Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

PHP (Professional Hypertext Preprocessor) based log collection and storage method and system

A caching system and log technology, applied in the network field, can solve problems such as the impact of database read and write capabilities, and achieve the effect of convenient collection and reduced writing pressure

Inactive Publication Date: 2015-11-04
CHENGDU STARCOR INFORMATION TECH
View PDF6 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For the storage scheme of the database, when the amount of log data is huge and the concurrency is high, it will have a huge impact on the read and write capabilities of the database

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • PHP (Professional Hypertext Preprocessor) based log collection and storage method and system
  • PHP (Professional Hypertext Preprocessor) based log collection and storage method and system
  • PHP (Professional Hypertext Preprocessor) based log collection and storage method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The principles and features of the present invention are described below in conjunction with the accompanying drawings, and the examples given are only used to explain the present invention, and are not intended to limit the scope of the present invention.

[0031] Explanation of terms involved in the present invention: PHP (foreign name: PHP: Hypertext Preprocessor, Chinese name: "hypertext preprocessor") is a general open source scripting language. Redis is an open-source, log-type, Key-Value database that is written in ANSIC language, supports network, can be memory-based or persistent, and provides APIs in multiple languages. MongoDB is a database based on distributed file storage, written in C++ language, designed to provide scalable high-performance data storage solutions for WEB applications.

[0032] figure 1 It is a flow chart of the method for collecting and storing logs based on PHP in the present invention.

[0033] like figure 1 As shown, a method for co...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention relates to a PHP (Professional Hypertext Preprocessor) based log collection and storage method and system. The method comprises the steps of: S1, reporting log data by a client; S2, collecting the log data and sending the log data to a Redis cache server by a log collection module; S3, storing the log data by the Redis cache server. S4, reading the log data line by line from the Redis cache server and sending the log data to a MongoDB database by a log asynchronous writing module; and S5, writing and storing the log data in the MongoDB database. According to the PHP based log collection and storage method and system, an effective log can be conveniently collected, reading and writing performances of the database are ensured to operate in a low-concurrency and low-IO-load range, and writing pressure of the storage database is reduced, so that the system can operate healthily and stably.

Description

technical field [0001] The invention relates to the field of network technology, in particular to a method and system for collecting and storing logs based on PHP. Background technique [0002] Now there are generally several ways to store log data, and the common one is to store it in local files or databases. For the storage scheme of the database, when the amount of log data is huge and the concurrency is high, it will have a huge impact on the read and write capabilities of the database. Contents of the invention [0003] The technical problem to be solved by the present invention is to provide a method and system for collecting and storing logs based on PHP. [0004] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: a method for collecting and storing logs based on PHP, comprising the following steps: [0005] Step S1, the client reports log data; [0006] Step S2, the log collection module collects the l...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/13G06F16/1815
Inventor 陈朱尧蔡华轶
Owner CHENGDU STARCOR INFORMATION TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products