Video caching method and device, storage medium, product and mobile terminal
By using the network coverage map and user movement trajectory provided by the operator in the video caching algorithm, we can accurately determine whether the network speed meets the requirements, solve the problem of inaccurate future network speed prediction in the existing technology, and improve the accuracy of the video data caching task. performance and resource utilization, improving the video playback experience.
Patent Information
- Application Number
- CN202410384994.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-01
- Publication Date
- 2024-10-22
AI Technical Summary
Existing video caching algorithms cannot accurately determine future network speeds, resulting in the inability to effectively determine whether to start video data caching tasks. Especially when network speeds are unstable and users move, video data may be cached or discarded unnecessarily.
Based on the network coverage map provided by the operator, determine the number of grids in the forward direction that meet and do not meet the network speed through the user's movement trajectory, determine whether it is necessary to start the video data caching task, and use actual data instead of subjective predictions to improve the caching task accuracy.
By accurately judging whether the network speed meets user requirements, it improves the accuracy of startup judgment of video data caching tasks, avoids unnecessary caching and waste of resources, and improves the video playback experience.
Smart Images

Figure CN118828048A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless network and video technology, and in particular to a video caching method, device, computer-readable storage medium, computer program product and mobile terminal. Background Art
[0002] Video caching (such as playback client caching) is also called video preloading. Specifically, it means that when playing online videos, the network transmission speed needs to be greater than the video playback bit rate. In the case of unstable network transmission speed, the video stream can be downloaded to the cache in advance when the network transmission speed is sufficient. Video caching is used to improve user service experience.
[0003] Most of the video caching or video preloading algorithms provided by the prior art have a fundamental problem: as mentioned above, the purpose of video caching is to pre-download for use when the network speed is low, so as to solve the problem of freezes when watching videos caused by poor network speed and affecting the video playback quality. If the duration of the low network speed is not considered, then the existing algorithms are subjective rather than objective. In other words, the existing algorithms use things that happened in the past to infer what will happen in the future in order to take preventive measures. It can be seen that the existing algorithms are biased towards prediction and are more suitable for situations where the network speed is stable and the user is in a stationary state (at this time the network speed will fluctuate around a certain mean value). It is not applicable to situations where the network speed is unstable, especially network speed fluctuations caused by user movement (at this time the achievable mean network speed is changing). This is because the existing algorithms cannot solve the problem of accuracy in predicting future network speeds, which makes it impossible to accurately determine whether video caching is needed. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a video caching method, device, computer-readable storage medium, computer program product and mobile terminal, which can accurately judge whether the grid network speed in the user's forward direction meets the user's requirements based on the network coverage map generated by the actual data provided by the operator, so as to judge whether it is necessary to start the video data caching task of the mobile terminal according to the number of grids that meet the user's requirements and the number of grids that do not meet the user's requirements, thereby improving the accuracy of the judgment on starting the video data caching task.
[0005] In order to achieve the above object, an embodiment of the present invention provides a video caching method, including:
[0006] According to the user's movement trajectory, the total number of first grids and the total number of second grids in the user's advancing direction are determined in a preset network coverage map; wherein the network coverage map is generated by the location information and signal level data provided by the operator and is divided into a plurality of grids, the first grid is a grid where the network speed meets the user's requirements, and the second grid is a grid where the network speed does not meet the user's requirements;
[0007] Whether it is necessary to start a video data caching task of the mobile terminal is determined according to the total number of the first grids and the total number of the second grids.
[0008] Furthermore, the method further comprises:
[0009] Acquiring user location information and actual network speed from the mobile terminal according to a preset time interval;
[0010] Determine the target grid to which the currently obtained user location information belongs in the network coverage map, and determine the nominal download rate of the target grid;
[0011] According to the nominal download rate of the target grid and the currently obtained actual network speed, obtaining the network speed of each grid in the network coverage map for the mobile terminal;
[0012] It is determined whether the network speed of each grid meets the user requirement according to the network speed of each grid for the mobile terminal.
[0013] Furthermore, the method further comprises:
[0014] Obtaining a user location change status based on currently obtained user location information and a number of historically obtained user location information;
[0015] The user's movement trajectory is obtained according to the user's position change state.
[0016] Furthermore, the determining, according to the user's moving trajectory, the total number of first grids and the total number of second grids in the user's advancing direction in a preset network coverage map specifically includes:
[0017] Determine the nearest base station location in the user's moving direction in a preset network coverage map based on the user's moving trajectory;
[0018] Starting from the location of the base station, backtracking is performed toward the current location of the user, and during the backtracking process, the number of second grids is accumulated from the first grid whose network speed does not meet the user's requirement, and after all the second grids are accumulated, the number of first grids is accumulated from the first grid whose network speed meets the user's requirement;
[0019] The total number of the first grid and the total number of the second grid are obtained according to the backtracking result.
[0020] Further, judging whether it is necessary to start the video data caching task of the mobile terminal according to the total number of the first grids and the total number of the second grids specifically includes:
[0021] Calculate and obtain the equivalent number of the second grid according to the total number of the second grid, the video bit rate of the mobile terminal, and the actual network speed;
[0022] Determine whether the total number of the first grid is greater than the sum of the equivalent number of the second grid and a preset number threshold;
[0023] If yes, clearing the total number of the first grid and the total number of the second grid, and re-determining the total number of the first grid and the total number of the second grid;
[0024] If not, it is determined that the video data caching task of the mobile terminal needs to be started.
[0025] Further, the calculating and obtaining the equivalent number of the second grid according to the total number of the second grid, the video bit rate of the mobile terminal and the actual network speed specifically includes:
[0026] Calculate the difference between the actual network speed of the mobile terminal and the video bit rate of the mobile terminal, and calculate the ratio of the video bit rate of the mobile terminal to the difference;
[0027] The product of the total number of the second grid and the ratio is calculated and used as the equivalent number of the second grid.
[0028] Furthermore, the method further comprises:
[0029] When it is determined that the video data caching task of the mobile terminal needs to be started, obtaining a first time duration required for the user to pass through all first grids and a second time duration required for the user to pass through all second grids according to the user's movement trajectory;
[0030] Acquire a video data cache duration according to the first duration and the second duration;
[0031] According to the video data cache duration, the video bit rate of the mobile terminal and the amount of cached data currently remaining in the cache area, the minimum amount of data that needs to be cached when the video data cache task is started is obtained.
[0032] Furthermore, the obtaining, according to the user's movement trajectory, a first time duration required for the user to pass through all first grids and a second time duration required for the user to pass through all second grids specifically includes:
[0033] According to the user's moving trajectory, the user's moving speed, the first trajectory length corresponding to the user passing through all the first grids, and the second trajectory length corresponding to the user passing through all the second grids are obtained;
[0034] Calculate and obtain a ratio of the first trajectory length to the moving speed, and use the ratio as a first time required for the user to pass through all first grids;
[0035] The ratio of the second track length to the moving speed is calculated and used as the second time length required for the user to pass through all the second grids.
[0036] Further, the obtaining, according to the video data cache duration, the video bit rate of the mobile terminal and the amount of cached data currently remaining in the cache area, a minimum amount of data that needs to be cached when the video data cache task is started specifically includes:
[0037] Calculate and obtain the product of the video data cache time and the video bit rate of the mobile terminal;
[0038] The difference between the product and the amount of cached data currently remaining in the cache area of the mobile terminal is calculated and used as the minimum amount of data that needs to be cached when the video data cache task is started.
[0039] In order to achieve the above object, an embodiment of the present invention further provides a video caching device, which is used to implement any of the above video caching methods, and the device includes:
[0040] A grid quantity statistics module is used to determine the total number of first grids and the total number of second grids in the user's forward direction in a preset network coverage map according to the user's movement trajectory; wherein the network coverage map is generated by the location information and signal level data provided by the operator and is divided into a plurality of grids, the first grid is a grid whose network speed meets the user's requirements, and the second grid is a grid whose network speed does not meet the user's requirements;
[0041] The video cache startup judgment module is used to judge whether it is necessary to start the video data cache task of the mobile terminal according to the total number of the first grid and the total number of the second grid.
[0042] An embodiment of the present invention further provides a computer-readable storage medium, comprising a stored computer program, wherein when the computer program is run, the device where the computer-readable storage medium is located controls the device to execute any one of the above-mentioned video caching methods.
[0043] An embodiment of the present invention further provides a computer program product, including a computer program, wherein the computer program implements any of the above-mentioned video caching methods when executed by a processor.
[0044] An embodiment of the present invention further provides a mobile terminal, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any of the above-mentioned video caching methods when executing the computer program.
[0045] Compared with the prior art, the embodiments of the present invention provide a video caching method, device, computer-readable storage medium, computer program product and mobile terminal, firstly, according to the user's moving trajectory, the total number of the first grid and the total number of the second grid in the user's forward direction are determined in a preset network coverage map; wherein the network coverage map is generated by the location information and signal level data provided by the operator and is divided into a plurality of grids, the first grid is a grid whose network speed meets the user's requirements, and the second grid is a grid whose network speed does not meet the user's requirements; then, according to the total number of the first grid and the total number of the second grid, it is judged whether it is necessary to start the video data caching task of the mobile terminal. The embodiments of the present invention can accurately judge whether the grid network speed in the user's forward direction meets the user's requirements based on the network coverage map generated by the actual data provided by the operator, so as to judge whether it is necessary to start the video data caching task of the mobile terminal according to the number of grids that meet the user's requirements and the number of grids that do not meet the user's requirements, thereby improving the accuracy of the judgment of starting the video data caching task. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flow chart of a preferred embodiment of a video caching method provided by the present invention;
[0047] Figure 2 is a relationship diagram between download rate and RSRP provided by an embodiment of the present invention;
[0048] Figure 3 It is a structural block diagram of a preferred embodiment of a video caching device provided by the present invention;
[0049] Figure 4 It is a structural block diagram of a preferred embodiment of a mobile terminal provided by the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this technical field without creative work are within the scope of protection of the present invention.
[0051] It should be noted that in wireless network planning and construction, a 95% coverage probability is usually used as a goal to meet the edge transmission rate. For example, if the edge download rate is set to 1Mbps, there is a 95% probability that the download rate in the area will reach or exceed 1Mbps. However, 1Mbps can only meet the transmission rate requirements of some services. The higher the rate requirement, the smaller the coverage range.
[0052] The statistical results of the business model show that video services account for 60% of the downlink traffic of 5G networks, and video playback clients all have video caching functions. Proper use of the caching function can expand the coverage of high-speed services. However, in typical buildings such as subways, tunnels, bridges, etc., due to the limited placement of antenna points, there may be areas with weak network signals. These areas are characterized by fixed locations and fixed probability of occurrence (they will inevitably pass through). Therefore, increasing the download volume of video cache data in areas with good network signals in advance can achieve seamless passage through areas with weak signals.
[0053] The embodiment of the present invention provides a video caching method, see Figure 1 FIG. 1 is a flowchart of a preferred embodiment of a video caching method provided by the present invention, wherein the method comprises steps S11 to S12:
[0054] Step S11: determining the total number of first grids and the total number of second grids in the user's advancing direction in a preset network coverage map according to the user's moving trajectory; wherein the network coverage map is generated by the location information and signal level data provided by the operator and is divided into a plurality of grids, the first grid is a grid where the network speed meets the user's requirements, and the second grid is a grid where the network speed does not meet the user's requirements;
[0055] Step S12: determining whether it is necessary to start a video data caching task of the mobile terminal according to the total number of the first grids and the total number of the second grids.
[0056] It should be noted that, in an embodiment of the present invention, the video on demand / sharing platform side can generate a network coverage map of the area where the mobile terminal is located based on the location information and signal level data provided by the operator, and divide the network coverage map into a number of grids (for example, the size of the grid is 5 meters * 5 meters, or other granularity), and the grid data corresponding to each grid includes a grid sequence number and a grid signal level value (referring to the average signal level value in the grid). In addition, the network coverage map also includes the location of the base station site. The closer the grid is to the base station, the larger the corresponding grid signal level value. It can be understood that the network coverage map corresponding to the area with concentrated business volume is relatively fine and complete, while other areas are relatively rough.
[0057] Furthermore, the operator side can also generate the network coverage map by itself, that is, merge data from multiple sources containing location information and signal level data (including MR (Measurement Report), MDT (Minimization Drive Test), DT (Drive Test), OTT (Over The Top), simulation, etc.), and generate a data sequence of {grid number, average signal level value in the grid} of a certain size of grid, which can be located on the network coverage map through fingerprint library query on the operator side, and the operator side and the video on demand / sharing platform side can exchange data to complement and improve the network coverage map maintained by themselves.
[0058] When the embodiment of the present invention is implemented, the video on demand / sharing platform can first query a pre-set network coverage map according to the user's movement trajectory (i.e., equivalent to the movement trajectory of the mobile terminal held by the user) to determine the total number of first grids and the total number of second grids in the user's forward direction among the several grids contained in the network coverage map, wherein if a certain grid in the user's forward direction meets the user's requirement for the network speed of the user, then the grid is the first grid; if the network speed of the grid does not meet the user's requirement, then the grid is the second grid; thereafter, the video on demand / sharing platform can determine whether it is necessary to start the video data caching task of the mobile terminal based on the determined total number of first grids and the total number of second grids.
[0059] It should be noted that, in the embodiment of the present invention, whether the network speed of the next location of the user (i.e., equivalent to the next moment or future moment) during the movement meets the user's requirements is not predicted based on relevant data at past moments, but is judged based on the actual location information and signal level data provided by the operator. The embodiment of the present invention uses a large amount of result data of actual network construction and network quality, and applies it to the video caching algorithm. This can solve the problem of the accuracy of future network speed prediction caused by the subjectivity of the existing video caching algorithm, thereby fully utilizing the functionality of the mobile terminal video caching, solving the problem of the accuracy of judging whether caching is needed, and effectively avoiding the extra cost caused by the cached video data being discarded.
[0060] A video caching method provided by an embodiment of the present invention first determines the total number of first grids and the total number of second grids in the user's forward direction in a preset network coverage map according to the user's moving trajectory; wherein the network coverage map is generated by the location information and signal level data provided by the operator and is divided into a plurality of grids, the first grid is a grid whose network speed meets the user's requirements, and the second grid is a grid whose network speed does not meet the user's requirements; then, based on the total number of the first grid and the total number of the second grid, it is judged whether it is necessary to start the video data caching task of the mobile terminal. The embodiment of the present invention can accurately judge whether the grid network speed in the user's forward direction meets the user's requirements based on the network coverage map generated by the actual data provided by the operator, so as to judge whether it is necessary to start the video data caching task of the mobile terminal according to the number of grids that meet the user's requirements and the number of grids that do not meet the user's requirements, thereby improving the accuracy of the judgment of starting the video data caching task.
[0061] In one of the optional embodiments, the method further includes:
[0062] Acquiring user location information and actual network speed from the mobile terminal according to a preset time interval;
[0063] Determine the target grid to which the currently obtained user location information belongs in the network coverage map, and determine the nominal download rate of the target grid;
[0064] According to the nominal download rate of the target grid and the currently obtained actual network speed, obtaining the network speed of each grid in the network coverage map for the mobile terminal;
[0065] It is determined whether the network speed of each grid meets the user requirement according to the network speed of each grid for the mobile terminal.
[0066] Specifically, in combination with the above embodiment, before executing step S11 in the above embodiment, the video on demand / sharing platform can first collect and obtain user location information (i.e., equivalent to the location information of the mobile terminal) and the actual network speed of the mobile terminal from the mobile terminal in real time according to a preset time interval (for example, every 5 seconds, or other duration); then query the network coverage map according to the currently obtained user location information, so as to determine the target grid to which the currently obtained user location information belongs among several grids contained in the network coverage map (i.e., the currently obtained user location is within the target grid), and further determine the nominal download rate corresponding to the target grid; thereafter, based on the nominal download rate corresponding to the target grid and the currently obtained actual network speed of the mobile terminal, obtain the network speed of each grid in the network coverage map for the mobile terminal, so as to judge whether the network speed of each grid for the mobile terminal meets the user requirements according to the network speed of each grid for the mobile terminal.
[0067] It should be noted that the user location information may be GPS (Global Positioning System) latitude and longitude information (when the user turns on the positioning function of the mobile terminal), or may be just the serving cell / neighboring cell identifier + signal level, which is not specifically limited in the embodiment of the present invention.
[0068] It should be noted that when obtaining the actual network speed of the mobile terminal, the mobile terminal can initiate a ping command to test and obtain it, or it can be obtained by using the network speed measurement method provided by the existing technology. For example, it can be obtained by calculating the download quantity / download time based on the time consumed by the mobile terminal to download a piece of data.
[0069] It should be noted that when determining the nominal download rate corresponding to the grid in the network coverage map, the relationship between the download rate of 700M@30M and 2.6G and RSRP (Reference Signal Receiving Power) can be used (such as Figure 2 The polynomial in the network coverage map, the correspondence between the grid signal level and the download rate, is used to obtain the nominal download rate corresponding to each grid in the network coverage map (because the correspondence is obtained by testing in an unloaded network, that is, the download rate that can be obtained when there is no interference from other users, which is an ideal state, so it is called the nominal download rate), which includes the nominal download rate corresponding to the target grid to which the mobile terminal belongs. On this basis, when it is necessary to obtain the network speed of each grid in the network coverage map for the mobile terminal, after obtaining the actual network speed of the mobile terminal (that is, equivalent to the network speed of the target grid for the mobile terminal), the user interference factor is calculated based on the nominal download rate corresponding to the target grid divided by the actual network speed of the mobile terminal. Correspondingly, the nominal download rates corresponding to other grids are respectively divided by the user interference factors for correction, and the network speed of each grid for the mobile terminal can be obtained.
[0070] A video caching method provided by an embodiment of the present invention queries the network coverage map, uses the nominal download rate of the current position and the nominal download rate of the next position (not a point, but a grid position area, which can represent the position passed by the user's movement trajectory within a period of time) obtained by the query, and combines the actual network speed of the mobile terminal currently obtained to compare the network speed of the next position, thereby obtaining a more accurate network speed at the next position or the next moment.
[0071] In one of the optional embodiments, the method further includes:
[0072] Obtaining a user location change status based on currently obtained user location information and a number of historically obtained user location information;
[0073] The user's movement trajectory is obtained according to the user's position change state.
[0074] Specifically, in combination with the above embodiments, after the embodiments of the present invention collect and obtain the user location information from the mobile terminal in real time according to a preset time interval, the user location change status can be obtained accordingly based on the currently obtained user location information and several pieces of historically obtained user location information. Based on the obtained user location change status, the user's movement trajectory can be obtained, and at the same time, the user's movement direction and movement speed can also be determined accordingly.
[0075] Exemplarily, the moving direction and moving speed of the user may be determined according to the change status of the location information reported by the user in the last few times. For example, a Kalman filter algorithm may be used to obtain an optimal estimation value.
[0076] In one of the optional embodiments, determining the total number of first grids and the total number of second grids in the user's advancing direction in a preset network coverage map according to the user's moving trajectory specifically includes:
[0077] Determine the nearest base station location in the user's moving direction in a preset network coverage map based on the user's moving trajectory;
[0078] Starting from the location of the base station, backtracking is performed toward the current location of the user, and during the backtracking process, the number of second grids is accumulated from the first grid whose network speed does not meet the user's requirement, and after all the second grids are accumulated, the number of first grids is accumulated from the first grid whose network speed meets the user's requirement;
[0079] The total number of the first grid and the total number of the second grid are obtained according to the backtracking result.
[0080] Specifically, in combination with the above embodiments, when determining the total number of the first grid and the total number of the second grid, the embodiment of the present invention can query the network coverage map, determine the location of the next base station closest to the user in the user's forward direction in the network coverage map according to the user's movement trajectory (moving direction) (where the signal is the strongest), start from the location of the nearest base station in front, and trace back to the user's current location (in the opposite direction of the user's forward direction). During the backtracking process, the number of second grids is accumulated starting from the first grid whose network speed does not meet the user's requirements. After all second grids are accumulated (that is, the backtracking process passes through all second grids whose network speeds do not meet the user's requirements), the number of first grids is accumulated starting from the first grid whose network speed meets the user's requirements. After the backtracking process is completed, the total number of first grids N1 and the total number of second grids N2 can be obtained according to the backtracking results.
[0081] It should be noted that by querying the network coverage map, it is possible to determine whether a weak coverage area appears at a distance of L1 in the direction of the user's advance. If so, the length L2 of the weak coverage area can be further determined and converted into grids in the network coverage map, that is, whether there is a weak coverage area after N1 grids in the direction of the user's advance and the number of grids where the weak coverage area continues is N2. Among them, the distance L1 between the user and the weak coverage area is determined by the network speed and the length L2 of the weak coverage area. The purpose is to ensure that there is enough time to download the amount of video playback data required to cross the L1+L2 distance, that is, it is necessary to satisfy L1>L2*video bit rate / (network speed-video bit rate).
[0082] In one optional embodiment, the determining whether it is necessary to start a video data caching task of the mobile terminal according to the total number of the first grids and the total number of the second grids specifically includes:
[0083] Calculate and obtain the equivalent number of the second grid according to the total number of the second grid, the video bit rate of the mobile terminal, and the actual network speed;
[0084] Determine whether the total number of the first grid is greater than the sum of the equivalent number of the second grid and a preset number threshold;
[0085] If yes, clearing the total number of the first grid and the total number of the second grid, and re-determining the total number of the first grid and the total number of the second grid;
[0086] If not, it is determined that the video data caching task of the mobile terminal needs to be started.
[0087] Specifically, in combination with the above embodiments, when judging whether it is necessary to start the video data caching task of the mobile terminal according to the total number N1 of the first grid and the total number N2 of the second grid, the embodiment of the present invention can first calculate the equivalent number N2' of the second grid according to the total number N2 of the second grid, the video bit rate of the mobile terminal and the actual network speed, and then judge whether the total number N1 of the first grid is greater than the sum of the equivalent number N2' of the second grid and the preset number threshold K; if the total number N1 of the first grid is greater than the sum of the equivalent number N2' of the second grid and the preset number threshold K, the total number N1 of the first grid and the total number N2 of the second grid currently obtained are cleared, and the total number N1 of the first grid and the total number N2 of the second grid are re-determined by backtracking to re-judgment whether it is necessary to start the video data caching task of the mobile terminal, and so on; if the total number N1 of the first grid is not greater than the sum of the equivalent number N2' of the second grid and the preset number threshold K, it is determined that the video data caching task of the mobile terminal needs to be started.
[0088] It should be noted that after each time the total number N1 of the first grid and the total number N2 of the second grid are obtained by backtracking, as long as it is determined that N1>N2'+K (K is a positive integer), the current N1 and N2 will be cleared, and N1 and N2 will be obtained again by backtracking. When it is determined that N1>N2'+K is not satisfied, the video data caching task of the mobile terminal should be started, and N1>N2' should be satisfied at this time, which is equivalent to ensuring that there is enough time for the user to download the video data.
[0089] It should be noted that the preset number threshold K is an arbitrary integer greater than 0, and its value can be set with reference to the user's moving speed. For example, assuming that the user is walking (moving at a low speed), K=2 can be set; assuming that the user is driving, K=20 can be set.
[0090] In one optional embodiment, the calculating and obtaining the equivalent number of the second grids according to the total number of the second grids, the video bit rate of the mobile terminal, and the actual network speed specifically includes:
[0091] Calculate the difference between the actual network speed of the mobile terminal and the video bit rate of the mobile terminal, and calculate the ratio of the video bit rate of the mobile terminal to the difference;
[0092] The product of the total number of the second grid and the ratio is calculated and used as the equivalent number of the second grid.
[0093] Specifically, in combination with the above embodiments, when calculating the equivalent number N2' of the second grid, the embodiment of the present invention can first calculate the difference between the actual network speed of the mobile terminal and the video bit rate of the mobile terminal, and calculate the ratio between the video bit rate of the mobile terminal and the difference, and then calculate the product of the total number N2 of the second grid and the ratio, and the product is the equivalent number N2' of the second grid.
[0094] Exemplarily, N2'=N2*video bit rate / (actual network speed-video bit rate). Accordingly, if it is determined that N1>N2*video bit rate / (actual network speed-video bit rate)+K is not satisfied, it is necessary to start the video data caching task of the mobile terminal.
[0095] In one of the optional embodiments, the method further includes:
[0096] When it is determined that the video data caching task of the mobile terminal needs to be started, obtaining a first time duration required for the user to pass through all first grids and a second time duration required for the user to pass through all second grids according to the user's movement trajectory;
[0097] Acquire a video data cache duration according to the first duration and the second duration;
[0098] According to the video data cache duration, the video bit rate of the mobile terminal and the amount of cached data currently remaining in the cache area, the minimum amount of data that needs to be cached when the video data cache task is started is obtained.
[0099] Specifically, in combination with the above embodiments, when determining that a video data caching task of a mobile terminal needs to be started, the embodiments of the present invention can further obtain, based on the user's movement trajectory, a first duration required for the user to pass through all first grids (i.e., N1 in total) and a second duration required for the user to pass through all second grids (i.e., N2 in total), so as to calculate the video data cache duration based on the obtained first duration and second duration, that is, video data cache duration = first duration + second duration, and then, based on the calculated video data cache duration, the video bit rate of the mobile terminal and the amount of video cache data currently remaining in the cache area of the mobile terminal, to obtain the minimum amount of data that needs to be cached when this video data caching task is started.
[0100] It is understandable that the minimum data amount means: it is possible to download more data, but it is not necessary, because when the video is played without lag, the video cache data will not improve the video playback quality. If the cached video data is not played, it will be wasted. Therefore, when the video data caching task is started, it is only necessary to cache the video according to the minimum data amount.
[0101] In one optional embodiment, obtaining the first time required for the user to pass through all the first grids and the second time required for the user to pass through all the second grids according to the user's movement trajectory specifically includes:
[0102] According to the user's moving trajectory, the user's moving speed, the first trajectory length corresponding to the user passing through all the first grids, and the second trajectory length corresponding to the user passing through all the second grids are obtained;
[0103] Calculate and obtain a ratio of the first trajectory length to the moving speed, and use the ratio as a first time required for the user to pass through all first grids;
[0104] The ratio of the second track length to the moving speed is calculated and used as the second time length required for the user to pass through all the second grids.
[0105] Specifically, in combination with the above embodiment, when obtaining the first time required for the user to pass through all the first grids and the second time required for the user to pass through all the second grids, the embodiment of the present invention can first obtain the user's moving speed according to the user's moving trajectory, obtain the first trajectory length corresponding to the user passing through all the first grids (that is, L1 in the above embodiment), and obtain the second trajectory length corresponding to the user passing through all the second grids (that is, L2 in the above embodiment), and then calculate the ratio of the first trajectory length L1 to the user's moving speed, which is the first time required for the user to pass through all the first grids. Similarly, calculate the ratio of the second trajectory length L2 to the user's moving speed, which is the second time required for the user to pass through all the second grids.
[0106] Exemplarily, the video data cache duration=the first duration+the second duration=(L1+L2) / the user movement speed.
[0107] In one of the optional embodiments, obtaining the minimum amount of data required to be cached when the video data cache task is started according to the video data cache duration, the video bit rate of the mobile terminal, and the amount of cached data currently remaining in the cache area specifically includes:
[0108] Calculate and obtain the product of the video data cache time and the video bit rate of the mobile terminal;
[0109] The difference between the product and the amount of cached data currently remaining in the cache area of the mobile terminal is calculated and used as the minimum amount of data that needs to be cached when the video data cache task is started.
[0110] Specifically, in combination with the above embodiments, when obtaining the minimum amount of data that needs to be cached when the current video data caching task is started, the embodiments of the present invention can first calculate the product of the video data caching duration and the video bit rate of the mobile terminal (that is, equivalent to calculating the total amount of data that needs to be downloaded within the video data caching duration), and then calculate the difference between the product and the amount of video cache data currently remaining in the cache area of the mobile terminal. The difference is the minimum amount of data that needs to be cached when the current video data caching task is started.
[0111] Exemplarily, the minimum data amount=video data cache duration*video bit rate-current remaining video cache data amount in the cache area.
[0112] It can be understood that the embodiment of the present invention determines the amount of data that needs to be downloaded for the video cache based on the video data cache duration, rather than determining the amount of data that needs to be downloaded for the video cache based on the predicted network speed. Furthermore, the video data cache duration is related to the user location, user movement speed, user movement trajectory and network speed in the future, wherein the future network speed is not predicted but determined based on the actual data of the operator. Therefore, in the video caching algorithm provided in the embodiment of the present invention, by adding the calculation of the mobile terminal location information and movement trajectory, and cooperating with the use of the wireless network coverage map, a more optimized calculation result of the video cache data download amount can be obtained.
[0113] A video caching method provided by an embodiment of the present invention obtains a user location, determines a user movement trajectory, queries a network coverage map, and uses the current location nominal download rate and the next location nominal download rate obtained by the query, combined with the actual network speed of the mobile terminal currently obtained, to compare the network speed of the next location, thereby obtaining a more accurate network speed for the next location or the next moment, thereby solving the problem of accuracy in judging whether caching is required, improving the accuracy of judging when starting a video data caching task, and determining the minimum amount of data to be downloaded with reference to the amount of data currently remaining in the cache area, and accurately determining the amount of data to be downloaded when caching the video, thereby solving the problem of accuracy in judging how much needs to be cached, and ensuring that the video cache data can be used and that the video cache data is sufficient.
[0114] In addition, the embodiments of the present invention can improve the video playback user experience by optimizing and adjusting the video cache data download amount according to the network signal, and accurately control the download amount as needed to avoid wasting video cache data and increasing costs due to position jumps (seeks) when users play videos.
[0115] The embodiment of the present invention further provides a video caching device for implementing the video caching method described in any of the above embodiments. Figure 3 FIG. 1 is a structural block diagram of a preferred embodiment of a video caching device provided by the present invention, wherein the device comprises:
[0116] The grid number counting module 11 is used to determine the total number of first grids and the total number of second grids in the user's forward direction in a preset network coverage map according to the user's movement trajectory; wherein the network coverage map is generated by the location information and signal level data provided by the operator and is divided into a plurality of grids, the first grid is a grid whose network speed meets the user's requirements, and the second grid is a grid whose network speed does not meet the user's requirements;
[0117] The video cache start judgment module 12 is used to judge whether it is necessary to start the video data cache task of the mobile terminal according to the total number of the first grid and the total number of the second grid.
[0118] Preferably, the device further comprises:
[0119] A location and network speed acquisition module, used to obtain user location information and actual network speed from the mobile terminal according to a preset time interval;
[0120] A grid positioning module, used to determine the target grid to which the currently obtained user location information belongs in the network coverage map, and determine the nominal download rate of the target grid;
[0121] A grid network speed acquisition module, used to acquire the network speed of each grid in the network coverage map for the mobile terminal according to the nominal download rate of the target grid and the actual network speed currently obtained;
[0122] The grid network speed determination module is used to determine whether the network speed of each grid meets the user's requirements based on the network speed of each grid for the mobile terminal.
[0123] Preferably, the device further comprises:
[0124] A location change acquisition module is used to acquire the user location change status based on the currently acquired user location information and several pieces of historically acquired user location information;
[0125] The movement track acquisition module is used to acquire the user's movement track according to the user's position change status.
[0126] Preferably, the grid quantity statistics module 11 specifically includes:
[0127] A base station location determination unit, configured to determine the location of the nearest base station in the user's advancing direction in a preset network coverage map according to the user's moving trajectory;
[0128] A grid quantity accumulation unit is used to trace back from the base station position to the user's current position, and in the process of tracing back, accumulate the number of second grids from the first grid whose network speed does not meet the user's requirements, and after all the second grids are accumulated, accumulate the number of first grids from the first grid whose network speed meets the user's requirements;
[0129] A grid quantity acquisition unit is used to obtain the total quantity of the first grid and the total quantity of the second grid according to the backtracking result.
[0130] Preferably, the video cache startup determination module 12 specifically includes:
[0131] A grid equivalent number calculation unit, used to calculate the equivalent number of the second grid according to the total number of the second grid, the video bit rate of the mobile terminal and the actual network speed;
[0132] A video cache start determination unit, used to determine whether the total number of the first grid is greater than the sum of the equivalent number of the second grid and a preset number threshold;
[0133] a grid quantity updating unit, configured to, if yes, clear the total quantity of the first grid and the total quantity of the second grid, and redetermine the total quantity of the first grid and the total quantity of the second grid;
[0134] The video cache start determination unit is used to determine if no, then to start the video data cache task of the mobile terminal.
[0135] Preferably, the grid equivalent quantity calculation unit is specifically used for:
[0136] Calculate the difference between the actual network speed of the mobile terminal and the video bit rate of the mobile terminal, and calculate the ratio of the video bit rate of the mobile terminal to the difference;
[0137] The product of the total number of the second grid and the ratio is calculated and used as the equivalent number of the second grid.
[0138] Preferably, the device further comprises:
[0139] A user time-consuming acquisition module is used to acquire, when it is determined that the video data caching task of the mobile terminal needs to be started, a first time duration required for the user to pass through all the first grids and a second time duration required for the user to pass through all the second grids according to the user's movement trajectory;
[0140] A video cache duration acquisition module, used to acquire a video data cache duration according to the first duration and the second duration;
[0141] The video cache data amount acquisition module is used to obtain the minimum amount of data required to be cached when the video data cache task is started according to the video data cache duration, the video bit rate of the mobile terminal and the amount of cache data currently remaining in the cache area.
[0142] Preferably, the user time-consuming acquisition module specifically includes:
[0143] A time-consuming parameter acquisition unit, used to acquire the user's moving speed, the first trajectory length corresponding to passing through all the first grids, and the second trajectory length corresponding to passing through all the second grids according to the user's moving trajectory;
[0144] A first user time-consuming calculation unit, used for calculating a ratio of the first trajectory length to the moving speed and using the ratio as a first time length required for the user to pass through all the first grids;
[0145] The second user time-consuming calculation unit is used to calculate the ratio of the second trajectory length to the moving speed and use the ratio as the second time required for the user to pass through all the second grids.
[0146] Preferably, the video cache data amount acquisition module specifically includes:
[0147] A video cache total data volume calculation unit, used to calculate the product of the video data cache duration and the video bit rate of the mobile terminal;
[0148] The video cache minimum data amount calculation unit is used to calculate the difference between the product and the current remaining cache data amount in the cache area of the mobile terminal, and use it as the minimum data amount that needs to be cached when the video data cache task is started.
[0149] It should be noted that a video caching device provided in an embodiment of the present invention can implement all processes of the video caching method described in any of the above embodiments. The functions of each module and unit in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the video caching method described in the above embodiments, and will not be repeated here.
[0150] An embodiment of the present invention further provides a computer-readable storage medium, comprising a stored computer program, wherein when the computer program is run, the device where the computer-readable storage medium is located controls the device to execute the video caching method described in any of the above embodiments.
[0151] An embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the video caching method described in any of the above embodiments is implemented.
[0152] The embodiment of the present invention also provides a mobile terminal, see Figure 4 As shown, it is a structural block diagram of a preferred embodiment of a mobile terminal provided by the present invention, wherein the mobile terminal includes a processor 10, a memory 20, and a computer program stored in the memory 20 and configured to be executed by the processor 10, and the processor 10 implements the video caching method described in any of the above embodiments when executing the computer program.
[0153] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory 20 and executed by the processor 10 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the mobile terminal.
[0154] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor 10 may be any conventional processor. The processor 10 is the control center of the mobile terminal, and various parts of the mobile terminal are connected using various interfaces and lines.
[0155] The memory 20 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory 20 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory 20 can also be other volatile solid-state storage devices.
[0156] It should be noted that the mobile terminal may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 4 The structural block diagram shown is only a structural example of the above-mentioned mobile terminal, and does not constitute a structural limitation of the above-mentioned mobile terminal. The above-mentioned mobile terminal may include more or less components than shown in the figure, or combine certain components, or different components.
[0157] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A video caching method, It is characterized in that include: According to the user's movement trajectory, the total number of first grids and the total number of second grids in the user's advancing direction are determined in a preset network coverage map; wherein the network coverage map is generated by the location information and signal level data provided by the operator and is divided into a plurality of grids, the first grid is a grid where the network speed meets the user's requirements, and the second grid is a grid where the network speed does not meet the user's requirements; Whether it is necessary to start a video data caching task of the mobile terminal is determined according to the total number of the first grids and the total number of the second grids.
2. The video caching method according to claim 1, It is characterized in that The method further comprises: Acquiring user location information and actual network speed from the mobile terminal according to a preset time interval; Determine the target grid to which the currently obtained user location information belongs in the network coverage map, and determine the nominal download rate of the target grid; According to the nominal download rate of the target grid and the currently obtained actual network speed, obtaining the network speed of each grid in the network coverage map for the mobile terminal; It is determined whether the network speed of each grid meets the user requirement according to the network speed of each grid for the mobile terminal.
3. The video caching method according to claim 2, It is characterized in that The method further comprises: Obtaining a user location change status based on currently obtained user location information and a number of historically obtained user location information; The user's movement trajectory is obtained according to the user's position change state.
4. The video caching method according to claim 1, It is characterized in that The step of determining the total number of first grids and the total number of second grids in the user's advancing direction in a preset network coverage map according to the user's moving trajectory specifically includes: Determine the nearest base station location in the user's moving direction in a preset network coverage map based on the user's moving trajectory; Starting from the location of the base station, backtracking is performed toward the current location of the user, and during the backtracking process, the number of second grids is accumulated from the first grid whose network speed does not meet the user's requirement, and after all the second grids are accumulated, the number of first grids is accumulated from the first grid whose network speed meets the user's requirement; The total number of the first grid and the total number of the second grid are obtained according to the tracing result.
5. The video caching method according to claim 1, It is characterized in that The determining whether it is necessary to start the video data caching task of the mobile terminal according to the total number of the first grids and the total number of the second grids specifically includes: Calculate and obtain the equivalent number of the second grid according to the total number of the second grid, the video bit rate of the mobile terminal, and the actual network speed; Determine whether the total number of the first grid is greater than the sum of the equivalent number of the second grid and a preset number threshold; If yes, clear the total number of the first grid and the total number of the second grid, and redetermine the total number of the first grid and the total number of the second grid; If not, it is determined that the video data caching task of the mobile terminal needs to be started.
6. The video caching method according to claim 5, It is characterized in that The calculating and obtaining the equivalent number of the second grid according to the total number of the second grid, the video bit rate of the mobile terminal and the actual network speed specifically includes: Calculate the difference between the actual network speed of the mobile terminal and the video bit rate of the mobile terminal, and calculate the ratio of the video bit rate of the mobile terminal to the difference; The product of the total number of the second grid and the ratio is calculated and used as the equivalent number of the second grid.
7. The video caching method according to claim 1, It is characterized in that The method further comprises: When it is determined that the video data caching task of the mobile terminal needs to be started, obtaining a first time duration required for the user to pass through all first grids and a second time duration required for the user to pass through all second grids according to the user's movement trajectory; Acquire a video data cache duration according to the first duration and the second duration; According to the video data cache duration, the video bit rate of the mobile terminal and the amount of cached data currently remaining in the cache area, the minimum amount of data that needs to be cached when the video data cache task is started is obtained.
8. The video caching method according to claim 7, It is characterized in that The step of obtaining, according to the user's movement trajectory, a first time duration required for the user to pass through all first grids and a second time duration required for the user to pass through all second grids specifically includes: According to the user's moving trajectory, the user's moving speed, the first trajectory length corresponding to the user passing through all the first grids, and the second trajectory length corresponding to the user passing through all the second grids are obtained; Calculate and obtain a ratio of the first trajectory length to the moving speed, and use the ratio as a first time required for the user to pass through all first grids; The ratio of the second track length to the moving speed is calculated and used as the second time length required for the user to pass through all the second grids.
9. The video caching method according to claim 7, It is characterized in that The acquiring, according to the video data cache duration, the video bit rate of the mobile terminal and the amount of cached data currently remaining in the cache area, the minimum amount of data required to be cached when the video data cache task is started specifically includes: Calculate and obtain the product of the video data cache time and the video bit rate of the mobile terminal; The difference between the product and the amount of cached data currently remaining in the cache area of the mobile terminal is calculated and used as the minimum amount of data that needs to be cached when the video data cache task is started.
10. A video caching device, It is characterized in that Used to implement the video caching method according to any one of claims 1 to 9, the device comprises: A grid quantity statistics module is used to determine the total number of first grids and the total number of second grids in the user's forward direction in a preset network coverage map according to the user's movement trajectory; wherein the network coverage map is generated by the location information and signal level data provided by the operator and is divided into a plurality of grids, the first grid is a grid whose network speed meets the user's requirements, and the second grid is a grid whose network speed does not meet the user's requirements; The video cache startup judgment module is used to judge whether it is necessary to start the video data cache task of the mobile terminal according to the total number of the first grid and the total number of the second grid.
11. A computer-readable storage medium, It is characterized in that The invention comprises a stored computer program, wherein when the computer program is run, the device where the computer-readable storage medium is located is controlled to execute the video caching method according to any one of claims 1 to 9.
12. A computer program product, It is characterized in that The invention comprises a computer program, which implements the video caching method according to any one of claims 1 to 9 when being executed by a processor.
13. A mobile terminal, It is characterized in that The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the video caching method according to any one of claims 1 to 9 when executing the computer program.
