Cache sharing method and device

A technology of cache and cache capacity, applied in the field of communication, can solve the problems of lack of resources and low resource utilization, and achieve the effect of sharing and isolation

Active Publication Date: 2017-06-13
CHINA TELECOM CORP LTD
4 Cites 4 Cited by

AI-Extracted Technical Summary

Problems solved by technology

However, since there is no resource sharing, when ...
View more

Method used

This device can judge whether data packet can be stored in cache by clear logic, can carry out fast processing to data packet; Can guarantee that each type of data packet obtains effective cache within the scope of the protocol cache capacity of itself , realizes data packet control by type, and improves the fairness of data security guarantee.
This device has been provided with protocol cache threshold for cache queue, can first judge whether cache queue is crowded, judge according to the data packet type of data packet again under crowded situation, thereby can more effectively utilize the buffer space of cache queue, Avoid packet loss when the buffer queue is relatively free but there are many packets of a certain type.
This meth...
View more

Abstract

The invention provides a cache sharing method and device, and relates to the technical field of communications. The cache sharing method of the invention comprises the following steps: receiving a data packet, and judging the type of the data packet, wherein the data packet type comprises an operator corresponding to the data packet or the business type of the data packet; determining whether to abandon the data packet or store the data packet in a cache queue according to the corresponding protocol cache capacity of the data packet in the cache queue, the size of the data packet and the cached data volume of the data packet of the corresponding type. The method disclosed by the invention comprises the following steps: judging the operator or the business type corresponding to the received data packet, judging whether to store the data packet in the cache queue based on the operator or the business type corresponding to the data packet, thereby performing cache handling on the data packet in a classification way; and the sharing and the isolation of the cache queue are realized.

Application Domain

Transmission

Technology Topic

Operating systemNetwork packet +1

Image

  • Cache sharing method and device
  • Cache sharing method and device
  • Cache sharing method and device

Examples

  • Experimental program(1)

Example Embodiment

