New! View global litigation for patent families

CN103747072A - Data reading and writing method and application server - Google Patents

Data reading and writing method and application server Download PDF

Info

Publication number
CN103747072A
CN103747072A CN 201310745987 CN201310745987A CN103747072A CN 103747072 A CN103747072 A CN 103747072A CN 201310745987 CN201310745987 CN 201310745987 CN 201310745987 A CN201310745987 A CN 201310745987A CN 103747072 A CN103747072 A CN 103747072A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
data
target
equipment
application
cache
Prior art date
Application number
CN 201310745987
Other languages
Chinese (zh)
Inventor
曹坤波
张文明
张国斌
李爽
Original Assignee
乐视网信息技术(北京)股份有限公司
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

Links

Abstract

The embodiment of the invention provides a data reading and writing method and an application server, and relates to the technical field of communication. The data reading and writing speed of the application server can be increased, and the response of the application server is quickened. The method comprises the following steps of receiving a data request message from a client by using the application server, and performing read operation or write operation on target data when the target data corresponding to identification information in the data request message are determined to be stored in CDN (content distribution network) cache equipment; when the target data are determined not to be stored in the CDN cache equipment, acquiring the target data from equipment with the target data, storing the acquired target data in the CDN cache equipment, and performing read operation or write operation indicated by the data request message on the target data stored in the CDN cache equipment after the acquired target data are stored in the CDN cache equipment. The embodiment of the invention is used for data reading and writing.

Description

一种读写数据的方法和应用服务器 A method of reading and writing data and application servers

技术领域 FIELD

[0001] 本发明涉及通信技术领域,尤其涉及一种读写数据的方法和应用服务器。 [0001] The present invention relates to communication technologies, particularly to a method for reading and writing data, and application servers.

背景技术 Background technique

[0002] 随着互联网技术的不断普及,互联网上传输的数据量出现了爆发式的增长,其中,应用服务器从数据库中读取数据并在浏览器中显示,许多网络应用也都将数据保存到数据库中。 [0002] With the growing popularity of Internet technology, the amount of data transmitted over the Internet there has been explosive growth, wherein the application server to read data from the database and displayed in the browser, many network applications also will save the data to database. 随着数据量的增大、访问的集中,增加了数据库的负担并造成了数据库的响应恶化,网站显示延迟等影响。 With the increased amount of data, access concentration, increasing the burden on the database and create the database in response to the deterioration of the site shows the effect of delay.

[0003] 现有技术中,应用服务器在接收到客户端的数据请求消息时,会对该数据请求消息进行分析和处理,而后对数据库中相应的数据进行数据请求消息所指示的读操作或写操作。 [0003] In the prior art, the application server upon receiving the data request from the client message, the request message for the data analysis and processing, then corresponding data in the database a data request message read or write operation indicated . 并且该应用服务器在下一次接收到相同的数据请求消息时,会再次对该数据请求消息进行分析和处理,并对数据库中相应的数据进行数据请求消息所指示的读操作或写操作。 And the application server receives the next time the same data request message, the request message again, the data will be analyzed and processed, and corresponding data in the database data read request message as indicated or write operation. 由于数据库往往设置在距离应用服务器较远的地方,应用服务器每次完成对数据库的访问都需要花费较多的处理资源且需要较长的处理时间,这样,在存在高并发数据请求而使得该应用服务器短时间内接收到大量的数据请求消息时,该应用服务器需针对每一个数据请求消息对数据库进行相应的访问,从而导致该应用服务器的响应时间过长的问题。 Because the database is often set in places far from the application server, application server, each complete access to the database need to spend more processing resources and require longer processing times, so, in the presence of high concurrent data requests while making the application the server receives a large number of short data request message, the request message for an application server for access to the appropriate database, thereby causing a problem that a long response time for each of the application server data.

发明内容 SUMMARY

[0004] 本发明提供一种读写数据的方法和应用服务器,能够提高该应用服务器读写数据的速度,减短了该应用服务器的响应时间。 [0004] The present invention provides a method for reading and writing data and the application server, the application server can improve the speed of reading and writing data, the short response time of the application server Save.

[0005] 为达到上述目的,本发明的实施例采用如下技术方案: [0005] To achieve the above object, embodiments of the present invention adopts the following technical solutions:

[0006] 第一方面,提供一种读写数据的方法,包括: [0006] In a first aspect, there is provided a method for reading and writing data, comprising:

[0007] 应用服务器接收客户端发送的数据请求消息;所述数据请求消息包括目标数据的标识信息; [0007] The application server receives a data request message sent by the client; the data request message includes identification information of the target data;

[0008] 根据所述标识信息,查询所述应用服务器所接入的内容分发网络CDN中距离所述应用服务器最近的CDN缓存设备内是否存储有所述标识信息对应的目标数据;其中,所述CDN缓存设备用于对所述应用服务器从包括数据库在内的其他设备处获取到的数据进行缓存; [0008] The content of the identification information, querying the application access server in the CDN distribution network from the application server is stored in the last buffer of CDN equipment identification information corresponding to the target data; wherein said CDN cache server apparatus for acquisition of the application from the device at the other, including databases, data cache;

[0009] 当查询到所述CDN缓存设备内存储有所述目标数据时,对所述目标数据进行所述数据请求消息所指示的读操作或写操作; [0009] When a query into the CDN cache device stores the target data, the target data of the read data request message or a write operation indicated;

[0010] 在确定所述CDN缓存设备内没有存储所述目标数据时,从存储有所述目标数据的设备处获取所述目标数据,将获取的所述目标数据存储到所述CDN缓存设备内,并在获取的所述目标数据存储到所述CDN缓存设备内后,对所述CDN缓存设备内存储的所述目标数据进行所述数据请求消息所指示的读操作或写操作。 [0010] When determining the target data is not stored within the cache device CDN, from stored data at the target device acquiring the target data, the target data acquired is stored into the cache device CDN after the target data is acquired and stored into the buffer device CDN, the CDN target data in the cache device stored the data request message indicated by the read operation or write operation.

[0011] 在第一方面的第一种可能的实现方式中,所述应用服务器在确定所述CDN缓存设备内没有存储所述目标数据时,从存储有所述目标数据的设备处获取所述目标数据,包括: [0011] In a first possible implementation manner of the first aspect, the application server upon determining the target data is not stored within the cache device CDN, it is stored at the device from the target of the data acquisition target data, including:

[0012] 所述应用服务器在确定所述CDN缓存设备内没有存储所述目标数据时,确定分布式缓存设备Cbase内是否存储有所述标识信息对应的目标数据; [0012] The application server upon determining the target data is not stored within the cache device CDN, determine whether to store target data corresponding to the identification information within the distributed cache device Cbase;

[0013] 若确定分布式缓存设备Cbase内存储有所述标识信息对应的目标数据,则从所述Cbase处获取所述目标数据; [0013] If it is determined within the distributed cache device Cbase stores said identification information corresponding to the target data, from said at Cbase acquiring the target data;

[0014] 若确定所述Cbase内没有存储所述标识信息对应的目标数据,则从所述数据库内获取所述目标数据。 [0014] If it is determined there is no target data corresponding to the identification information stored in said Cbase, acquires the target data from the database.

[0015] 结合第一种可能的实现方式,在第二种可能的实现方式中,所述标识信息包括数据键值Key ;则 [0015] The first possible implementation manner, in a second possible implementation, the identification information comprises data key Key; the

[0016] 所述应用服务器确定分布式缓存设备Cbase内是否存储有所述标识信息对应的目标数据,包括: [0016] The application server determines whether to store target data corresponding to the identification information within the distributed cache device Cbase, comprising:

