CN110609818B - Log processing method and device - Google Patents

Log processing method and device Download PDF

Info

Publication number
CN110609818B
CN110609818B CN201810530899.6A CN201810530899A CN110609818B CN 110609818 B CN110609818 B CN 110609818B CN 201810530899 A CN201810530899 A CN 201810530899A CN 110609818 B CN110609818 B CN 110609818B
Authority
CN
China
Prior art keywords
log
folder
server
target
data server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810530899.6A
Other languages
Chinese (zh)
Other versions
CN110609818A (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.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201810530899.6A priority Critical patent/CN110609818B/en
Publication of CN110609818A publication Critical patent/CN110609818A/en
Application granted granted Critical
Publication of CN110609818B publication Critical patent/CN110609818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a log processing method and a log processing device, wherein the log processing method is applied to a video network, the video network comprises a main control server and a data server, and the method comprises the following steps: the data server detects whether a target log folder exists locally; if the target log folder is not detected, the data server establishes the target log folder according to a preset rule; the data server receives a write-in instruction sent by the master control server, wherein the write-in instruction carries log information; and the data server writes the log information into a target log folder. The invention provides a log processing scheme applicable to video networking, which enables a user to acquire the state information of a server in the video networking in time by inquiring the recorded log information in a log folder, further enables troubleshooting and daily maintenance of the video networking server, and effectively improves the reliability and stability of the video networking server.

Description

Log processing method and device
Technical Field
The invention relates to the technical field of video networking, in particular to a log processing method and device.
Background
The log system, also known as a system log, is used to record information about hardware, software and system problems in the system, and also to monitor events occurring in the system. The user can locate the fault reason by browsing the log information recorded in the system log.
In the existing video networking, due to the lack of a log system, an operator cannot quickly locate and troubleshoot faults in a video networking server, so that after the video networking server fails, the repair cycle is long, and the user experience is seriously influenced.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are provided to provide a log processing method and apparatus that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a log processing method, which is applied to a video network, where the video network includes a master control server and a data server, and the method includes:
the data server detects whether a target log folder exists locally;
if the target log folder is not detected, the data server establishes the target log folder according to a preset rule;
the data server receives a write-in instruction sent by the master control server, wherein the write-in instruction carries log information;
and the data server writes the log information into a target log folder.
In a second aspect, the present invention further provides a log processing apparatus applied to a video network, where the video network includes a co-master server and a data server, and the apparatus includes:
the detection module is used for detecting whether a target log folder exists locally;
the establishing module is used for establishing a target log folder according to a preset rule if the target log folder is not detected;
the receiving module is used for receiving a write-in instruction sent by the master control server, wherein the write-in instruction carries log information;
and the writing module is used for writing the log information into the target log folder.
The embodiment of the invention has the following advantages:
the embodiment of the invention applies the characteristics of the video network, introduces the log system into the data server of the video network, and enables the data server to establish the log folder which accords with the preset rule, thereby enabling an operator to search the established log folder according to the content of the preset rule so as to quickly position the log folder which needs to be searched. In addition, an operator can acquire the current state of each server in the video network according to the log information recorded in the log folder, and can perform fault reason positioning and troubleshooting on the generated fault, so that the reliability and the stability of the video network server are effectively improved, and the user experience is further improved.
Drawings
FIG. 1 is a schematic networking diagram of a video network of the present invention;
FIG. 2 is a schematic diagram of a hardware architecture of a node server according to the present invention;
fig. 3 is a schematic diagram of a hardware structure of an access switch of the present invention;
fig. 4 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present invention;
FIG. 5 is a flow chart of the steps of a method embodiment of the present invention for log processing;
FIG. 6 is a flowchart illustrating steps for one embodiment of a user query log file;
FIG. 7 is a block diagram of a log processing apparatus according to an embodiment of the present invention;
FIG. 8 is a second block diagram of the log processing apparatus according to the second embodiment of the present invention;
FIG. 9 is a third block diagram of an embodiment of a log processing apparatus according to the present invention;
FIG. 10 is a fourth block diagram of the log processing apparatus according to an embodiment of the present invention;
FIG. 11 is a block diagram of a log processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The video networking is an important milestone of network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of Internet applications to high-definition video, and high definition is face-to-face.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network Technology (Network Technology)
Network technology innovation in video networking has improved over traditional Ethernet (Ethernet) to face the potentially enormous video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video network is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the large-scale high-definition video real-time transmission of the whole network which can not be realized by the current Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
The server technology on the video network and the unified video platform is different from the traditional server, the streaming media transmission of the video network and the unified video platform is established on the basis of connection orientation, the data processing capability of the video network and the unified video platform is irrelevant to flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 1, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server may be directly connected to the access switch or may be directly connected to the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure controlled by a hierarchical centralized way, and the network controlled by the node server and the metropolitan area server can be in various structures such as a tree, a star, a ring and the like.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may interconnect and interwork via metropolitan and wide area video networks.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: servers, switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 the devices of the access network part can be mainly classified into 3 types: node servers, access switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
as shown in fig. 2, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the packets coming from the network interface module 201, the cpu module 203 and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 polls all packet buffer queues for forwarding if the following conditions are met: 1) The port send buffer is not full; 2) The queued packet counter is greater than zero. The disk array module 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 204.
The access switch:
as shown in fig. 3, the network interface module mainly includes a network interface module (a downlink network interface module 301 and an uplink network interface module 302), a switching engine module 303 and a CPU module 304;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the data packet coming from the CPU module 204 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues, which in this embodiment of the present invention is divided into two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) The port send buffer is not full; 2) The queued packet counter is greater than zero; 3) Obtaining a token generated by a code rate control module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) The port send buffer is not full; 2) The queue packet counter is greater than zero.
The rate control module 208 is configured by the CPU module 204, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol conversion gateway
As shown in fig. 4, the apparatus mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a rate control module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2 byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 detects the sending buffer of the port, if there is a packet, the ethernet MAC DA of the corresponding terminal is known according to the destination address DA of the packet in the video network, the ethernet MAC DA of the terminal, the MAC SA of the ethernet protocol gateway, and the ethernet length or frame type are added, and the packet is sent.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), source Address (SA), reserved bytes, payload (PDU), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), and is defined to be the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to the types of different datagrams, 64 bytes if various protocol packets, 32+1024=1056 bytes if single-multicast data packets, and certainly not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In the present specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and there are 2 labels for the packet from the device B to the device a. The label is divided into an in label and an out label, and assuming that the label (in label) of the data packet entering the device a is 0x0000, the label (out label) of the data packet leaving the device a may become 0x0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are all passively executed, which is different from label allocation of MPLS, which is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA SA Reserved label (R) Payload CRC
Namely Destination Address (DA), source Address (SA), reserved byte (Reserved), tag, payload (PDU), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, which is located between the reserved bytes and the payload of the packet.
Based on the characteristics of the video networking, one of the core concepts of the embodiments of the present invention is provided, and the data server may locally establish a target log folder meeting a predetermined rule according to a protocol of the video networking, and the log information is absorbed into the target log folder according to a write-in instruction sent by the main control server, so that a log processing scheme applicable to the video networking can be provided, the log folder can be generated in the data server, the log information in daily operation is recorded, and a user can acquire the state information of the server in the video networking in time by querying the recorded log information in the log folder, so that the fault troubleshooting and daily maintenance of the video networking server can be performed, and the reliability and stability of the video networking server are effectively improved.
Referring to fig. 5, a flowchart illustrating steps of an embodiment of a log processing method according to the present invention is shown, where the method may be applied to a video network, where the video network includes a master server and a data server, and specifically includes the following steps:
step 501, the data server detects whether a target log folder exists locally.
Specifically, in the embodiment of the present invention, a database exists in the data server, the database is used for storing a log folder, and a user can obtain log information recorded in the log folder by accessing the database. In an embodiment of the invention, the data server detects whether a target log folder exists in the local storage, i.e. the database. In one embodiment, the data server may start the main program at a fixed time every day to enable the main program to perform a detection operation on whether the target log folder exists. In an embodiment of the present invention, step 501 may specifically include:
and a substep 11, the data server inquires about the current date.
Specifically, in an embodiment of the present invention, the data server queries for the current date. In one embodiment, the time module in the data server may synchronize the time, and the data server may query the current date from the time module.
In sub-step 12, the data server detects whether a log folder named by the current date is locally stored.
Specifically, in the embodiment of the present invention, the data server detects whether a log folder named by the current date exists locally. In the embodiment of the invention, in order to distinguish daily log folders, the log folders in the data server are established by taking days as units, namely, corresponding log folders are generated every day, and the current log information is recorded.
And a substep 13 of determining that the target log folder does not exist if the log folder named by the current date is not detected.
Specifically, in the embodiment of the present invention, if the data server does not detect the log folder named by the current date, it may be determined that the target log folder does not exist currently.
Step 502, if the target log folder is not detected, the data server establishes the target log folder according to a predetermined rule.
Specifically, in the embodiment of the present invention, if the data server does not detect the target log folder, the data server locally obtains a predetermined rule, and establishes the target log folder based on the predetermined rule. In the embodiment of the invention, the data server establishes the predetermined rule in advance according to the input instruction of the operator. In the embodiment of the present invention, the step of establishing, by the data server, the target log folder according to the predetermined rule specifically includes:
substep 21, the data server creates a target log folder and names the target log folder with the current date.
Specifically, in the embodiment of the present invention, the data server creates a new log folder, and names the log folder with the queried current date to generate the target log folder.
In sub-step 22, the data server generates an operation log file and an error log file in the target log folder.
Specifically, in the embodiment of the present invention, after the data server generates the target log folder, the data server generates the operation log file and the error log file in the target log folder. In one embodiment, the operation log file is used for recording operation records of a user when accessing the video network server. In another embodiment, the error log file is used to record error operation records that occur when a user accesses the video network server. The specific writing method will be described in detail in the following examples.
Step 503, the data server receives a write-in instruction sent by the master control server, where the write-in instruction carries log information.
Specifically, in the embodiment of the present invention, the master control server may obtain an action record of the user when accessing the video network server, so as to generate a corresponding write instruction, and send the write instruction to the data server.
Step 504, the data server writes the log information into the target log folder.
Specifically, in the embodiment of the present invention, after receiving the write instruction, the data server obtains the log information therein, and writes the log information into the target log folder.
Specifically, in the embodiment of the present invention, step 504 specifically includes:
in sub-step 31, the data server queries whether the log information includes error log information.
And a substep 32, writing the error log information into an error log file if the error log information exists.
And a substep 33 of writing the log information into the operation log file if there is no error log information.
Specifically, in the embodiment of the present invention, when accessing the video network, the user issues an access instruction to the master control server, where the access instruction is used to instruct the master control server to perform operations such as data query and data extraction according to the instruction. And the main control server sends a processing instruction to the corresponding server based on the instruction so as to control the server to perform service processing such as data query. In a preferred embodiment, taking a data server as an example, assuming that a user desires to access a database in the data server to query data a and extract data B, after a service logic layer in the data server obtains a processing instruction, an instruction information carried in the instruction is obtained, that is, the data a is queried and the data B is extracted. In a preferred embodiment, the business logic layer may include a plurality of sub-logic layers, such that different business processes are processed in parallel by the plurality of sub-logic layers. For example, the following steps are carried out: the service logic layer can comprise a query sub-logic layer and an extraction sub-logic layer, the query sub-logic layer can be used for querying the data A according to the indication information, and the extraction sub-logic layer can be used for extracting the data B according to the indication information, so that parallel processing is realized, and the processing speed is further improved.
In the embodiment of the present invention, the data server further includes different layers for processing services, such as a database abstraction layer, in addition to the service logic layer. And after each layer processes corresponding services, returning the operation records to the master control server, and indicating the data server with the established log system to record corresponding log information by the master control server.
In an embodiment, still taking the data server as an example, after the data server completes the corresponding service processing, the data server returns information related to the operation action to the master control server, where the related information may include operation action content, for example: inquiring data A, inquiring time, inquiring position and other information. And after receiving the operation action related information, the main control server generates a write-in instruction and sends the write-in instruction to a data server with a log system. And the data server acquires the log information in the write-in instruction, and writes the log information into an operation record log file when detecting that the log information carried in the write-in instruction is operation record information and does not include error log information. In a preferred embodiment of the present invention, the log folder may further include other types of files such as a database operation log file besides the operation record log file, for example: the log information generated by the operation actions related to the access of the user to the database can be recorded in the database operation log file, and the log information generated by the access of the user to other service servers can be recorded in the service operation log file, so that the user can acquire the required information more quickly and accurately when inquiring the log file by classifying the log files.
In another embodiment, if the data server performs the corresponding service processing, an error occurs, for example: the acquisition of the B data fails. And then, the data server returns the error information to the main control server, and the main control server generates a write-in instruction carrying the error log information based on the error information. And the master control server sends the writing instruction to a data server establishing a date-to-date system. And when the data server detects that the write-in instruction carries error log information, writing the error log information into an error log file.
In the embodiment of the invention, when a user desires to check the log files recorded in the video network, the video network can be connected through the mobile terminal, so that the access operation of the user to the day-to-day system is realized.
Referring to fig. 6, a flowchart illustrating steps of an embodiment of querying a log file by a user according to the present invention is shown, in this embodiment, a collaboration server is further included in a video network, and the specific steps include:
step 601, the cooperative conversion server receives a query instruction sent by the mobile terminal, wherein the query instruction carries at least one of the following: and inquiring date and name of a log folder.
Specifically, in the embodiment of the present invention, when a user accesses a video network, the user may connect to a collaboration server in the video network through a mobile terminal, and send a query instruction to the video network through the mobile terminal, where in the embodiment of the present invention, the query instruction carries at least one of the following: query date, log folder name, etc. The query date is the date to which the log to be queried belongs, for example, if an operator needs to query a log file of 1 month and 1 day, the query date carried in the query instruction is 1 month and 1 day.
In addition, in the embodiment of the invention, the mobile terminal and the protocol conversion server of the video network interact by using an internet protocol.
Step 602, the protocol conversion server converts the query instruction into an instruction conforming to the video networking protocol, and sends the converted query instruction to the main control server through the video networking protocol, and the main control server forwards the converted query instruction to the data server.
Specifically, in the embodiment of the present invention, the protocol conversion server receives the query instruction sent by the mobile terminal, and then turns the query instruction conforming to the internet protocol into an instruction conforming to the video networking protocol. And then, the protocol conversion server sends the converted query instruction to a main control server of the video network through a video network protocol. The main control server forwards the received query instruction to the data server.
Step 603, the data server searches a corresponding log folder in the plurality of locally stored log folders according to the received converted query instruction.
Specifically, in the embodiment of the present invention, the data server searches, according to the received query instruction conforming to the video networking protocol, a log folder corresponding to information such as a query date carried in the query instruction, from among a plurality of log folders locally stored in the data server.
Step 604, the data server sends the found log folder to the main control server, and the main control server forwards the found log folder to the cooperation server.
Specifically, in the embodiment of the present invention, the data server extracts the found log folder and the log files in the log folder, and sends the extracted log files to the master control server. And the master control server forwards the log file folder and the plurality of log files in the log file folder to the protocol conversion server.
Step 605, the collaboration server converts the log file in the log folder into a file conforming to the internet protocol, and sends the converted log file to the mobile terminal through the internet protocol.
Specifically, in the embodiment of the present invention, after receiving the log folder conforming to the video networking protocol, the protocol conversion server extracts all log files in the log folder, and converts the extracted log files into log files conforming to the internet protocol. And then, the cooperative conversion server rewrites the converted log files into a log folder and sends the log folder conforming to the Internet protocol to the mobile terminal through the Internet protocol. An operator can view a plurality of log files in the log folder through the mobile terminal. In the embodiment of the invention, an operator can inquire the log files in the video network by using the mobile terminal, so that a convenient and quick log inquiry mode is provided, the operator can connect the video network at any time and any place through the mobile terminal and check the log files in the video network, the fault maintenance efficiency of the video network is further improved, and the user experience is improved.
It should be noted that for simplicity of description, the method embodiments are shown as a series of combinations of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those of skill in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the embodiments of the invention.
Referring to fig. 7, a block diagram of a log processing apparatus according to an embodiment of the present invention is shown, where the apparatus may be applied in a video network, and specifically includes the following modules:
the detecting module 701 is configured to detect whether a target log folder exists locally.
The establishing module 702 is configured to, if the target log folder is not detected, establish the target log folder according to a predetermined rule.
The receiving module 703 is configured to receive a write instruction sent by the main control server, where the write instruction carries log information.
A writing module 704, configured to write the log information into the target log folder.
Referring to fig. 8, in a preferred embodiment of the present invention, on the basis of fig. 6, the video network further includes a collaboration server, and the apparatus further includes:
the searching module 705 is configured to search a corresponding log folder in the plurality of local log folders according to a second query instruction from the protocol conversion server, where the second query instruction is obtained by sending the mobile terminal to the protocol conversion server and converting the second query instruction by the protocol conversion server according to a video networking protocol;
and a returning module 706, configured to return the found log folder to the protocol conversion server, so that the protocol conversion server converts the log file in the log folder according to the video networking protocol and sends the converted log file to the mobile terminal.
Referring to fig. 9, in a preferred embodiment of the present invention, on the basis of fig. 6, the detecting module 701 includes:
a first query submodule 7011, configured to query the current date.
The detecting sub-module 7012 is configured to detect whether a log folder named by the current date is stored locally.
The determining sub-module 7013 is configured to determine that the target log folder does not exist if the log folder named by the current date is not detected.
Referring to fig. 10, in a preferred embodiment of the present invention, on the basis of fig. 7, the establishing module 702 includes:
the creating sub-module 7021 is configured to create a target log folder and to name the target log folder by the current date.
The generating submodule 7022 is configured to generate an operation log file and an error log file in the target log folder.
Referring to fig. 11, in a preferred embodiment of the present invention, on the basis of fig. 7, the writing module 704 includes:
the second query submodule 7041 is configured to query whether the log information includes error log information.
The write-in sub-module 7042 is configured to, if there is error log information, write the error log information into an error log file.
The writing sub-module 7042 is further configured to write the log information into the operation log file if there is no error log information.
For the apparatus and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "include", "including" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrases "comprising one of \ 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The above detailed description is provided for the log processing method and apparatus provided by the present invention, and a specific example is applied in the present text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A log processing method is applied to a video network, wherein the video network comprises a master control server, a data server and a protocol conversion server, and the method comprises the following steps:
the data server detects whether a target log folder exists locally;
if the target log folder is not detected, the data server establishes the target log folder according to a preset rule; the target log folder at least comprises an operation log file and an error log file, and the error log file is used for recording error operation records generated when a user accesses the video network server;
the data server receives a write-in instruction sent by the master control server, wherein the write-in instruction carries log information;
the data server writes the log information into the target log folder;
the data server searches a corresponding log folder in a plurality of local log folders according to a second query instruction from the protocol conversion server, wherein the second query instruction is sent to the protocol conversion server by the mobile terminal and is obtained after the protocol conversion by the protocol conversion server according to a video networking protocol;
and the data server returns the searched log folder to the protocol conversion server, so that the protocol conversion server converts the log file in the log folder according to the video networking protocol and sends the converted log file to the mobile terminal.
2. The method according to claim 1, wherein the step of detecting whether the target log folder exists locally specifically includes:
the data server inquires the current date;
the data server detects whether a log folder named by the current date is stored locally;
and if the log folder named by the current date is not detected, determining that the target log folder does not exist.
3. The method according to claim 1, wherein the step of creating the target log folder according to a predetermined rule specifically comprises:
the data server establishes the target log folder and names the target log folder by the current date;
and the data server generates an operation log file and an error log file in the target log folder.
4. The method according to claim 3, wherein the step of writing the log information into the target log folder specifically comprises:
the data server inquires whether the log information comprises error log information or not;
if the error log information exists, writing the error log information into the error log file;
and if the error log information does not exist, writing the log information into the operation log file.
5. A log processing device is applied to a video network, wherein the video network comprises a protocol conversion server, a master control server, a data server and a protocol conversion server, and the log processing device comprises:
the detection module is used for detecting whether a target log folder exists locally;
the establishing module is used for establishing the target log folder according to a preset rule if the target log folder is not detected; the target log folder at least comprises an operation log file and an error log file, and the error log file is used for recording error operation records generated when a user accesses the video network server;
the receiving module is used for receiving a write-in instruction sent by the master control server, wherein the write-in instruction carries log information;
the writing module is used for writing the log information into the target log folder;
the searching module is used for searching a corresponding log folder in a plurality of local log folders according to a second query instruction from the protocol conversion server, wherein the second query instruction is sent to the protocol conversion server by the mobile terminal and is obtained after the protocol conversion by the protocol conversion server according to a video networking protocol;
and the return module is used for returning the searched log folder to the protocol conversion server so that the protocol conversion server converts the log files in the log folder according to the video networking protocol and then sends the converted log files to the mobile terminal.
6. The apparatus of claim 5, wherein the detection module comprises:
the first inquiry submodule is used for inquiring the current date;
the detection submodule is used for detecting whether a log folder named by the current date is locally stored;
and the determining submodule is used for determining that the target log folder does not exist if the log folder named by the current date is not detected.
7. The apparatus of claim 5, wherein the establishing module comprises:
the establishing submodule is used for establishing the target log folder and naming the target log folder by the current date;
and the generating submodule is used for generating an operation log file and an error log file in the target log folder.
8. The apparatus of claim 7, wherein the write module comprises:
the second query submodule is used for querying whether the log information comprises error log information or not;
the writing sub-module is used for writing the error log information into the error log file if the error log information exists;
the writing sub-module is used for writing the log information into the operation log file if the error log information does not exist.
CN201810530899.6A 2018-05-29 2018-05-29 Log processing method and device Active CN110609818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810530899.6A CN110609818B (en) 2018-05-29 2018-05-29 Log processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810530899.6A CN110609818B (en) 2018-05-29 2018-05-29 Log processing method and device

