CN101556591A - Method for efficiently writing complex contents to database - Google Patents

Method for efficiently writing complex contents to database Download PDF

Info

Publication number
CN101556591A
CN101556591A CNA2008101035801A CN200810103580A CN101556591A CN 101556591 A CN101556591 A CN 101556591A CN A2008101035801 A CNA2008101035801 A CN A2008101035801A CN 200810103580 A CN200810103580 A CN 200810103580A CN 101556591 A CN101556591 A CN 101556591A
Authority
CN
China
Prior art keywords
contents
content
database
library
clauses
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008101035801A
Other languages
Chinese (zh)
Inventor
汤海京
徐友春
朱红军
赵峰
孙涛
刘莹
蒋海涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wenyan Technology Co Ltd
Original Assignee
Beijing Wenyan 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 Beijing Wenyan Technology Co Ltd filed Critical Beijing Wenyan Technology Co Ltd
Priority to CNA2008101035801A priority Critical patent/CN101556591A/en
Publication of CN101556591A publication Critical patent/CN101556591A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for efficiently writing complex contents to a database. Firstly, a capturing program stores a plurality of contents into a local file according to a certain organization form; an entry program regularly inspects whether a content catalog has new contents or not; a memory is provided with caches, and the entry program loads the new contents in the caches; after the caches reach a certain number, the contents are transmitted to an entry module at mass; then, the entry module transmits the contents in the database in batch, and an ID of each item is arranged by the database; the entry program transfers a picture of each item into a resource catalog and stores the picture in the certain organization form according to the ID; finally, the entry program moves the items and the pictures into a backup catalog for examination by a management person; and the entry program regularly clears backup logs. The invention improves the efficiency for writing the contents into the database in such a way that the contents are cached in a file system and then enter the database in batch.

Description