[0017] 所述应用服务器确定所述Cbase内是否存在与所述Key对应的数据值Value ; [0017] The application server determines whether there is a data value to the Key Value corresponding to said Cbase;

[0018] 若确定所述Cbase内存在与所述Key对应的数据值Value,则确定所述Cbase内存储有所述目标数据; [0018] If it is determined in said data memory Cbase the value corresponding to the Key Value, and determining that the target Cbase said data stored therein;

[0019] 若确定所述Cbase内不存在与所述Key对应的数据值Value,则确定所述Cbase内未存储有所述目标数据。 [0019] If determined that there is the data value corresponding to the Key Value, it is determined that there is not stored within the target data Cbase said Cbase.

[0020] 结合第一种可能的实现方式,在第三种可能的实现方式中,所述数据请求消息还包括与所述目标数据相关的其他目标数据的标识信息;则 [0020] The first possible implementation manner, in a third possible implementation manner, the data request message further includes target data associated with the identification information of the other target data; is

[0021] 所述应用服务器对所述目标数据进行所述数据请求消息所指示的读操作或写操作之后,所述方法还包括: After [0021] the application server for the data request message as indicated by the read or write operation to the target data, the method further comprising:

[0022] 所述应用服务器将所述数据库内存储的所述其他目标数据存储到所述Cbase内,以便所述应用服务器在接收到包含所述其他目标数据的标识信息的数据请求消息时,将所述Cbase内存储的所述其他目标数据存储到所述CDN缓存设备内。 When [0022] the application server of said database stored in said object data stored in the other said Cbase, so that the application server receiving said additional data comprising target data identification information request message, the stored within the data storage Cbase other objects into the CDN cache device.

[0023] 结合第一种可能的实现方式至第三种可能的实现方式中的任意一种可能的实现方式,在第四种可能的实现方式中,在所述应用服务器对所述目标数据进行所述数据请求消息所指示的写操作后,所述方法还包括: Any [0023] combination with the first to third possible implementation manner possible implementation of one possible implementation, in a fourth possible implementation manner, the target data performed in the server application after the write operation the data request message indicated, the method further comprising:

[0024] 所述应用服务器根据所述CDN缓存设备内的被执行了所述写操作的所述目标数据,更新所述Cbase和所述数据库。 [0024] The application server is performed according to the apparatus within the CDN caches the write operation of the target data, the database and updating the Cbase.

[0025] 本发明第二方面提供一种应用服务器,包括: [0025] The second aspect of the present invention to provide an application server, comprising:

[0026] 接收单元,用于接收客户端发送的数据请求消息;所述数据请求消息包括目标数据的标识信息; [0026] a receiving unit for receiving data sent by a client request message; the data request message includes identification information of the target data;

[0027] 处理单元,用于根据所述标识信息,查询所述应用服务器所接入的内容分发网络CDN中距离所述应用服务器最近的CDN缓存设备内是否存储有所述标识信息对应的目标数据;当查询到所述CDN缓存设备内存储有所述目标数据时,对所述目标数据进行所述数据请求消息所指示的读操作或写操作;其中,所述CDN缓存设备用于对所述应用服务器从包括数据库在内的其他设备处获取到的数据进行缓存; [0027] a processing unit, the target data is stored for the identification information corresponding to the distribution network from the application server in the CDN CDN caching apparatus according to the latest identification information of the content, the application queries the server access ; when the query to the CDN cache device stores the target data, the target data of the data request message indicated by the read or write operation; wherein the cache device for the CDN acquired from the server application device to another, including databases, data cache;

[0028] 所述处理单元还用于,在确定所述CDN缓存设备内没有存储所述目标数据时,从存储有所述目标数据的设备处获取所述目标数据,将获取的所述目标数据存储到所述CDN缓存设备内,并在获取的所述目标数据存储到所述CDN缓存设备内后,对所述CDN缓存设备内存储的所述目标数据进行所述数据请求消息所指示的读操作或写操作。 The target data [0028] The processing unit is further configured to, when determining the target data is not stored within the cache device CDN, from stored data at the target device acquiring the target data, the acquired reading the target data stored in the storage device into said cache CDN, and after the acquired CDN said cache device, the target data within the CDN cache device stored the data request message indicated or write operation.

[0029] 在第二方面的第一种可能的实现方式中,所述处理单元具体用于: [0029] In a first possible implementation of the second aspect, the processing unit is configured to:

[0030] 在确定所述CDN缓存设备内没有存储所述目标数据时,确定分布式缓存设备Cbase内是否存储有所述标识信息对应的目标数据; [0030] When determining the target data is not stored within the cache device CDN, determine whether to store within the distributed cache device Cbase have the identification information corresponding to the target data;

[0031] 若确定分布式缓存设备Cbase内存储有所述标识信息对应的目标数据,则从所述Cbase处获取所述目标数据; [0031] If it is determined within the distributed cache device Cbase stores said identification information corresponding to the target data, from said at Cbase acquiring the target data;

[0032] 若确定所述Cbase内没有存储所述标识信息对应的目标数据,则从所述数据库内获取所述目标数据。 [0032] If it is determined there is no target data corresponding to the identification information stored in said Cbase, acquires the target data from the database.

[0033] 结合第一种可能的实现方式,在第二种可能的实现方式中,所述标识信息包括数据键值Key ;则所述处理单元具体用于,确定所述Cbase内是否存在与所述Key对应的数据值Value ; [0033] The first possible implementation manner, in a second possible implementation, the identification information comprises data key Key; the processing unit is configured to determine whether there is the said Cbase said data value corresponding to the value Key;

[0034] 若确定所述Cbase内存在与所述Key对应的数据值Value,则确定所述Cbase内存储有所述目标数据; [0034] If it is determined in said data memory Cbase the value corresponding to the Key Value, and determining that the target Cbase said data stored therein;

[0035] 若确定所述Cbase内不存在与所述Key对应的数据值Value,则确定所述Cbase内未存储有所述目标数据。 [0035] If determined that there is the data value corresponding to the Key Value, it is determined that there is not stored within the target data Cbase said Cbase.

[0036] 结合第一种可能的实现方式,在第三种可能的实现方式中,所述数据请求消息还包括与所述目标数据相关的其他目标数据的标识信息;则所述处理单元还用于,将所述数据库内存储的所述其他目标数据存储到所述Cbase内,以便所述应用服务器在接收到包含所述其他目标数据的标识信息的数据请求消息时,将所述Cbase内存储的所述其他目标数据存储到所述CDN缓存设备内。 [0036] The first possible implementation manner, in a third possible implementation manner, the data request message further includes target data associated with the identification information of the other target data; with the processing unit further when on, the database stored in said object data stored in the other said Cbase, so that the application server receiving said additional data comprising target data identification information request message, the inner storage Cbase the other target data is stored in the cache device CDN.

[0037] 结合第一种可能的实现方式至第三种可能的实现方式中的任意一种可能的实现方式,在第四种可能的实现方式中,在所述对所述目标数据进行所述数据请求消息所指示的写操作后,所述处理单元还用于,根据所述CDN缓存设备内的被执行了所述写操作的所述目标数据,更新所述Cbase和所述数据库。 [0037] The first possible implementation manner to any third possible implementation of one possible implementation, in a fourth possible implementation manner, the target data performed in the after the data write request message indicated, the processing unit is further configured, to be executed in accordance with the operation of the write cache device CDN said target data, said database and updating the Cbase.