Publications (2)

Publication Number Publication Date
CN110609818A CN110609818A (en) 2019-12-24
CN110609818B true CN110609818B (en) 2022-11-25

Family

ID=68887530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810530899.6A Active CN110609818B (en) 2018-05-29 2018-05-29 Log processing method and device

Country Status (1)

Country Link
CN (1) CN110609818B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198855B (en) * 2019-12-31 2023-07-25 深圳移航通信技术有限公司 Log data processing method and device
CN111581171A (en) * 2020-04-30 2020-08-25 中国工商银行股份有限公司 Log processing method and device, computing equipment and medium
CN113283884A (en) * 2020-12-31 2021-08-20 深圳怡化电脑股份有限公司 Log processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793479A (en) * 2014-01-14 2014-05-14 上海上讯信息技术股份有限公司 Log management method and log management system
CN104580372A (en) * 2014-12-12 2015-04-29 安徽富煌和利时科技股份有限公司 Method for transmitting status files of electronic station board IPCs (Industrial Personal Computer)
CN107959602A (en) * 2016-10-14 2018-04-24 北京视联动力国际信息技术有限公司 A kind of method of network entry and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8676958B1 (en) * 2006-02-10 2014-03-18 Open Invention Network, Llc System and method for monitoring the status of multiple servers on a network
CN104572413B (en) * 2013-10-29 2017-11-24 上海斐讯数据通信技术有限公司 A kind of electronic equipment preserves the method and electronic equipment of system journal
CN103870560A (en) * 2014-03-06 2014-06-18 上海爱数软件有限公司 Log managing method for cluster
CN106294041A (en) * 2016-07-22 2017-01-04 厦门美图移动科技有限公司 Method, device and the mobile terminal of a kind of BUG information reporting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793479A (en) * 2014-01-14 2014-05-14 上海上讯信息技术股份有限公司 Log management method and log management system
CN104580372A (en) * 2014-12-12 2015-04-29 安徽富煌和利时科技股份有限公司 Method for transmitting status files of electronic station board IPCs (Industrial Personal Computer)
CN107959602A (en) * 2016-10-14 2018-04-24 北京视联动力国际信息技术有限公司 A kind of method of network entry and device