A kind of method of efficiently writing complex contents to database
Technical field
The present invention relates to a kind of method of efficiently writing complex contents to database, particularly a kind of to write text to database efficiently long and contain the method for the content of picture.
Background technology
The content of the magnanimity that grasps from network needs a kind of mode that writes database efficiently, to alleviate the pressure of database.The present invention uses the cache contents in file system with content elder generation, criticizes the mode of warehouse-in again and extracts the efficient that writes database.
Summary of the invention
Technical matters to be solved by this invention provides that a kind of to write text to database efficiently long and contain the method for the content of picture.
The method of a kind of efficiently writing complex contents to database of the present invention, this method comprises following step at least:
Step 1: capture program is saved as local file with a large amount of contents by certain form of organization.
Step 2: go into library and make regular check on contents directory whether new content is arranged.
Step 3: buffer memory is set in internal memory, go into library new load content in buffer memory.
Step 4: buffer memory reaches after certain quantity, and content is sent in batches into library module.
Step 5: go into library module content is sent in the database in batches, come the ID of each clauses and subclauses of layout by database.
Step 6: go into library the picture of each clauses and subclauses is transferred in the Resource TOC, and deposit picture by certain form of organization according to ID.
Step 7: go into library clauses and subclauses and picture are moved in the backup directory, check in order to managerial personnel.
Step 8: go into library periodic cleaning backup log.
The method of a kind of efficiently writing complex contents to database of the present invention, capture program is saved as local file with a large amount of contents by certain form of organization, the steps include:
Step 11: in designated directory, with the ID that grasps task as the title md.
Step 12: character replacement such as the colon among the webpage url, oblique line are become underscore, as the title of second layer sub-directory; Clauses and subclauses of storage in this catalogue.
Step 13: in this sub-directory, setting up with Content.txt is the text of title.
The method of a kind of efficiently writing complex contents to database of the present invention is provided with buffer memory in internal memory, go into library new load content in buffer memory, its step is.
Step 31: read the Content.txt text, read each row successively, discern the information of this row by prefix.
Step 32: if the null of reading, will be the content of back as content.
The method of a kind of efficiently writing complex contents to database of the present invention, capture program is saved as local file with a large amount of contents by certain form of organization, and in this sub-directory, setting up with Content.txt is the text of title, the steps include:
Step 131:, be that prefix is saved as delegation with " Title: " with the clauses and subclauses title that grabs.
Step 132: the time is that prefix is saved as delegation with " Time: ".
Step 133: the Url of clauses and subclauses is that prefix is saved as delegation with " Url: ".
Step 134: stay null, a memory contents then.
Step 135: picture is named as respectively in order: 0.jpg, 1.jpg, 2.jpg etc.
The method of a kind of efficiently writing complex contents to database that the present invention relates to makes content elder generation cache contents in file system, criticizes the mode of warehouse-in again and extracts the efficient that writes database.
Description of drawings
Fig. 1 is a process flow diagram of the present invention.
Embodiment
Referring to Fig. 1, key step of the present invention is as follows:
Step 1: capture program is saved as local file with a large amount of contents by certain form of organization.
Step 2: go into library and make regular check on contents directory whether new content is arranged.
Step 3: buffer memory is set in internal memory, go into library new load content in buffer memory.
Step 4: buffer memory reaches after certain quantity, and content is sent in batches into library module.
Step 5: go into library module content is sent in the database in batches, come the ID of each clauses and subclauses of layout by database.
Step 6: go into library the picture of each clauses and subclauses is transferred in the Resource TOC, and deposit picture by certain form of organization according to ID.
Step 7: go into library clauses and subclauses and picture are moved in the backup directory, check in order to managerial personnel.
Step 8: go into library periodic cleaning backup log.
Above-mentioned steps 1 capture program is as follows by the concrete steps that certain form of organization is saved as local file with a large amount of contents:
Step 11: in designated directory, with the ID that grasps task as the title md.
Step 12: character replacement such as the colon among the webpage url, oblique line are become underscore, as the title of second layer sub-directory; Clauses and subclauses of storage in this catalogue.
Step 13: in this sub-directory, setting up with Content.txt is the text of title.
Above-mentioned steps 13 is in this sub-directory, and setting up with Content.txt is that the concrete steps of text of title are as follows:
Step 131:, be that prefix is saved as delegation with " Title: " with the clauses and subclauses title that grabs.
Step 132: the time is that prefix is saved as delegation with " Time: ".
Step 133: the Url of clauses and subclauses is that prefix is saved as delegation with " Url: ".
Step 134: stay null, a memory contents then.
Step 135: picture is named as respectively in order: 0.jpg, 1.jpg, 2.jpg etc.
Above-mentioned steps 3 is provided with buffer memory in internal memory, it is as follows to the concrete steps in the buffer memory new load content to go into library:
Step 31: read the Content.txt text, read each row successively, discern the information of this row by prefix.
Step 32: if the null of reading, will be the content of back as content.
When technique scheme is implemented, alleviated the pressure of database during the content of the magnanimity that grasps from network.
It should be noted last that above embodiment is only in order to explanation and unrestricted technical scheme described in the invention; Therefore, although this instructions has been described in detail the present invention with reference to the above embodiments,, those of ordinary skill in the art should be appreciated that still and can make amendment or replacement to the present invention with being equal to; And all do not break away from the technical scheme and the improvement thereof of the spirit and scope of the present invention, and it all should be encompassed in the middle of the claim scope of the present invention.

Claims (4)

1, a kind of method of efficiently writing complex contents to database is characterized in that: this method comprises following step at least:
Step 1: capture program is saved as local file with a large amount of contents by certain form of organization.
Step 2: go into library and make regular check on contents directory whether new content is arranged.
Step 3: buffer memory is set in internal memory, go into library new load content in buffer memory.
Step 4: buffer memory reaches after certain quantity, and content is sent in batches into library module.
Step 5: go into library module content is sent in the database in batches, come the ID of each clauses and subclauses of layout by database.
Step 6: go into library the picture of each clauses and subclauses is transferred in the Resource TOC, and deposit picture by certain form of organization according to ID.
Step 7: go into library clauses and subclauses and picture are moved in the backup directory, check in order to managerial personnel.
Step 8: go into library periodic cleaning backup log.
2, the method for a kind of efficiently writing complex contents to database according to claim 1 is characterized in that capture program is saved as local file with a large amount of contents by certain form of organization, the steps include:
Step 11: in designated directory, with the ID that grasps task as the title md.
Step 12: character replacement such as the colon among the webpage ur1, oblique line are become underscore, as the title of second layer sub-directory; Clauses and subclauses of storage in this catalogue.
Step 13: in this sub-directory, setting up with Content.txt is the text of title.
3, the method for a kind of efficiently writing complex contents to database according to claim 1 is characterized in that buffer memory is set in internal memory, go into library new load content in buffer memory, the steps include:
Step 31: read the Content.txt text, read each row successively, discern the information of this row by prefix.
Step 32: if the null of reading, will be the content of back as content.
4, capture program according to claim 2 is saved as local file with a large amount of contents by certain form of organization, it is characterized in that in this sub-directory, and setting up with Content.txt is the text of title, after its step is:
Step 131:, be that prefix is saved as delegation with " Title: " with the clauses and subclauses title that grabs.
Step 132: the time is that prefix is saved as delegation with " Time: ".
Step 133: the Ur1 of clauses and subclauses is that prefix is saved as delegation with " Ur1: ".
Step 134: stay null, a memory contents then.
Step 135: picture is named as respectively in order: 0.jpg, 1.jpg, 2.jpg etc.
CNA2008101035801A 2008-04-09 2008-04-09 Method for efficiently writing complex contents to database Pending CN101556591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008101035801A CN101556591A (en) 2008-04-09 2008-04-09 Method for efficiently writing complex contents to database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008101035801A CN101556591A (en) 2008-04-09 2008-04-09 Method for efficiently writing complex contents to database