[0038] 采用上述方案,应用服务器接收客户端发送的数据请求消息,并在确定CDN(Content Delivery Network,内容分发网络)缓存设备内存储有该数据请求消息中的标识信息对应的目标数据时,对该目标数据进行读操作或写操作;在确定该CDN缓存设备内没有存储该目标数据时,从存储有该目标数据的设备处获取该目标数据,将获取的该目标数据存储到该CDN缓存设备内,并在获取的该目标数据存储到该CDN缓存设备内后,对该CDN缓存设备内存储的该目标数据进行该数据请求消息所指示的读操作或写操作。 When [0038] the above embodiment, data application server receives a client sends a request message, and determining the CDN (Content Delivery Network, the content distribution network) cache device storing the data request identification information corresponding to the message in the target data, the target for a read or write operation data; CDN upon determining that the target data is not stored in the buffer device, is stored at the device from the target data of the target data acquisition, the acquired data into the target cache CDN after the apparatus and the object data acquired are stored in the cache of the CDN equipment, the data request message read operation or a write operation indicated by the data stored in the target cache device within the CDN. 这样,该应用服务器在接收到数据请求消息后,无需对该数据请求消息进行分析处理即可直接对该CDN缓存设备内的目标数据进行读操作或写操作,避免了每次都从数据库中读写数据,提高了该应用服务器读写数据的速度,减短了该应用服务器的响应时间。 Thus, the application server after receiving a data request message, the request message without the data read operation analysis processing to direct the data in the target device or the CDN cache write operation, avoiding every read from the database write data, improve the speed of reading and writing data to the application server, to shorten the response time of the application server.

附图说明 BRIEF DESCRIPTION

[0039] 图1为本发明实施例提供的一种读写数据的方法的流程示意图; Flow of the method [0039] FIG 1. A read and write data according to an embodiment of the present invention, a schematic diagram;

[0040] 图2为本发明实施例提供的另一种读写数据的方法的流程示意图; [0040] FIG. 2 is a schematic flowchart of a method of reading and writing data to another embodiment of the present invention is provided;

[0041] 图3为本发明实施例提供的一种应用服务器的应用场景的示意图; [0041] FIG. 3 provides a schematic diagram of an application scenario of an application server embodiment of the invention;

[0042] 图4为本发明实施例提供的一种应用服务器的结构示意图。 [0042] FIG. 4 is a schematic structure of an application server according to an embodiment of the present invention. 具体实施方式 detailed description

[0043] 下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。 [0043] below in conjunction with the present invention in the accompanying drawings, technical solutions of embodiments of the present invention are clearly and completely described, obviously, the described embodiments are merely part of embodiments of the present invention, but not all embodiments example. 基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 Based on the embodiments of the present invention, all other embodiments of ordinary skill in the art without any creative effort shall fall within the scope of the present invention.

[0044] 本发明实施例提供一种读写数据的方法,如图1所示,该方法包括: [0044] The embodiment provides a method of reading and writing data in the present embodiment of the invention, shown in Figure 1, the method comprising:

[0045] S101、应用服务器接收客户端发送的数据请求消息,该数据请求消息包括目标数据的标识信息。 [0045] S101, the application server receives a data request sent by the client message, the data request message includes identification information of the target data.

[0046] S102、该应用服务器根据该标识信息,查询该应用服务器所接入的内容分发网络CDN中距离该应用服务器最近的CDN缓存设备内是否存储有该标识信息对应的目标数据。 [0046] S102, the application server according to the identification information, queries the server application access distribution network CDN whether the identification information is stored corresponding to the last target data from the cache device CDN server application.

[0047] 其中,该CDN缓存设备用于对该应用服务器从包括数据库在内的其他设备处获取到的数据进行缓存。 [0047] wherein the CDN cache device for the application server to obtain from the other device, including the database to the data cache.

[0048] S103、当该应用服务器查询到该CDN缓存设备内存储有该目标数据时,对该目标数据进行该数据请求消息所指示的读操作或写操作。 [0048] S103, when the application server within the CDN query cache device storing the data to the target, the target data read operation of the data request message or a write operation indicated.

[0049] S104、该应用服务器在确定该CDN缓存设备内没有存储该目标数据时,从存储有该目标数据的设备处获取该目标数据,将获取的该目标数据存储到该CDN缓存设备内,并在获取的该目标数据存储到该CDN缓存设备内后,对该CDN缓存设备内存储的该目标数据进行该数据请求消息所指示的读操作或写操作。 When the [0049] S104, the application server determines not to store the target data within the CDN cache device from the stored acquires the target data of the target device data, storing the target data acquired into the CDN cache device, after the target data is stored and retrieved into the cache CDN equipment, the data request message read operation or a write operation indicated by the data stored in the target cache device within the CDN.

[0050] 采用上述方案,应用服务器接收客户端发送的数据请求消息,并在确定CDN(Content Delivery Network,内容分发网络)缓存设备内存储有该数据请求消息中的标识信息对应的目标数据时,对该目标数据进行读操作或写操作;在确定该CDN缓存设备内没有存储该目标数据时,从存储有该目标数据的设备处获取该目标数据,将获取的该目标数据存储到该CDN缓存设备内,并在获取的该目标数据存储到该CDN缓存设备内后,对该CDN缓存设备内存储的该目标数据进行该数据请求消息所指示的读操作或写操作。 When [0050] the above embodiment, data application server receives a client sends a request message, and determining the CDN (Content Delivery Network, the content distribution network) cache device storing the data request identification information corresponding to the message in the target data, the target for a read or write operation data; CDN upon determining that the target data is not stored in the buffer device, is stored at the device from the target data of the target data acquisition, the acquired data into the target cache CDN after the apparatus and the object data acquired are stored in the cache of the CDN equipment, the data request message read operation or a write operation indicated by the data stored in the target cache device within the CDN. 这样,该应用服务器在接收到数据请求消息后,无需对该数据请求消息进行分析处理即可直接对该CDN缓存设备内的目标数据进行读操作或写操作,避免了每次都从数据库中读写数据,提高了该应用服务器读写数据的速度,减短了该应用服务器的响应时间。 Thus, the application server after receiving a data request message, the request message without the data read operation analysis processing to direct the data in the target device or the CDN cache write operation, avoiding every read from the database write data, improve the speed of reading and writing data to the application server, to shorten the response time of the application server.

[0051] 为了使本领域技术人员能够更清楚地理解本发明实施例提供的技术方案,下面通过具体的实施例,对本发明实施例提供的另一种读写数据的方法进行详细说明,如图2所示,该方法包括: [0051] In order that those skilled in the art to more clearly understand the technical solutions provided by the embodiments of the present invention, the following through specific embodiments, the present invention is another method for reading and writing data provided by the embodiment described in detail, FIG. 2, the method comprising:

[0052] S201、应用服务器接收客户端发送的数据请求消息,所述数据请求消息包括目标数据的标识信息。 [0052] S201, the application server receives a client request message transmitted data, the data request message includes identification information of the target data.

[0053] 具体地,用户在浏览网页时,通过点击调用该网页内的应用程序,向该应用服务器发送数据请求消息,其中,该数据请求消息可以是对目标数据的写请求或者读请求,该数据请求消息包括该目标数据的标识信息。 [0053] Specifically, the user browse the Web, the calling application by clicking within the web page, sending a data request message to the application server, wherein the request message may be a data write request or the read request of the target data, the data request message includes identification information of the target data.

[0054] 需要说明的是,该应用服务器的应用场景如图3所示,图3包括CDN缓存设备,用于短时间缓存数据,客户端可以通过该应用服务器直接从该CDN缓存设备中调用数据,显示网页;Cbase,用于长时间缓存数据,减轻数据库的负担,提高数据访问的速度;数据库,用于存储数据的存储介质,如磁盘;应用服务器,用于根据数据请求消息查找对应的目标数据,以及对各存储空间进行维护。 [0054] Incidentally, the application server application scenario shown in Figure 3, Figure 3 comprises a CDN cache device, cache data for a short time, the client can invoke the application data directly from the server cache apparatus CDN web page is displayed; Cbase, cache data for a long time, to reduce the burden of the database, increase the speed of data access; database, storage medium for storing data, such as a disk; an application server, a request message to find the data corresponding to the target data, and perform maintenance on each of the storage space.

[0055] S202、该应用服务器确定CDN缓存设备内是否存储有对应该标识信息的目标数据。 [0055] S202, the application server determines whether the data to be stored target identification information in the CDN cache device.

[0056] 需要说明的是,多个⑶N缓存设备可以分布在不同的地域,则某一地域的用户在进行网页浏览时,该应用服务器可以根据接收到的数据请求消息访问离该地域最近的CDN缓存设备,另外,由于该CDN缓存设备中的数据失效时间很快,约两分钟,因此该CDN缓存设备只能短时间的存储目标数据。 [0056] Incidentally, a plurality of cache devices may be distributed ⑶N different regions, a region of the user during web browsing, the application server may request access to the data message received from the area nearest CDN cache device, Further, since the data in the cache device CDN quickly failure time, about two minutes, so that only a short CDN cache device stores object data.

[0057] 若该应用服务器确定CDN缓存设备内存储有对应该标识信息的目标数据,执行步骤S203 ;若该应用服务器确定CDN缓存设备内没有存储对应该标识信息的目标数据,执行步骤S204。 [0057] If the application server within the CDN determines the cache apparatus stores data to be the target identification information, executing step S203; if the application server determines that no cache within the CDN device should store information identifying the target data, perform step S204.

[0058] S203、该应用服务器根据该数据请求消息对该CDN缓存设备内存储的该目标数据进行相应的读操作或写操作。 [0058] S203, the application server request message based on the data of the corresponding read or write operation on the data stored in the target cache device within the CDN.

[0059] 示例地,用户在网页中点击播放音乐时,在应用服务器接收到数据请求消息后,若该CDN缓存设备中存储有该数据请求消息对应的音乐数据,则该应用服务器可直接读取该音乐数据,并将该音乐数据发送给该网页客户端。 When the [0059] example, the user clicks play music page, the application server receives a data request message, if the CDN cache device stores the data corresponding to the music data request message, the application server may directly read the music data, and sends the music data to the web client.

[0060] S204、该应用服务器确定分布式缓存设备Cbase内是否存储有对应该标识信息的目标数据。 [0060] S204, the application server determines whether the data to be stored target identification information within the distributed cache device Cbase.

[0061] 可选地,该标识信息包括数据键值Key,若该应用服务器确定该Cbase内存在与该Key对应的数据值Value,则确定该Cbase内存储有该目标数据;若确定该Cbase内不存在与该Key对应的数据值Value,则确定该Cbase内未存储有该目标数据。 [0061] Alternatively, the identification information includes data key Key, if the application server determines that the memory data Cbase to the value corresponding to the Key Value, it is determined that the target Cbase data stored therein; if it is determined that the Cbase Key does not exist corresponding to the data value value, it is determined that there is not stored within the Cbase the target data.

[0062] 需要说明的是,数据由Key (键)和Value (值)两部分构成,其中,Key相当于数据的索引,Value是Key所代表的数据内容,一个Value可能具有多个键值,用户可以根据键值访问到数据内容。 [0062] Incidentally, the data composed Key (key) and a Value (value) in two parts, wherein, the index data corresponding to Key, Key Value is the content of the data represented, may have a plurality of keys Value, users can access content according to the data key. 另外,该Cbase中可以持久化缓存数据。 Further, the Cbase cache data may be persistent.

[0063] 若该应用服务器确定该Cbase内存储有对应该标识信息的目标数据,执行步骤S205 ;若该应用服务器确定该Cbase内没有存储对应该标识信息的目标数据,执行步骤S206。 [0063] If the server application determines that the data Cbase to be stored on the target identification information, executing step S205; if the application server determines that no internal Cbase stores information should be identified as target data, perform step S206.

[0064] S205、该应用服务器将该Cbase内存储的该目标数据存储到该CDN缓存设备内,并根据该数据请求消息对该CDN缓存设备内存储的该目标数据进行相应的读操作或写操作。 [0064] S205, the application server sends the target data stored in the storage Cbase CDN into the cache device, and the request message based on the data read operation corresponding to the target data within the CDN cache storage device or write operation .

[0065] S206、该应用服务器从对应的数据库内获取该目标数据,将该目标数据存储到该CDN缓存设备和该Cbase内,并对该CDN缓存设备内存储的该目标数据进行读操作或写操作。 [0065] S206, the application server acquires from a database corresponding to the target data, the target data is stored in the cache device and the CDN Cbase, and reads the stored data of the target within the CDN or write cache device operating.

[0066] 具体地,在该CDN缓存设备和该Cbase内都没有存储该目标数据时,该应用服务器在数据库中获取该目标数据,并将该目标数据存储到该CDN缓存设备和该Cbase中,并对该CDN缓存设备内存储的该目标数据进行读操作或写操作,完成本次数据请求,并且该应用服务器再次接收到对应该目标数据的数据请求消息时,该应用服务器能够直接根据该数据请求消息对该CDN缓存设备中存储的该目标数据进行读操作或写操作;若该应用服务器再次接收到对应该目标数据的数据请求消息时,该CDN缓存设备中存储的该目标数据失效,则该应用服务器根据该数据请求消息从该Cbase中获取到该目标数据,避免了再次从数据库中获取,这样,该应用服务器对相同的目标数据只需要进行一次计算并从数据库中获取,并在之后再次读写该目标数据时无需计算,因为,该应用服务器在 When [0066] Specifically, in the cache device and the CDN Cbase are not the target data storage, the application server acquires the target data in the database, and stores the target data to the cache device and the CDN Cbase in when the target and the data stored within the CDN cache device read or write operation, the completion of this data request, and the application server receives the data to be object data request message again, the application server directly according to the data the request message to the target cache device CDN data stored in a read or write operation; If the application server receives the data request message should be re-target data, the target data stored in the CDN cache device failure, the the application server request message based on the data acquired from the Cbase into the target data, to avoid obtaining from the database again, so, the application server the same target data only once calculated and acquired from the database, and after no need to calculate the target data read and write again, because the application server 通过数据请求消息从数据库中获取目标数据时,需要对多个数据库和多张表的数据通过计算以确定目标数据,消耗了较多的时间,则通过该CDN缓存设备和该Cbase 二重缓存机制,减少了该应用服务器在数据库中获取目标数据的次数,提高了该应用服务器读写数据的速度,同时减轻了数据库的负担。 Acquiring target data from the database via a data request message, the data needed for a plurality of databases and tables to determine a plurality of target data by calculation, the more time consuming, the CDN through the cache device and double caching mechanism Cbase , reducing the number of the target application server to obtain data in the database, increasing the speed of the application server to read and write data, while reducing the burden on the database.

[0067] 需要说明的是,由于在数据库访问权限以及安全级别均高于CDN缓存设备和Cbase,因此,该应用服务器在CDN缓存设备和Cbase中访问数据的速度高于在数据库访问数据的速度。 [0067] It should be noted that, due to database access and security levels are higher than CDN caching device and Cbase, therefore, the application server speed access to data in the cache CDN equipment and Cbase higher than the speed of access to data in the database.

