CN104281668A - Data processing method - Google Patents
Data processing method Download PDFInfo
- Publication number
- CN104281668A CN104281668A CN201410506767.1A CN201410506767A CN104281668A CN 104281668 A CN104281668 A CN 104281668A CN 201410506767 A CN201410506767 A CN 201410506767A CN 104281668 A CN104281668 A CN 104281668A
- Authority
- CN
- China
- Prior art keywords
- data
- application program
- caching system
- database
- processing method
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/3012—Organisation of register space, e.g. banked or distributed register file
- G06F9/30123—Organisation of register space, e.g. banked or distributed register file according to context, e.g. thread buffers
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a data processing method. The data processing method includes a process when an application program updates or writes in data and a process when the application program reads the data. The process when the application program updates or writes in the data includes that if data exist inside a cache system, the data are updated or written in to the cache system and a database, and if the data do not exist inside the cache system, the cache system is empty, and the data are updated or written in to the database only; the process when the application program reads the data includes that if the data required by the application program exist in the cache system, the data are directly returned to the application program, and if the data required by the application program do not exist in the cache system, the cache system accesses the database. The data processing method has the advantages that uniformity of the data is guaranteed; the application program only needs to interact with the cache system when requesting the data, so that direct access, to the database, of the application program is avoided, and interaction objects are reduced.
Description
Technical field
The present invention relates to a kind of computer realm, more particularly, relate to the disposal route that a kind of database is different with caching system application programs data.
Background technology
During present application requests data, usual elder generation is to cache request data, if there is not application program desired data in buffer memory, then return sky data or application program again to request msg in database, this flow process result in application program to be needed to carry out alternately with multiple data system, and efficiency is lower.
The correlation technique of current existence, such as disclosed in 2008-06-18, publication number is the Chinese invention " a kind of method of access data base by multi-line program applied program " of 100395710C, this invention provides a kind of method of access data base by multi-line program applied program, by the JDBC mode accessing database of JAVA, to improve database access performance.And the invention provides buffer memory and database two kinds of access modes, and provide same api interface, what the data that user need not understand needed for him come from, accelerates the access speed of database and caching system, need not access the connection all going to create buffer memory and database at every turn.
And for example disclosed in 2013-05-22, publication number is the Chinese invention " supporting the system of high concurrent cache task queue and asynchronous batch process thereof " of 103116634A, described method is that the data of mobile terminal request are put in request queue, uses a thread to carry out Timing Processing on backstage to each request queue.This invention mainly adopts asynchronous mode of operation, more inconsistent than being easier to produce data, and the present invention is by synchronously carrying out data processing, and utilizes multithreading to remove accessing database, accelerates operating speed.
Summary of the invention
The technical problem to be solved in the present invention, be to provide a kind of data processing method, the consistent of application program and caching system data is ensure that to caching system write data by application program, and only need carry out alternately with caching system during application requests data, avoid application program directly to the access of database, decrease interactive object.
The present invention is achieved in that a kind of data processing method, and described method comprises the process of application program update or write data and the process of application program reading data:
The process of described application program update or write data is: when application program is to caching system write data, first judge whether caching system inside itself has data: if caching system inside itself does not have data, namely caching system is empty, then only write data to database; If itself there are data caching system inside, then caching system are upgraded and write data to database; This ensure that the consistance of application program and caching system data;
The process that described application program reads data comprises the steps:
Step 20, application program are to caching system request msg;
Step 21, judge whether caching system inside exists the data that application program asks: the data that application program asks if exist in caching system, then these data are directly returned to application program, if there are not the data that application program is asked in caching system, then by caching system accessing database;
Step 22, judge whether to exist in database the data that application program asks: the data that application program asks if exist in database, then will return these data to application program by caching system in this Data import to caching system, during so next application requests identical data, database lookup need not be removed again, decrease the pressure of database; If there are not the data that application program is asked in database, then directly return sky data to application program.
Further, described caching system accessing database is by creating thread pool on the server, pre-sets the connection management of caching system and database and realizes, and all again will create connection when this avoid each accessing database of caching system.
Further, the data in described caching system have life cycle, and when arriving life cycle, the data in caching system can be automatically deleted, in time the space of release caching system.
Tool of the present invention has the following advantages:
1, write data by application program, ensure that the consistance of application program and caching system data;
2, application requests data only need to caching system mutual, decrease interactive object;
3, caching system is by thread pool (i.e. multithreading) accessing database, accelerates the operating speed of caching system and database.
Accompanying drawing explanation
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the flowchart of application program update or write data procedures.
Fig. 2 is the flowchart that application program reads data procedures.
Embodiment
The present invention, a kind of data processing method, described method comprises the process of application program update or write data and the process of application program reading data:
As shown in Figure 1, the process of described application program update or write data is: when application program is to caching system write data, first judge whether caching system inside itself has data: if caching system inside itself does not have data, namely caching system is empty, then only write data to database; If itself there are data caching system inside, then caching system are upgraded and write data to database;
By application program update or write data to caching system, ensure that the consistance of application program and caching system data;
As shown in Figure 2, the process of described application program reading data comprises the steps:
Step 20, application program are to caching system request msg;
Step 21, judge whether caching system inside exists the data that application program asks: the data that application program asks if exist in caching system, then these data are directly returned to application program, if there are not the data that application program is asked in caching system, then by caching system accessing database;
Step 22, judge whether to exist in database the data that application program asks: the data that application program asks if exist in database, then will return these data to application program by caching system in this Data import to caching system; If there are not the data that application program is asked in database, then directly return sky data to application program;
Only need to caching system mutual during such application requests data, and database need not be visited again, decrease interactive object, and during next application requests identical data, database lookup need not be removed again, decrease the pressure of database.
Described caching system accessing database is by creating thread pool on the server, pre-set the connection management of caching system and database and realize, all again to create connection when this avoid each accessing database of caching system, accelerate the operating speed of caching system and database.
Data in described caching system have life cycle, and when arriving life cycle, the data in caching system can be automatically deleted, in time the space of release caching system.
Present invention improves over application program write data and read the process of data, ensure that the consistent of application program and caching system data, and avoid application program directly to the access of database, decrease interactive object.
Although the foregoing describe the specific embodiment of the present invention; but be familiar with those skilled in the art to be to be understood that; specific embodiment described by us is illustrative; instead of for the restriction to scope of the present invention; those of ordinary skill in the art, in the modification of the equivalence done according to spirit of the present invention and change, should be encompassed in scope that claim of the present invention protects.
Claims (3)
1. a data processing method, is characterized in that: described method comprises the process of application program update or write data and the process of application program reading data:
The process of described application program update or write data is: when application program is to caching system write data, first judge whether caching system inside itself has data: if caching system inside itself does not have data, namely caching system is empty, then only write data to database; If itself there are data caching system inside, then caching system are upgraded and write data to database;
The process that described application program reads data comprises the steps:
Step 20, application program are to caching system request msg;
Step 21, judge whether caching system inside exists the data that application program asks: the data that application program asks if exist in caching system, then these data are directly returned to application program, if there are not the data that application program is asked in caching system, then by caching system accessing database;
Step 22, judge whether to exist in database the data that application program asks: the data that application program asks if exist in database, then will return these data to application program by caching system in this Data import to caching system; If there are not the data that application program is asked in database, then directly return sky data to application program.
2. a kind of data processing method according to claim 1, is characterized in that: described caching system accessing database is by creating thread pool on the server, pre-sets the connection management of caching system and database and realizes.
3. a kind of data processing method according to claim 1, is characterized in that: the data in described caching system have life cycle, and when arriving life cycle, the data in caching system can be automatically deleted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410506767.1A CN104281668A (en) | 2014-09-28 | 2014-09-28 | Data processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410506767.1A CN104281668A (en) | 2014-09-28 | 2014-09-28 | Data processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104281668A true CN104281668A (en) | 2015-01-14 |
Family
ID=52256541
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410506767.1A Pending CN104281668A (en) | 2014-09-28 | 2014-09-28 | Data processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104281668A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017045410A1 (en) * | 2015-09-17 | 2017-03-23 | 中兴通讯股份有限公司 | Method and apparatus for dynamically loading data in a paging model |
CN106776875A (en) * | 2016-11-29 | 2017-05-31 | 天脉聚源(北京)传媒科技有限公司 | A kind of request processing method and device |
CN106940660A (en) * | 2016-01-05 | 2017-07-11 | 阿里巴巴集团控股有限公司 | The method and apparatus of the realization of caching |
CN107124466A (en) * | 2017-05-23 | 2017-09-01 | 努比亚技术有限公司 | One kind prevents caching penetrating method and device, computer-readable recording medium |
CN107800691A (en) * | 2017-10-12 | 2018-03-13 | 云巅(上海)网络科技有限公司 | The system and method for building application program on demand and accessing data trnascription is realized based on distributed storage mechanism |
CN109614404A (en) * | 2018-11-01 | 2019-04-12 | 阿里巴巴集团控股有限公司 | A kind of data buffering system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070288459A1 (en) * | 2006-06-09 | 2007-12-13 | Toshihiko Kashiyama | Stream data processing method cooperable with reference external data |
US20090248697A1 (en) * | 2008-03-31 | 2009-10-01 | Richardson David R | Cache optimization |
CN101937467A (en) * | 2010-09-17 | 2011-01-05 | 北京开心人信息技术有限公司 | High-efficiency caching method and system of server |
CN103049478A (en) * | 2012-11-22 | 2013-04-17 | 浪潮电子信息产业股份有限公司 | Double-way buffering mechanism design method for Web services |
CN104158757A (en) * | 2014-08-21 | 2014-11-19 | 福建星海通信科技有限公司 | GPS (Global Positioning System) data loading and processing method and system |
-
2014
- 2014-09-28 CN CN201410506767.1A patent/CN104281668A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070288459A1 (en) * | 2006-06-09 | 2007-12-13 | Toshihiko Kashiyama | Stream data processing method cooperable with reference external data |
US20090248697A1 (en) * | 2008-03-31 | 2009-10-01 | Richardson David R | Cache optimization |
CN101937467A (en) * | 2010-09-17 | 2011-01-05 | 北京开心人信息技术有限公司 | High-efficiency caching method and system of server |
CN103049478A (en) * | 2012-11-22 | 2013-04-17 | 浪潮电子信息产业股份有限公司 | Double-way buffering mechanism design method for Web services |
CN104158757A (en) * | 2014-08-21 | 2014-11-19 | 福建星海通信科技有限公司 | GPS (Global Positioning System) data loading and processing method and system |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017045410A1 (en) * | 2015-09-17 | 2017-03-23 | 中兴通讯股份有限公司 | Method and apparatus for dynamically loading data in a paging model |
CN106940660A (en) * | 2016-01-05 | 2017-07-11 | 阿里巴巴集团控股有限公司 | The method and apparatus of the realization of caching |
CN106776875A (en) * | 2016-11-29 | 2017-05-31 | 天脉聚源(北京)传媒科技有限公司 | A kind of request processing method and device |
CN107124466A (en) * | 2017-05-23 | 2017-09-01 | 努比亚技术有限公司 | One kind prevents caching penetrating method and device, computer-readable recording medium |
CN107124466B (en) * | 2017-05-23 | 2020-12-29 | 努比亚技术有限公司 | Method and device for preventing cache from penetrating and computer readable storage medium |
CN107800691A (en) * | 2017-10-12 | 2018-03-13 | 云巅(上海)网络科技有限公司 | The system and method for building application program on demand and accessing data trnascription is realized based on distributed storage mechanism |
CN109614404A (en) * | 2018-11-01 | 2019-04-12 | 阿里巴巴集团控股有限公司 | A kind of data buffering system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104281668A (en) | Data processing method | |
CN110275841B (en) | Access request processing method and device, computer equipment and storage medium | |
CN103473732B (en) | Based on the mobile GIS slice map exhibiting method of con current control and dual-cache mechanism | |
KR102147356B1 (en) | Cache memory system and operating method for the same | |
WO2021223658A1 (en) | Mini program update | |
CN104536701A (en) | Realizing method and system for NVME protocol multi-command queues | |
JP2018511132A (en) | Application loading method and apparatus | |
US20130036426A1 (en) | Information processing device and task switching method | |
CN110851285B (en) | Resource multiplexing method, device and equipment based on GPU virtualization | |
US11886846B2 (en) | Method for executing computation, computing device, computing system, and storage medium | |
CN111737564B (en) | Information query method, device, equipment and medium | |
CN106294205B (en) | Cache data processing method and device | |
CN103092673A (en) | Snapshot processing method and device for virtual machine | |
CN105247478A (en) | Command instruction management | |
CN113641596A (en) | Cache management method, cache management device and processor | |
US20200371827A1 (en) | Method, Apparatus, Device and Medium for Processing Data | |
CN107277022B (en) | Process marking method and device | |
CN103513956A (en) | Data processing method and device of processor | |
CN110955503B (en) | Task scheduling method and device | |
CN104407990A (en) | Disk access method and device | |
CN106598502B (en) | Data storage method and system | |
CN107748649B (en) | Method and device for caching data | |
CN107423291B (en) | Data translation method and client device | |
US11055813B2 (en) | Method, electronic device and computer program product for expanding memory of GPU | |
CN102542525B (en) | Information processing equipment and information processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150114 |