Video storage method and device and electronic equipment
Technical Field
The present invention relates to data storage technologies, and in particular, to a method and an apparatus for storing video, and an electronic device.
Background
With the continuous development of computer communication and internet technologies, especially 4G communication technologies, electronic devices, such as smart mobile phones, personal digital assistants, palm computers, and notebook computers, are applied more and more widely, and more Applications (APPs) are installed in the electronic devices, and the provided Application functions are more and more abundant. For example, as a third major social carrier behind characters and pictures, a short video is likely to become a new development trend of social contact, and a user can share the short video through a social platform, and can play a plurality of short videos for watching in a playing interface of a player by using a player of a client, so that the user experience is greatly enhanced and enriched.
In order to review played videos anytime and anywhere in the follow-up process, the played videos need to be stored, and because the storage space occupied by the videos is large, a large amount of storage space needs to be consumed for storing the played short videos locally, which greatly improves the cost of electronic equipment, especially mobile electronic equipment, so that how to effectively save the local storage space and reduce the cost of the electronic equipment become a technical problem which needs to be solved urgently.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for storing a video, and an electronic device, which can effectively save a storage space of a local electronic device, so as to solve a problem of a large required storage space caused by the need of storing complete video data in the local electronic device in an existing method for storing a video.
In a first aspect, an embodiment of the present invention provides a method for storing a video, including:
acquiring videos respectively played by a plurality of playing view windows on a playing interface, and constructing a mapping relation between the playing view windows and the videos correspondingly played;
splicing the videos respectively played by the multiple playing view windows to obtain spliced videos;
and optimizing the spliced video according to a preset storage space optimization strategy to obtain a storage optimized spliced video and locally store the storage optimized spliced video.
With reference to the first aspect, in a first implementation manner of the first aspect, the obtaining videos respectively played by a plurality of play view windows on a play interface includes:
setting a plurality of play view windows on a play interface, wherein each play view window is provided with a decoding class;
receiving a video to be played, calling a decoding class corresponding to a playing view window for playing the video to be played, and decoding the video to be played to obtain image data;
rendering the image data to a playing view window for playing the video to be played.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the decoding classes are hardware decoding classes that use a hardware decoding technique, and the decoding classes set for each play view window are the same.
With reference to the first aspect, in a third implementation manner of the first aspect, the constructing a mapping relationship between the play view window and a corresponding played video includes:
setting a playing interface identifier for the playing interface;
acquiring a play view window identifier of a play view window for playing the video to be played in the play interface;
and linking the playing interface identifier and the playing view window identifier to the corresponding played video.
With reference to the first aspect and any one of the first to third implementation manners of the first aspect, in a fourth implementation manner of the first aspect, the optimizing the spliced video according to a preset storage space optimization policy includes:
acquiring a first frame of each video in the spliced video, and storing the first frame to a preset local disk;
and extracting each video according to a preset frame interval threshold value by taking the first frame as a basis, and storing the video to a preset local disk.
With reference to the first aspect and any one of the first to third implementation manners of the first aspect, in a fifth implementation manner of the first aspect, the optimizing the spliced video according to a preset storage space optimization policy includes:
and for each frame in the spliced video, reducing the video resolution and then storing the video resolution to a preset local disk.
With reference to the first aspect, any one of the first to third embodiments of the first aspect, in a sixth embodiment of the first aspect, the method further comprises:
receiving a video high-definition playing request from a playing view window, pulling the video mapped by the playing view window according to the constructed mapping relation, and playing in the playing view window, wherein the playing view window is a playing view window in the playing interface for playing the stored optimized spliced video, and other playing view windows continue to play the corresponding optimized spliced video.
With reference to the first aspect or any one of the first to third embodiments of the first aspect, in a seventh embodiment of the first aspect, the method further includes:
and receiving a multi-video high-definition playing request from a non-playing view window in a playing interface for playing the storage optimization spliced video, respectively pulling the video mapped by each playing view window according to the number of the playing view windows contained in the playing interface and the constructed mapping relation, and playing the video in the corresponding playing view window.
In a second aspect, an embodiment of the present invention provides an apparatus for storing a video, including: a mapping relation construction module, a splicing module and an optimized storage module, wherein,
the mapping relation construction module is used for acquiring videos respectively played by a plurality of playing view windows on a playing interface and constructing the mapping relation between the playing view windows and the videos correspondingly played;
the splicing module is used for splicing the videos respectively played by the multiple playing view windows to obtain spliced videos;
and the optimized storage module is used for optimizing the spliced video according to a preset storage space optimization strategy to obtain a storage optimized spliced video and storing the storage optimized spliced video locally.
With reference to the second aspect, in a first implementation manner of the second aspect, the mapping relationship building module includes: a decoding class setting unit, a decoding unit, a rendering unit and a mapping relation constructing unit, wherein,
the decoding type setting unit is used for setting a plurality of play view windows on the play interface, and each play view window is provided with a decoding type;
the decoding unit is used for receiving a video to be played, calling a decoding class corresponding to a playing view window for playing the video to be played, and decoding the video to be played to obtain image data;
the rendering unit is used for rendering the image data to a playing view window for playing the video to be played;
and the mapping relation construction unit is used for constructing the mapping relation between the playing view window and the video played correspondingly.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the decoding classes are hardware decoding classes that use a hardware decoding technique, and the decoding classes set for each play view window are the same.
With reference to the first implementation manner of the second aspect, in a third implementation manner of the second aspect, the mapping relationship constructing unit includes: an interface identification setting subunit, a view window setting subunit, and a link setting subunit, wherein,
the interface identifier setting subunit is used for setting a playing interface identifier for the playing interface;
the view window setting subunit is used for acquiring a play view window identifier of a play view window for playing the video to be played in the play interface;
and the link setting subunit is used for linking the playing interface identifier and the playing view window identifier to the corresponding played video.
With reference to the second aspect and any one of the first to third embodiments of the second aspect, in a fourth embodiment of the second aspect, the optimized storage module includes: a first frame processing unit and an interval frame extracting unit, wherein,
the first frame processing unit is used for acquiring a first frame of each video in the spliced video and storing the first frame to a preset local disk;
and the interval frame extraction unit is used for extracting each video according to the preset frame interval threshold value by taking the first frame as a basis and storing the video to a preset local disk.
With reference to the second aspect and any one of the first to third embodiments of the second aspect, in a fifth embodiment of the second aspect, the optimized storage module includes: a resolution processing unit and a storage unit, wherein,
the resolution processing unit is used for reducing the resolution of each frame in the spliced video;
and the storage unit is used for storing the frame with the reduced video resolution to a preset local disk.
With reference to the second aspect, or any one of the first to third embodiments of the second aspect, in a sixth embodiment of the second aspect, the apparatus further comprises:
and the first playback module is used for receiving a video high-definition playing request from a playing view window, pulling the video mapped by the playing view window according to the constructed mapping relation, and playing in the playing view window, wherein the playing view window is a playing view window in the playing interface for playing the stored optimized spliced video, and other playing view windows continue to play the corresponding optimized spliced video.
With reference to the second aspect, or any one of the first to third embodiments of the second aspect, in a seventh embodiment of the second aspect, the apparatus further comprises:
and the second playback module is used for receiving a multi-video high-definition playing request from a non-playing view window in a playing interface for playing the storage optimization spliced video, respectively pulling the video mapped by each playing view window according to the number of the playing view windows contained in the playing interface and the constructed mapping relation, and playing the video in the corresponding playing view window.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for performing the following operations:
acquiring videos respectively played by a plurality of playing view windows on a playing interface, and constructing a mapping relation between the playing view windows and the videos correspondingly played;
splicing the videos respectively played by the multiple playing view windows to obtain spliced videos;
and optimizing the spliced video according to a preset storage space optimization strategy to obtain a storage optimized spliced video and locally store the storage optimized spliced video.
In a fourth aspect, an embodiment of the present invention further provides a storage medium for storing an application program, where the application program is configured to execute a method for storing a video according to an embodiment of the present invention.
In a fifth aspect, an embodiment of the present invention further provides an application program, configured to execute the method for storing a video provided in the embodiment of the present invention.
According to the method, the device and the electronic equipment for storing the video, provided by the embodiment of the invention, the mapping relation between the playing view windows and the corresponding played video is constructed by acquiring the videos respectively played by the playing view windows on the playing interface; splicing the videos respectively played by the multiple playing view windows to obtain spliced videos; the spliced video is optimized according to a preset storage space optimization strategy to obtain a storage optimized spliced video and is stored locally, so that the storage space of local electronic equipment can be effectively saved, and the problem of large required storage space caused by the fact that complete video data needs to be stored in the local electronic equipment in the existing video storage method is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for storing video according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a playing interface according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a playing interface after playing and storing the optimized spliced video according to the embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a second apparatus for storing video according to the present invention;
fig. 5 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Fig. 1 is a flowchart illustrating a method for storing video according to an embodiment of the present invention, as shown in fig. 1, the method of this embodiment may include:
step 101, acquiring videos respectively played by a plurality of play view windows on a play interface, and constructing a mapping relation between the play view windows and the videos correspondingly played;
in this embodiment, as an optional embodiment, the obtaining videos respectively played by a plurality of play view windows on the play interface includes:
a11, setting multiple play view windows on the play interface, each play view window setting a decoding class;
in this embodiment, as an optional embodiment, the number of play view windows on the play interface may be set according to the number of videos to be played, and each play view window is used for playing a video. For example, for live broadcasting of the same sports event on different channels, the play view window may be set according to the number of channels on which the same sports event is live.
Fig. 2 is a schematic structural diagram of a playing interface according to an embodiment of the present invention. Referring to fig. 2, assuming that the number of videos to be played is 12, the number of the play view windows set on the play interface is also 12, where every three play view windows form a play unit, the sizes of the play units may be the same or different, and the positions and sizes of the play view windows (corresponding to a grid, and a grid corresponding to a play view window) in the play unit may be set according to the actual play requirement of the user, for example, for a play unit, the play unit may be centered, vertically split, and then centered, horizontally split to the right split, so as to form three play view windows.
In this embodiment, since synchronous playing of multiple videos needs to be realized in the same playing interface, in order to guarantee the fluency of each played video, as an optional embodiment, a decoding class is set for each playing view window to speed up decoding of the videos.
In this embodiment, as an optional embodiment, the decoding class is a hardware decoding class that adopts a hardware decoding technology. The hardware decoding class may be a multimedia chip, for example, a chip provided with a MediaCodec library. The multimedia chip specially designed at the bottom layer is utilized to convert the video data stream into the image data stream which can be displayed at the hardware level, thereby completing the decoding of the high-definition video data stream in real time. Of course, in practical applications, the decoding class may also be a software decoding class that adopts a software decoding technology, which is not limited in this embodiment.
In this embodiment, as an optional embodiment, the decoding classes set for the respective play view windows are the same.
In this embodiment, as another optional embodiment, a play button may be further set in the play view window, for example, a start play button, a stop play button, an interrupt play button, a fast forward, fast backward, a high definition play request button, and the like, where if a subsequent user clicks the high definition play request button, the subsequent user may be associated with a mapping relationship between the constructed play view window and a video that is correspondingly played.
A12, receiving a video to be played, calling a decoding class corresponding to a playing view window for playing the video to be played, and decoding the video to be played to obtain image data;
in this embodiment, the video to be played may be from a network or may be from a local storage. And the user places a video to be played in the corresponding play view window according to the actual play requirement, and the play view window receives the video to be played and decodes the video by using the set decoding class.
In this embodiment, after the video is decoded, the decoded video data is image data.
A13, rendering the image data to a playing view window playing the video to be played.
In this embodiment, as an optional embodiment, a hardware Open graphics library (OpenGL) is used to render image data into a corresponding play view window, where the play view window is a play view window for receiving a video. Therefore, the video is continuously decoded by utilizing the decoding class to obtain the image data, and then the image data is continuously rendered into the playing view windows by utilizing the hardware OpenGL.
In this embodiment, as an optional embodiment, the constructing a mapping relationship between the playing view window and the video played correspondingly includes:
a21, setting a playing interface identifier for the playing interface;
in this embodiment, when a user constructs different playing interfaces to play different videos, each playing interface corresponds to a playing interface identifier.
A22, acquiring a play view window identifier of a play view window playing the video to be played in the play interface;
in this embodiment, different play view windows in the play interface have different play view window identifiers.
A23, linking the playing interface identifier and the playing view window identifier to the corresponding played video.
In this embodiment, the play view window for playing the video is set as a link, that is, when the play view window is subsequently clicked, the link may be connected to the network server where the played video is located, so as to pull the video from the network server for playback.
In this embodiment, the linked web server may be connected to the electronic device in a wired or wireless manner.
In this embodiment, as an optional embodiment, after obtaining videos respectively played by a plurality of play view windows on the play interface, before constructing a mapping relationship between the play view windows and the videos played correspondingly, the method further includes:
and acquiring a storage address of the video correspondingly played, and if the storage address is a remote storage address, executing the step of constructing the mapping relation between the playing view window and the video correspondingly played.
In this embodiment, the remote storage address, that is, the video played correspondingly, is not stored locally.
102, splicing videos respectively played by the multiple playing view windows to obtain spliced videos;
in this embodiment, splicing a plurality of videos that are played synchronously is a known technology, and a detailed description thereof is omitted here.
And 103, optimizing the spliced video according to a preset storage space optimization strategy to obtain a storage optimized spliced video and locally store the storage optimized spliced video.
In this embodiment, as an optional embodiment, the optimizing the spliced video according to a preset storage space optimization policy includes:
b11, acquiring a first frame of each video in the spliced video, and storing the first frame to a preset local disk;
in this embodiment, as an optional embodiment, the obtaining a first frame of each video in the spliced video and storing the first frame to a preset local disk includes:
setting a storage file containing playing interface attribute information, acquiring first frame data rendered into a playing view window by using the hardware OpenGL, and compiling the first frame data into the storage file in a coding type mode, wherein the playing interface attribute information, such as the position and the size of each playing view window, the link relation of the playing view windows and the like, is stored in the storage file.
In this embodiment, a storage space (storage file) P is created in the storage device, and data rendered into each play view window by using hardware OpenGL is directly compiled into the storage file P in a hardware encoding manner.
In this embodiment, the first frame is selected for initial storage to facilitate synchronization of subsequent playback. As another alternative, the first frame may not be selected for initial storage.
And B12, based on the first frame, extracting each video according to a preset frame interval threshold value, and storing the video to a preset local disk.
In this embodiment, the frame interval threshold may be set according to actual needs, for example, one frame is extracted every 5 frames. For example, for a video with a length of 60s, only picture data of a certain frame in each second can be stored, so that every certain number of frames is stored, and a mode of obtaining a source video by using a link construction mode is combined, so that when a user needs to browse a high-definition video, a corresponding clear complete video can be called, the storage space can be greatly saved, and the cost of electronic equipment can be effectively reduced.
As another optional embodiment, the optimizing the spliced video according to a preset storage space optimization policy includes:
and for each frame in the spliced video, reducing the video resolution and then storing the video resolution to a preset local disk.
In this embodiment, by reducing the resolution of the video to be stored, for example, reducing the original 1920 × 1080 video resolution to 192 × 108, and combining the mode of acquiring the source video by using the link construction mode, the storage space can be greatly saved, and the cost of the electronic device is effectively reduced.
In this embodiment, as an optional embodiment, the method may further include:
receiving a video high-definition playing request from a playing view window, pulling the video mapped by the playing view window according to the constructed mapping relation, and playing in the playing view window, wherein the playing view window is a playing view window in the playing interface for playing the stored optimized spliced video, and other playing view windows continue to play the corresponding optimized spliced video.
In this embodiment, when a user needs to watch a plurality of videos in the playing interface again, the stored optimized spliced video may be played, so that a playing interface including a plurality of playing view window patterns may be presented, and a corresponding video stored in a storage file is played in each playing view window, so that the user may roughly browse each played video.
When a user needs to perform high-definition browsing on a video in a certain play view window, the play view window can be clicked to trigger and output a video high-definition play request, so that the linked video is pulled from the corresponding network server to perform high-definition playing according to the link set for the play view window. And continuously playing the corresponding storage optimization spliced video in other non-clicked playing view windows.
In this embodiment, as another optional embodiment, the method may further include:
and receiving a multi-video high-definition playing request from a non-playing view window in a playing interface for playing the storage optimization spliced video, respectively pulling the video mapped by each playing view window according to the number of the playing view windows contained in the playing interface and the constructed mapping relation, and playing the video in the corresponding playing view window.
In this embodiment, if the user clicks any position outside all the play view windows on the play interface, the multi-video high-definition play request is triggered to be output, so that the linked videos are pulled from the corresponding network server to the corresponding play view windows for high-definition play according to the play view windows included in the play interface and the links (mapping relationships) respectively set for the play view windows.
Fig. 3 is a schematic structural diagram of a playing interface after playing and storing the optimized spliced video according to the embodiment of the present invention. Referring to fig. 3, the playing interface after playing and storing the optimized spliced video includes three playing view windows, which are a first playing view window, a second playing view window and a third playing view window from left to right and from top to bottom, respectively. The first playing view window is linked to a first video stored in a first storage file in a first network server, the second playing view window is linked to a second video stored in a second storage file in the first network server, the third playing view window is linked to a third video stored in a third storage file in a third network server, when a user clicks any position of an area where the first playing view window is located, the current playing of the first playing view window is stopped, the first video stored in the first storage file is obtained from the first network server for high-definition playing, and the second playing view window and the third playing view window continue to play the locally stored storage optimized spliced video. If the user clicks any area position except the first playing view window, the second playing view window and the third playing view window, a multi-video high-definition playing request is triggered to be output, each grid stops the currently played optimized spliced video, and in the first playing view window, a first video stored in a first storage file is obtained from a first network server for high-definition playing; in the second playing view window, acquiring a second video stored in a second storage file from the first network server for high-definition playing; and in the third playing view window, acquiring a third video stored in a third storage file from a third network server for high-definition playing, so that each grid directly plays the corresponding high-definition video.
In the method for storing the video, a mapping relationship between a plurality of playing view windows and a corresponding video to be played is established by acquiring videos respectively played by the playing view windows on a playing interface; splicing the videos respectively played by the multiple playing view windows to obtain spliced videos; and optimizing the spliced video according to a preset storage space optimization strategy to obtain a storage optimized spliced video and locally store the storage optimized spliced video. Therefore, the mapping relation between the playing view window and the corresponding played video is established, the played video is locally combined and optimized in storage space, a plurality of videos can be combined into a spliced video, the videos can be watched at the same time, the combined spliced video can contain more contents, the combined video is optimized in storage space, local electronic equipment can be effectively saved, the storage space is saved, and the cost of the electronic equipment is reduced. Further, in subsequent applications, the stored storage optimized spliced video is played, so that a multi-playing view window of a playing interface is loaded, multi-video synchronous playing can be performed, and the mapping relation between the playing view window and the video played correspondingly is further loaded, so that after one playing view window is clicked, the corresponding video can be pulled to perform high-definition playing according to the mapping relation, and the playback performance and the user experience are guaranteed.
Example two
Fig. 4 is a schematic structural diagram of a second video storage apparatus according to an embodiment of the present invention, and as shown in fig. 4, the apparatus of this embodiment may include: a mapping relation construction module 41, a concatenation module 42, and an optimization storage module 43, wherein,
the mapping relationship establishing module 41 is configured to obtain videos respectively played by multiple play view windows on a play interface, and establish a mapping relationship between the play view windows and the videos played correspondingly;
in this embodiment, as an optional embodiment, the mapping relationship building module 41 includes: a decoding class setting unit, a decoding unit, a rendering unit, and a mapping relationship construction unit (not shown in the figure), wherein,
the decoding type setting unit is used for setting a plurality of play view windows on the play interface, and each play view window is provided with a decoding type;
in this embodiment, as an optional embodiment, the decoding class is a hardware decoding class that adopts a hardware decoding technology, and the decoding classes set for each play view window are the same. The hardware decoding class may be a multimedia chip, for example, a chip provided with a MediaCodec library.
In this embodiment, as another optional embodiment, a play button may be further provided in the play view window, for example, a start play button, a stop play button, an interrupt play button, a fast forward, fast backward, a high definition play request button, and the like.
The decoding unit is used for receiving a video to be played, calling a decoding class corresponding to a playing view window for playing the video to be played, and decoding the video to be played to obtain image data;
in this embodiment, after the video is decoded, the decoded video data is image data.
The rendering unit is used for rendering the image data to a playing view window for playing the video to be played;
in this embodiment, as an optional embodiment, the image data is rendered into the corresponding play view window by using a hardware open graphics library.
And the mapping relation construction unit is used for constructing the mapping relation between the playing view window and the video played correspondingly.
In this embodiment, as an optional embodiment, the mapping relationship constructing unit includes: an interface identification setting subunit, a view window setting subunit, and a link setting subunit, wherein,
the interface identifier setting subunit is used for setting a playing interface identifier for the playing interface;
the view window setting subunit is used for acquiring a play view window identifier of a play view window for playing the video to be played in the play interface;
and the link setting subunit is used for linking the playing interface identifier and the playing view window identifier to the corresponding played video.
A splicing module 42, configured to splice videos respectively played by the multiple play view windows to obtain spliced videos;
and the optimized storage module 43 is configured to perform optimization processing on the spliced video according to a preset storage space optimization strategy to obtain a storage optimized spliced video, and store the storage optimized spliced video locally.
In this embodiment, as an optional embodiment, the optimization storage module 43 includes: a first frame processing unit, and an interval frame extracting unit (not shown), wherein,
the first frame processing unit is used for acquiring a first frame of each video in the spliced video and storing the first frame to a preset local disk;
in this embodiment, as an optional embodiment, the obtaining a first frame of each video in the spliced video and storing the first frame to a preset local disk includes:
setting a storage file containing attribute information of a playing interface, acquiring first frame data rendered into a playing view window by using the hardware OpenGL, and compiling the first frame data into the storage file in a coding type mode. Wherein, the playing interface attribute information comprises: the position and size of each playing view window, the link relation of the playing view windows and the like.
And the interval frame extraction unit is used for extracting each video according to the preset frame interval threshold value by taking the first frame as a basis and storing the video to a preset local disk.
In this embodiment, the frame interval threshold may be set according to actual needs, for example, one frame is extracted every 5 frames.
As another alternative embodiment, the optimization storage module 43 includes: a resolution processing unit, and a storage unit (not shown), wherein,
the resolution processing unit is used for reducing the resolution of each frame in the spliced video;
and the storage unit is used for storing the frame with the reduced video resolution to a preset local disk.
In this embodiment, as an optional embodiment, the apparatus may further include:
and a first playback module (not shown in the figure), configured to receive a video high-definition play request from a play view window, pull the video mapped by the play view window according to the constructed mapping relationship, and play the video in the play view window, where the play view window is a play view window in a play interface for playing the stored optimized spliced video, and other play view windows continue to play the corresponding optimized spliced video.
In this embodiment, when a user needs to watch a plurality of videos in the playing interface again, the stored optimized spliced video may be played, so that a playing interface including a plurality of playing view window patterns may be presented, and a corresponding video stored in a storage file is played in each playing view window, so that the user may roughly browse each played video.
When a user needs to perform high-definition browsing on a video in a certain play view window, the play view window can be clicked to trigger and output a video high-definition play request, so that the linked video is pulled from the corresponding network server to perform high-definition playing according to the link set for the play view window. And continuously playing the corresponding storage optimization spliced video in other non-clicked playing view windows.
In this embodiment, as another optional embodiment, the apparatus may further include:
and a second playback module (not shown in the figure), configured to receive a multi-video high-definition play request from a non-play view window in a play interface for playing the storage-optimized spliced video, respectively pull the video mapped by each play view window according to the number of play view windows included in the play interface and the constructed mapping relationship, and play the video in the corresponding play view window.
In this embodiment, when a user needs to perform high-definition browsing on a video in a play view window of the entire play interface, a multi-video high-definition play request may be triggered and output by clicking any position on the play interface except the play view window, so that the linked video is pulled from the corresponding network server to the corresponding play view window for high-definition playing according to the play view window included in the play interface and links (mapping relationships) respectively set for the play view window.
The apparatus of this embodiment may be used to implement the technical solutions of the method embodiments shown in fig. 1 to fig. 3, and the implementation principles and technical effects are similar, which are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term "comprising", without further limitation, means that the element so defined is not excluded from the group consisting of additional identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof.
In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
The embodiment of the invention also provides electronic equipment, and the electronic equipment comprises the device in any one of the embodiments.
Fig. 5 is a schematic structural diagram of an embodiment of an electronic device of the present invention, which can implement the processes of the embodiments shown in fig. 1 to 4 of the present invention, and as shown in fig. 5, the electronic device may include: the device comprises a shell 51, a processor 52, a memory 53, a circuit board 54 and a power circuit 55, wherein the circuit board 54 is arranged inside a space enclosed by the shell 51, and the processor 52 and the memory 53 are arranged on the circuit board 54; a power supply circuit 55 for supplying power to each circuit or device of the electronic apparatus; the memory 53 is used to store executable program code; the processor 52 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 53, for performing the following operations:
acquiring videos respectively played by a plurality of playing view windows on a playing interface, and constructing a mapping relation between the playing view windows and the videos correspondingly played;
splicing the videos respectively played by the multiple playing view windows to obtain spliced videos;
and optimizing the spliced video according to a preset storage space optimization strategy to obtain a storage optimized spliced video and locally store the storage optimized spliced video.
The specific execution process of the above steps by the processor 52 and the steps further executed by the processor 52 by running the executable program code may refer to the description of the embodiment shown in fig. 1 to 4 of the present invention, and are not described herein again.
The electronic device exists in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
The embodiment of the invention also provides a storage medium for storing the application program, and the application program is used for executing the method for storing the video provided by the embodiment of the invention.
The embodiment of the invention also provides an application program used for executing the method for storing the video provided by the embodiment of the invention.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
The above description of the embodiments will make clear to those skilled in the art that the present invention can be implemented
The invention can be implemented by means of software plus a necessary general-purpose hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.