[0068] 可选地,该数据请求消息还包括与该目标数据相关的其他目标数据的标识信息,则该应用服务器在对该CDN设备内存储的该目标数据进行读操作或写操作之后,将数据库内存储的该其他目标数据存储到该Cbase内,以便该应用服务器在接收到对应该其他目标数据的数据请求消息时,将该Cbase内存储的该其他目标数据存储到该CDN缓存设备内。 After [0068] Alternatively, the data request message further includes target data associated with the identification information of the other target data, the application server in the read operation of the target data storage device within the CDN or write operation, the other target data stored in the database is stored in the Cbase, so that the application server receiving the other data to be object data request message, the data of the other objects within Cbase stored in the storage apparatus into the cache CDN.

[0069] 具体地,有上述可知,该应用服务器在通过数据请求消息从数据库中获取目标数据时,需要耗费较长的时间,若该应用服务器在接收到该数据请求消息时再通过计算确定数据库中的目标数据,延长了该应用服务器的响应时间,因此,该应用服务器在接收到该数据请求消息之前,可以预先将该目标数据存储到该Cbase内,则该应用服务器在接收到该数据请求消息时,可以直接从该Cbase内获取到该目标数据,减短了该应用服务器的响应时间。 [0069] Specifically, there can be seen above, the application server when the target data acquired from the database via a data request message, it takes a long time, then it is determined by computing the database server if the application receives the data request message the target data, the extended response time of the application server, so prior to the application server receives the data request message, the target data may be previously stored into the Cbase, the application server receives the data request message may be obtained directly from the inside to the target data Cbase, short response time of the application server Save.

[0070] S207、该应用服务器该应用服务器根据该CDN缓存设备内的被执行了该写操作的该目标数据,更新该Cbase和该数据库。 [0070] S207, the application server that the server is performed according to the target data of the write operation within the CDN cache device, and the database updates the Cbase.

[0071] 示例地,该数据请求消息为写请求消息,则该应用服务器在根据该写请求消息对该CDN缓存设备内存储的目标数据进行写操作,修改该目标数据的值后,将修改后的目标数据存储到该Cbase和该数据库中。 After the [0071] example, the request message is a data write request message, the application server based on the request message in a write operation to the write target data stored in the cache device within the CDN, the modified data value of the target, the modified the target data is stored in the database and Cbase.

[0072] 这样,该应用服务器在接收到数据请求消息后,无需对该数据请求消息进行分析处理即可直接对该CDN缓存设备内的目标数据进行读操作或写操作,避免了每次都从数据库中读写数据,提高了该应用服务器读写数据的速度,减短了该应用服务器的响应时间。 [0072] Thus, the application server after receiving a data request message, the request message without the data read operation analysis processing to direct the data in the target device or the CDN cache write operation is avoided from every read and write data in the database, increasing the speed of reading and writing data to the application server, shorten the response time of the application server.

[0073] 另外,对于上述方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。 [0073] Further, the above-described method embodiments, for ease of description, it is described as a series combination of actions, those skilled in the art should understand that the present invention is not limited by the order of acts described, secondly, those skilled in the art should also understand that the embodiments are described in the specification are exemplary embodiments, actions and modules involved are not necessarily required by the present invention.

[0074] 本发明实施例提供一种应用服务器40,如图4所示,包括: [0074] The present invention provides an application server 40, shown in Figure 4, comprising:

[0075] 接收单元41,用于接收客户端发送的数据请求消息。 [0075] The receiving unit 41, for receiving a data request message sent by the client.

[0076] 该数据请求消息包括目标数据的标识信息。 [0076] The data request message includes identification information of the target data.

[0077] 处理单元42,用于根据该标识信息,查询该应用服务器所接入的内容分发网络CDN中距离该应用服务器最近的CDN缓存设备内是否存储有该标识信息对应的目标数据;当查询到该CDN缓存设备内存储有该目标数据时,对该目标数据进行该数据请求消息所指示的读操作或写操作。 [0077] The processing unit 42, the CDN for content delivery network application server in the access from the application server is stored in the last buffer of CDN equipment identification information corresponding to the target data according to the identification, query; when a query when the CDN to the cache device stores the target data, the data request message read operation or write operation indicated by the target data.

[0078] 其中,该CDN缓存设备用于对该应用服务器从包括数据库在内的其他设备处获取到的数据进行缓存。 [0078] wherein the CDN cache device for the application server to obtain from the other device, including the database to the data cache.

[0079] 该处理单元还用于,在确定该CDN缓存设备内没有存储该目标数据时,从存储有该目标数据的设备处获取该目标数据,将获取的该目标数据存储到该CDN缓存设备内,并在获取的该目标数据存储到该CDN缓存设备内后,对该CDN缓存设备内存储的该目标数据进行该数据请求消息所指示的读操作或写操作。 [0079] The processing unit is further configured to, when it is determined that the target data CDN is not stored in the buffer device, acquired from the target data is stored the data at the target device, the target data acquired is stored into the cache device CDN inside, and the target data acquired is stored into the buffer within the CDN equipment, the stored data of the target within the CDN cache device requests a read of the message data or write operation is indicated.

[0080] 具体地,用户在浏览网页时,通过点击调用该网页内的应用程序,向该应用服务器发送数据请求消息,其中,该数据请求消息可以是对目标数据的写请求或者读请求,该数据请求消息包括该目标数据的标识信息。 [0080] Specifically, the user browse the Web, the calling application by clicking within the web page, sending a data request message to the application server, wherein the request message may be a data write request or the read request of the target data, the data request message includes identification information of the target data.

[0081] 需要说明的是,多个⑶N缓存设备可以分布在不同的地域,则某一地域的用户在进行网页浏览时,该应用服务器可以根据接收到的数据请求消息访问离该地域最近的CDN缓存设备,另外,由于该CDN缓存设备中的数据失效时间很快,约两分钟,因此该CDN缓存设备只能短时间的存储目标数据。 [0081] Incidentally, a plurality of cache devices may be distributed ⑶N different regions, a region of the user during web browsing, the application server may request access to the data message received from the area nearest CDN cache device, Further, since the data in the cache device CDN quickly failure time, about two minutes, so that only a short CDN cache device stores object data.

[0082] 示例地,用户在网页中点击播放音乐时,在应用服务器接收到数据请求消息后,若该CDN缓存设备中存储有该数据请求消息对应的音乐数据,则该应用服务器可直接读取该音乐数据,并将该音乐数据发送给该网页客户端。 When the [0082] example, the user clicks play music page, the application server receives a data request message, if the CDN cache device stores the data corresponding to the music data request message, the application server may directly read the music data, and sends the music data to the web client.

[0083] 可选地,该处理单元42具体用于,在确定该CDN缓存设备内没有存储该目标数据时,确定分布式缓存设备Cbase内是否存储有该标识信息对应的目标数据,若确定分布式缓存设备Cbase内存储有该标识信息对应的目标数据,则从该Cbase处获取该目标数据;若确定该Cbase内没有存储该标识信息对应的目标数据,则从该数据库内获取该目标数据。 [0083] Alternatively, the processing unit 42 is specifically configured to, when it is determined that the target data CDN is not stored in the buffer device, determine whether to store within the distributed cache device Cbase have the identification information corresponding to the target data, if it is determined the distribution Cbase the caching apparatus stores target data corresponding to the identification information, acquires the target data from the at Cbase; if it is determined that the identification information is not stored in the corresponding target data in the Cbase, acquired from the target data within the database.

