CN112445727B - Edge cache replacement method and device based on viewport characteristics - Google Patents
Edge cache replacement method and device based on viewport characteristics Download PDFInfo
- Publication number
- CN112445727B CN112445727B CN202011368371.7A CN202011368371A CN112445727B CN 112445727 B CN112445727 B CN 112445727B CN 202011368371 A CN202011368371 A CN 202011368371A CN 112445727 B CN112445727 B CN 112445727B
- Authority
- CN
- China
- Prior art keywords
- cache
- edge
- edge cache
- viewport
- tile
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000003860 storage Methods 0.000 claims abstract description 76
- 230000000875 corresponding effect Effects 0.000 claims description 29
- 230000008859 change Effects 0.000 claims description 19
- 238000009826 distribution Methods 0.000 claims description 10
- 230000002596 correlated effect Effects 0.000 claims description 5
- 238000013507 mapping Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 3
- 230000004075 alteration Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/12—Replacement control
- G06F12/121—Replacement control using replacement algorithms
- G06F12/122—Replacement control using replacement algorithms of the least frequently used [LFU] type, e.g. with individual count value
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Image Processing (AREA)
Abstract
The application discloses an edge cache replacement method based on viewport characteristics, which comprises the following steps: acquiring weight information of each image block in the panoramic video; when the acquired image blocks need to be cached, judging whether the storage space of the edge cache is sufficient or not; if the storage space of the edge cache is insufficient, deleting the image blocks smaller than the preset weight in the cache unit; replacing the cache unit storing the image blocks according to a replacement algorithm; the edge cache stores tiles of the same panoramic video by creating a cache unit. The application also discloses an edge caching device and a computer readable storage medium, which solve the problem that the hit rate of the image block of the edge cache is reduced due to the fact that the importance of the image block cannot be judged in the prior art, and improve the hit rate of the image block of the edge cache.
Description
Technical Field
The present application relates to the field of storage management technologies, and in particular, to a method and an apparatus for replacing an edge cache based on viewport features.
Background
In a panoramic video transmission scheme applied to a multi-user scene, a panoramic video is required to be segmented into a plurality of segments of video blocks with the same duration in a time dimension, then the video blocks are segmented into a plurality of blocks with the same resolution in the space dimension, each block is encoded by using a plurality of code rates, a user side is spliced to obtain a complete video block through downloading the blocks, and then the user views the video block through a view port.
In the prior art, in order to reduce repeated transmission of common tiles, the tiles downloaded from a remote server need to be stored in an edge buffer. However, the present inventors found that the transmission of the above video has the following technical problems:
1. the hit rate of the image blocks is high, the storage of the edge cache is limited, and a large number of image blocks cannot be stored;
2. the least recently used permutation algorithm (Least Recently Used, LRU) and the least frequently used permutation algorithm (Least Frequently Used, LFU) are both unable to determine the importance of a tile, thereby easily confusing commonly used tiles with non-commonly used tiles, reducing the tile hit rate of the edge cache.
Therefore, designing a way to quickly determine the tiles that may not be reused when storing as many common tiles as possible, so that a higher cache hit rate can be maintained after replacing the tiles in the edge cache is a technical problem to be solved in the present application.
Disclosure of Invention
The application mainly aims to provide an edge cache replacement method, device and computer storage medium based on view port characteristics, and aims to solve the problem that in the prior art, the hit rate of an image block of an edge cache is reduced due to incapability of judging the importance of the image block.
In order to achieve the above object, the present application provides an edge buffer replacement method based on viewport features, the edge buffer replacement method based on viewport features includes the following steps:
in one embodiment, the panoramic video is segmented into a plurality of equally sized and consecutive video blocks in time sequence, and each video block is segmented into a plurality of equally resolved tiles; the method comprises the following steps:
acquiring weight information of each image block in the panoramic video;
when the acquired image blocks need to be cached, judging whether the storage space of the edge cache is sufficient or not;
if the storage space of the edge cache is insufficient, deleting the image blocks smaller than the preset weight in the cache unit;
replacing the cache unit storing the image blocks according to a replacement algorithm; the edge cache stores tiles of the same panoramic video by creating a cache unit.
In an embodiment, the obtaining the weight information of each tile in the panoramic video includes:
obtaining a view port feature, and mapping a viewing direction to a panoramic video picture;
and counting the user viewport frequencies of different image block positions, and calculating the weight value of the corresponding image block according to the frequencies.
In an embodiment, the viewport feature is a trajectory of change in viewing direction; the edge cache replacement method based on the viewport features further comprises the following steps:
and acquiring the change tracks of all view directions of the view ports, and updating the weight distribution information of each image block in the view ports in real time according to the change tracks.
In one embodiment, before buffering the acquired tile, the method further includes:
analyzing the block information to obtain an index of the cache unit;
inquiring whether the index of the cache unit is stored in the edge cache or not;
if the cache unit is not stored in the edge cache, a new cache unit is built in the edge cache according to the index.
In an embodiment, the tile information includes at least: the name of the panoramic video, the footprint of the tile, and the tile resolution.
In an embodiment, the edge cache replacement method based on the viewport feature further includes:
setting storage time length positively correlated with the weight for all stored image blocks in the edge cache;
when the storage duration of the tile ends, the corresponding tile is deleted.
In an embodiment, the edge cache replacement method based on the viewport feature further includes: if all tiles in the cache unit are deleted, the cache unit is deleted from the edge cache.
In one embodiment, the permutation algorithm comprises: the least recently used permutation algorithm or the least frequently used permutation algorithm.
To achieve the above object, the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores an edge cache replacement program based on a viewport feature, and the edge cache replacement program based on the viewport feature implements each step of the edge cache replacement method based on the viewport feature as described above when being executed by a processor.
In order to achieve the above object, the present application further provides an edge buffer device, where the edge buffer device includes one or more processors, a memory, and a view port feature-based edge buffer replacement program stored in the memory and capable of running on the processor, where the view port feature-based edge buffer replacement program implements the steps of the view port feature-based edge buffer replacement method as described above when executed by the processor.
The technical scheme of the edge cache replacement method and the device based on the viewport features provided by the embodiment of the application has at least the following technical effects:
1. because the panoramic video is segmented into a plurality of continuous video blocks with the same size according to the time sequence, each video block is segmented into a plurality of blocks with the same resolution, the weight information of each block in the panoramic video is acquired, when the acquired blocks are required to be cached, whether the storage space of the edge cache is sufficient or not is judged, if the storage space of the edge cache is insufficient, the technical scheme of deleting the blocks with the weights smaller than the preset weight in the cache unit is adopted, the problems that the hit rate of the blocks is high, the storage of the edge cache is limited, and the importance of the blocks cannot be judged in the prior art are solved, and the hit rate of the edge cache blocks is improved.
2. Because the cache units storing the tiles are replaced according to a replacement algorithm; the edge cache stores the image blocks of the same panoramic video by creating a cache unit; the permutation algorithm comprises: the technical scheme of least recently used replacement algorithm or least frequently used replacement algorithm solves the problem that the tile hit rate of the edge cache is reduced because the tiles which are not reused can not be judged quickly in the prior art, and can still keep higher cache hit rate after the tiles are replaced in the edge cache.
Drawings
FIG. 1 is a schematic diagram of an edge buffer device according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a first embodiment of an edge cache replacement method based on viewport features according to the application;
FIG. 3 is a flowchart illustrating a first embodiment of a method for replacing an edge buffer according to the present application, step S110;
FIG. 4 is a flowchart illustrating a second embodiment of an edge cache replacement method based on viewport features according to the application;
FIG. 5 is a flowchart illustrating a third embodiment of an edge cache replacement method based on viewport features according to the application;
the achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The method and the device solve the problem that the hit rate of the image block in the edge cache is reduced because the importance of the image block cannot be judged in the prior art, and acquire weight information of each image block in the panoramic video; when the acquired image blocks need to be cached, judging whether the storage space of the edge cache is sufficient or not; if the storage space of the edge cache is insufficient, deleting the image blocks smaller than the preset weight in the cache unit; replacing the cache unit storing the image blocks according to a replacement algorithm; the edge cache stores the image blocks of the same panoramic video by creating a cache unit; the technical scheme of the edge cache device and the computer readable storage medium is adopted, so that the hit rate of the edge cache block is improved.
In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
Those skilled in the art will appreciate that the hardware architecture of the system-on-chip shown in FIG. 1 is not limiting of the system-on-chip, and that the system-on-chip may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As an implementation manner, as shown in fig. 1, fig. 1 is a schematic structural diagram of an edge buffer device according to an embodiment of the present application.
The processor 1100 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the methods described above may be performed by integrated logic circuitry in hardware or instructions in software in processor 1100. The processor 1100 described above may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 1200, and the processor 1100 reads information in the memory 1200, and in combination with its hardware, performs the steps of the method described above.
It is to be appreciated that memory 1200 in embodiments of the application may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (Double Data Rate SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). The memory 1200 of the systems and methods described in embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
For a software implementation, the techniques described in embodiments of the present application may be implemented by modules (e.g., procedures, functions, and so on) that perform the functions described in embodiments of the present application. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Based on the above-described structure, an embodiment of the present application is presented.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of an edge buffer replacement method based on viewport features according to the application, wherein the edge buffer replacement method based on viewport features comprises the following steps:
step S110, weight information of each block in the panoramic video is obtained.
In this embodiment, the panoramic video is segmented into a plurality of video blocks with the same size and continuous according to the time sequence, each video block is segmented into a plurality of tiles with the same resolution, and the edge cache stores the tiles of the same panoramic video by creating a cache unit; the method includes the steps that weight information of each image block in panoramic video is obtained, the weight refers to importance degree of a certain image block or index in a cache unit relative to all image blocks in the cache unit, statistics of the weight information of each image block can be performed by adopting methods such as an expert evaluation method, a weighted statistics method and a frequency statistics method, and the application takes the frequency statistics method to count user viewport frequencies of different image block positions as an example, and specifically implementation is as shown in step S111 to step S113, and details are omitted here.
Referring to fig. 3, fig. 3 is a flowchart illustrating a refinement step of step S110 in a first embodiment of a viewport feature-based edge buffer replacement method according to the present application, including:
step S111, obtaining the view port feature, and mapping the view direction to the panoramic video picture.
In this embodiment, the view port feature refers to a change track of a panoramic video viewing direction, where the viewing direction has variability, and the change track of the corresponding viewing direction also has variability, which may be a change track of any viewing direction left, right, upward, and downward, and may change the corresponding viewing direction according to the interest or viewing habit of the user; the mapping refers to the corresponding relation between the viewing direction and the panoramic video picture, the viewing direction corresponding to the view port is mapped to the panoramic video picture by collecting the changing track of the viewing direction in the process of viewing the panoramic video by a user, and the user can load the panoramic video on intelligent equipment such as a personal computer, an intelligent mobile phone and the like and view the panoramic video.
Step S112, counting the user viewport frequencies of different image block positions, and calculating the weight value of the corresponding image block according to the frequencies.
In this embodiment, the panoramic video is stored in a remote server, and when the panoramic video is acquired from the remote server, the remote server maps the viewing direction onto a panoramic video picture according to the track change of the viewing direction of the viewing port of the user, counts the viewing port frequencies of the user at different image block positions in the panoramic video picture, and calculates the weight value of the corresponding image block according to the viewing port frequencies of the user; the user view port frequency can be displayed through a view direction hotspot graph, the view direction hotspot graph comprises a plurality of user view ports at different block positions in the view direction, and the weight value of the corresponding block is calculated by counting the user view port frequency at the different block positions corresponding to the different view directions on the view direction hotspot graph; for example, if the viewing direction of the user is located at the very center most of the time, counting the frequency of the user's view port located at the very center block according to the thermal diagram of the viewing direction, and calculating and obtaining the weight value of the corresponding block according to the frequency of the user's view port; if the user's viewing direction is at the upper side most of the time, according to the viewing direction heat map, counting the frequency of the user's viewing port at the upper side block position, and calculating according to the frequency of the user's viewing port to obtain the weight value of the corresponding block, for example, the frequency of the user's viewing port at the right center block position counted from the viewing direction heat map is 5, the frequency of the user's viewing port at the upper side block position is 3, the frequency of the user's viewing port at the left side block position is 2, the number of the blocks in the viewing port corresponding to each direction is 10, the weight of the block at the right center is 0.5, the weight of the block at the upper side is 0.3, and the weight of the block at the right center is 0.2.
Step S113, obtaining the change tracks of all view directions of the view ports, and updating the weight distribution information of each image block in the view ports in real time according to the change tracks.
In this embodiment, when a user views a panoramic video, tiles are acquired from a remote server in real time, and view ports of a plurality of users when viewing the panoramic video are collected, because weight distribution information of each tile in the view ports changes due to changes of viewing direction change tracks, weight values are continuously changed, and therefore the weight distribution information of each tile in the view ports needs to be updated in real time according to the change tracks, and weight values of corresponding tiles are calculated.
Because the technical scheme that the view port characteristics are obtained, the view directions are mapped to the panoramic video picture, the view port frequencies of users at different image block positions are counted, the weight values of the corresponding image blocks are calculated according to the frequencies, the change tracks of all view port view directions are obtained, and the weight distribution information of each image block in the view port is updated in real time according to the change tracks is adopted, the problems that the image block hit rate is high and a large number of image blocks cannot be stored in the prior art are effectively solved, and the weight distribution information of each image block in the view port is obtained in real time so as to improve the hit rate of the image block.
In step S120, when the acquired tile needs to be cached, it is determined whether the storage space of the edge cache is sufficient.
In this embodiment, when a user receives a tile from a remote server, the tile needs to be stored in an edge cache, because the storage space of the edge cache is limited, when the acquired tile needs to be cached, the size of the total file of the newly inserted tile needs to be compared with the storage space of the edge cache, and whether the storage space of the edge cache is sufficient is determined; for example, if the storage space of the edge buffer is 100MB, and the total file size of the newly inserted tile of the panoramic video is 50MB, the storage space of the edge buffer is sufficient; if the storage space of the edge buffer is 100MB, and the total file size of the newly inserted image block of the panoramic video is 101MB, the storage space of the edge buffer is insufficient.
In step S130, if the storage space of the edge buffer is insufficient, deleting the tiles smaller than the preset weight in the buffer unit.
In this embodiment, when the storage space of the edge buffer is insufficient to store a new image block, the edge buffer acquires real-time image block weight distribution from a remote server, deletes the image block with less than a preset weight in the buffer unit, preferentially stores the image block with high weight, and improves the hit rate of the buffered image block, wherein the edge buffer stores the image block of the same panoramic video by creating the buffer unit, the image blocks in each buffer unit are ordered according to the weight value of the image block, and when the storage space of the edge buffer is insufficient, acquires the real-time weight distribution of the image block, deletes the image block with less than the preset weight value until the edge buffer has enough space to store the new image block; for example, if the preset weight of the tile is 0.5, the tile with the weight of 0.2 and 0.8 is stored in the edge buffer, and when the storage space of the edge buffer is insufficient, the tile with the weight of 0.2 is deleted.
Step S140, replacing the cache unit storing the image blocks according to a replacement algorithm; the edge cache stores tiles of the same panoramic video by creating a cache unit.
In this embodiment, the edge buffer creates a buffer unit to store the tiles of the same panoramic video, and the edge buffer may include one or more buffer units, where the buffer units may store the tiles of the same video according to the same classification information; the replacement algorithm includes a least recently used replacement algorithm or a least frequently used replacement algorithm, and the least recently used or least frequently used cache units are replaced according to the replacement algorithm, and all cache units can be managed by using the replacement algorithm, for example, when a certain cache unit is reused, the importance of the cache unit is modified by using the replacement algorithm.
Acquiring the weight information of each image block in the panoramic video, acquiring the change track of the viewing direction of all the view ports, updating the weight distribution information of each image block in the view ports in real time according to the change track, judging whether the storage space of the edge cache is sufficient or not when the acquired image blocks are required to be cached, deleting the image blocks with less than the preset weight in the cache unit if the storage space of the edge cache is insufficient, and replacing the cache unit storing the image blocks according to a replacement algorithm; according to the technical scheme, the image blocks of the same panoramic video are stored in the edge cache through the creation of the cache unit, the problems that in the prior art, the hit rate of the image blocks is high, the storage of the edge cache is limited, a large number of image blocks cannot be stored are effectively solved, and the hit rate of the image blocks is improved.
Referring to fig. 4, fig. 4 is a flowchart of a second embodiment of an edge cache replacement method based on viewport features according to the application, including:
in step S210, the tile information is parsed to obtain the index of the cache unit.
In this embodiment, the tile information is analyzed as the index of the buffer unit, all the tiles are classified and stored in the corresponding buffer unit according to the related information, and the view ports of a plurality of users watching the tiles are collected at the same time, so that the weights of the tiles are updated in real time; the image blocks can be stored in the corresponding cache units according to panoramic video names, the image blocks can be stored in the corresponding cache units according to occupied spaces of the image blocks, and the image blocks can be stored in the same cache unit according to resolution of the image blocks; for example, the remote server includes a panoramic video named a, wherein the panoramic video includes three tiles a1, a2 and a3, the edge cache includes A, B two cache units, connection with the cache unit a is established according to the name of the a video, and when a user obtains a1 from the remote server, the a1 can be stored in the cache unit a instead of the cache unit B through the index of the cache unit.
In step S220, it is queried whether the index of the cache unit is already stored in the edge cache.
In this embodiment, when the storage duration of each tile in the cache unit is over or the weight of the tile is smaller than the preset weight, the tile is deleted, and when all the tiles in the cache unit are deleted, the corresponding cache unit is deleted, so when a new tile is inserted into the edge cache, it is necessary to first query whether the cache unit corresponding to the new tile is already stored in the edge cache, and determine whether the cache unit is stored in the edge cache by querying the index of the cache unit.
Step S230, if the buffer unit is not stored in the edge buffer, a new buffer unit is built in the edge buffer according to the index.
In this embodiment, when the cache unit is queried and not stored in the edge cache, a new cache unit is built in the edge cache according to the index, for example, the remote server includes panoramic video named B, wherein the three tiles including B1, B2 and B3 are included, when the cache unit is queried and not stored in the edge cache, a cache unit named B is built in the edge cache according to the panoramic video index named B, and B1, B2 and B3 tiles in the panoramic video named B are stored in the B cache according to the index.
Step S240, weight information of each block in the panoramic video is obtained.
In step S250, when the acquired tile needs to be cached, it is determined whether the storage space of the edge cache is sufficient.
In step S260, if the storage space of the edge buffer is insufficient, deleting the tiles smaller than the preset weight in the buffer unit.
Step S270, replacing the cache unit storing the block according to a replacement algorithm; the edge cache stores tiles of the same panoramic video by creating a cache unit.
Compared with the first embodiment, the second embodiment includes step S210, step S220, step S230, and other steps are the same as those of the first embodiment, and will not be repeated.
The method comprises the steps of analyzing block information to obtain an index of a cache unit, inquiring whether the index of the cache unit is stored in an edge cache or not, if the index of the cache unit is not stored in the edge cache, establishing a new cache unit in the edge cache according to the index, obtaining weight information of each block in a panoramic video, judging whether the storage space of the edge cache is sufficient when the obtained block is required to be cached, if the storage space of the edge cache is insufficient, deleting the block with weight smaller than a preset weight in the cache unit, and replacing the cache unit storing the block according to a replacement algorithm; according to the technical scheme, the image blocks of the same panoramic video are stored in the edge cache through the creation of the cache unit, the problem that the hit rate of the image blocks of the edge cache is reduced due to the fact that the image blocks which are not multiplexed can not be judged rapidly in the prior art is solved, and the hit rate of common image blocks is improved.
Referring to fig. 5, fig. 5 is a flowchart of a third embodiment of an edge cache replacement method based on viewport features according to the application, which includes:
step S310, weight information of each block in the panoramic video is obtained.
In step S320, when the acquired tile needs to be cached, it is determined whether the storage space of the edge cache is sufficient.
In step S330, if the storage space of the edge buffer is insufficient, deleting the tiles smaller than the preset weight in the buffer unit.
Step S340, replacing the cache unit storing the block according to a replacement algorithm; the edge cache stores tiles of the same panoramic video by creating a cache unit.
In step S350, a storage duration positively correlated to the weight is set for all stored tiles in the edge buffer.
In this embodiment, in order to further improve the hit rate of the edge cache to the common image blocks, a storage time length mechanism is set, where the storage time length mechanism is applied to all the image blocks being stored in the edge cache, each image block is correspondingly set with a corresponding storage time length, and the storage time length positively correlated to the weight is set for all the stored image blocks in the edge cache, that is, the greater the storage time length is related to the weight value of the image block, the longer the storage time length is; for example, if the weight value of a tile is 0.1, the corresponding tile storage period is set to 10 seconds, and if the weight value of a tile is 0.2, the corresponding tile storage period is set to 15 seconds.
In step S360, when the storage duration of the tile is over, the corresponding tile is deleted.
In this embodiment, the edge cache queries the storage duration of all the stored tiles at regular time, and if the storage duration of the tile is over, the corresponding tile is forcedly deleted; for example, when a tile has been stored for up to 10 seconds and no call has been made to the tile for 10 seconds, resulting in a decrease in the weight value of the tile, the tile is deleted.
In step S370, if all the tiles in the cache unit are deleted, the cache unit is deleted from the edge cache.
In this embodiment, if all the tiles under a certain cache unit are deleted, the edge cache will delete the corresponding cache unit; for example, a certain cache unit contains two blocks, the storage duration of a first block is set to be 5 seconds, the storage duration of a second block is set to be 10 seconds, if the first block is not called within 5 seconds, the first block is deleted, if the second block is not called within 10 seconds, the second block is deleted, and when the two blocks contained in the cache unit are deleted, the cache unit is deleted. In other embodiments, after the cache unit is deleted, if the user views the same tile again, the edge cache will recall the tile, and the storage duration of the tile needs to be reset.
Compared with the first embodiment, the third embodiment includes step S350, step S360 and step S370, and other steps are the same as those of the first embodiment, and will not be repeated.
Because the weight information of each block in the panoramic video is acquired, when the acquired block is required to be cached, judging whether the storage space of the edge cache is sufficient, if the storage space of the edge cache is insufficient, deleting the block smaller than the preset weight in the cache unit, and replacing the cache unit storing the block according to a replacement algorithm; the edge cache is used for storing the image blocks of the same panoramic video by creating a cache unit, setting storage time length positively correlated with the weight for all stored image blocks in the edge cache, deleting corresponding image blocks when the storage time length of the image blocks is finished, deleting the cache unit from the edge cache if all the image blocks in the cache unit are deleted, setting the storage time length for each image block, further screening out the image blocks which are rarely focused by a user through the sorting result of the weight values and the limitation of the storage time length, so that the image blocks which are commonly used can be better stored in the edge cache, effectively solving the problem that the image blocks which are not multiplexed any more cannot be quickly judged in the prior art, reducing the image block hit rate of the edge cache, limiting the storage time length of the image blocks which are not commonly used, reducing the transmission quantity of a user side and a far-end server, accelerating the image block transmission and improving the hit rate of the image blocks which are commonly used.
Based on the same inventive concept, the embodiment of the present application further provides a computer readable storage medium, where a program for replacing an edge buffer based on a viewport feature is stored, where each step of the embodiment of the method for replacing an edge buffer based on a viewport feature is implemented when the program for replacing an edge buffer based on a viewport feature is executed by a processor, and the steps can achieve the same technical effect, so that repetition is avoided and no further description is given here.
Because the computer readable storage medium provided by the embodiment of the present application is a computer readable storage medium used for implementing the method of the embodiment of the present application, based on the method described by the embodiment of the present application, a person skilled in the art can understand the specific structure and the modification of the computer readable storage medium, and therefore, the detailed description thereof is omitted herein. All computer readable storage media used in the method of the embodiment of the application are within the scope of the application.
Based on the same inventive concept, the embodiment of the application further provides an edge buffer device, which comprises one or more processors, a memory and an edge buffer replacement program based on the viewport features, wherein the edge buffer replacement program based on the viewport features is stored in the memory and can run on the processor, and when being executed by the processor, the edge buffer replacement program based on the viewport features realizes the steps of the edge buffer replacement method based on the viewport features, and can achieve the same technical effects, so that repetition is avoided and no further description is given here.
Since the edge buffer device provided by the embodiment of the present application is an edge buffer device adopted for implementing the method of the embodiment of the present application, based on the method introduced by the embodiment of the present application, a person skilled in the art can understand the specific structure and the deformation of the edge buffer device, and therefore, the description thereof is omitted herein. All the edge buffer devices adopted by the method of the embodiment of the application belong to the scope of protection of the application. The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (8)
1. An edge buffer replacement method based on view port features is characterized in that a panoramic video is segmented into a plurality of video blocks which are the same in size and continuous according to time sequence, and each video block is segmented into a plurality of image blocks with the same resolution; the method comprises the following steps:
obtaining a view port feature, and mapping a viewing direction to a panoramic video picture;
counting the user viewport frequencies of different image block positions, and calculating the weight value of the corresponding image block according to the user viewport frequencies;
when the acquired image blocks need to be cached, judging whether the storage space of the edge cache is sufficient or not;
if the storage space of the edge cache is insufficient, deleting the image blocks smaller than the preset weight in the cache unit;
replacing the cache unit storing the image blocks according to a replacement algorithm; the edge cache stores the image blocks of the same panoramic video by creating a cache unit;
the viewport is characterized by a trajectory of change in viewing direction, the method further comprising:
and acquiring the change tracks of all view directions of the view ports, and updating the weight distribution information of each image block in the view ports in real time according to the change tracks.
2. The viewport feature-based edge cache replacement method of claim 1, further comprising, prior to caching the acquired tile:
analyzing the block information to obtain an index of the cache unit;
inquiring whether the index of the cache unit is stored in the edge cache or not;
if the cache unit is not stored in the edge cache, a new cache unit is built in the edge cache according to the index.
3. The viewport feature-based edge cache replacement method of claim 2, wherein the tile information comprises at least: the name of the panoramic video, the footprint of the tile, and the tile resolution.
4. The viewport feature-based edge cache replacement method of claim 1, further comprising:
setting storage time length positively correlated with the weight for all stored image blocks in the edge cache;
when the storage duration of the tile ends, the corresponding tile is deleted.
5. The viewport feature-based edge cache replacement method recited in claim 4, further comprising: if all tiles in the cache unit are deleted, the cache unit is deleted from the edge cache.
6. The viewport feature-based edge cache replacement method of claim 1, wherein the replacement algorithm comprises: the least recently used permutation algorithm or the least frequently used permutation algorithm.
7. A computer readable storage medium, having stored thereon an edge cache replacement program based on viewport features, which when executed by a processor implements the method of any one of claims 1-6.
8. An edge cache device comprising one or more processors, memory, and a viewport feature-based edge cache replacement program stored on the memory and operable on the processors, the processor implementing the method of any one of claims 1-6 when executing the viewport feature-based edge cache replacement program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011368371.7A CN112445727B (en) | 2020-11-27 | 2020-11-27 | Edge cache replacement method and device based on viewport characteristics |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011368371.7A CN112445727B (en) | 2020-11-27 | 2020-11-27 | Edge cache replacement method and device based on viewport characteristics |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112445727A CN112445727A (en) | 2021-03-05 |
CN112445727B true CN112445727B (en) | 2023-08-25 |
Family
ID=74737846
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011368371.7A Active CN112445727B (en) | 2020-11-27 | 2020-11-27 | Edge cache replacement method and device based on viewport characteristics |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112445727B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113543073B (en) * | 2021-06-07 | 2023-05-09 | 中国联合网络通信集团有限公司 | Block checking method and block chain system |
CN115103023B (en) * | 2022-06-14 | 2024-04-05 | 北京字节跳动网络技术有限公司 | Video caching method, device, equipment and storage medium |
CN116916050B (en) * | 2022-12-20 | 2024-03-19 | 哈尔滨商业大学 | Method and device for transmitting road monitoring image to terminal |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006052390A2 (en) * | 2004-10-15 | 2006-05-18 | Seadragon Software, Inc. | System and method for managing communication and/or storage of image data |
CN106060513A (en) * | 2016-06-29 | 2016-10-26 | 深圳市优象计算技术有限公司 | Code stream caching mechanism for cylindrical surface stereoscopic panoramic video network playing |
CN110163125A (en) * | 2019-05-05 | 2019-08-23 | 浙江传媒学院 | A kind of real-time video knowledge method for distinguishing based on trajectory predictions and size decision |
CN110971962A (en) * | 2019-11-30 | 2020-04-07 | 咪咕视讯科技有限公司 | Slice caching method and device and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9998785B2 (en) * | 2014-11-10 | 2018-06-12 | Ami Entertainment Network, Llc | Video caching system and method for a jukebox |
-
2020
- 2020-11-27 CN CN202011368371.7A patent/CN112445727B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006052390A2 (en) * | 2004-10-15 | 2006-05-18 | Seadragon Software, Inc. | System and method for managing communication and/or storage of image data |
CN106060513A (en) * | 2016-06-29 | 2016-10-26 | 深圳市优象计算技术有限公司 | Code stream caching mechanism for cylindrical surface stereoscopic panoramic video network playing |
CN110163125A (en) * | 2019-05-05 | 2019-08-23 | 浙江传媒学院 | A kind of real-time video knowledge method for distinguishing based on trajectory predictions and size decision |
CN110971962A (en) * | 2019-11-30 | 2020-04-07 | 咪咕视讯科技有限公司 | Slice caching method and device and storage medium |
Non-Patent Citations (1)
Title |
---|
Very Long Term Field of View Prediction for 360-Degree Video Streaming;Chenge Li et al.;《2019 IEEE Conference on Multimedia Information Processing and Retrieval (MIPR)》;第1-6页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112445727A (en) | 2021-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112445727B (en) | Edge cache replacement method and device based on viewport characteristics | |
CN104809198B (en) | Method, device and the terminal unit of picture cleaning | |
CN111159436B (en) | Method, device and computing equipment for recommending multimedia content | |
TWI684099B (en) | Profiling cache replacement | |
CN110998660B (en) | Method, system and apparatus for optimizing pipelined execution | |
CN108055302B (en) | Picture caching processing method and system and server | |
US9043848B2 (en) | System and method for interactive spatio-temporal streaming data | |
WO2019128667A1 (en) | Video playback method and terminal, server and storage medium | |
CN104469086B (en) | A kind of video stabilization method and device | |
CN108108089B (en) | Picture loading method and device | |
CN109286758B (en) | High dynamic range image generation method, mobile terminal and storage medium | |
CN106649313B (en) | Method and apparatus for processing cache data | |
CN103702032A (en) | Image processing method, device and terminal equipment | |
CN107301215A (en) | A kind of search result caching method and device, searching method and device | |
TW202201969A (en) | Apparatus and method for filtering harmful video file | |
CN110049309A (en) | The Detection of Stability method and apparatus of picture frame in video flowing | |
CN115981563A (en) | Method and system for storing traffic image information | |
CN114598919B (en) | Video processing method, device, computer equipment and storage medium | |
CN108763458B (en) | Content characteristic query method, device, computer equipment and storage medium | |
CN111866419B (en) | Thermal imaging image display method and device and thermal imaging equipment | |
CN112711726B (en) | Method, device, computer equipment and storage medium for caching video data | |
WO2021237645A1 (en) | Method and apparatus for updating mirroring, and electronic device and storage medium | |
JP7180769B2 (en) | Data management device, control method, and storage medium | |
CN111953981B (en) | Encoding method and device, decoding method and device | |
CN107256250A (en) | A kind of image processing method, device, server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |