Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the invention provides a video playing method, a video playing device, electronic equipment and a storage medium.
The video playing device can be integrated in a server, and the server can comprise a server which operates independently or a distributed server, and can also comprise a server cluster formed by a plurality of servers.
For example, referring to fig. 1a, the video playing apparatus is integrated on a server, the server may collect a plurality of videos, for example, the videos may include a television show, a variety program and/or a movie, for convenience of description, taking a video a as an example, the server may receive a video playing instruction, where the video playing instruction carries a video a and a plurality of bullet screen texts of the video a, the video playing instruction may be triggered by a user, then the server determines marked bullet screen texts in the plurality of bullet screen texts, then the server constructs a content heat map corresponding to the video a according to the marked bullet screen texts and a distribution of the bullet screen texts in the video a, and finally, the server generates a playing page for playing the video a corresponding to the video a based on the content heat map and the video data, and plays the video a on the playing page.
The content heat map in the video playing scheme is constructed according to the marked barrage texts and the distribution of the barrage texts in the video to be played, so that in actual use, the influence of some barrage texts which are completely irrelevant to the video on the accuracy of the content heat map can be avoided, the accuracy of positioning key segments of the video according to the video heat map can be improved, and the video playing efficiency is improved.
The following will describe in detail. It should be noted that the following description order of embodiments is not a limitation of the priority order of embodiments.
A video playing method, comprising: receiving a video playing instruction, determining marked barrage texts in a plurality of barrage texts, constructing a content heat map corresponding to the video to be played according to the marked barrage texts and the distribution of each barrage text in the video to be played, generating a playing page corresponding to the video to be played based on the content heat map, and playing the video to be played on the playing page.
Referring to fig. 1b, fig. 1b is a flowchart illustrating a video playing method according to an embodiment of the present invention. The specific flow of the video playing method can be as follows:
101. And receiving a video playing instruction.
The video playing instruction carries a video to be played and a plurality of barrage texts of the video to be played, wherein the barrage texts can be sent by a plurality of users, and of course, one user can also send at least two barrage texts, and the video playing instruction is specific according to actual conditions.
In order to facilitate the subsequent analysis of each barrage text, therefore, the barrage text needs to be segmented, and the segmentation technology belongs to the category of natural language understanding technology, is a first link of semantic understanding, and is a technology capable of exactly separating words in sentences. It is the basis of the fields of text classification, information retrieval, machine translation, voice input and output of text, etc. The Chinese word segmentation technology becomes a difficulty in the word segmentation technology due to the complexity of Chinese per se and the writing habit thereof. The word segmentation method can comprise a dictionary-based method, a statistical-based method and a rule-based method, wherein the dictionary-based method is also called a mechanical word segmentation method, and is characterized in that a Chinese character string to be analyzed is matched with an entry in a machine dictionary according to a certain strategy, and if a certain character string is found in the dictionary, the matching is successful; according to different scanning directions, the word segmentation method can be divided into forward matching and reverse matching; according to different lengths, the method can be divided into maximum matching and minimum matching; the word segmentation algorithm based on statistics at present has a plurality of kinds, and the common algorithm is as follows: the statistics algorithm of probability based on mutual information and the decision algorithm of Chinese word segmentation based on combination degree, for example, the decision algorithm of Chinese word segmentation based on combination degree segments the barrage text set to obtain the barrage texts of good conditions, very burned brain and very good performance, however, in practical application, the barrage texts may have non-Chinese barrage texts such as 666 and beautiful, and thus, the decision algorithm of Chinese word segmentation based on combination degree cannot be used for word segmentation of the barrage text set containing non-Chinese, and in some embodiments, word segmentation can be performed on the barrage text set through a word segmentation model.
102. Marked barrage text is determined among a plurality of barrage text.
In practical application, the user can not only issue the barrage text by himself, but also mark the barrage text issued by himself and/or barrage texts issued by other users, for example, click "like" or "despise" control key in the text box of barrage text a to finish marking the barrage text a. The number of marked and the number of marked bullet screen texts per bullet screen text can then be counted to determine the marked bullet screen text, wherein for each bullet screen text there is a time parameter representing when the bullet screen text was released in the video, so that it can be counted whether the bullet screen text released at the same time has marked bullet screen text or not to determine the number of all marked bullet screen texts in the video to be played and the distribution of the marked bullet screen texts in the video to be played. It can be understood that the marked barrage text can more accurately show whether the current video is wonderful, so that the content heat map corresponding to the video can be more accurately obtained by counting the marked barrage text.
103. And constructing a content heat map corresponding to the video to be played according to the marked barrage texts and the distribution of each barrage text in the video to be played.
Taking a video E to be played (hereinafter referred to as video E) as an example, the duration of the video E is 10 seconds, 20 bullet screen texts exist in the video E, wherein the time stamps corresponding to 5 bullet screen texts are 3 rd seconds, the time stamps corresponding to 3 bullet screen texts are 5 th seconds, the time stamps corresponding to 9 bullet screen texts are 6 th seconds, the time stamps corresponding to 3 bullet screen texts are 10 th seconds, and all bullet screen texts located at the 6 th second in the video E are marked, wherein the marked bullet screen texts can be used for representing approval and/or liking of the bullet screen texts by a user, then a content heat map corresponding to the video to be played can be constructed according to the number of marked bullet screen texts, the number of all bullet screen texts and the distribution of each bullet screen text in the video to be played,
It should be noted that, since the bullet screen text sent by each user for the same video may be different, the meaning to be expressed may also be different, for example, the bullet screen text sent by the user a for the video E is related to the video content of the video E, for example, "XXX really looks good", and the bullet screen text sent by the user B for the video E is not related to the video content of the video E, for example, "3 bullet screens? If the sofa is occupied, the reliability of the content heat map constructed according to the barrage text related to the video content of the video E is higher than the reliability of the content heat map constructed according to the barrage text unrelated to the video content of the video E, and the barrage text may possibly show dislike of the video. In addition, in some cases, the limited number of marked barrage text can affect the accuracy of the content heat map, despite the relatively large number of barrage text in the video. Therefore, in order to further improve the reliability of the content heat map, semantic analysis may be performed on the multiple barrage texts, and then, based on the analysis result and the marked barrage texts, a content heat map corresponding to the video to be played may be constructed, that is, optionally, in some embodiments, the step of "constructing the content heat map corresponding to the video to be played according to the marked barrage texts and the distribution of each barrage text in the video to be played" may specifically include:
(21) Respectively carrying out semantic analysis on the bullet screen texts to obtain a plurality of bullet screen texts after analysis;
(22) And constructing a content heat map corresponding to the video to be played according to semantic analysis results, the distribution of the bullet screen texts in the video to be played and the marked bullet screen texts.
The multi-layer perceptron with multiple hidden layers is a deep learning structure. Deep learning forms more abstract high-level representation attribute categories or features by combining low-level features to discover distributed feature representations of data. Deep learning is a new field in machine learning research, and the motivation is to build and simulate a neural network for analysis learning of the human brain, and interpret data, such as images, sounds, text, etc., by mimicking the mechanism of the human brain. Common deep learning models include: convolutional neural networks (Convolutional Neural Networks, CNN), recurrent neural networks (Recurrent Neural Network, RNN), long Short-Term Memory networks (LSTM), deep neural networks (Deep Neural Network, DNN), deep Belief Networks (DBNs), and the like. There are two ways in which data propagates in a neural network, one along the path of the input to the output, referred to as forward propagation (Forwardpropagation), and the other back from the output to the input, referred to as backward propagation (Backpropagation). In the forward propagation process, input information is processed layer by layer through a neural network and transmitted to an output layer, errors between output values and expectations are described through a loss function, reverse propagation is carried out, partial derivatives of weights of the loss function on all neurons are obtained layer by layer, weight gradient data of the weight vector by the loss function are formed, the weight gradient data are used as the basis for updating weight parameters, training of the neural network is completed in the process of continuously updating the weight parameters, for example, in the embodiment, a text topic model (LATENT DIRICHLET Allocation, LDA) can be adopted to respectively carry out semantic analysis on a plurality of barrage texts.
In addition, in order to reduce the calculation amount, a semantic analysis method based on an emotion dictionary may be adopted, referring to fig. 1e, after obtaining the bullet text after word segmentation, the emotion words in the bullet text and the positions of each emotion word in the video to be played may be counted, the emotion words, the negatives and the degree adverbs in the bullet text may be found, then whether each emotion word is preceded by the negatives and the degree adverbs may be determined, for example, the negatives and the degree adverbs located before the emotion words are divided into a group, if there is a negation word, the emotion weight of the emotion word is multiplied by-1, if there is a degree adverb is multiplied by a degree value of the degree adverb, finally, the scores of all groups are weighted and added to obtain an emotion value, the emotion value is more than 0 and is less than 0 and the emotion score distribution diagram of the bullet text may be obtained based on the method, as shown in fig. 1c, wherein the abscissa represents the t second of the video to be played, t is more than or equal to 0, and the ordinate represents the emotion score of the bullet text. The emotion score characterizes the user's attention to the currently playing video.
Specifically, the number of all the barrage texts in the video to be played may be obtained, and then, according to the obtained number, the semantic analysis result, the distribution of each barrage text in the video to be played and the marked barrage texts, a corresponding content heat map of the video to be played may be constructed, that is, optionally, in some embodiments, the step of "constructing the content heat map of the video to be played according to the semantic analysis result, the distribution of each barrage text in the video to be played and the marked barrage text" may specifically include:
(31) Acquiring the number of bullet screen texts in a video to be played to obtain the global number;
(32) And constructing a content heat map corresponding to the video to be played according to the semantic analysis result, the global quantity, the distribution of each barrage text in the video to be played and the marked barrage text.
Then, according to the distribution of the marked barrage texts in the video to be played, a marking distribution diagram of the marked barrage texts is constructed, as shown in fig. 1d, and finally, according to the distribution of each barrage text in the video to be played, the emotion score distribution diagram and the marking distribution diagram of the marked barrage texts are fused to obtain a content heat map of the video to be played, as shown in fig. 1e, the content heat map can be used for representing: the video is of interest to the user who has viewed the video to be played.
It should be noted that, when there are a large number of barrage texts in the video to be played, the confidence level of the barrage content of each video segment of the video to be played may be calculated according to the semantic analysis result and the marked barrage texts, the confidence level characterizes the highlight level of the video segment, and then the content heat map is determined according to the confidence level obtained by calculation, that is, optionally, in some embodiments, the step of "constructing the content heat map corresponding to the video to be played according to the semantic analysis result, the global number, the distribution of each barrage text in the video to be played and the marked barrage texts" may specifically include:
(41) Dividing the video to be played into areas to obtain a plurality of video clips;
(42) Calculating the confidence coefficient of the barrage content of each video segment based on the semantic analysis result and the marked barrage text;
(43) And constructing a corresponding content heat map of the video to be played according to the global quantity, the distribution of the bullet screen texts in the video to be played and the confidence level of bullet screen content of each video clip.
In order to make the constructed content heat map consistent with the playing progress of the video, for example, the playing time of the video to be played is 10 seconds, the preset time interval is 2 seconds, then 5 video clips are obtained, then the confidence level of the barrage content of each video clip is calculated according to the semantic analysis result and the marked barrage text, then the confidence level of the barrage content of each video clip is calculated according to the barrage text corresponding to each video clip and the number (i.e. the local number) of barrage texts corresponding to each video clip, finally, the content heat map is obtained based on the global number, the distribution of each barrage text in the video to be played and the confidence level of the barrage content of each video clip, wherein the confidence level of the barrage content of each video clip can be calculated by the following formula:
Wherein K is the confidence level of the barrage content of a video clip, M is the attention level (i.e. emotion score) of the video content corresponding to the barrage text, c is the number of marked barrage texts, and N is a preset weight coefficient, where a mapping table between the barrage text and the attention level of the video content may be pre-established, as shown in fig. 1f, the preset weight coefficient may be set according to the actual requirement, and in particular, the preset weight coefficient may be set according to the actual requirement.
Further, the size parameter corresponding to each confidence coefficient may be obtained, and then, a corresponding content heat map of the video to be played may be constructed according to the obtained size parameter, that is, optionally, in some embodiments, the step of "constructing the corresponding content heat map of the video to be played according to the global number, the distribution of each bullet screen text in the video to be played, and the confidence coefficient of the bullet screen content of each video clip" may specifically include:
(51) Obtaining size parameters corresponding to the confidence coefficients;
(52) And constructing a corresponding content heat map of the video to be played according to the global quantity, the distribution of the bullet screen texts in the video to be played and the acquired size parameters.
The size parameter is used to indicate the display position and the display size of the confidence in the content heat map, in order to determine the unique position of the confidence in the content heat map, the display size and the reference point coordinate are generally included in the size parameter, the display size refers to the size of the confidence in the content heat map, the size includes a width and a height, in general, the display size refers to the pixel occupied by the width and the pixel occupied by the height in the content heat map, the reference point coordinate refers to the coordinate of a preset reference point in the content heat map, for example, the confidence is displayed in the form of a histogram, then the display size of each confidence and four reference point coordinates can be obtained, and then the corresponding content heat map of the video to be played is constructed according to the global quantity, the distribution of the bullet screen texts in the video to be played and the obtained size parameter.
For example, the region division is performed on the video to be played to obtain 5 video segments, namely a video segment a, a video segment b, a video segment c, a video segment d and a video segment e, the confidence degrees obtained by calculation are 3, 5, 9, 10 and 12 respectively, for example, the confidence degree of the video segment a is 3, and the size parameter corresponding to the confidence degree is s1, so that the display position and the display size in the content heat map of the confidence degree corresponding to the video segment a can be determined according to the size parameter s1, and the like, and finally, the content heat map corresponding to the video to be played is obtained.
104. And generating a playing page corresponding to the video to be played based on the content heat map, and playing the video to be played on the playing page.
The video data of the video to be played records information such as the type, the storage address, the playing time length and the like of the video to be played, wherein the storage address can be represented by a uniform resource locator (Uniform Resource Locator, URL), and in the embodiment of the invention, a video transmission protocol is followed between a terminal and a server in the video playing process, and the transmission protocol can comprise: a real-time messaging Protocol (REAL TIME MESSAGING Protocol, RTMP) Protocol, HLS (HTTP Live Streaming) Protocol, and the like. Firstly, an initial page of a video to be played may be generated according to video data, and then a playing page for playing the video to be played corresponding to the initial page is constructed based on the content heat map, that is, optionally, in some embodiments, the step of generating the playing page corresponding to the video to be played based on the content heat map may specifically include:
(61) Acquiring video data of a video to be played;
(62) Generating an initial page of a video to be played according to the video data;
(63) And generating a playing page corresponding to the video to be played based on the content heat map and the initial page.
The position of the content heat map on the playing page may be adaptively adjusted according to a preset user interface, for example, the size of the content heat map, the duty ratio of the content heat map on the playing page, the transparency value of the content heat map, and the like, and optionally, in some embodiments, a target area corresponding to a preset policy may be determined in an initial page, and then, the content heat map is displayed in the target area, so as to obtain a playing page corresponding to a video to be played, that is, the step of generating, based on the content heat map and the initial page, a playing page corresponding to the video to be played may specifically include:
(71) Determining a target area corresponding to a preset strategy in an initial page;
(72) Acquiring size information of a target area;
(73) And displaying the content heat map in the target area according to the size information to obtain a playing page corresponding to the video to be played.
After receiving a video playing instruction, the embodiment of the invention determines marked barrage texts in a plurality of barrage texts, then constructs a content heat map corresponding to the video to be played according to the marked barrage texts and the distribution of each barrage text in the video to be played, finally generates a playing page corresponding to the video to be played based on the content heat map, and plays the video to be played on the playing page. The content heat map in the video playing scheme is constructed according to the marked barrage texts and the distribution of the barrage texts in the video to be played, so that in actual use, the influence of some barrage texts which are completely irrelevant to the video on the accuracy of the content heat map can be avoided, the accuracy of positioning key segments of the video according to the video heat map can be improved, and the video playing efficiency is improved.
The method according to the embodiment will be described in further detail by way of example.
In this embodiment, a case where the video playback apparatus is integrated in a server will be described as an example.
Referring to fig. 2a, a video playing method may include the following specific steps:
201. and the server receives the video playing instruction.
The video playing instruction carries a video to be played and a plurality of barrage texts of the video to be played, wherein the barrage texts can be sent by a plurality of users, and of course, one user can also send at least two barrage texts, and the video playing instruction is specific according to actual conditions.
202. The server determines a marked barrage text among the plurality of barrage texts.
In practical application, the user may not only issue the barrage text by himself, but also mark the barrage text issued by himself and/or barrage texts issued by other users, for example, specifically, the a user and the b user mark the barrage text a issued by the c user respectively, for example, mark the barrage text a is completed by clicking the "like" control key.
203. And the server constructs a content heat map corresponding to the video to be played according to the marked barrage texts and the distribution of the barrage texts in the video to be played.
For example, specifically, the server may construct a content popularity graph corresponding to the video to be played according to the distribution of multiple barrage texts in the video to be played and the semantics of the marked barrage texts, since the barrage texts sent by each user for the same video may be different, the meaning to be expressed may also be different, for example, the barrage text sent by the user a for the video E is related to the video content of the video E, and the server may determine such barrage texts as candidate barrage texts; the bullet screen text sent by the user a for the video E is irrelevant to the video content of the video E, such as negative comments of the video to be played and/or negative evaluations of characters in the video to be played, etc., and such bullet screen text may affect the accuracy of the content heat map, so that, optionally, in some embodiments, the server may remove such bullet screen text.
In order to make the constructed content heat map consistent with the playing progress of the video, for example, the playing time of the video to be played is 10 seconds, the preset time interval is 2 seconds, then 5 video clips are obtained, then the server calculates the confidence coefficient of the barrage content of each video clip according to the semantic analysis result and the marked barrage text, then the server calculates the confidence coefficient of the barrage content of each video clip according to the barrage text corresponding to each video clip and the number (namely the local number) of the barrage text corresponding to each video clip, and finally the server constructs the content heat map based on the global number, the distribution of each barrage text in the video to be played and the confidence coefficient of the barrage content of each video clip, so as to obtain the content heat map corresponding to the video to be played.
Further, the server may also count the number of marking times of each barrage text, and construct a mapping relationship between the barrage text and the content popularity based on the number of marking times and the mapping table, as shown in fig. 2 b.
204. And the server generates a playing page corresponding to the video to be played based on the content heat map, and plays the video to be played on the playing page.
The position of the content heat map on the playing page may be adaptively adjusted according to a preset user interface, for example, the server may adjust the size of the content heat map, the duty ratio of the content heat map on the playing page, the transparency value of the content heat map, and the like, and optionally, in some embodiments, the server may determine a target area corresponding to a preset policy in an initial page, and then, the server displays the content heat map in the target area to obtain the playing page corresponding to the video to be played.
In order to facilitate understanding of the video playing method provided by the embodiment of the present invention, please refer to fig. 2c, which further illustrates that a user views a video through a mobile phone, the present invention provides a video playing system, which includes a server, a mobile phone, and a user, when the server receives a video playing instruction for a video E, the server obtains the video E, where the video E includes video data of the video E and a bullet screen text set of the video E, then the server performs word segmentation processing on the bullet screen text set to obtain a plurality of bullet screen texts, and then the server determines marked bullet screen texts in the plurality of bullet screen texts, where a manner of marking bullet screen texts by the user may be "praise" on bullet screen texts, and bullet screen praise is a common user operation behavior of current video bullet screens, and the user may praise bullet screens sent by other users. As shown in fig. 2d, the marked barrage text is pointed by the arrow in the figure, and it is to be noted that the content of the barrage text is slightly different from that of the traditional text, and there are a large number of network vocabularies or vocabularies described on the side, such as 66666, chicken leg and front high energy, so that the server needs to perform semantic detection on the marked barrage text, determines the marked barrage text meeting the preset condition as a candidate barrage text according to the detection result, constructs a content heat map corresponding to the video to be played based on the multiple analyzed barrage texts and the candidate barrage text, and finally constructs a play page corresponding to the video to be played based on the content heat map and the video data, and the display of the mobile phone can display the play page and play the video to be played on the play page, as shown in fig. 2 e.
After the server of the embodiment of the invention acquires the video to be played, the server performs word segmentation on the bullet screen text set to obtain a plurality of bullet screen texts, then the server determines marked bullet screen texts in the bullet screen texts, then the server constructs a content heat map corresponding to the video to be played according to the bullet screen texts and the marked bullet screen texts, and finally the server constructs a playing page for playing the video to be played based on the content heat map and the video data, and plays the video to be played on the playing page. The content heat map in the video playing scheme is constructed according to the barrage texts and the marked barrage texts, so that in actual use, the influence of some barrage texts which are completely irrelevant to the video on the accuracy of the content heat map can be avoided, the accuracy of positioning key segments of the video according to the video heat map can be improved, and the video playing efficiency is further improved.
In order to facilitate better implementation of the video playing method according to the embodiment of the present invention, the embodiment of the present invention further provides a video playing device (simply referred to as a playing device) based on the foregoing embodiment of the present invention. The meaning of the nouns is the same as that in the video playing method, and specific implementation details can be referred to the description in the method embodiment.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a video playing device according to an embodiment of the present invention, where the playing device may include a receiving module 301, a determining module 302, a constructing module 303, a generating module 304, and a playing module 305, and may specifically be as follows:
the receiving module 301 is configured to receive a video playing instruction.
The video playing instruction carries a video to be played and a plurality of barrage texts of the video to be played, wherein the barrage texts can be sent by a plurality of users, and of course, one user can also send at least two barrage texts, and the video playing instruction is specific according to actual conditions.
A determining module 302 is configured to determine a marked barrage text from among a plurality of barrage texts.
And the construction module 303 is configured to construct a content heat map corresponding to the video to be played according to the marked barrage text and the distribution of each barrage text in the video to be played.
Optionally, in some embodiments, the building module 303 may specifically include:
the analysis submodule is used for carrying out semantic analysis on the bullet screen texts respectively to obtain a plurality of bullet screen texts after analysis;
The construction sub-module is used for constructing a content heat map corresponding to the video to be played according to semantic analysis results, distribution of the bullet screen texts in the video to be played and the marked bullet screen texts.
Optionally, in some embodiments, the building unit submodule may specifically include:
The acquisition unit is used for acquiring the number of the bullet screen texts in the video to be played to obtain the global number;
The construction unit is used for constructing a content heat map corresponding to the video to be played according to semantic analysis results, the overall quantity, the distribution of the bullet screen texts in the video to be played and the marked bullet screen texts.
Optionally, in some embodiments, the building unit may specifically include:
the dividing sub-unit is used for dividing the region of the video to be played to obtain a plurality of video clips;
a calculating subunit, configured to calculate, based on the semantic analysis result and the marked barrage text, a confidence level of barrage content of each video clip;
And the construction subunit is used for constructing a corresponding content heat map of the video to be played according to the global quantity, the distribution of the bullet screen texts in the video to be played and the confidence level of bullet screen content of each video fragment.
Alternatively, in some embodiments, the computing subunit may be specifically configured to: and respectively determining the number of barrage texts corresponding to each video segment to obtain a plurality of local numbers, and calculating the confidence coefficient of barrage contents of each video segment according to the barrage texts corresponding to each video segment and the local numbers.
Alternatively, in some embodiments, the building sub-unit may be specifically configured to: and acquiring the size parameters corresponding to the confidence coefficients, and constructing a corresponding content heat map of the video to be played according to the global quantity, the distribution of the bullet screen texts in the video to be played and the acquired size parameters.
The generating module 304 generates a playing page corresponding to the video to be played based on the content heat map.
The position of the content heat map on the playing page can be adaptively adjusted according to a preset user interface.
Optionally, in some embodiments, the generating module 304 may specifically include:
The acquisition unit is used for the video data of the video to be played;
the first generation unit is used for generating an initial page of the video to be played according to the video data;
and the second generation unit is used for generating a playing page corresponding to the video to be played based on the content heat map and the initial page.
Optionally, in some embodiments, the second generating unit may specifically be configured to: and determining a target area corresponding to a preset strategy in the initial page, acquiring the size information of the target area, and displaying the content heat map in the target area according to the size information to obtain a playing page corresponding to the video to be played.
The playing module 305 is configured to play the video to be played on the playing page.
After receiving a video playing instruction, a determining module 302 determines marked barrage texts in a plurality of barrage texts, a constructing module 303 constructs a content heat map corresponding to a video to be played according to the marked barrage texts and the distribution of each barrage text in the video to be played, and finally a generating module 34 generates a playing page corresponding to the video to be played based on the content heat map, and a playing module 305 plays the video to be played on the playing page. The content heat map in the video playing scheme is constructed according to the marked barrage texts and the distribution of the barrage texts in the video to be played, so that in actual use, the influence of some barrage texts which are completely irrelevant to the video on the accuracy of the content heat map can be avoided, the accuracy of positioning key segments of the video according to the video heat map can be improved, and the video playing efficiency is improved.
In addition, the embodiment of the invention further provides an electronic device, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the embodiment of the invention, specifically:
The electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
Receiving a video playing instruction, determining marked barrage texts in a plurality of barrage texts, constructing a content heat map corresponding to the video to be played according to the marked barrage texts and the distribution of each barrage text in the video to be played, generating a playing page corresponding to the video to be played based on the content heat map, and playing the video to be played on the playing page.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
After receiving a video playing instruction, the embodiment of the invention determines marked barrage texts in a plurality of barrage texts, then constructs a content heat map corresponding to the video to be played according to the marked barrage texts and the distribution of each barrage text in the video to be played, finally generates a playing page corresponding to the video to be played based on the content heat map, and plays the video to be played on the playing page. The content heat map in the video playing scheme is constructed according to the marked barrage texts and the distribution of the barrage texts in the video to be played, so that in actual use, the influence of some barrage texts which are completely irrelevant to the video on the accuracy of the content heat map can be avoided, the accuracy of positioning key segments of the video according to the video heat map can be improved, and the video playing efficiency is improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any one of the video playing methods provided by the embodiment of the present invention. For example, the instructions may perform the steps of:
Receiving a video playing instruction, determining marked barrage texts in a plurality of barrage texts, constructing a content heat map corresponding to the video to be played according to the marked barrage texts and the distribution of each barrage text in the video to be played, generating a playing page corresponding to the video to be played based on the content heat map, and playing the video to be played on the playing page.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any video playing method provided by the embodiment of the present invention can be executed due to the instructions stored in the storage medium, so that the beneficial effects that can be achieved by any video playing method provided by the embodiment of the present invention can be achieved, and detailed descriptions of the previous embodiments are omitted herein.
The foregoing describes in detail a video playing method, apparatus, electronic device and storage medium provided by the embodiments of the present invention, and specific examples are applied to illustrate the principles and embodiments of the present invention, where the foregoing examples are only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.