[0084] 需要说明的是,数据由Key (键)和Value (值)两部分构成,其中,Key相当于数据的索引,Value是Key所代表的数据内容,一个Value可能具有多个键值,用户可以根据键值访问到数据内容。 [0084] Incidentally, the data composed Key (key) and a Value (value) in two parts, wherein, the index data corresponding to Key, Key Value is the content of the data represented, may have a plurality of keys Value, users can access content according to the data key. 另外,该Cbase中可以持久化缓存数据。 Further, the Cbase cache data may be persistent.

[0085] 可选地,该标识信息包括数据键值Key,则该处理单元具体用于,确定该Cbase内是否存在与该Key对应的数据值Value,若确定该Cbase内存在与该Key对应的数据值Value,则确定该Cbase内存储有该目标数据;若确定该Cbase内不存在与该Key对应的数据值Value,则确定该Cbase内未存储有该目标数据。 [0085] Alternatively, the identification information includes data key Key, the processing unit is specifically configured to determine whether there is a data value corresponding to the Key Value within the Cbase, if it is determined that the corresponding memory Cbase the Key data value value, it is determined that the target Cbase storing the data; determining if the data value corresponding to the Key value does not exist in the Cbase, it is determined that there is not stored within the Cbase the target data.

[0086] 需要说明的是,数据由Key (键)和Value (值)两部分构成,其中,Key相当于数据的索引,Value是Key所代表的数据内容,一个Value可能具有多个键值,用户可以根据键值访问到数据内容。 [0086] Incidentally, the data composed Key (key) and a Value (value) in two parts, wherein, the index data corresponding to Key, Key Value is the content of the data represented, may have a plurality of keys Value, users can access content according to the data key. 另外,该Cbase中可以持久化缓存数据。 Further, the Cbase cache data may be persistent.

[0087] 可选地,该数据请求消息还包括与该目标数据相关的其他目标数据的标识信息,则该处理单元还用于,将该数据库内存储的该其他目标数据存储到该Cbase内,以便该应用服务器在接收到包含该其他目标数据的标识信息的数据请求消息时,将该Cbase内存储的该其他目标数据存储到该CDN缓存设备内。 [0087] Alternatively, the data request message further includes identification information of additional target data associated with the target data, the processing unit is further for storing the data of the other objects stored in the database into the Cbase, so that the application server receiving the data containing the identification information of the other object data request message, the data of the other objects within Cbase stored in the storage apparatus into the cache CDN.

[0088] 具体地,在该CDN缓存设备和该Cbase内都没有存储该目标数据时,该应用服务器在数据库中获取该目标数据,并将该目标数据存储到该CDN缓存设备和该Cbase中,并对该CDN缓存设备内存储的该目标数据进行读操作或写操作,完成本次数据请求,并且该应用服务器再次接收到对应该目标数据的数据请求消息时,该应用服务器能够直接根据该数据请求消息对该CDN缓存设备中存储的该目标数据进行读操作或写操作;若该应用服务器再次接收到对应该目标数据的数据请求消息时,该CDN缓存设备中存储的该目标数据失效,则该应用服务器根据该数据请求消息从该Cbase中获取到该目标数据,避免了再次从数据库中获取,这样,该应用服务器对相同的目标数据只需要进行一次计算并从数据库中获取,并在之后再次读写该目标数据时无需计算,因为,该应用服务器在 When [0088] Specifically, in the cache device and the CDN Cbase are not the target data storage, the application server acquires the target data in the database, and stores the target data to the cache device and the CDN Cbase in when the target and the data stored within the CDN cache device read or write operation, the completion of this data request, and the application server receives the data to be object data request message again, the application server directly according to the data the request message to the target cache device CDN data stored in a read or write operation; If the application server receives the data request message should be re-target data, the target data stored in the CDN cache device failure, the the application server request message based on the data acquired from the Cbase into the target data, to avoid obtaining from the database again, so, the application server the same target data only once calculated and acquired from the database, and after no need to calculate the target data read and write again, because the application server 通过数据请求消息从数据库中获取目标数据时,需要对多个数据库和多张表的数据通过计算以确定目标数据,消耗了较多的时间,则通过该CDN缓存设备和该Cbase 二重缓存机制,减少了该应用服务器在数据库中获取目标数据的次数,提高了该应用服务器读写数据的速度,同时减轻了数据库的负担。 Acquiring target data from the database via a data request message, the data needed for a plurality of databases and tables to determine a plurality of target data by calculation, the more time consuming, the CDN through the cache device and double caching mechanism Cbase , reducing the number of the target application server to obtain data in the database, increasing the speed of the application server to read and write data, while reducing the burden on the database.

[0089] 需要说明的是,由于在数据库访问权限以及安全级别均高于CDN缓存设备和Cbase,因此,该应用服务器在CDN缓存设备和Cbase中访问数据的速度高于在数据库访问数据的速度。 [0089] It should be noted that, due to database access and security levels are higher than CDN caching device and Cbase, therefore, the application server speed access to data in the cache CDN equipment and Cbase higher than the speed of access to data in the database.

[0090] 可选地,在该应用服务器对该目标数据进行该数据请求消息所指示的写操作后,该处理单元还用于,根据该CDN缓存设备内的被执行了该写操作的该目标数据,更新该Cbase和该数据库。 [0090] Alternatively, after the writing operation of the data application server data request message to the target indicated by the processing unit it is further configured to, according to the target is performed within the CDN cache write operation of the apparatus data, updating the database and the Cbase.

[0091] 示例地,该数据请求消息为写请求消息,则该应用服务器在根据该写请求消息对该CDN缓存设备内存储的目标数据进行写操作,修改该目标数据的值后,将修改后的目标数据存储到该Cbase和该数据库中。 After the [0091] example, the request message is a data write request message, the application server based on the request message in a write operation to the write target data stored in the cache device within the CDN, the modified data value of the target, the modified the target data is stored in the database and Cbase.

[0092] 采用上述应用服务器,该应用服务器接收客户端发送的数据请求消息,并在确定CDN (Content Delivery Network,内容分发网络)缓存设备内存储有该数据请求消息中的标识信息对应的目标数据时,对该目标数据进行读操作或写操作;在确定该CDN缓存设备内没有存储该目标数据时,从存储有该目标数据的设备处获取该目标数据,将获取的该目标数据存储到该CDN缓存设备内,并在获取的该目标数据存储到该CDN缓存设备内后,对该CDN缓存设备内存储的该目标数据进行该数据请求消息所指示的读操作或写操作。 [0092] The said application server, the application server receives the data sent by the client request message, and determining the CDN (Content Delivery Network, the content distribution network) in the buffer device storing the data request identification information in the message corresponding to the target data when, the object data read or write operation; CDN upon determining that the target data is not stored in the buffer device, acquired from the target data is stored the data at the target device, the target data acquired is stored into the after the CDN cache device, the target data is acquired and stored in the cache of the CDN equipment, the data request message read operation or a write operation indicated by the data stored in the target cache device within the CDN. 这样,该应用服务器在接收到数据请求消息后,无需对该数据请求消息进行分析处理即可直接对该CDN缓存设备内的目标数据进行读操作或写操作,避免了每次都从数据库中读写数据,提高了该应用服务器读写数据的速度,减短了该应用服务器的响应时间。 Thus, the application server after receiving a data request message, the request message without the data read operation analysis processing to direct the data in the target device or the CDN cache write operation, avoiding every read from the database write data, improve the speed of reading and writing data to the application server, to shorten the response time of the application server.

