CACHE METHOD, CACHE EDGE SERVER, CACHE CORE SERVER, AND CACHE SYSTEM
20170295052 ยท 2017-10-12
Assignee
Inventors
- Zanfeng Yang (Shenzhen, CN)
- Tao Song (Shenzhen, CN)
- Xinyu Ge (Nanjing, CN)
- Pinhua Zhao (Nanjing, CN)
- Jianzhong Yu (Nanjing, CN)
- Bo Zhou (Nanjing, CN)
- Wentao Wang (Shenzhen, CN)
Cpc classification
H04L67/5681
ELECTRICITY
H04L67/568
ELECTRICITY
G06F16/00
PHYSICS
H04L67/2885
ELECTRICITY
H04L67/5682
ELECTRICITY
International classification
Abstract
Embodiments of the present application provide a cache method, the cache method includes: receiving, from the cache core server, information about a Transmission Control Protocol (TCP) flow; determining, according to the information, whether the cache edge server stores content corresponding to the information; sending a migrate-out request to the cache core server based on that the cache edge server stores the content corresponding to the information; receiving a migrate-out response from the cache core server upon the sending of the migrate-out request; performing a TCP connection to user equipment according to the migrate-out response; and reading content corresponding to the connection from storage of the cache edge server according to a byte quantity, sent by the cache core server, of the content, and sending the content to the user equipment.
Claims
1. A cache system, comprising a cache core server and a cache edge server, wherein: the cache core server is configured to send information about a Transmission Control Protocol (TCP) flow to the catch edge server; the cache edge server is configured to send a migrate-out request to the cache core server in response to the information about the TCP flow; the cache core server is further configured to: in response to the migrate-out request, disable a TCP connection to a user equipment, and transmit a migrate-out response to the cache edge server; and the cache edge server is further configured to establish a TCP connection to the user equipment according to the migrate-out response, and transfer content corresponding to the information about the TCP flow to the user equipment.
2. The cache system according to claim 1, wherein after transferring the content to the user equipment, the cache edge server is further configured to: send a migrate-back request to the cache core server, and the cache core server is further configured to: restore the TCP connection to the user equipment in response to the migrate-back request.
3. The cache system according to claim 1, wherein the cache core server is further configured to: receive an acknowledgment message from another server, and send a migrate-back request to the cache edge server according to the acknowledgment message; wherein based on the migrate-back request, the cache edge server disables the TCP connection to the user equipment, and sends a migrate-back response to the cache core server; and the cache core server is further configured to: restore the TCP connection to the user equipment according to the migrate-back response.
4. A cache method for use by a cache edge server, comprising: receiving, from a cache core server, information about a Transmission Control Protocol (TCP) flow; determining, according to the information, whether the cache edge server stores content corresponding to the information; sending a migrate-out request to the cache core server based on that the cache edge server stores the content corresponding to the information; receiving a migrate-out response from the cache core server in response to the migrate-out request; establishing a TCP connection to a user equipment according to the migrate-out response; and transferring the content to the user equipment by using the TCP connection.
5. The cache method according to claim 4, wherein establishing the TCP connection to user equipment comprises: establishing the TCP connection to the user equipment according to TCP connection information in the migrate-out response.
6. The cache method according to claim 4, further comprising: searching for the content according to content searching information in the migrate-out response.
7. The cache method according to claim 4, further comprising: after the user equipment receives the content, sending a migrate-back request to the cache core server to migrate the TCP connection back to the cache core server; receiving a migrate-back response from the cache core server in response to the migrate-back request; and disabling the TCP connection to the user equipment upon the migrate-back response.
8. The cache method according to claim 4, wherein transferring the content to the user equipment by using the TCP connection comprises: transferring a first part of the content to the user equipment by using the TCP connection; and in response to the user equipment moving to a signal range of another server, transferring a second part of the content to the user equipment via the other server.
9. The cache method according to claim 8, further comprising: receiving a migrate-back request from the cache core server after the second part of the content is transferred to the user equipment; disabling the TCP connection to the user equipment based on the migrate-back request; and sending a migrate-back response to the cache core server, so that the cache core server restores the TCP connection to the user equipment.
10. A cache method for use by a cache core server, comprising: sending information about a Transmission Control Protocol (TCP) flow to a catch edge server; receiving a migrate-out request from the cache edge server; disabling a TCP connection to a user equipment in response the migrate-out request; and sending a migrate-out response to the cache edge server, so that the cache edge server establishes a TCP connection to the user equipment according to the migrate-out response, and transfers content corresponding to the information about the TCP flow to the user equipment.
11. The cache method according to claim 10, further comprising: after the content is transferred to the user equipment, receiving a migrate-back request from the cache edge server; and restoring the TCP connection to the user equipment in response to the migrate-back request.
12. The cache method according to claim 10, further comprising: receiving from another server, an acknowledgment message, wherein the acknowledgment message acknowledges that the user equipment has moved from the cache edge server to the other server and has received the content; sending a migrate-back request to the cache edge server; receiving a migrate-back response from the cache edge server upon the migrate-back request; and restoring the TCP connection to the user equipment according to the migrate-back response.
13. A cache edge server, comprising: a transceiver, configured to receive, from a cache core server, information about a Transmission Control Protocol (TCP) flow; and a processor, configured to determine, according to the information, whether the cache edge server stores content corresponding to the information; the transceiver is further configured to: send a migrate-out request to the cache core server based on that the cache edge server stores the content corresponding to the information; and receive a migrate-out response from the cache core server in response to the sending of the migrate-out request; the processor is further configured to: establish a TCP connection to a user equipment according to the migrate-out response by using the transceiver; and the transceiver is further configured to transfer the content to the user equipment by using the TCP connection.
14. The cache edge server according to claim 13, wherein in establishing the TCP connection to user equipment, the processor is configured to: establish the TCP connection to the user equipment according to TCP connection information in the migrate-out response by using the transceiver.
15. The cache edge server according to claim 13, wherein the processor is further configured to search for the content according to content searching information in the migrate-out response.
16. The cache edge server according to claim 13, wherein the processor is further configured to, by using the transceiver: after the user equipment receives the content, send a migrate-back request to the cache core server to migrate the TCP connection back to the cache core server; receive a migrate-back response from the cache core server in response to the migrate-back request; and disable the TCP connection to the user equipment upon the migrate-back response.
17. The cache edge server according to claim 13, wherein the processor is further configured to, by using the transceiver: transfer a first part of the content to the user equipment by using the Transmission Control Protocol connection; and in response to the user equipment moving to a signal range of another server, transfer a second part of the content to the user equipment via the other server.
18. The cache edge server according to claim 17, wherein the processor is further configured to, by using the transceiver: receive a migrate-back request from the cache core server after the second part of the content is transferred to the user equipment; disable the TCP connection to the user equipment based on the migrate-back request; and send a migrate-back response to the cache core server, so that the cache core server restores the TCP connection to the user equipment.
19. A cache core server, comprising: a transceiver, configured to send information about a Transmission Control Protocol (TCP) flow to a catch edge server, and receive a migrate-out request from the cache edge server; and a processor, configured to disable a TCP connection to a user equipment based on the migrate-out request; wherein the transceiver is further configured to send a migrate-out response to the cache edge server, so that the cache edge server establishes a TCP connection to the user equipment according to the migrate-out response, and transfers content corresponding to the information about the TCP flow to the user equipment.
20. The cache core server according to claim 19, wherein the transceiver is further configured to: receive a migrate-back request from the cache edge server after the content is transferred to the user equipment; and the processor is further configured to: restore, by using the transceiver, the TCP connection to the user equipment according to the migrate-back request.
21. The cache core server according to claim 19, wherein the transceiver is further configured to: receive an acknowledgment message from another server, wherein the acknowledgment message acknowledges that the user equipment has moved from the cache edge server to the other server and has received the content; send a migrate-back request to the cache edge server; receive a migrate-back response from the cache edge server upon the migrate-back request; and the processor is further configured to: restore, by using the transceiver, the TCP connection to the user equipment according to the migrate-back response.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
DESCRIPTION OF EMBODIMENTS
[0038] The following describes the technical solutions in the embodiments of the present application with reference to the accompanying drawings. Table 1 lists definitions of abbreviations and key terms related to subsequent embodiments.
TABLE-US-00001 TABLE 1 Abbreviation Full Name CDN content delivery network LTE long term evolution UMTS universal mobile telecommunications system RAN radio access network PS-Core packet switched core network eNB E-UTRAN NodeB (evolved NodeB) BTS base transceiver station RNC radio network controller SGW serving gateway PGW packet data network gateway SGSN serving GPRS support node GGSN gateway GPRS support node UE user equipment PDP packet data protocol RADIUS remote authentication dial in user service RTT round trip time TCP transmission control protocol HTTP hypertext transfer protocol FTP file transfer protocol P2P peer-to-peer
First Embodiment
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045] In step 404, a processing module 333 of the cache core server 33 may detect, according to the partial information of the content included in the HTTP response, that the content requested by the user equipment 11 has been cached in a memory 335 of the cache core server 33. Specifically, the processing module 333 of the cache core server 33 may determine, according to a content identifier (Content-ID) obtained by performing a hash operation on the partial information of the content, that the memory 335 has cached the requested content.
[0046] In step 405, the processing module 333 of the cache core server 33 marks a TCP flow as having been cached. Specifically, the processing module 333 marks the TCP flow, that is, extends a TCP Option field, and marks that the cache core server 33 has cached the content. In step 406, the transceiver module 331 of the cache core server 33 sends the TCP flow with a cache token. In step 407, upon detecting that the TCP flow has the cache token, the processing module 313 of the cache edge server 31 learns that the cache core server 33 has cached the content. In step 408, based on the detected cache token, the transceiver module 311 of the cache edge server 31 queries, by using an outbound channel from the marking cache core server 33, information about the cached content corresponding to the TCP flow.
[0047] In step 409, the transceiver module 331 of the cache core server 33 sends, by using the outbound channel, information about the TCP flow, where the information is about the cached content, and the information may include a uniform resource locator (URL), the content identifier, a TCP sequence number of a start location of an HTTP body, and the like. In step 410, the transceiver module 311 of the cache edge server 31 receives, by using the outbound channel from the cache core server 33, the information about the TCP flow, and the processing module 313 determines, according to the information, whether the memory 315 of the cache edge server 31 stores the content corresponding to the information, that is, whether the memory 315 stores the content that has been cached by the marking cache core server 33.
[0048] If the cache edge server 31 does not store the content corresponding to the information, in step 411, the processing module 313 of the cache edge server 31 accumulates a quantity of query times of the content, where if the quantity of the query times of the content is greater than or equal to a threshold, the processing module 313 acquires, by using the transceiver module 311 and the outbound channel, the content from the cache core server 33; if the cache edge server 31 stores the content corresponding to the information, in step 412, the transceiver module 311 sends, by using the outbound channel, a migrate-out request to the cache core server 33. In step 413, the transceiver module 331 of the cache core server 33 receives the migrate-out request from the cache edge server 31, and the processing module 333 of the cache core server 33 disables, based on the migrate-out request, a TCP connection to the user equipment 11, stops sending data by using the TCP connection, and keeps TCP connection information.
[0049] In step 414, the transceiver module 331 of the cache core server 33 transfers, by using the outbound channel, a migrate-out response to the cache edge server 31, where the migrate-out response includes but is not limited to information in the following Table 2.
TABLE-US-00002 TABLE 2 Maximum sending sequence number of a packet sent by a local end Sequence number of an earliest packet that is sent over TCP by a local end but is not yet acknowledged, that is, sequence number of the first byte in a sending buffer of a local end Next sequence number that a local end expects to receive Data length of a sending buffer Data length of a receiving buffer Size of a receiving window of a peer end Size of a sending congestion window of a local end Maximum value of a sliding window Size of a data packet received for the last time TCP Option information
[0050] In step 415, the transceiver module 311 of the cache edge server 31 receives the migrate-out response from the cache core server 33, and the processing module 313 establishes, by using the transceiver module 311 according to the information included in the migrate-out response, a TCP connection to the user equipment 11. In step 416, the transceiver module 311 of the cache edge server 31 transfers, by using the TCP connection, the content requested by the user equipment 11 to the user equipment 11. In step 417, the transceiver module 311 of the cache edge server 31 receives, by using the TCP connection, an acknowledgment message from the user equipment 11, where the acknowledgment message indicates that the user equipment 11 has received all requested content. In step 418, the transceiver module 311 of the cache edge server 31 receives, by using the TCP connection, a data message from the user equipment 11, where the data message indicates that the user equipment 11 initiates a new request. In step 419, upon the received data message or the received acknowledgment message, the transceiver module 311 of the cache edge server 31 sends, by using the outbound channel, a migrate-back request to the cache core server 33, to migrate the TCP connection back to the cache core server 33.
[0051] It should be noted that, in this signaling flow, as long as either of step 417 and step 418 is performed, step 419 may be performed to migrate the TCP connection back to the cache core server 33. In other words, as long as the user equipment 11 initiates a new request, even if the user equipment 11 has not received all the requested content, step 419 may be directly performed to migrate the TCP connection back to the cache core server 33; or as long as it is acknowledged that the user equipment 11 has received all the requested content, step 419 may be performed to migrate the TCP connection back to the cache core server 33.
[0052] In addition, the migrate-back request includes but is not limited to the information in Table 2, so that the cache core server 33 may restore, according to the information, the TCP connection to the user equipment 11. In step 420, the transceiver module 331 of the cache core server 33 receives the migrate-back request from the cache edge server 31, and the processing module 333 restores, by using the transceiver module 331 according to the migrate-back request, the TCP connection to the user equipment 11. Then, the cache core server 33 may perform TCP flow transmission with the user equipment 11 again; in step 420, the transceiver module 331 of the cache core server 33 sends, by using the outbound channel, a migrate-back response to the cache edge server 31; in step 421, the cache edge server 31 disables the TCP connection to the user equipment.
[0053] In conclusion, in the first embodiment of the present application, after acknowledging that a local end actually stores content requested by user equipment 11, a cache edge server 31 may perform a TCP connection to the user equipment and transfer, by using the TCP connection, the content requested by the user equipment 11 to the user equipment 11. In this way, a cache token server may be not deployed, so as to improve a download speed and reduce costs for deploying the cache token server.
Second Embodiment
[0054]
[0055] In step 416, a transceiver module 311 of the cache edge server 31 transfers, by using a TCP connection, content to the user equipment 11. After the content is transferred, in step 501, the user equipment 11 moves to a signal range of another server (that is, the server 35). Therefore, in step 502, an acknowledgment message sent by the user equipment 11 is received by a transceiver module 311 of the server 35 by using a TCP connection. In step 503, the transceiver module 311 of the server 35 forwards, by using the TCP connection, the acknowledgment message to the cache core server 33. In step 504, a transceiver module 331 of the cache core server 33 receives, by using a TCP connection, the acknowledgment message from the another server (that is, the cache edge server 35). A processing module 333 acknowledges, according to the acknowledgment message, that the user equipment 11 moves from the cache edge server 31 to the another server 35. Specifically, before step 416, the cache core server 33 has stopped sending data on the TCP connection and should not receive a message by using the TCP connection. Therefore, the processing module 333 may acknowledge, according to the acknowledgment message, that the user equipment 11 moves from the cache edge server 31 to the another server 35.
[0056] In step 505, based on that the user equipment 11 moves from the cache edge server 31 to the server 35, the transceiver module 331 of the cache core server 33 sends, by using an outbound channel, a migrate-back request to the cache edge server 31. In step 506, a processing module 313 of the cache edge server 31 receives, by using the transceiver module 311 and the outbound channel, the migrate-back request from the cache core server 33. The processing module 313 of the cache edge server 31 disables, by using the transceiver module 311, the TCP connection to the user equipment 11 based on the migrate-back request. In step 507, the processing module 313 of the cache edge server 31 sends, by using the transceiver module 311 and the outbound channel, a migrate-back response to the cache core server 33. It should be noted that, the migrate-back response includes but is not limited to the information in Table 2, so that the cache core server 33 restores, according to the information, the TCP connection to the user equipment 11.
[0057] In step 508, the transceiver module 331 of the cache core server 33 receives, by using the outbound channel, the migrate-back response from the cache edge server 31. In step 509, the processing module 333 of the cache core server 33 restores, by using the transceiver module 331 according to the migrate-back response, the TCP connection to the user equipment 11. Then, the cache core server 33 may perform TCP flow transmission with the user equipment 11 again.
[0058] Another example of this embodiment is depicted in
[0059] The following describes only a part that is different from the signaling flow in
[0060] In conclusion, in the second embodiment of the present application, after acknowledging that a local end actually stores content requested by user equipment 11, a cache edge server 31 may perform a TCP connection and transfer, by using the TCP connection, the content requested by the user equipment 11 to the user equipment 11. In this way, a cache token server may be not deployed, so as to improve a download speed and reduce costs for deploying the cache token server.
[0061]
[0062] The processor 51 may be a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute a related program, to implement the technical solutions provided in embodiments of the present application.
[0063] The memory 52 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 52 may store an operating system or another application program. When the technical solutions provided in the embodiments of the present application are implemented by using software or firmware, program code used to implement the technical solutions provided in the embodiments of the present application is stored in the memory 52, and is executed by the processor 51.
[0064] The input/output interface 53 is configured to receive input data and information, and to output data such as an operation result.
[0065] The communications interface 54 uses a transceiver apparatus, such as but not limited to, a transceiver and a transceiver module, so as to implement communication between the cache edge server 5 and another device or communications network.
[0066] The bus 55 may include a channel to transfer information between parts (such as the processor 51, the memory 52, the input/output interface 53, and the communications interface 54) of a multimedia processing apparatus 5.
[0067] It should be noted that, although only the processor 51, the memory 52, the input/output interface 53, the communications interface 54, and the bus 55 of the illustrated multimedia processing apparatus 5 are shown in
[0068] The hardware structure shown in
[0069] A person of ordinary skill in the art may understand that all or some of the processes of the methods in the embodiments may be implemented by a computer program instructing relevant hardware. The program may be stored in a computer readable storage medium. When the program runs, the processes of the methods in the embodiments are performed. The foregoing storage medium may include: a disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM).
[0070] Specific examples are used in this specification to describe the principle and implementation manners of the present application. The descriptions of the foregoing embodiments are merely intended to help understand the method and idea of the present application. In addition, with respect to the implementation manners and the application scope, modifications may be made by a person of ordinary skill in the art according to the idea of the present application. Therefore, this specification shall not be construed as a limitation on the present application.