Disclosure of Invention
The embodiment of the invention provides a method and a device for recording a multimedia program, which are used for solving the problem that the recording of the multimedia program is interrupted if hot plugging is carried out on a storage device which stores the recorded multimedia program in the prior art.
The embodiment of the invention provides the following specific technical scheme:
a method of multimedia program recording, comprising:
when recording a multimedia program, selecting one of at least one locally registered storage device as a first target storage device, and storing the recorded content in the first target storage device;
detecting that a user carries out hot plug on the first target storage equipment in the recording process;
and selecting one storage device from at least one locally registered storage device as a second target storage device again, and storing the recorded content obtained after the hot plug into the second target storage device.
Optionally, before recording the multimedia program, the method further includes:
determining that a user inserts at least one storage device, and acquiring identification information of each storage device in the at least one storage device;
setting a virtual storage space, mapping each storage device locally to a corresponding storage subspace in the virtual storage space, and establishing a corresponding relationship between the identification information of each storage device and the corresponding storage subspace.
Optionally, before selecting one of the at least one locally registered storage device as the first target storage device, the method further includes:
judging whether at least one storage subspace exists locally or not;
if yes, determining that at least one registered storage device exists locally;
otherwise, the user is prompted to insert at least one storage device.
Optionally, when recording the multimedia program, selecting one of the at least one locally registered storage device as a first target storage device, and storing the recorded content in the first target storage device, including:
recording a multimedia program to obtain a recording content, and storing the recording content in a recording file cache;
when at least one registered storage device is determined to exist locally, screening is carried out in the at least one registered storage device, and one storage device which meets the screening condition is used as a first target storage device;
and storing the recorded content in the recording file cache into the first target storage device.
Optionally, taking one storage device that meets the screening condition as the first target storage device, including:
taking the storage device with the largest residual storage space as a first target storage device, wherein the maximum residual storage space is a screening condition determined according to user instructions; alternatively, the first and second electrodes may be,
and taking the storage equipment with the highest transmission speed as a first target storage equipment, wherein the highest transmission speed is a screening condition determined according to user instructions.
Optionally, reselecting one of the at least one locally registered storage device as a second target storage device, and storing the recorded content obtained after the hot plug into the second target storage device, including:
storing the recording content obtained after the hot plugging into a recording file cache;
detecting locally again, and determining that at least one registered storage device still exists locally when judging that at least one storage subspace exists locally;
re-screening in the at least one registered storage device according to the screening condition, and taking one storage device which meets the screening condition as a second target storage device;
and storing the recorded content in the recording file cache into a second target storage device.
Optionally, after storing the recording content obtained after the hot plug into the recording file cache, before determining that at least one registered storage device still exists locally, the method further includes:
when the data volume of the recorded content stored in the recording file cache reaches a preset data volume threshold, stopping recording the multimedia program; and/or the first and/or second light sources,
and when the duration of the process of storing the recording content obtained after hot plug into the recording file cache reaches a preset duration threshold, stopping recording the multimedia program.
An apparatus for multimedia program recording, comprising at least: first memory cell, detecting element, second memory cell, wherein:
the first storage unit is used for selecting one storage device which is registered locally as a first target storage device when the multimedia program is recorded, and storing the recorded content in the first target storage device;
the detection unit is used for detecting that the user carries out hot plug on the first target storage equipment in the recording process;
and the second storage unit selects one storage device from at least one locally registered storage device as a second target storage device again, and stores the recorded content obtained after the hot plug into the second target storage device.
Optionally, before recording the multimedia program, the first storage unit is further configured to:
determining that a user inserts at least one storage device, and acquiring identification information of each storage device in the at least one storage device;
setting a virtual storage space, mapping each storage device locally to a corresponding storage subspace in the virtual storage space, and establishing a corresponding relationship between the identification information of each storage device and the corresponding storage subspace.
Optionally, before selecting one of the at least one locally registered storage device as the first target storage device, the first storage unit is further configured to:
judging whether at least one storage subspace exists locally or not;
if yes, determining that at least one registered storage device exists locally;
otherwise, the user is prompted to insert at least one storage device.
Optionally, when recording the multimedia program, selecting one of the at least one locally registered storage device as a first target storage device, and storing the recorded content in the first target storage device, the first storage unit is configured to:
recording a multimedia program to obtain a recording content, and storing the recording content in a recording file cache;
when at least one registered storage device is determined to exist locally, screening is carried out in the at least one registered storage device, and one storage device which meets the screening condition is used as a first target storage device;
and storing the recorded content in the recording file cache into the first target storage device.
Optionally, when one storage device that meets the screening condition is taken as the first target storage device, the first storage unit is configured to:
taking the storage device with the largest residual storage space as a first target storage device, wherein the maximum residual storage space is a screening condition determined according to user instructions; alternatively, the first and second electrodes may be,
and taking the storage equipment with the highest transmission speed as a first target storage equipment, wherein the highest transmission speed is a screening condition determined according to user instructions.
Optionally, when one of the at least one locally registered storage device is selected again as a second target storage device, and the recorded content obtained after the hot plug is stored in the second target storage device, the second storage unit is configured to:
storing the recording content obtained after the hot plugging into a recording file cache;
detecting locally again, and determining that at least one registered storage device still exists locally when judging that at least one storage subspace exists locally;
re-screening in the at least one registered storage device according to the screening condition, and taking one storage device which meets the screening condition as a second target storage device;
and storing the recorded content in the recording file cache into a second target storage device.
Optionally, after storing the recording content obtained after the hot plug into a recording file cache, before determining that at least one registered storage device still exists locally, the second storage unit is further configured to:
when the data volume of the recorded content stored in the recording file cache reaches a preset data volume threshold, stopping recording the multimedia program; and/or the first and/or second light sources,
and when the duration of the process of storing the recording content obtained after hot plug into the recording file cache reaches a preset duration threshold, stopping recording the multimedia program.
The invention has the following beneficial effects:
in the embodiment of the invention, the television is provided with the virtual disk device which can register and manage at least one storage device inserted by a user, when the television records a multimedia program, one of the locally registered storage devices is selected as a first target storage device, and the recorded content is stored in the first target storage device, after the television detects that the user carries out hot plug on the first target storage device, the television selects one of the locally registered storage devices as a second target storage device again, and the recorded content obtained after the hot plug is stored in the second target storage device, so that the condition that the recording of the multimedia program is interrupted if the user carries out the hot plug on the currently used storage device unintentionally is avoided, the complete recording of the program is accurately ensured, and the service quality and the service efficiency of the program recording are improved, meanwhile, user experience is improved.
Detailed Description
In the embodiment of the invention, a virtual disk system is installed on the television, the television performs registration management on at least one storage device inserted by a user through the virtual disk system, and the television sets a virtual storage space in the virtual disk system and respectively maps each storage device in the virtual storage space to a corresponding storage subspace, so that the television can determine whether at least one storage device exists locally by detecting whether at least one storage subspace exists locally, and further can store recorded contents through at least one storage device existing locally.
In practical applications, the storage device may be a different type of device, such as a usb disk, a removable hard disk, and so on.
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, in the embodiment of the present invention, in the preprocessing process, a specific process of registering, by a television, at least one storage device through a virtual disk system is as follows:
step 101: the television detects that the user has inserted at least one storage device.
Step 102: and the television performs registration management on the at least one storage device.
Specifically, after the television determines that the user inserts at least one storage device, the identification information of each storage device in the at least one storage device is acquired through the virtual disk system, and registration management of the at least one storage device is completed.
Step 103: the television maps each storage device locally to a corresponding storage subspace.
Specifically, the television sets a virtual storage space in the virtual disk system, then maps each storage device in the virtual storage space to a corresponding storage subspace, and establishes a corresponding relationship between the identification information of each hard disk and the corresponding storage subspace.
For example: referring to table 1, after successful registration, the correspondence between the identification information of the storage device stored on the television and the storage subspace is as follows:
the identification information of the storage device 1 is device 1, the corresponding storage subspace is subspace 1, the identification information of the storage device 2 is device 2, the corresponding storage subspace is subspace 2, the identification information of the storage device 3 is device 3, and the corresponding storage subspace is subspace 3.
TABLE 1
Hard disk device name
|
Identification information
|
Corresponding storage sub-spaces
|
Hard disk device 1
|
Device 1
|
Subspace 1
|
Hard disk device 2
|
Device 2
|
Subspace 2
|
Hard disk device 3
|
Device 3
|
Subspace 3 |
Based on the above embodiment, after the storage device is successfully registered, the television can start to use the storage device to store the recorded multimedia program. Referring to fig. 2, in the embodiment of the present invention, a specific process for recording a multimedia program by a television is as follows:
step 200: and the television records the multimedia program to obtain recorded content.
Step 201: and the television stores the obtained recorded content into a recording file cache.
Specifically, the virtual disk system is installed on the television, the recording file cache is arranged in the virtual disk system, and after the television obtains the recorded content, the recorded content is stored through the recording file cache in the virtual disk system.
Step 202: the television determines whether at least one registered storage device exists locally, if so, step 204 is executed, otherwise, step 203 is executed.
Specifically, after the television completes registration management on at least one storage device through the virtual disk system, each storage device locally has a corresponding storage subspace in the virtual storage space, so that the television can locally detect and judge whether at least one storage subspace locally exists, if so, it is indicated that at least one registered storage device locally exists, otherwise, it is indicated that at least one registered storage device locally does not exist, and it is determined that a prompt needs to be sent to the user.
Step 203: the television prompts the user to insert at least one storage device and registers the at least one storage device after determining that the user inserted the at least one storage device, and then returns to step 202.
Specifically, after determining that at least one registered storage device does not exist locally, the television prompts the user, optionally, the television pops up a window on a screen, and displays a content "please insert a storage device" in the window, and the user learns that at least one registered storage device does not exist locally in the television and needs to insert at least one storage device through the display content in the window.
Step 204: the television selects one of the at least one locally registered storage device as a first target storage device, stores the recorded content in the recording file cache in the first target storage device, and then executes step 205.
Specifically, the television is preset with a screening condition, and after the television starts recording the multimedia program, the storage device meeting the screening condition is selected from the plurality of locally registered storage devices as a target storage device.
Specifically, when setting the filtering condition, the television may adopt, but is not limited to, the following modes:
the first method is as follows: the user selects "the remaining storage space is maximum" as the filtering condition.
Suppose there are three registered storage devices locally, respectively: storage device 1, storage device 2 and storage device 3. Then, after determining that the user selects "remaining storage space is maximum" as the filtering condition, the television detects the remaining storage space of the local three registered storage devices. After the television is detected, the remaining storage space of the storage device 1 is determined to be 8G, the remaining storage space of the storage device 2 is determined to be 7G, and the remaining storage space of the storage device 3 is determined to be 11G, so that the remaining storage space of the storage device 3 is determined to be the maximum, the storage device 3 is used as a first target storage device, and the recorded content in the recorded file cache is stored in the storage device 3.
The second method comprises the following steps: the user selects "fastest transmission speed" as the screening condition as an example.
Suppose there are three registered storage devices locally, respectively: storage device 1, storage device 2 and storage device 3. Then, after determining that the user selects "fastest transmission speed" as the filtering condition, the television detects the transmission performance of the local three registered storage devices. After the television is detected, the transmission speed of the storage device 1 is determined to be 10Mb/s, the transmission speed of the storage device 2 is determined to be 30Mb/s, and the transmission speed of the storage device 3 is determined to be 15Mb/s, so that the transmission speed of the storage device 2 can be determined to be the fastest, and therefore the storage device 2 is used as a first target storage device, and the content in the recording file cache is stored in the storage device 2.
Step 205: the television detects that the user carries out hot plug on the first target storage device in the recording process.
Step 206: and the television detects locally again, judges whether at least one registered storage device still exists locally, if so, executes step 207, otherwise, returns to step 203.
Specifically, after detecting that a user hot plugs a first target storage device in a recording process, the television stores the recorded content obtained after the hot plugging into a recording file cache, because the television performs registration management on at least one storage device through a virtual disk system, each storage device locally has a corresponding storage subspace in a virtual storage space, the television can locally re-detect and judge whether at least one storage subspace still exists, if so, the fact that at least one registered storage device still exists locally is indicated, otherwise, the fact that at least one storage device does not exist locally is indicated, and it is determined that the user needs to be prompted.
Step 207: after the television determines that at least one registered storage device still exists locally, the television performs screening again in the at least one registered storage device according to the screening conditions, uses one storage device meeting the screening conditions as a second target storage device, and stores the recording content in the recording file cache into the second target storage device.
Specifically, when the television determines the first target storage device, the filtering condition is already determined according to the user instruction, so that after the television determines that at least one registered storage device still exists locally, the filtering condition selected by the user before is carried out again in the at least one storage device, and one storage device meeting the filtering condition is used as the second target storage device.
In addition, in practical application, the television may preset a data volume threshold or/and a time length threshold according to a user instruction, and when the television fails to determine the second target storage device for a long time, if it is determined that the operation of storing the recording content obtained after hot plug into the recording file cache reaches the data volume threshold or/and the time length threshold, the recording of the multimedia program is stopped.
Taking the preset data volume threshold as 2G as an example, when the television has determined that the data volume of the recorded content stored in the recording file cache reaches the preset data volume threshold 2G, if the second target storage device is not determined yet, the recording of the multimedia program is stopped.
Taking the preset time length threshold of 300s as an example, when the duration of the process that the television already determines to store the recording content in the recording file cache reaches the preset time length threshold of 300s, if the second target storage device is not determined yet, the recording of the multimedia program is stopped.
Step 208: the television judges whether the recorded content is successfully stored in the at least one registered storage device, if so, step 209 is executed, otherwise, step 202 is returned.
Step 209: the television judges whether the recording of the multimedia program is finished, if so, the step 210 is executed, otherwise, the step 200 is returned to.
Specifically, in the recording process, the television monitors the recording process of the multimedia program in real time and judges whether the recording of the multimedia program is completed.
Step 210: the television prompts the user that the recording of the multimedia program has been completed.
Specifically, the television pops up a window on the screen, the display content of the window is "recording end", and the user can know that the recording of the multimedia program is ended through the display content in the window, and at this time, the user can perform hot plug on at least one local registered storage device. Based on the above embodiments, referring to fig. 3, an apparatus for recording multimedia programs at least includes: a first storage unit 30, a detection unit 31, a second storage unit 32, wherein:
a first storage unit 30, configured to select one of at least one locally registered storage device as a first target storage device when recording a multimedia program, and store a recording content in the first target storage device;
the detecting unit 31 detects that the user performs hot plug on the first target storage device in the recording process;
the second storage unit 32 selects one of the at least one locally registered storage device again as a second target storage device, and stores the recorded content obtained after the hot plug into the second target storage device.
Optionally, before recording the multimedia program, the first storage unit 30 is further configured to:
determining that a user inserts at least one storage device, and acquiring identification information of each storage device in the at least one storage device;
setting a virtual storage space, mapping each storage device locally to a corresponding storage subspace in the virtual storage space, and establishing a corresponding relationship between the identification information of each storage device and the corresponding storage subspace.
Optionally, before selecting one of the at least one locally registered storage device as the first target storage device, the first storage unit 30 is further configured to:
judging whether at least one storage subspace exists locally or not;
if yes, determining that at least one registered storage device exists locally;
otherwise, the user is prompted to insert at least one storage device.
Optionally, when recording a multimedia program, selecting one of at least one locally registered storage device as a first target storage device, and storing a recorded content in the first target storage device, the first storage unit 30 is configured to:
recording a multimedia program to obtain a recording content, and storing the recording content in a recording file cache;
when at least one registered storage device is determined to exist locally, screening is carried out in the at least one registered storage device, and one storage device which meets the screening condition is used as a first target storage device;
and storing the recorded content in the recording file cache into the first target storage device.
Optionally, when one storage device meeting the screening condition is taken as the first target storage device, the first storage unit 30 is configured to:
taking the storage device with the largest residual storage space as a first target storage device, wherein the maximum residual storage space is a screening condition determined according to user instructions; alternatively, the first and second electrodes may be,
and taking the storage equipment with the highest transmission speed as a first target storage equipment, wherein the highest transmission speed is a screening condition determined according to user instructions.
Optionally, when one of the at least one locally registered storage device is selected again as a second target storage device, and the recorded content obtained after the hot plug is stored in the second target storage device, the second storage unit 32 is configured to:
storing the recording content obtained after the hot plugging into a recording file cache;
detecting locally again, and determining that at least one registered storage device still exists locally when judging that at least one storage subspace exists locally;
re-screening in the at least one registered storage device according to the screening condition, and taking one storage device which meets the screening condition as a second target storage device;
and storing the recorded content in the recording file cache into a second target storage device.
Optionally, after storing the recording content obtained after the hot plug into the recording file cache, before determining that at least one registered storage device still exists locally, the second storage unit 32 is further configured to:
when the data volume of the recorded content stored in the recording file cache reaches a preset data volume threshold, stopping recording the multimedia program; and/or the first and/or second light sources,
and when the duration of the process of storing the recording content obtained after hot plug into the recording file cache reaches a preset duration threshold, stopping recording the multimedia program.
In summary, in the embodiments of the present invention, a virtual disk device is installed on a television, and registration management may be performed on at least one storage device inserted by a user, when the television records a multimedia program, the television selects one of locally registered storage devices as a first target storage device and stores a recorded content in the first target storage device, and after detecting that the user performs hot plug on the first target storage device, the television selects another one of locally registered storage devices as a second target storage device again and stores a recorded content obtained after the hot plug into the second target storage device, so as to avoid a situation that the recording of the multimedia program is interrupted if the user performs hot plug on the storage device being used unintentionally, accurately ensure complete recording of the program, improve quality of service and service efficiency of the program recording, meanwhile, user experience is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.