[0093] 以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。 [0093] The above are only specific embodiments of the present invention, but the scope of the present invention is not limited thereto, any skilled in the art in the art within the technical scope of the present invention is disclosed, variations may readily occur to or alternatively, shall fall within the protection scope of the present invention. 因此,本发明的保护范围应以权利要求的保护范围为准。 Accordingly, the scope of the present invention should be defined by the scope of the claims.

Claims (10)

  1. 1.一种读写数据的方法,其特征在于,包括: 应用服务器接收客户端发送的数据请求消息;所述数据请求消息包括目标数据的标识信息; 根据所述标识信息,查询所述应用服务器所接入的内容分发网络CDN中距离所述应用服务器最近的CDN缓存设备内是否存储有所述标识信息对应的目标数据;其中,所述CDN缓存设备用于对所述应用服务器从包括数据库在内的其他设备处获取到的数据进行缓存; 当查询到所述CDN缓存设备内存储有所述目标数据时,对所述目标数据进行所述数据请求消息所指示的读操作或写操作; 在确定所述CDN缓存设备内没有存储所述目标数据时,从存储有所述目标数据的设备处获取所述目标数据,将获取的所述目标数据存储到所述CDN缓存设备内,并在获取的所述目标数据存储到所述CDN缓存设备内后,对所述CDN缓存设备内存储的所述目标数 1. A method of reading and writing data, characterized by comprising: an application server receiving a data request message sent by the client; the data request message includes identification information of the target data; according to the identification information, querying the server application the content delivery network access from the application server in the CDN is stored in the last buffer of CDN equipment identification information corresponding to the target data; wherein, the CDN cache device for the application server from a database comprising acquiring at other devices within the data cache; query to the CDN when the cache device stores the target data, the target data, the data request message is indicative of a read operation or a write operation; in it is determined that the target data is not stored within the cache device CDN, acquired from the target data is stored at the device of the target data, the target data acquired is stored into the CDN cache device, and acquires after the target data is stored into the buffer device CDN, the CDN target number of said cache storage device 据进行所述数据请求消息所指示的读操作或写操作。 According to the data request for a read operation or a message indicating a write operation.
  2. 2.根据权利要求1所述的方法,其特征在于,所述应用服务器在确定所述CDN缓存设备内没有存储所述目标数据时,从存储有所述目标数据的设备处获取所述目标数据,包括: 所述应用服务器在确定所述CDN缓存设备内没有存储所述目标数据时,确定分布式缓存设备Cbase内是否存储有所述标识信息对应的目标数据; 若确定分布式缓存设备Cbase内存储有所述标识信息对应的目标数据,则从所述Cbase处获取所述目标数据; 若确定所述Cbase内没有存储所述标识信息对应的目标数据,则从所述数据库内获取所述目标数据。 The method according to claim 1, wherein the application server upon determining the target data is not stored within the cache device CDN, from stored data at the target device acquiring the target data , comprising: determining the application server when the target data is not stored within the cache device CDN, determine whether to store within the distributed cache device Cbase have the identification information corresponding to the target data; determining if the distributed cache device Cbase stores the identification information corresponding to the target data, the target data acquired from said at Cbase; if it is determined that no target data corresponding to the identification information stored in said Cbase, acquired from the database of the target data. ` `
  3. 3.根据权利要求2所述的方法,其特征在于,所述标识信息包括数据键值Key ;则所述应用服务器确定分布式缓存设备Cbase内是否存储有所述标识信息对应的目标数据,包括: 所述应用服务器确定所述Cbase内是否存在与所述Key对应的数据值Value ; 若确定所述Cbase内存在与所述Key对应的数据值Value,则确定所述Cbase内存储有所述目标数据; 若确定所述Cbase内不存在与所述Key对应的数据值Value,则确定所述Cbase内未存储有所述目标数据。 3. The method according to claim 2, wherein said identification information comprises a data key Key; then determine whether to store the application server within the distributed cache device Cbase information corresponding to the target identification data, comprising : the application server determines whether there is a data value corresponding to the Key value said Cbase; Cbase said memory if it is determined in the data value corresponding to the Key value, it is determined that the stored within the target Cbase transactions; if determined that there is the data value corresponding to the Key value, it is determined that there is not stored within the target data Cbase said Cbase.
  4. 4.根据权利要求2所述的方法,其特征在于,所述数据请求消息还包括与所述目标数据相关的其他目标数据的标识信息;则所述应用服务器对所述目标数据进行所述数据请求消息所指示的读操作或写操作之后,所述方法还包括: 所述应用服务器将所述数据库内存储的所述其他目标数据存储到所述Cbase内,以便所述应用服务器在接收到包含所述其他目标数据的标识信息的数据请求消息时,将所述Cbase内存储的所述其他目标数据存储到所述CDN缓存设备内。 4. The method according to claim 2, wherein said data request message further includes identification information of other data related to the target data of the target; the application server is the data of the target data after the message requests a read or write operation is indicated, the method further comprising: the application server, the database stored in said object data stored in the other said Cbase, so that the receiving application server comprising the other data identification information request message to the target data, the storage storing the said data Cbase other objects within the CDN to cache device.
  5. 5.根据权利要求2至4任一项所述的方法,其特征在于,在所述应用服务器对所述目标数据进行所述数据请求消息所指示的写操作后,所述方法还包括: 所述应用服务器根据所述CDN缓存设备内的被执行了所述写操作的所述目标数据,更新所述Cbase和所述数据库。 5. The method according to any one of claims 2 to 4, wherein the target data for the data in the write request message application server indicated, the method further comprising: the said server application being executed in accordance with the apparatus within the CDN caches the write operation of the target data, the database and updating the Cbase.
  6. 6.一种应用服务器,其特征在于,包括: 接收单元,用于接收客户端发送的数据请求消息;所述数据请求消息包括目标数据的标识信息; 处理单元,用于根据所述标识信息,查询所述应用服务器所接入的内容分发网络CDN中距离所述应用服务器最近的CDN缓存设备内是否存储有所述标识信息对应的目标数据;当查询到所述CDN缓存设备内存储有所述目标数据时,对所述目标数据进行所述数据请求消息所指示的读操作或写操作;其中,所述CDN缓存设备用于对所述应用服务器从包括数据库在内的其他设备处获取到的数据进行缓存; 所述处理单元还用于,在确定所述CDN缓存设备内没有存储所述目标数据时,从存储有所述目标数据的设备处获取所述目标数据,将获取的所述目标数据存储到所述CDN缓存设备内,并在获取的所述目标数据存储到所述CDN缓存设备内后, An application server, characterized by comprising: receiving means for receiving a data request message sent by the client; the data request message includes identification information of the target data; processing unit according to the identification information, querying the server application access to the CDN content distribution network from the application server is stored in the last buffer of CDN equipment identification information corresponding to the target data; when the query into the cache device stores the CDN when the target data, the data request message indicated by the read or write operation on the target data; wherein said apparatus for acquiring a CDN caches from the other device, including the database of the application server to the target of the processing unit is further configured to, when determining the target data is not stored within the cache device CDN, from stored data at the target device acquiring the target data acquired; data cache the target data is stored into the data cache CDN equipment, and stores the acquired CDN after said cache device, 所述CDN缓存设备内存储的所述目标数据进行所述数据请求消息所指示的读操作或写操作。 The target device stores the data in the buffer for the data request to the CDN message indicating the read operation or write operation.
  7. 7.根据权利要求6所述的应用服务器,其特征在于,所述处理单元具体用于: 在确定所述CDN缓存设备内没有存储所述目标数据时,确定分布式缓存设备Cbase内是否存储有所述标识信息对应的目标数据; 若确定分布式缓存设备Cbase内存储有所述标识信息对应的目标数据,则从所述Cbase处获取所述目标数据; 若确定所述Cbase内没有存储所述标识信息对应的目标数据,则从所述数据库内获取所述目标数据。 The application server according to claim 6, characterized in that the processing unit is specifically configured to: when determining the target data is not stored within the cache device CDN, determine whether to store within the distributed cache device has Cbase identification information corresponding to the target data; determining if the device Cbase distributed cache stores target information corresponding to the identification data, from said at Cbase acquiring the target data; if the determination is not stored within said Cbase identification information corresponding to the target data, the target data acquired from within the database.
  8. 8.根据权利要求7所述的应用服务器,其特征在于,所述标识信息包括数据键值Key ;则所述处理单元具体用于,确定所述Cbase内是否存在与所述Key对应的数据值Value ; 若确定所述Cbase内存在与所述Key对应的数据值Value,则确定所述Cbase内存储有所述目标数据; 若确定所述Cbase内不存在与所述Key对应的数据值Value,则确定所述Cbase内未存储有所述目标数据。 8. The application server according to claim 7, wherein said identification information comprises a data key Key; specifically for the processing unit, determining whether there is data corresponding to the Key values ​​within said Cbase value; Cbase memory if it is determined in the data corresponding to the value of the Key value, Cbase determining that the data stored therein to the target; the data value corresponding to the Key value does not exist in said determining if Cbase, it is determined that the target data is not stored within said Cbase.
  9. 9.根据权利要求7所述的应用服务器,其特征在于,所述数据请求消息还包括与所述目标数据相关的其他目标数据的标识信息;则所述处理单元还用于,将所述数据库内存储的所述其他目标数据存储到所述Cbase内,以便所述应用服务器在接收到包含所述其他目标数据的标识信息的数据请求消息时,将所述Cbase内存储的所述其他目标数据存储到所述⑶N缓存设备内。 9. The application server according to claim 7, wherein said data request message further includes identification information of other data related to the target data of the target; the processing unit is further configured, the database said other objects stored within the data storage into said Cbase, so that the application server receiving said additional data comprising target data identification information request message, to the target Cbase other data stored within the ⑶N stored into said cache device.
  10. 10.根据权利要求7至9任一项所述的应用服务器,其特征在于,在所述对所述目标数据进行所述数据请求消息所指示的写操作后,所述处理单元还用于,根据所述CDN缓存设备内的被执行了所述写操作的所述目标数据,更新所述Cbase和所述数据库。 10. The application server according to claim 7-1 according to claims 9, characterized in that, for the data of the target data in the request message indicated by the write operation, the processing unit is further configured to, It was performed according to the apparatus within the CDN caches the write operation of the target data, the database and updating the Cbase.