[0040] The technical solutions of the present invention will be further described in detail below through the accompanying drawings and embodiments.
[0041] The flowchart of an embodiment of the cache sharing method of the present invention is as follows image 3 Shown.
[0042] In step 301, when a new data packet is received, the queue management process is triggered to determine the type of the incoming data packet. The data packet type can refer to the operator type to which the data packet belongs, or the service type of the data packet.
[0043] In step 302, the data packet is determined to be discarded or stored in the buffer queue according to the protocol buffer capacity corresponding to the data packet type in the buffer queue, the size of the data packet, and the amount of buffered data of the data packet of the corresponding type. Each data packet type can have a certain protocol buffer capacity or protocol buffer ratio in the buffer queue. The protocol buffer capacity/proportion of the data packet type, the size of the data packet, and the buffered capacity of the type in the buffer queue can be comprehensively considered to determine whether to store the data packet in the buffer.
[0044] This method can determine the operator or service type to which the received data packet belongs, and determine whether to store the data packet in the buffer queue based on the operator or data type to which the data packet belongs, so as to realize the type of data packet buffer processing. Realize the sharing and isolation of the cache queue.
[0045] The physical entity corresponding to the cache queue is a section of memory (storage resources), and memory resources are limited, especially for micro-stations and mobile terminals. Therefore, it is necessary to design an efficient cache queue to ensure the utilization of its storage resources and realize the resource isolation of different operators (or services). In an embodiment, the cache queue may be a queue of the S1 interface, a queue of a service server, or a terminal queue.
[0046] In one embodiment, it can be determined whether the sum of the amount of buffered data in the buffer queue of the data packet of the corresponding type and the size of the received data packet exceeds the protocol buffer capacity corresponding to the data packet type in the buffer queue. If it exceeds, it means that there are too many data packets of the data packet type in the buffer queue and the data packets need to be discarded; if it does not exceed, the data packets are stored in the buffer queue.
[0047] This method can judge whether the data packet can be stored in the cache through clear logic, and can process the data packet quickly; it can ensure that each type of data packet is effectively cached within its own protocol cache capacity, and realizes Different types of data packet control improve the fairness of data security.
[0048] The flowchart of another embodiment of the cache sharing method of the present invention is as follows Figure 4 Shown.
[0049] In step 401, when a new data packet is received, the queue management process is triggered to determine the type of the incoming data packet.
[0050] In step 402, it is determined whether the sum of the used buffer amount of the buffer queue and the data packet size exceeds a predetermined buffer threshold, if it does not exceed the threshold, step 405 is executed; otherwise, step 403 is executed. The predetermined cache threshold may be a predetermined occupancy ratio of the cache queue, for example, 80%. When the amount of used cache does not reach the predetermined cache threshold, it means that the cache queue is empty. It does not matter whether the storage capacity of this type of data packet has exceeded its protocol cache capacity; if it has exceeded the used cache threshold, the cache queue is relatively empty. Full, need to filter according to data packet type.
[0051] In an embodiment, the cache queue can be divided into a shared segment A and an isolated segment B, and the A segment is used to cache data of various operators. In addition, segment B is reserved for receiving burst data from operators who have not reached their agreed ratio. Sections A and B can be logically divided, not actual physical divisions. The general principle is to see whether the occupancy rate of the total buffer reaches the threshold of segment A, for example, 80%. The ratio of section A and B can be configured according to actual conditions and is variable. For example, 80% of the total cache is segment A and 20% is segment B.
[0052] In step 403, it is determined whether the sum of the amount of buffered data in the buffer queue of the data packet of the corresponding type and the size of the received data packet exceeds the protocol buffer capacity corresponding to the data packet type in the buffer queue. If it exceeds, go to step 404; otherwise, go to step 405.
[0053] In step 404, the data packet is discarded.
[0054] In step 405, the data packet is stored in the buffer queue.
[0055] This method sets the protocol buffer threshold for the buffer queue. It can first judge whether the buffer queue is crowded, and then judge according to the data packet type of the data packet in the case of congestion, so that the buffer space of the buffer queue can be used more effectively and avoid When the queue is idle but there are many packets of a certain type, packets are lost.
[0056] In an embodiment, it can be determined whether the sum of the used buffer amount of the buffer queue and the data packet size exceeds the total capacity of the buffer queue. If it exceeds, it means that the buffer queue will overflow, the data packet cannot be stored in the buffer, and the data packet needs to be discarded. This method can prevent the overflow of the buffer queue and ensure the safe operation of the system.
[0057] The flow chart of another embodiment of the cache sharing method of the present invention is as follows Figure 5 Shown.
[0058] In step 501, when a data packet arrives, queue management is triggered to determine the type of the data packet. The data packet type can refer to the operator to which the data packet belongs, or the service type of the data packet.
[0059] In step 502, the occupied size M (Mbits) of the current buffer queue and the size x (Mbits) of the data packet are obtained.
[0060] In step 503, compare the size of M+x and the shared segment capacity A of the buffer queue. If M+x≤A, it means that the buffer queue is relatively idle, and step 507 is executed; otherwise, the isolation processing flow is triggered, and step 504 is executed.
[0061] In step 504, the size of M+x and the total capacity of the cache queue (A+B) are compared. If M+x>(A+B), it means that the remaining resources of the buffer queue are small and insufficient to store the data packet, and step 508 is executed; otherwise, step 505 is executed.
[0062] In step 505, the buffered data amount Q of the data packet of the data packet type in the buffer queue is obtained.
[0063] In step 506, compare Q+x with the protocol buffer capacity of the corresponding data packet type. The capacity of the protocol buffer can be represented by A*p[n], where p[n] is the proportion of the protocol buffer of the data packet type n in the buffer queue. If Q+x≤A*p[n], it means that the protocol buffer ratio of this type is not exceeded, and step 507 is executed; otherwise, it means that the protocol buffer space of other operators or service types will be occupied, and step 508 is executed.
[0064] In step 507, the data packet is stored in the buffer queue.
[0065] In step 508, the data packet is discarded.
[0066] This method can consider various factors such as the remaining amount of buffer space, the protocol buffer space of the packet type, and the amount of cached data of the packet type, and judge with clear and rigorous logic to optimize the effect of queue management.
[0067] In one embodiment, the sentence can be judged logically:
[0068] x
[0069] Determine whether to store the data packet in the buffer. If the result of the above formula is 1, the data packet is stored in the buffer queue, if it is 0, the data packet is discarded.
[0070] This method can be implemented with logical judgment statements such as Figure 5 The judgment shown in the figure facilitates the technical personnel to apply the method in practice.
[0071] In an embodiment, after a data packet arrives, the entire buffer queue may be scanned to obtain the used buffer amount M of the buffer queue and the buffered data amount Q of the corresponding type of data packet. The method can obtain the M and Q values ​​instantly, the obtained data is more reliable, and the accuracy of the method is improved.
[0072] In one embodiment, the type and size of data packets stored in the cache queue, and the type and size of data packets successfully sent from the cache queue can be counted, and then the used cache amount M of the cache queue and the corresponding type of data can be obtained. The amount of cached data Q of the packet. With this method, there is no need to scan all buffer queues when data packets arrive, which improves efficiency.
[0073] A schematic diagram of an embodiment of the cache sharing device of the present invention is as follows: Image 6 Shown. Among them, 601 is a data packet receiving module, which is used to trigger the process of queue management when a new data packet is received, and determine the type of the incoming data packet. The data packet type can refer to the operator type to which the data packet belongs, or the service type of the data packet. 602 is a protocol buffer judging module, which can determine whether to discard or store a data packet in the buffer queue according to the protocol buffer capacity corresponding to the data packet type in the buffer queue, the size of the data packet, and the amount of buffered data of the corresponding type of data packet. Each data packet type can have a certain protocol buffer capacity or protocol buffer ratio in the buffer queue. The protocol buffer capacity/proportion of the data packet type, the size of the data packet, and the buffered capacity of the type in the buffer queue can be comprehensively considered to determine whether to store the data packet in the buffer.
[0074] This device can determine the operator or service type to which the received data packet belongs, and determine whether to store the data packet in the buffer queue based on the operator or data type to which the data packet belongs, so as to realize the type of data packet buffer processing. Realize the sharing and isolation of the cache queue.
[0075] In an embodiment, the protocol cache determination module includes a protocol cache determination unit and a protocol cache execution unit. The protocol buffer judging unit can judge whether the sum of the amount of buffered data in the buffer queue of the corresponding type of data packet and the size of the received data packet exceeds the protocol buffer capacity corresponding to the data packet type in the buffer queue, and pass the result to the protocol Cache execution unit. The protocol buffer execution unit executes corresponding operations according to the judgment result of the protocol buffer judgment unit, including: the sum of the amount of buffered data in the buffer queue of the corresponding type of data packet and the size of the received data packet exceeds that of the data packet type in the buffer In the case of the corresponding protocol buffer capacity in the queue, the data packet is discarded; in the case of not exceeding, the data packet is stored in the buffer queue.
[0076] This device can judge whether the data packet can be stored in the cache through clear logic, and can process the data packet quickly; it can ensure that each type of data packet is effectively cached within its own protocol cache capacity, and realizes Different types of data packet control improve the fairness of data security.
[0077] A schematic diagram of another embodiment of the cache sharing device of the present invention is as follows Figure 7 As shown, where 701 is a data packet receiving module, which is used to trigger the process of queue management when a new data packet is received, and determine the type of the incoming data packet. 702 is a threshold judgment module, which is used to judge whether the sum of the used buffer amount of the buffer queue and the data packet size exceeds the predetermined buffer threshold. If it does not exceed the threshold, the buffer queue is empty and the data packet is stored in the buffer queue; otherwise it is activated Protocol cache judgment module 703. The protocol buffer judging module 703 judges whether the sum of the amount of buffered data in the buffer queue of the corresponding type of data packet and the size of the received data packet exceeds the corresponding protocol buffer capacity of the data packet type in the buffer queue, and if it exceeds, discard it Data packets, otherwise the school bags will be stored in the buffer queue.
[0078] This device sets a protocol buffer threshold for the buffer queue. It can first judge whether the buffer queue is crowded, and then judge according to the packet type of the data packet when it is crowded, so that the buffer space of the buffer queue can be used more effectively and avoid When the queue is idle but there are many packets of a certain type, packets are lost.
[0079] In one embodiment, Figure 7 702 in can also be a total capacity judging module for judging whether the sum of the used buffer amount of the buffer queue and the data packet size exceeds the total capacity of the buffer queue. If it exceeds, it means that the buffer queue will overflow, and the data packet cannot be stored in the buffer, and the data packet needs to be discarded. Otherwise, the protocol buffer judgment module 703 is activated for judgment operation. This device can prevent the buffer queue from overflowing and ensure the safe operation of the system.
[0080] A schematic diagram of another embodiment of the cache sharing device of the present invention is as follows Figure 8 As shown, where 801 is a data packet receiving module, which is used to trigger queue management when a data packet arrives to determine the type of the data packet. 802 is the first judgment module, which is used to judge whether the sum of the used buffer amount of the buffer queue and the data packet size exceeds the predetermined buffer threshold. If it does not exceed the threshold, the data packet is stored in the buffer queue; if the threshold is exceeded, the first Two judgment module 803. The second judgment module 803 is used to judge whether the sum of the used buffer amount of the buffer queue and the data packet size exceeds the total capacity of the buffer queue, if it exceeds the total capacity of the buffer queue, then discard the data packet; if it does not exceed the total capacity of the buffer queue, activate Protocol cache judgment module 804. The protocol buffer judgment module 804 is used to judge whether the sum of the amount of buffered data in the buffer queue of the corresponding type of data packet and the size of the received data packet exceeds the protocol buffer capacity corresponding to the data packet type in the buffer queue; if it exceeds, The data packet is discarded; if it is not exceeded, the data packet is stored in the buffer queue.
[0081] This device can consider various factors such as the remaining amount of buffer space, the protocol buffer space of the packet type, and the amount of cached data of the packet type, and judge with clear and rigorous logic to optimize the effect of queue management.
[0082] In one embodiment, the cache sharing device further includes a scanning module 805, which is used to scan the entire cache queue after a data packet arrives to obtain the used cache amount of the cache queue and the cached data amount of the corresponding type of data packet. This method can instantly obtain the used buffer amount of the buffer queue and the buffered data amount of the corresponding type of data packet, the obtained data is real-time and reliable, and the accuracy of the method is improved.
[0083] In one embodiment, Figure 8 805 can also be a statistics module, used to count the type and size of data packets stored in the cache queue, and the type and size of data packets successfully sent from the cache queue, and then obtain the used cache amount of the cache queue and the corresponding The amount of cached data for the type of packet. This device does not need to scan all buffer queues when data packets arrive, which improves efficiency.
[0084] In an embodiment, the cache queue may be a queue of the S1 interface, a queue of a service server, or a terminal queue. This device can be used in all links of the communication process, which is beneficial to realize end-to-end cache sharing and isolation.
[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it; although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that: The specific implementation of the invention is modified or some technical features are equivalently replaced; without departing from the spirit of the technical solution of the invention, all of them shall be covered by the scope of the technical solution claimed by the invention.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products