Publications (1)

Publication Number Publication Date
CN101556591A true CN101556591A (en) 2009-10-14

Family

ID=41174708

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008101035801A Pending CN101556591A (en) 2008-04-09 2008-04-09 Method for efficiently writing complex contents to database

Country Status (1)

Country Link
CN (1) CN101556591A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996244A (en) * 2010-11-09 2011-03-30 中兴通讯股份有限公司 Device, system and method for inputting batch data into database
CN102087650B (en) * 2009-12-08 2012-10-31 北大方正集团有限公司 Method and device for displaying electronic document
CN103945013A (en) * 2013-01-17 2014-07-23 方正宽带网络服务股份有限公司 Data transmission interface device and data transmission method
CN111459950A (en) * 2019-01-18 2020-07-28 北京字节跳动网络技术有限公司 Data updating method and device
CN111966670A (en) * 2020-07-08 2020-11-20 成都星时代宇航科技有限公司 Remote sensing data distribution method and device based on mosaic data set and management platform

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087650B (en) * 2009-12-08 2012-10-31 北大方正集团有限公司 Method and device for displaying electronic document
CN101996244A (en) * 2010-11-09 2011-03-30 中兴通讯股份有限公司 Device, system and method for inputting batch data into database
WO2012062010A1 (en) * 2010-11-09 2012-05-18 中兴通讯股份有限公司 Device, system and method for batch data storage
CN103945013A (en) * 2013-01-17 2014-07-23 方正宽带网络服务股份有限公司 Data transmission interface device and data transmission method
CN111459950A (en) * 2019-01-18 2020-07-28 北京字节跳动网络技术有限公司 Data updating method and device
CN111966670A (en) * 2020-07-08 2020-11-20 成都星时代宇航科技有限公司 Remote sensing data distribution method and device based on mosaic data set and management platform

Similar Documents

Publication Publication Date Title
CN102035881B (en) Data caching method of cloud storage system
CN102906751B (en) A kind of method of data storage, data query and device
CN100530186C (en) Method and system for processing buffer
CN104317926B (en) The data storage and query method and corresponding device and system of a kind of persistence
CN101848231B (en) Method and system for data transmission
CN102012933B (en) Distributed file system and method for storing data and providing services by utilizing same
CN101082927B (en) File services method based on ContextFS context file systems
CN101556591A (en) Method for efficiently writing complex contents to database
CN105243155A (en) Big data extracting and exchanging system
CN101808121A (en) Method and device for writing server log of mobile terminal into database
CN102508919B (en) Data processing method and system
CN106909470A (en) Distributed file system storage method and device based on correcting and eleting codes
CN106990975A (en) One kind application heat deploying method, device and system
CN102033917A (en) Webpage browsing method for mobile terminal and mobile terminal applying same
CN110989937B (en) Data storage method, device and equipment and computer readable storage medium
CN102238223B (en) Networked personal data management method for mobile device
CN106055274A (en) Data storage method, data reading method and electronic device
CN104750741A (en) Invalid link processing method and invalid link processing device
CN102567313B (en) Progressive webpage library deduplication system and its implementation
CN101739412A (en) Web page safety evaluating device and web page safety evaluating method for intelligent card
CN106599115A (en) Data protection method and device and terminal
CN106874399A (en) One kind networking standby system and backup method
CN104657359A (en) Webpage content and style recording method by using website
CN104424188A (en) System and method for updating obtained webpage data
CN103455547A (en) Method and device for webpage load

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20091014