CN 201310745987 2013-12-30 2013-12-30 Data reading and writing method and application server CN103747072A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201310745987 CN103747072A (en) 2013-12-30 2013-12-30 Data reading and writing method and application server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201310745987 CN103747072A (en) 2013-12-30 2013-12-30 Data reading and writing method and application server

Publications (1)

Publication Number Publication Date
CN103747072A true true CN103747072A (en) 2014-04-23

Family

ID=50504058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201310745987 CN103747072A (en) 2013-12-30 2013-12-30 Data reading and writing method and application server

Country Status (1)

Country Link
CN (1) CN103747072A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391662A (en) * 2014-12-12 2015-03-04 北京奇虎科技有限公司 Data reading and writing method and device
CN104765888A (en) * 2015-04-30 2015-07-08 北京奇艺世纪科技有限公司 Data access system, method and device
WO2015196692A1 (en) * 2014-06-24 2015-12-30 中兴通讯股份有限公司 Cloud computing system and processing method and apparatus for cloud computing system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002071242A1 (en) * 2001-03-01 2002-09-12 Akamai Technologies, Inc. Optimal route selection in a content delivery network
CN1777880A (en) * 2002-02-14 2006-05-24 塞维斯公司 Managed object replication and delivery
CN102047244A (en) * 2008-04-04 2011-05-04 第三雷沃通讯有限责任公司 Handling long-tail content in a content delivery network (CDN)
CN102231749A (en) * 2011-08-12 2011-11-02 乐视网信息技术(北京)股份有限公司 System and method for transmitting live stream by utilizing content delivery network (CDN)
CN103268318A (en) * 2013-04-16 2013-08-28 华中科技大学 Distributed key value database system with strong consistency and read-write method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002071242A1 (en) * 2001-03-01 2002-09-12 Akamai Technologies, Inc. Optimal route selection in a content delivery network
CN1777880A (en) * 2002-02-14 2006-05-24 塞维斯公司 Managed object replication and delivery
CN102047244A (en) * 2008-04-04 2011-05-04 第三雷沃通讯有限责任公司 Handling long-tail content in a content delivery network (CDN)
CN102231749A (en) * 2011-08-12 2011-11-02 乐视网信息技术(北京)股份有限公司 System and method for transmitting live stream by utilizing content delivery network (CDN)
CN103268318A (en) * 2013-04-16 2013-08-28 华中科技大学 Distributed key value database system with strong consistency and read-write method thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015196692A1 (en) * 2014-06-24 2015-12-30 中兴通讯股份有限公司 Cloud computing system and processing method and apparatus for cloud computing system
CN104391662A (en) * 2014-12-12 2015-03-04 北京奇虎科技有限公司 Data reading and writing method and device
CN104765888A (en) * 2015-04-30 2015-07-08 北京奇艺世纪科技有限公司 Data access system, method and device

Similar Documents

Publication Publication Date Title
US20110289126A1 (en) Content delivery network
US6973546B2 (en) Method, system, and program for maintaining data in distributed caches
US20120036264A1 (en) Efficient Storage and Retrieval of Resources for Rendering Structured Documents
US20120166276A1 (en) Framework that facilitates third party integration of applications into a search engine
US8108377B2 (en) Predictive resource identification and phased delivery of structured documents
US20120023120A1 (en) Predictive query suggestion caching
US20130219255A1 (en) Authorized Syndicated Descriptions of Linked Web Content Displayed With Links in User-Generated Content
US20110093461A1 (en) Extensible Custom Variables for Tracking User Traffic
CN102385594A (en) Method and device for controlling inner cores of multi-core browser
US20100180208A1 (en) Server side data cache system
US20120084346A1 (en) Page Loading Optimization Using Page-Maintained Cache
CN101635655A (en) Method, device and system for page performance test
CN101004740A (en) Method and system for reading information at network resource site, and searching engine
US20100094822A1 (en) System and method for determining a file save location
US20110022582A1 (en) Indexing of Partitioned External Data Sources
CN102624920A (en) Method and device for performing access through proxy server
US20110302485A1 (en) Component-based content rendering system
US20110276569A1 (en) Caching electronic document resources in a client device having an electronic resource database
US8645362B1 (en) Using resource load times in ranking search results
CN102411585A (en) Webpage paging data pre-loading method and system
US20120084297A1 (en) Network-Resource-Specific Search Assistance
US20120016857A1 (en) System and method for providing search engine optimization analysis
US20110264759A1 (en) Optimized caching for large data requests
US20110066608A1 (en) Systems and methods for delivering targeted content to a user
US20120124123A1 (en) Extensible video player selection via server-side detection of client application

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C41 Transfer of patent application or patent right or utility model