Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and an apparatus for edge node-based service processing, an edge node, and a storage medium.
According to an aspect of the present disclosure, there is provided a service processing method based on an edge node, including: acquiring basic version video content corresponding to the service request; determining video version transcoding information based on link quality corresponding to a terminal sending the service request; based on the video version transcoding information and the computing resource information of the edge node, acquiring transcoding predicted time for transcoding the basic version video content by using a neural network model; determining a transcoding start slice of the basic version video content according to the transcoding prediction duration, and transcoding the basic version video content from the transcoding start slice based on the video version transcoding information to generate a target version video content; obtaining an initial playing slice of the basic version video content according to the transcoding predicted time length and transmitting the initial playing slice to the terminal; and after the initial playing slice is transmitted to a terminal and the transcoding processing is finished, transmitting the target version video content to the terminal.
Optionally, the predicting, by using a neural network model, a transcoding prediction duration for transcoding the base version video content includes: inputting the video version transcoding information and the computing resource information into the trained neural network model to obtain the transcoding predicted time length output by the neural network model; wherein the video version transcoding information comprises: original version information of the base version video content and target version information of the target version video content; the computing resource information includes: video conversion processing capability information; the neural network model includes: the LSTM neural network model.
Optionally, the determining the conversion of the base version video content according to the transcoding predicted durationThe code start slice includes: calculating the transcoding predicted time duration Ttrans_pre Obtaining a rounded value m of a quotient of the playing time T of each slice of the basic version video content; determining the (m + 1) th slice of the base version video content as the transcoding start slice.
Optionally, the obtaining an initial playing slice of the base version video content according to the transcoding predicted duration and transmitting the initial playing slice to the terminal includes: determining the first n slices of the basic version video content as the initial playing slices, and transmitting the first n slices to the terminal; wherein n > = m +1.
Optionally, the transmitting the target version video content to the terminal includes: after the first n slices are transmitted to the terminal, the corresponding slices of the target version video content are sent to the terminal from the (n + 1) th slice of the base version video content, so that the base version video content and the target version video content are switched.
Optionally, for each content source video, storing the base version video content and original version video content corresponding to the content source video; and storing the basic version video content and the original version video content in a TS (transport stream) slice mode, wherein the playing time length of each TS slice is T.
Optionally, the target version video content is cached by using an LRU algorithm.
Optionally, wireless network information corresponding to the terminal is obtained, and the link quality is determined in real time based on the wireless network information.
According to another aspect of the present disclosure, an edge node-based traffic processing apparatus is provided, including: the video content acquisition module is used for acquiring basic version video content corresponding to the service request; the transcoding information acquisition module is used for determining video version transcoding information based on the link quality corresponding to the terminal sending the service request; the transcoding duration prediction module is used for obtaining the transcoding prediction duration for transcoding the basic version video content by using a neural network model based on the video version transcoding information and the computing resource information of the edge node; the video transcoding processing module is used for determining a transcoding starting slice of the basic version video content according to the transcoding predicted time length, and transcoding the basic version video content from the transcoding starting slice based on the video version transcoding information so as to generate a target version video content; the video initial sending module is used for obtaining an initial playing slice of the basic version video content according to the transcoding predicted time length and transmitting the initial playing slice to the terminal; and the video switching and sending module is used for transmitting the target version video content to the terminal after the initial playing slice is transmitted to the terminal and the transcoding processing is finished.
Optionally, the transcoding duration prediction module is configured to input the video version transcoding information and the computing resource information into the trained neural network model, and obtain the transcoding prediction duration output by the neural network model; wherein the video version transcoding information comprises: original version information of the base version video content and target version information of the target version video content; the computing resource information includes: video conversion processing capability information; the neural network model includes: the LSTM neural network model.
Optionally, the video transcoding processing module is configured to calculate the transcoding predicted duration Ttrans_pre Obtaining a rounded value m of a quotient of the playing time T of each slice of the basic version video content; determining an m +1 th slice of the base version video content as the transcoding start slice.
Optionally, the video initial sending module is configured to determine the first n slices of the base version video content as the initial playing slice, and transmit the first n slices to the terminal; wherein n > = m +1.
Optionally, the video switching and sending module is configured to, after the first n slices are transmitted to the terminal, start from an n +1 th slice of the base version video content, send a corresponding slice of the target version video content to the terminal, so that the base version video content is switched with the target version video content.
Optionally, the first video storage module is configured to store, for each content source video, the base version video content and the original version video content corresponding to the content source video; and storing the basic version video content and the original version video content in a TS (transport stream) slice mode, wherein the playing time length of each TS slice is T.
Optionally, the second video storage module is configured to perform caching processing on the target version video content by using an LRU algorithm.
Optionally, the link quality acquiring module is configured to acquire wireless network information corresponding to the terminal, and determine the link quality in real time based on the wireless network information.
According to another aspect of the present disclosure, an edge node-based traffic processing apparatus is provided, including: a memory; and a processor coupled to the memory, the processor configured to perform the method as described above based on instructions stored in the memory.
According to yet another aspect of the present disclosure, there is provided an edge node comprising: an edge node based traffic handling apparatus as described above.
According to yet another aspect of the present disclosure, a computer-readable storage medium is provided that stores computer instructions for execution by a processor to perform the method as described above.
According to the edge node-based service processing method, the edge node-based service processing device, the edge node and the storage medium, the resources of the edge node are utilized to realize rapid transcoding of the original version, so that access to a central node is avoided, and the cost of network resources is reduced; the neural network model is used for obtaining the transcoding prediction time length and obtaining the link quality, seamless switching between the basic version video content and the target version video content can be provided, quick service response and optimal service experience are provided for users, more different content videos can be stored in limited storage resources, and smooth high-quality service experience is provided for the users while the edge cache hit rate is improved.
Detailed Description
The present disclosure now will be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the disclosure are shown. The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The terms "first", "second", and the like are used hereinafter only for descriptive distinction and not for other specific meanings.
Fig. 1 is a schematic flowchart of an embodiment of a service processing method based on an edge node according to the present disclosure, as shown in fig. 1:
step 101, obtaining a basic version video content corresponding to the service request.
And 102, determining video version transcoding information based on the link quality corresponding to the terminal sending the service request.
In an embodiment, the terminal sending the service request may be a mobile phone, a tablet computer, or the like. The Edge node may be an Edge node based on MEC (Mobile Edge Computing) technology, or the like. The method comprises the steps of obtaining wireless network information corresponding to a terminal, determining link quality in real time based on the wireless network information, and determining video version transcoding information based on the link quality. The wireless network information may include wireless network quality information, wireless network load information, etc., and the wireless network information corresponding to the terminal may be obtained by using various existing methods. For example, based on the network resources of the edge node, the wireless network information of the access user terminal is acquired, and the link quality of the user is acquired in real time.
And 103, acquiring a transcoding predicted time length for transcoding the basic version video content by using a neural network model based on the video version transcoding information and the computing resource information of the edge node.
In one embodiment, the neural network model may be any of various existing neural network models, such as an LSTM (Long Short-Term Memory) neural network model. The video version transcoding information comprises: original version information of the base version video content and target version information of the target version video content, and the like. The version information includes resolution, code rate, duration, etc. The computing resource information includes: video conversion processing capability information, and the like, the video conversion processing capability information including: the availability of the memory of the accelerator card is displayed.
Target version information of target version video content to be transcoded is determined based on link quality. The LSTM neural network model is established, and can be the existing LSTM neural network model. And obtaining a training sample, wherein the training sample comprises video version transcoding information, computing resource information and historical transcoding duration information. And training the LSTM neural network model based on the training samples to obtain the trained LSTM neural network model. And inputting the video version transcoding information and the computing resource information into the trained LSTM neural network model to obtain the transcoding predicted time length output by the neural network model.
The processing time required by transcoding, namely the transcoding prediction duration (T), can be predicted based on the LSTM neural network model by acquiring the currently available computing resources, the original video version and the target version information of the edge nodetrans_pre )。
Andstep 104, determining a transcoding start slice of the basic version video content according to the transcoding predicted duration, and transcoding the basic version video content from the transcoding start slice based on the video version transcoding information to generate the target version video content.
And 105, obtaining an initial playing slice of the basic version video content according to the transcoding predicted time length and transmitting the initial playing slice to the terminal.
And 106, after the initial playing slice is transmitted to the terminal and the transcoding processing is completed, transmitting the target version video content to the terminal.
Only the original (high-quality) version and the basic (low-quality) version of the video content are stored in the edge node, so that more videos with different contents can be stored in limited storage resources, and the hit rate of the edge node is improved. By utilizing the edge node network, storage and calculation resources, the cooperative processing of network information, a cache strategy and an intelligent transcoding strategy of a video service is realized, smooth high-quality service experience is provided for a user while the hit rate of the edge cache is improved, seamless switching from a video basic version to a transcoding version is provided, and quick service response and optimal service experience are provided for the user.
Fig. 2 is a schematic flowchart of determining a transcoding prediction duration in an embodiment of a service processing method based on an edge node according to the present disclosure, as shown in fig. 2:
step 201, calculating the predicted time length T of transcodingtrans_pre And obtaining a value m obtained by rounding the quotient of the playing time length T of each slice of the basic version video content.
Instep 202, the (m + 1) th slice of the base version video content is determined as a transcoding starting slice.
From m +1 (m = [ T ]) using computational resources of the edge nodetrans_pre /T]) And starting transcoding for each slice (transcoding starting slice), and storing the transcoded target version video content into a video library. And caching the transcoded target version video content by using an LRU (Least Recent Used) algorithm, and determining and eliminating the target version video content which is not Used for the latest time. Using existing LRU algorithms, the oldest unaccessed target version of video content is deleted from the video library when a storage space/time alarm is raised.
Determining the first n slices of the basic version video content as initial playing slices, and transmitting the first n slices to a terminal; wherein n > = m +1. And after the first n slices are transmitted to the terminal, starting from the (n + 1) th slice of the video content of the base version, sending the corresponding slice of the video content of the target version to the terminal so as to switch the video content of the base version and the video content of the target version. For each content source video, a base version video content and an original version video content corresponding to the content source video are stored. The basic version video content and the original (high-quality) version video content are stored in a TS (transport stream) slice mode, and the playing time length of each TS slice is T.
HLS (HTTP Live Streaming) Live Streaming is one of the commonly used Live Streaming methods. The basic principle of HLS live broadcast is: when the Stream push terminal pushes the collected video Stream to the server, the server packs the received Stream information into a new TS (Transport Stream) file (also called TS slice file) every time the Stream information is cached for a period of time, and the TS slice file is a TS slice. The server establishes an index file of m3u8 (Moving Picture Experts Group Audio layer 3Uniform Resource Locator, m3u file encoded by UTF-8) to maintain the indexes of the latest TS slice files. And the terminal requests the server to download and acquire the TS slice file according to the m3u8 index file for playing.
In one embodiment, an edge node receives a user service request and determines whether the video library contains requested video content. And obtaining the link quality corresponding to the user terminal, and determining video version transcoding information based on the link quality. As shown in FIG. 3, the computing resource information and the video version transcoding information are input into the well-trained LSTM neural network model, and the transcoding predicted duration (T) output by the LSTM neural network model is obtainedtrans_pre )。
As shown in fig. 4, the duration (T) is predicted based on transcodingtrans_pre ) Selecting n slices (T) of a base version of a video from a video librarytrans_pre <n*T<T+Ttrans_pre ) And transmitting to the user. Predicting a duration (T) from target version information and based on transcodingtrans_pre ) From m (m = T) th with computing resourcestrans_pre the/T) slices start transcoding.
When a user request is received, the 1 st slice of the basic version is directly sent to the user to ensure the quick access of the service, then the first n (n > = m + 1) slices of the video content of the basic version are sent to the user, and the transcoded target version is sent to the user from the n +1 th slice, so that the quick access of the video service and the seamless switching from the basic version to the transcoded target version are realized, and the high-quality service experience of the user is ensured.
In an embodiment, in the service processing method based on edge nodes of the present invention, theMEC edge node 1 at the edge of the 5G network stores the basic version (resolution 480P, average bitrate 0.5Mbps, frame rate 30fps, duration 2 minutes) and the original version (resolution 4K, average bitrate 16Mbps, frame rate 30fps, duration 2 minutes) of the video resource of a certain content; in the prior art, three versions of video sources with the same content are stored in the MEC edge node 2 at the edge of the 5G network: basic version, original version and high definition version (720P, average code rate 2Mbps, frame rate 30fps, duration 2 minutes).
In a cell covered by the same base station, a mobile phone terminal A and a mobile phone terminal B with the same model respectively and simultaneously initiate video-on-demand requests toMEC edge nodes 1 and 2 for two times. And collecting indexes such as service access time delay, player Buffer, received video stream data and the like in the on-demand process. The first request requests 4K video service, and the second request requests UHD video service. According to the collected data, the key index of each on-demand service is calculated, as shown in the following table 1:
TABLE 1 index Table for on-demand service
As can be seen from table 1, during the first (# 1) on-demand service, the requested video version is 4K. By using the edge node-based service processing method of the invention, theMEC edge node 1 obtains the user downlink quality in real time, and judges that the current link quality of the user only supports the transmission of the HD (720P) version, so that theMEC edge node 1 provides the user with the video version of 480P +720P through intelligent transcoding, the service access delay is 0.46s, the card is 1 time, and theMEC edge node 1 hits. In contrast, in the prior art, the MEC edge node 2 stores a 4K version, so that the 4K version is directly sent, and considering the limitation of user link quality, the service access delay is 3s, and the number of times of blocking is 8, which is far beyond the index data corresponding to theMEC edge node 1.
In the second (# 2) service-on-demand process, the requested video version is 1080P, using the edge node-based service processing method of the present invention,MEC edge node 1 obtains the user downlink quality in real time,MEC edge node 1 provides a video version of 480P +1080P through intelligent transcoding, the service access delay is 0.59s, the card is on for 2 times,MEC edge node 1 is in hit state; in contrast, the MEC edge node 2 in the prior art does not store the 1080P version, so the MEC edge node 2 requests the central node to provide the on-demand service of the version, the service access delay is up to 5s, the card is stopped for 7 times, and the MEC edge node 2 is also in a hit state. Therefore, the service processing method based on the edge node of the invention brings obvious improvement to the service indexes such as hit rate, service access delay, stuck and the like, namely, the service perception experience of the user is finally improved.
In one embodiment, as shown in fig. 5, the present disclosure provides an edge node-based traffic processing apparatus 50, including: the system comprises a video content acquisition module 51, a transcoding information acquisition module 52, a transcoding time length prediction module 53, a video transcoding processing module 54, a video initial sending module 55, a video switching sending module 56, a first video storage module 57, a second video storage module 58 and a link quality acquisition module 59.
The video content obtaining module 51 obtains the base version video content corresponding to the service request. The transcoding information obtaining module 52 determines video version transcoding information based on the link quality corresponding to the terminal sending the service request. The transcoding duration prediction module 53 obtains the transcoding prediction duration for transcoding the basic version video content by using a neural network model based on the video version transcoding information and the computing resource information of the edge node.
The video transcoding processing module 54 determines a transcoding start slice of the base version video content according to the transcoding predicted duration, and performs transcoding processing on the base version video content from the transcoding start slice based on the video version transcoding information to generate the target version video content. The video initial sending module 55 obtains an initial playing slice of the basic version video content according to the transcoding predicted duration and transmits the initial playing slice to the terminal. The video switching and sending module 56 transmits the target version video content to the terminal after transmitting the initial playing slice to the terminal and completing the transcoding process.
In one embodiment, the transcoding duration prediction module 53 inputs the video version transcoding information and the computing resource information into the trained neural network model to obtain the transcoding predicted duration output by the neural network model, where the video version transcoding information includes: original version information of the basic version video content, target version information of the target version video content and the like; the computing resource information includes: video conversion processing capability information, etc.; the neural network model comprises: LSTM neural network models, and the like.
Video transcoding processing module 54 calculates transcoding predicted time duration Ttrans_pre The quotient of the playing time length T of each slice of the basic version video content is obtainedAnd determining the m +1 th slice of the video content of the basic version as a transcoding starting slice according to the rounded value m of the quotient. The video initial sending module 55 determines the first n slices of the basic version video content as initial playing slices, and transmits the first n slices to the terminal; wherein n is>= m +1. After the first n slices are transmitted to the terminal, the video switching and transmitting module 56 transmits the corresponding slices of the video content of the target version to the terminal from the n +1 th slice of the video content of the base version, so that the video content of the base version is switched with the video content of the target version.
The first video storage module 57 stores, for each content source video, a base version video content and an original version video content corresponding to the content source video; the basic version video content and the original version video content are stored in a TS slice mode, and the playing time length of each TS slice is T. The second video storage module 58 caches the target version of the video content using the LRU algorithm. The link quality acquisition module 59 acquires wireless network information corresponding to the terminal, and determines the link quality in real time based on the wireless network information.
Fig. 6 is a block diagram of another embodiment of an edge node-based traffic processing apparatus according to the present disclosure. As shown in fig. 6, the apparatus may include amemory 61, aprocessor 62, acommunication interface 63, and a bus 64. Thememory 61 is used for storing instructions, theprocessor 62 is coupled to thememory 61, and theprocessor 62 is configured to execute the service processing method based on the instructions stored in thememory 61.
Thememory 61 may be a high-speed RAM memory, a non-volatile memory (non-volatile memory), or the like, and thememory 61 may be a memory array. Thestorage 61 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules. Theprocessor 62 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement the edge node based traffic processing method of the present disclosure.
According to yet another aspect of the present disclosure, a computer-readable storage medium is provided, which stores computer instructions for execution by a processor to perform the above method.
The edge node-based service processing method, the edge node-based service processing device, the edge node and the storage medium provided in the above embodiments determine video version transcoding information based on link quality, obtain transcoding prediction duration based on the video version transcoding information and calculation resource information and using a neural network model, perform transcoding processing on basic version video content from a transcoding start slice according to the transcoding prediction duration, and generate target version video content; transmitting the initial playing slice to the terminal according to the transcoding predicted time length; after the initial playing slices are transmitted to the terminal and transcoding processing is completed, transmitting the target version video content to the terminal; the resources of the edge nodes are utilized to realize the rapid transcoding of the original version, thereby avoiding accessing the central node and reducing the expenditure of network resources; the neural network model is used for obtaining the transcoding prediction time and the link quality, seamless switching between the basic version video content and the target version video content can be provided, quick service response and optimal service experience are provided for users, and more different content videos can be stored in limited storage resources; by utilizing the edge node network, storage and computing resources, the cooperative processing of the network information, the cache strategy and the intelligent transcoding strategy of the video service is realized, and smooth and high-quality service experience is provided for users while the edge cache hit rate is improved.
The method and system of the present disclosure may be implemented in a number of ways. For example, the methods and systems of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the disclosure in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the disclosure and the practical application, and to enable others of ordinary skill in the art to understand the disclosure for various embodiments with various modifications as are suited to the particular use contemplated.