Also Published As

Publication number Publication date
CN110609818A (en) 2019-12-24

Similar Documents

Publication Publication Date Title
CN109672856B (en) Resource synchronization method and device
CN109889780B (en) Data synchronization method and device
CN111193788A (en) Audio and video stream load balancing method and device
CN109617956B (en) Data processing method and device
CN110190973B (en) Online state detection method and device
CN109474715B (en) Resource configuration method and device based on video network
CN110113566B (en) Method and device for calling video stream
CN110719258B (en) Server access method and system
CN109743550B (en) Method and device for monitoring data flow regulation
CN109819062B (en) Method and device for accessing network by using virtual MAC address
CN109660753B (en) Resource synchronization method and device
CN110475131B (en) Terminal connection method, server and terminal
CN110609818B (en) Log processing method and device
CN110224988B (en) Image data processing method, system and device and storage medium
CN110557608B (en) Resource monitoring method, device and computer readable storage medium
CN110134892B (en) Loading method and system of monitoring resource list
CN108989896B (en) Video-on-demand request processing method and device
CN110784683B (en) Management method, device and storage medium for monitoring resources
CN110381029B (en) Monitoring resource synchronization method and device
CN110120937B (en) Resource acquisition method, system, device and computer readable storage medium
CN109688073B (en) Data processing method and system based on video network
CN110768854B (en) Data statistics method and device based on video network
CN111479138B (en) Server detection method and device
CN110971479B (en) Server detection method, device and system based on video network
CN109743636B (en) Method and device for sharing video networking disk data

Legal Events

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