CN111128247A - Data recording method, device, computing equipment and storage medium - Google Patents

Data recording method, device, computing equipment and storage medium Download PDF

Info

Publication number
CN111128247A
CN111128247A CN201911310518.4A CN201911310518A CN111128247A CN 111128247 A CN111128247 A CN 111128247A CN 201911310518 A CN201911310518 A CN 201911310518A CN 111128247 A CN111128247 A CN 111128247A
Authority
CN
China
Prior art keywords
data
recording
cache
recorded
capacity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911310518.4A
Other languages
Chinese (zh)
Other versions
CN111128247B (en
Inventor
孙汝峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201911310518.4A priority Critical patent/CN111128247B/en
Publication of CN111128247A publication Critical patent/CN111128247A/en
Application granted granted Critical
Publication of CN111128247B publication Critical patent/CN111128247B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B7/00Recording or reproducing by optical means, e.g. recording using a thermal beam of optical radiation by modifying optical properties or the physical structure, reproducing using an optical beam at lower power by sensing optical properties; Record carriers therefor
    • G11B7/004Recording, reproducing or erasing methods; Read, write or erase circuits therefor
    • G11B7/0045Recording

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Optical Recording Or Reproduction (AREA)

Abstract

The application discloses a data recording method, a data recording device, computing equipment and a storage medium. The method comprises the following steps: responding to the received burning instruction, acquiring data to be burned in real time and storing the data to be burned in a burning cache; if the data volume of the data to be recorded in the recording cache is greater than the first capacity threshold value, awakening the optical drive to enter a working state so that the optical drive writes the data to be recorded in the recording cache into the optical disk; if the data volume of the data to be recorded in the recording cache is monitored to be smaller than the second capacity threshold value when the optical drive is in the working state, the optical drive is instructed to switch from the working state to the dormant state, and the step of waking up the optical drive to enter the working state is returned to execute if the data volume of the data to be recorded in the recording cache is monitored to be larger than the first capacity threshold value. Therefore, the working time of the optical drive is reduced by an intermittent recording mode, the optical drive loss is reduced, the recording error probability is reduced as much as possible, and support is provided for guaranteeing the fluency of a long-time recording process.

Description

Data recording method, device, computing equipment and storage medium
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a data recording method, an apparatus, a computing device, and a storage medium.
Background
Burning is also called burning, and is a technology for burning data into a medium such as an optical disc, a burning card (GBA) and the like by a burning machine, burning software and the like. Data storage by recording optical discs has become a common data storage method. At present, the direct-writing technology is mostly adopted, the operation of writing the optical disc is executed as long as there is a code stream in the immediate recording cache, and if the recording is in error midway, the whole recording process is stopped.
There are various brands of optical discs and optical drives in the existing market, and the compatibility between them is poor. Moreover, the optical drive belongs to a consumable, and if the optical drive is used for a long time, part of components of the optical drive can be aged, so that the probability of recording errors is greatly increased. If the direct-writing technology is applied in the real-time code stream writing scene, the optical drive is always in the running state in the whole writing process, and the error probability is increased along with the longer and longer writing process. If the recording is stopped immediately after a fault occurs in the midway of recording, frequent intervention and operation of a user are required, and the user experience is very poor. In some scenes (for example, judicial trial scenes) with higher requirements on fluency of the recording process, the shortcomings of the direct-writing technology are more obvious.
Therefore, how to improve the data recording scheme to reduce the recording error probability as much as possible becomes a technical problem to be solved urgently.
Disclosure of Invention
The application aims to provide a data recording method, a data recording device, a computing device and a storage medium, so that the recording error probability is reduced as much as possible.
In a first aspect, an embodiment of the present application provides a data recording method, including:
responding to the received burning instruction, acquiring data to be burned in real time and storing the data to be burned in a burning cache;
if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold value, awakening the optical drive to enter a working state so that the optical drive writes the data to be recorded in the recording cache into an optical disc;
if the data volume of the data to be recorded in the recording cache is monitored to be smaller than a second capacity threshold value when the optical drive is in a working state, the optical drive is instructed to switch from the working state to a dormant state, and the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than the first capacity threshold value is executed.
In one implementation, the optical disc includes a plurality of data blocks, and the data blocks have a sequential writing order during recording;
at the time of writing, the method further includes:
if the write-in operation of the current data block is successfully executed, continuing to execute the write-in operation aiming at the next data block;
and if the write operation of the current data block fails to be executed, skipping the current data block, and re-executing the write operation aiming at the current data block in the next data block.
In one implementation, upon writing, the method further comprises:
if the current data block is skipped over and the write-in operation re-executed in the next data block is successfully executed, continuing to execute the write-in operation; and
and if the current data block is skipped and the write-in operation executed again in the next data block fails, switching the optical drive from the working state to the dormant state, and returning to execute the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold.
In one implementation, the recording buffer has a predetermined storage capacity, and the method further includes:
and in response to meeting a preset adjustment condition, adjusting the storage capacity of the recording cache according to an adjustment strategy corresponding to the adjustment condition, wherein the first capacity threshold is a first preset proportion of the storage capacity of the recording cache, the second capacity threshold is a second preset proportion of the storage capacity of the recording cache, and the first preset proportion is larger than the second preset proportion.
In one implementation, if the adjusting condition is that the write operation fails to write data to two data blocks of the optical disc consecutively, adjusting the storage capacity of the recording buffer includes:
increasing the storage capacity of the recording cache by a first preset capacity;
if the adjustment condition is that the recording start time accumulation reaches a preset adjustment time point and the recording is not in error, adjusting the storage capacity of the recording cache, including:
and reducing the storage capacity of the burning cache by a second preset capacity.
In one implementation, the optical disc has a storage space with a fixed capacity, and a third capacity threshold for ending recording the optical disc is preset, and the method further includes:
monitoring the residual storage capacity of the optical disc in real time;
and if the condition that the residual storage capacity of the optical disk meets the preset end condition is monitored, stopping obtaining the data to be recorded in real time, and continuing to drive the optical drive to write the residual data to be recorded in the recording cache into the optical disk, wherein the end condition is that the residual storage capacity of the optical disk is larger than the third capacity threshold and smaller than or equal to a fourth capacity threshold, and the third capacity threshold is smaller than the fourth capacity threshold.
In one implementation, if the remaining storage capacity of the optical disc is not monitored to meet a preset end condition, the method further includes:
and in response to receiving the ending instruction, stopping acquiring the data to be recorded in real time, and continuously driving the optical drive to write the residual data to be recorded in the recording cache into the optical disc.
In one implementation, when the optical disc drive is in an operating state, the optical disc drive writes the data to be recorded in the recording buffer to an optical disc at a maximum writing speed supported by the optical disc drive.
In a second aspect, an embodiment of the present application provides a data recording device, where the method includes:
the cache unit is configured to respond to the received burning instruction, acquire data to be burned in real time and store the data to the burning cache;
the awakening unit is configured to awaken the optical drive to enter a working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold value, so that the optical drive can write the data to be recorded in the recording cache into an optical disc;
and the dormancy unit is configured to instruct the optical drive to switch from the working state to the dormant state if the data volume of the data to be recorded in the recording cache is monitored to be smaller than a second capacity threshold value when the optical drive is in the working state, and return to execute the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold value.
In one implementation, the optical disc includes a plurality of data blocks, and the data blocks have a sequential writing order during recording; the device further comprises:
a write unit configured to:
during writing, if the write operation of the current data block is successfully executed, continuing to execute the write operation aiming at the next data block;
and if the write operation of the current data block fails to be executed, skipping the current data block, and re-executing the write operation aiming at the current data block in the next data block.
In one implementation, the write unit is configured to:
if the current data block is skipped over and the write-in operation re-executed in the next data block is successfully executed, continuing to execute the write-in operation; and
and if the current data block is skipped and the write-in operation executed again in the next data block fails, switching the optical drive from the working state to the dormant state, and returning to execute the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold.
In one implementation, the recording buffer has a predetermined storage capacity, and the apparatus further includes:
and the adjusting unit is configured to adjust the storage capacity of the recording cache according to an adjustment strategy corresponding to a preset adjustment condition in response to the preset adjustment condition being met, where the first capacity threshold is a first preset proportion of the storage capacity of the recording cache, the second capacity threshold is a second preset proportion of the storage capacity of the recording cache, and the first preset proportion is greater than the second preset proportion.
In one implementation, the adjustment unit is configured to:
if the adjustment condition is that the write operation fails to write data continuously for two data blocks of the optical disc, adjusting the storage capacity of the recording cache, including:
increasing the storage capacity of the recording cache by a first preset capacity;
if the adjustment condition is that the recording start time accumulation reaches a preset adjustment time point and the recording is not in error, adjusting the storage capacity of the recording cache, including:
and reducing the storage capacity of the burning cache by a second preset capacity.
In one implementation, the optical disc has a storage space with a fixed capacity, and a third capacity threshold for ending recording the optical disc is preset, and the apparatus further includes:
an end burning unit configured to:
monitoring the residual storage capacity of the optical disc in real time;
and if the condition that the residual storage capacity of the optical disk meets the preset end condition is monitored, stopping obtaining the data to be recorded in real time, and continuing to drive the optical drive to write the residual data to be recorded in the recording cache into the optical disk, wherein the end condition is that the residual storage capacity of the optical disk is larger than the third capacity threshold and smaller than or equal to a fourth capacity threshold, and the third capacity threshold is smaller than the fourth capacity threshold.
In one implementation, the end burning unit is configured to:
and if the residual storage capacity of the optical disk is not monitored to meet the preset end condition, responding to the received end instruction, stopping acquiring the data to be recorded in real time, and continuously driving the optical drive to write the residual data to be recorded in the recording cache into the optical disk.
In a third aspect, another embodiment of the present application also provides a computing device comprising at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any data burning method provided by the embodiment of the application.
In a fourth aspect, another embodiment of the present application further provides a computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions are configured to cause a computer to execute any data burning method in the embodiments of the present application.
The data recording scheme can reduce the working time of the optical drive in a real-time code stream application scene in an intermittent recording mode so as to reduce the optical drive loss, reduce the recording error probability as much as possible and provide support for guaranteeing the fluency of a long-time recording process. Furthermore, the storage capacity of the recording cache can be dynamically adjusted to adjust the dormancy time of the optical drive, so that the optical drive can normally work in the whole recording process, the user operation is not influenced on the basis of ensuring the data integrity, and the user experience is guaranteed.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic illustration of an application environment according to one embodiment of the present application;
FIG. 2 is a flowchart illustrating a data recording method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a data recording process according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a data recording apparatus according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a computing device according to one embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
FIG. 1 is a schematic diagram of an application environment according to one embodiment of the present application. The scheme of the application is suitable for application scenes of real-time code streams.
As shown in fig. 1, the application environment of the present application may include, for example, a capture device 10, a recording device 20, and an optical disc 30.
The capture device 10 can capture data to be recorded in real time, such as video images recorded in real time, i.e. real-time code streams. The code stream (Data Rate) is the Data flow Rate used by the video file in unit time, also called code Rate, and is the most important part in picture quality control in Data recording.
The recording device 20 may include, for example, a processor 21, an optical drive 22, and a recording buffer 23, where the processor 21 may, for example, obtain data to be recorded from the acquisition device 10 in real time and store the data to be recorded in the recording buffer 23, and drive the optical drive 22 through control to write the data to be recorded stored in the recording buffer 23 into the optical disc 30.
In the embodiment of the present application, when performing recording control, the processor 21 can control the optical disc drive 22 to work intermittently, for example, to reduce the operation duration of the optical disc drive and reduce the error probability, thereby ensuring the fluency of the long-time recording process as much as possible. Furthermore, the storage capacity of the recording cache can be dynamically adjusted to adjust the dormancy time of the optical drive, so that the optical drive can normally work in the whole recording process, the user operation is not influenced on the basis of ensuring the data integrity, and the user experience is guaranteed.
In the embodiment of the present application, the recording device 20 may be independent from the capture device 10, and may be connected to the capture device 10 in a wired or wireless manner. Alternatively, the recording device 20 can also be implemented, for example, as an embedded device, for example, embedded in the recording device 10. Alternatively, the recording device 20 can also be implemented as an application, for example.
It should be understood that the embodiment of the present application is only an illustrative example of the implementation manner of the recording device 20, and is not limited thereto. In addition, the connecting line in the drawings indicates that there is information interaction between the two connected, and the connecting line may be a wired connection, a wireless connection, or any form of connection capable of performing information transmission, which is not limited in this application.
FIG. 2 is a flowchart illustrating a data recording method according to an embodiment of the present application. Wherein the method may be performed by, for example, the processor 21 shown in fig. 1.
As shown in fig. 2, in step S210, in response to the received recording command, the data to be recorded is obtained in real time and stored in the recording buffer.
In the embodiment of the application, the recording command can start the recording process. The recording command may be triggered in response to a recording operation by a user, for example. The burning operation may be, for example, an interactive operation of a user with an associated interface or an associated control. The recording process described herein is a complete process between the recording command and the corresponding ending command, and includes a process in which the optical disc drive is in a working state and performs a writing operation and a process in which the optical disc drive is in a sleep state.
The data to be recorded (e.g., data such as real-time recorded video images) may be obtained in real time from the capture device 10 shown in fig. 1, for example. In addition, in this recording process, the data to be recorded can be continuously obtained in real time.
As an example, the data to be recorded may be, for example, a real-time recorded video image, such as a forensic video. The acquisition device 10 may acquire the code stream data in real time at a predetermined rate and synchronously transmit the data to the recording device, for example. Or, in order to ensure the integrity of the data, the acquisition device 10 may also have a storage module, which can store the acquired data to be recorded in advance to the storage module, and enable the recording device to obtain the data to be recorded from the storage module, and the rate at which the recording device obtains the data to be recorded may be the same as the rate at which the acquisition device acquires the data. It should be understood that the present application is only an illustrative example of the manner of obtaining the data to be recorded, and is not limited thereto, and in other embodiments, the data to be recorded may also be obtained in other manners in real time.
In the embodiment of the present application, the code stream existing in the immediate recording cache wakes up the working mechanism of the optical disc drive, but the working mechanism of the optical disc drive is intermittently woken up, instead of being based on the direct-writing technology.
As an example, for example, the recording control may be performed by storing the obtained data to be recorded in the recording buffer and monitoring whether the data amount of the data to be recorded stored in the recording buffer meets a preset relevant condition based on intermittent control of the data amount in the recording buffer. The recording device may be preset with an optical drive wake-up condition (for example, the data amount of the data to be recorded in the recording buffer is greater than a first capacity threshold) and an optical drive sleep condition (for example, the data amount of the data to be recorded in the recording buffer is less than a second capacity threshold) based on the buffer data amount, and after the recording process is started, the data amount of the data to be recorded in the recording buffer is monitored in real time to determine whether the related conditions are met, so as to determine the related state of the optical drive and implement the intermittent recording control. The first capacity threshold or the second capacity threshold may be a fixed capacity threshold set by a user as needed, or may be a predetermined proportion of the storage capacity of the recording cache, for example, the first capacity threshold is 80% of the storage capacity of the recording cache, and the second capacity threshold is 10% of the storage capacity of the recording cache.
For example, in step S220, if it is detected that the data amount of the data to be recorded in the recording buffer is greater than the first capacity threshold, the optical disc drive is woken up to enter a working state, so that the optical disc drive writes the data to be recorded in the recording buffer into an optical disc.
In step S230, if it is monitored that the data amount of the data to be recorded in the recording cache is smaller than the second capacity threshold when the optical disc drive is in the working state, the optical disc drive is instructed to switch from the working state to the sleep state, and step S220 is returned, that is, if it is monitored that the data amount of the data to be recorded in the recording cache is larger than the first capacity threshold, the optical disc drive is awakened to enter the working state.
Based on the working mechanism of the application, when the recording process is just started, the data to be recorded stored in the recording cache is less, the optical drive is not woken up to write the data into the optical disc at the moment, the optical disc is in a dormant state, namely a rest state, the magnetic head stops running and does not perform writing operation.
When the data to be recorded stored in the recording cache is gradually increased until the optical drive awakening condition is met, such as the data volume is larger than a first capacity threshold value), the optical drive is awakened, and the optical drive is switched from the dormant state to the working state. When the optical disc drive is in a working state, the optical disc drive runs, and at this time, the processor 21 may read data from the recording buffer and write data to the optical disc via the running optical disc drive.
In this embodiment, the optical disc drive in the working state may write data to the optical disc based on the maximum writing rate supported by the optical disc drive (i.e. the maximum operating speed of the optical disc drive). Because the write-in speed of the optical drive is far greater than the acquisition speed of the real-time code stream, most data in the burning cache can be written into the optical disc in a short time when the optical drive is driven and write-in operation is executed, thereby reducing the time consumed by the operation of the optical drive. Also, for optical drives, writing data at a faster rate has a much lower error probability than writing data at a lower rate. Therefore, in the embodiment of the present application, when writing data of the same size to the optical disc at full speed, not only the time consumed by the operation of the optical disc drive can be greatly shortened, but also the recording error probability can be reduced. Taking a predetermined optical disc drive as an example, the maximum write rate supported by the optical disc drive can reach 30M/s, based on 5 minutes of recorded data in the conventional direct-writing manner, the optical disc drive needs to operate for 5 minutes to write the 5 minutes of recorded data into the optical disc, and based on the present application, the write operation can be completed in about 20 s.
Meanwhile, since the write-in rate of the optical disc drive is much greater than the acquisition rate of the real-time code stream, the data to be recorded stored in the recording cache is gradually reduced when the optical disc drive is driven to write data into the optical disc. Based on the working mechanism of the application, when the data volume of the remaining data to be recorded in the recording cache is smaller than the second capacity threshold, the optical drive is switched from the working state to the dormant state, namely the magnetic head of the optical drive stops running, and the temperature is gradually reduced. At this time, since the data to be recorded is still obtained in real time and stored in the recording cache, if the data amount in the recording cache is monitored to increase to meet the optical drive wake-up condition, the optical drive is awakened again to write the data to be recorded stored in the recording cache into the optical disc.
Therefore, according to the scheme, the intermittent work control of the optical drive is realized by monitoring the data volume of the data to be recorded stored in the recording cache, the running time of the optical drive can be greatly shortened, and the service life of the optical drive is prolonged. Meanwhile, by shortening the running time of the optical drive, the recording error probability can be reduced, so that support is provided for guaranteeing the fluency of the whole recording process.
In practical applications, because the application scenarios for each recording are not completely the same, for example, the devices and/or optical discs are different, the data amount to be recorded is also not completely the same, for example, if the judicial interrogation time is long, the data amount to be recorded is large, and if the judicial interrogation time is short, the data amount to be recorded is small. The technical solution described above can be applied to different scenarios, and can implement intermittent control of the optical disc drive in combination with corresponding scenario information (e.g., real-time code stream rate, data amount to be recorded, storage capacity of recording cache, etc.) and/or device information (e.g., optical disc drive attribute information, etc.) and/or optical disc information (e.g., optical disc storage space, etc.), so as to complete recording of all data to be recorded in different scenarios, which will be described in detail below.
In this embodiment of the application, the optical disc may include a plurality of data blocks, and the plurality of data blocks have a sequential writing order (for example, writing from inside to outside in circles), and when the optical disc drive is in a working state and writes data into the plurality of data blocks of the optical disc, the processor 21 may further monitor whether the writing operation for each data block is successfully executed, if the execution is successful, it indicates that the recording is not in error, and if the execution is failed, it indicates that the recording is in error.
There are many reasons for recording errors, such as the quality of the optical disc, the reason for the optical disc drive (e.g. over-temperature), etc. In the embodiment of the application, if the write-in operation of the current data block is successfully executed, the write-in operation aiming at the next data block is continuously executed; and if the write operation of the current data block fails to be executed, skipping the current data block, and re-executing the write operation aiming at the current data block in the next data block. That is, when it is monitored that the recording error occurs, the recording process is not stopped, but the current data block is skipped over and data rewriting is performed on the next data block of the optical disc, so as to avoid the recording stop caused by the quality of the optical disc, thereby avoiding interrupting the user operation and influencing the user experience.
When skipping the current data block and skipping to the next data block for data rewriting, the processor 21 still monitors whether the write operation for the data block is successfully performed. If the execution is successful, it indicates that the previous recording error is caused by the quality of the optical disc itself (i.e. the existence of bad data blocks). If the execution fails, it indicates that the operation may be caused by the optical disc drive, for example, the temperature of the optical disc drive is too high for a long time. At this time, the optical drive can stop writing data, so that the optical drive is switched from the working state to the dormant state. When the optical drive is in a dormant state, the magnetic head stops running, and the running temperature of the optical drive is reduced, so that the dormant time of the optical drive can be adjusted, the optical drive has enough time to be cooled, the consumption of the optical drive is reduced as much as possible, and the error probability is reduced.
In this embodiment, the recording buffer may have a predetermined storage capacity, for example, 200M, so that a certain amount of data to be recorded can be stored in the recording buffer. The specific value of the storage capacity may be determined according to the size of the code stream, for example. For example, the storage capacity of the recording buffer may be set by the user when recording is started, for example, the recording buffer can store at least 5 minutes of video.
In this embodiment, the storage capacity of the recording buffer may be dynamically adjusted, and the first capacity threshold/the second capacity threshold may also be dynamically adjusted, so as to achieve the purpose of dynamically adjusting the sleep time of the optical disc drive, and achieve intermittent control of the optical disc drive with a lower loss as much as possible.
In the recording process, the processor 21 can dynamically adjust the storage capacity of the recording buffer or the first capacity threshold/the second capacity threshold in combination with the related status information, so as to adjust the sleep time of the optical disc drive, and provide support for ensuring normal recording of the recording device. The related status information may include, for example, corresponding scene information (e.g., real-time code stream rate, data amount to be recorded, storage capacity of recording buffer, etc.), and/or device information (e.g., optical drive attribute information, etc.) and/or optical disc information (e.g., optical disc storage space, etc.), etc., which is not limited in this application.
For example, related adjustment conditions may also be preset, and whether the entire recording system meets the preset adjustment conditions is determined in the recording process to determine whether to execute the corresponding adjustment strategy. If not, no adjustment may be made. If the adjustment condition is met, the storage capacity of the recording cache and/or the first capacity threshold/the second capacity threshold can be adjusted according to the adjustment strategy corresponding to the adjustment condition, so that the dormancy time of the optical drive is adjusted, and support is provided for ensuring normal recording of the recording equipment.
In one embodiment, the first capacity threshold may be a first predetermined proportion of the storage capacity of the recording buffer, and the second capacity threshold may be a second predetermined proportion of the storage capacity of the recording buffer, where the first predetermined proportion is greater than the second predetermined proportion (e.g., the first predetermined proportion is 80% and the second predetermined proportion is 10%). Thus, during the adjustment, only the recording storage capacity is adjusted while keeping the first predetermined ratio/the second predetermined ratio unchanged, and the first capacity threshold/the second capacity threshold is adjusted accordingly. Therefore, the control of the whole recording process is more intelligent through self-adaptive adjustment based on the proportion, so that the human intervention can be reduced, the user operation can be reduced, and the user experience can be guaranteed.
As an example, in the embodiment of the present application, for the adjustment of the storage capacity of the recording buffer, the storage capacity may be increased or decreased, the corresponding adjustment condition and the adjustment policy may be configured and stored in advance, and when the recording flow meets the relevant adjustment condition, the adjustment is performed based on the corresponding adjustment policy.
For example, for a recording error condition caused by an optical disc drive, an adjustment condition may be set to be that a write operation fails to write data for two data blocks of an optical disc continuously, and accordingly, adjusting the storage capacity of the recording buffer may be to increase the storage capacity of the recording buffer by a first predetermined capacity. Therefore, the dormancy time of the optical drive in the subsequent recording process can be prolonged.
For another example, the storage capacity of the recording buffer may be adjusted periodically, the adjustment period may be 1 hour or other duration, the adjustment condition may be that the recording start time is accumulated to reach a preset adjustment time point and the recording has not performed an error, and the storage capacity of the recording buffer may be adjusted to reduce the storage capacity of the recording buffer by a second predetermined capacity. Therefore, the sleep time of the optical drive in the subsequent recording process can be reduced.
It should be understood that the first/second predetermined capacity may be preset by a user, or may be determined by the processor in combination with the operating condition of the device, the first predetermined capacity may be the same as or different from the second predetermined capacity, or the first predetermined capacity (the second predetermined capacity) involved in different adjustments may be different, and the application is not limited thereto.
In addition, in the recording process, the foregoing adjustment period may be dynamically adjusted in combination with the actual operation status of the device, for example, if the processing of increasing the storage capacity of the recording buffer is executed, the adjustment period may be shortened (for example, from 1 hour to 20 minutes) to achieve the stepwise increase of the storage capacity of the recording buffer, and achieve the adaptation between the storage capacity of the recording buffer and the optical drive as much as possible, so as to reduce the operation time of the optical drive, reduce the recording error probability, and provide support for ensuring the fluency of the recording process. Specific adjustment may have various implementation possibilities, which are not limited in this application.
In the embodiment of the present application, the optical disc has a storage space with a fixed capacity, and a third capacity threshold for ending recording the optical disc may be preset, so that a user can be reminded to perform subsequent processing operations, such as replacing the optical disc or ending recording, when the optical disc is full or is about to be full of data.
In the recording process, the processor 21 can monitor the remaining storage capacity of the optical disc in real time. If the residual storage capacity of the optical disc is monitored not to meet the preset end condition, recording is continued. And if the residual storage capacity of the optical disk is monitored to meet the preset end condition, stopping acquiring the data to be recorded in real time, and continuously driving the optical disk drive to write the residual data to be recorded in the recording cache into the optical disk. Therefore, by monitoring the remaining capacity of the optical disc, and when a preset end condition is met, that is, when the recording of the optical disc needs to be ended, the remaining data to be recorded in the recording cache is completely written into the optical disc.
As described above, since the writing rate of the optical disc drive is much greater than the acquisition rate of the real-time code stream, and the remaining capacity of the optical disc is monitored in real time, based on the technical solution of the present application, when the remaining storage capacity of the optical disc meets the preset termination condition, the data amount of the data to be recorded remaining in the recording cache is less than or equal to the remaining storage capacity of the optical disc, and thus, the remaining data in the recording cache can always be written into the optical disc, and the integrity of the data is ensured.
The ending condition may be that the remaining storage capacity of the optical disc is greater than the third capacity threshold and less than or equal to a fourth capacity threshold, where the third capacity threshold is less than the fourth capacity threshold. Therefore, the ending response can be triggered in advance before the residual storage capacity of the optical disc approaches to the third capacity threshold for ending the recording, so that the residual data in the recording cache can be written into the optical disc, and the data integrity is ensured.
Or, if it is not monitored that the remaining storage capacity of the optical disc meets the preset end condition, the method may also stop obtaining the data to be recorded in real time in response to receiving an end instruction, and continue to drive the optical disc drive to write the remaining data to be recorded in the recording cache into the optical disc. The ending instruction may be triggered by a user interaction. Therefore, when an ending instruction triggered by a user is received, the residual data in the burning cache can be written into the optical disc, and the data integrity is ensured.
So far, the data recording scheme of the present application has been described in detail with reference to fig. 2. The data recording scheme can reduce the working time of the optical drive in an intermittent recording mode in a real-time code stream application scene so as to reduce the loss of the optical drive, reduce the recording error probability as much as possible and provide support for guaranteeing the fluency of a long-time recording process. Furthermore, the storage capacity of the recording cache can be dynamically adjusted to adjust the dormancy time of the optical drive, so that the optical drive can normally work in the whole recording process, the user operation is not influenced on the basis of ensuring the data integrity, and the user experience is guaranteed.
FIG. 3 is a schematic diagram of a data recording process according to an embodiment of the present application.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to real-time code stream data (i.e., data to be recorded) and a flowchart shown in fig. 3.
As shown in fig. 3, after the user starts a path of real-time code stream recording, in step S301, real-time code stream data is obtained.
In step S302, the obtained real-time code stream data is stored in the recording cache. At this time, the storage capacity of the recording buffer is a reference capacity (e.g. 200M, which can be customized according to the device memory, and this application does not limit this).
In step S303, it is monitored whether the data amount of the code stream data stored in the recording cache satisfies the optical disc drive wake-up condition, i.e. whether the data amount of the code stream data is greater than a first capacity threshold (e.g. 160M), i.e. whether the ratio of the data amount of the code stream data to the reference capacity of the recording cache reaches a first predetermined ratio (e.g. 80%).
If not, waiting for the data volume of the code stream data stored in the burning cache to increase to meet the relevant conditions. If so, the data amount of the code stream data stored in the temporary storage is greater than the first capacity threshold, and the process proceeds to step S304.
In step S304, the optical disc drive is woken up to write the data to be recorded in the recording buffer into the optical disc.
In step S305, the data to be recorded in the recording buffer is written into the optical disc at the maximum writing speed supported by the optical disc drive.
In step S306, it is determined whether a write operation execution failure, that is, a write error, occurs during the process of writing data.
If yes, the process proceeds to step S307, where the current data block is skipped and data rewriting is performed in the next data block. If not, continuing to execute the write operation.
It is judged in step S308 whether the data rewriting is successful.
If so, the process returns to step S305 to continue the write operation. If not, i.e. the rewriting fails, step S309 is performed to adjust the storage capacity of the recording buffer, e.g. increase the first predetermined capacity, so as to increase the sleep time of the optical disc drive in the subsequent recording process, and cool the optical disc drive, so as to reduce the recording error probability.
In step S310, it is monitored whether the data amount of the code stream data stored in the recording cache satisfies the optical disc drive hibernation condition, i.e. whether the data amount of the code stream data is smaller than a second capacity threshold (e.g. 20M), i.e. whether the ratio of the data amount of the code stream data to the reference capacity of the recording cache reaches a second predetermined ratio (e.g. 10%).
If so, the process proceeds to step S311, where the writing of data to the optical disc is stopped, and the optical disc drive is switched from the operating state to the hibernation state. And, returning to step S303, monitoring whether the data amount of the code stream data stored in the recording cache meets the optical drive wake-up condition, so as to wait for the next optical drive working stage.
If not, the process returns to step S305 to continue writing the data to be recorded in the recording buffer into the optical disc at the maximum writing speed supported by the optical disc drive.
In the above process, the remaining capacity of the optical disc and the operation status of the apparatus are monitored in the whole process, so as to dynamically adjust the storage capacity of the recording cache, or monitor the recording end time for the optical disc, thereby realizing the control of the recording process. The details of the related implementation can be referred to the related description above, and are not repeated herein.
Based on the same conception, the embodiment of the application also provides a data recording device.
FIG. 4 is a diagram of a data recording apparatus according to an embodiment of the present application.
As shown in fig. 4, the data recording apparatus 400 can include:
a cache unit 410 configured to obtain data to be recorded in real time in response to the received recording instruction and store the data to be recorded in the recording cache;
a wake-up unit 420 configured to wake up the optical disc drive to enter a working state if it is monitored that the data amount of the data to be recorded in the recording cache is greater than a first capacity threshold, so that the optical disc drive writes the data to be recorded in the recording cache into an optical disc;
and a sleep unit 430 configured to instruct the optical disc drive to switch from the working state to the sleep state if the data amount of the data to be recorded in the recording cache is monitored to be smaller than a second capacity threshold when the optical disc drive is in the working state, and to return to perform the step of waking up the optical disc drive to enter the working state if the data amount of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold.
In one embodiment, the optical disc includes a plurality of data blocks, and the data blocks have a sequential writing order during recording; the device further comprises:
a write unit configured to:
during writing, if the write operation of the current data block is successfully executed, continuing to execute the write operation aiming at the next data block;
and if the write operation of the current data block fails to be executed, skipping the current data block, and re-executing the write operation aiming at the current data block in the next data block.
In one embodiment, the writing unit is configured to:
if the current data block is skipped over and the write-in operation re-executed in the next data block is successfully executed, continuing to execute the write-in operation; and
and if the current data block is skipped and the write-in operation executed again in the next data block fails, switching the optical drive from the working state to the dormant state, and returning to execute the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold.
In one embodiment, the recording buffer has a predetermined storage capacity, and the apparatus further includes:
and the adjusting unit is configured to adjust the storage capacity of the recording cache according to an adjustment strategy corresponding to a preset adjustment condition in response to the preset adjustment condition being met, where the first capacity threshold is a first preset proportion of the storage capacity of the recording cache, the second capacity threshold is a second preset proportion of the storage capacity of the recording cache, and the first preset proportion is greater than the second preset proportion.
In one embodiment, the adjusting unit is configured to:
if the adjustment condition is that the write operation fails to write data continuously for two data blocks of the optical disc, adjusting the storage capacity of the recording cache, including:
increasing the storage capacity of the recording cache by a first preset capacity;
if the adjustment condition is that the recording start time accumulation reaches a preset adjustment time point and the recording is not in error, adjusting the storage capacity of the recording cache, including:
and reducing the storage capacity of the burning cache by a second preset capacity.
In one embodiment, the optical disc has a storage space with a fixed capacity, and a third capacity threshold for ending recording the optical disc is preset, and the apparatus further includes:
an end burning unit configured to:
monitoring the residual storage capacity of the optical disc in real time;
and if the condition that the residual storage capacity of the optical disk meets the preset end condition is monitored, stopping obtaining the data to be recorded in real time, and continuing to drive the optical drive to write the residual data to be recorded in the recording cache into the optical disk, wherein the end condition is that the residual storage capacity of the optical disk is larger than the third capacity threshold and smaller than or equal to a fourth capacity threshold, and the third capacity threshold is smaller than the fourth capacity threshold.
In one embodiment, the end burning unit is configured to:
and if the residual storage capacity of the optical disk is not monitored to meet the preset end condition, responding to the received end instruction, stopping acquiring the data to be recorded in real time, and continuously driving the optical drive to write the residual data to be recorded in the recording cache into the optical disk.
In one embodiment, when the optical disc drive is in an operating state, the optical disc drive writes the data to be recorded in the recording buffer to the optical disc at the maximum writing speed supported by the optical disc drive.
The details of the data recording device and the functional implementation of the functional model thereof can be referred to the above description in conjunction with fig. 1-3, and are not repeated herein.
Having described a method and apparatus for data recording according to an exemplary embodiment of the present application, a computing device according to another exemplary embodiment of the present application is described next.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, a computing device according to the present application may include at least one processor, and at least one memory. The memory stores program code, and the program code, when executed by the processor, causes the processor to perform the steps of the data recording method according to various exemplary embodiments of the present application described above in the present specification. For example, a processor may perform the steps as shown in FIG. 2 or as shown in FIG. 3.
The computing device 130 according to this embodiment of the present application is described below with reference to fig. 5. The computing device 130 shown in fig. 5 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present application.
As shown in FIG. 5, computing device 130 is embodied in the form of a general purpose computing device. Components of computing device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Computing device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with computing device 130, and/or with any devices (e.g., router, modem, etc.) that enable computing device 130 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 135. Also, computing device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via network adapter 136. As shown, network adapter 136 communicates with other modules for computing device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computing device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, aspects of a data recording method provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of a data recording method according to various exemplary embodiments of the present application described above in this specification when the program product is run on the computer device, for example, the computer device may perform the steps as shown in fig. 2 or fig. 3.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for data burning of the embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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 the preferred embodiments of the present application 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 alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (18)

1. A method for recording data, the method comprising:
responding to the received burning instruction, acquiring data to be burned in real time and storing the data to be burned in a burning cache;
if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold value, awakening the optical drive to enter a working state so that the optical drive writes the data to be recorded in the recording cache into an optical disc;
if the data volume of the data to be recorded in the recording cache is monitored to be smaller than a second capacity threshold value when the optical drive is in a working state, the optical drive is instructed to switch from the working state to a dormant state, and the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than the first capacity threshold value is executed.
2. The method of claim 1, wherein the optical disc comprises a plurality of data blocks, and the data blocks have a sequential writing order during recording;
at the time of writing, the method further includes:
if the write-in operation of the current data block is successfully executed, continuing to execute the write-in operation aiming at the next data block;
and if the write operation of the current data block fails to be executed, skipping the current data block, and re-executing the write operation aiming at the current data block in the next data block.
3. The method of claim 2, wherein upon writing, the method further comprises:
if the current data block is skipped over and the write-in operation re-executed in the next data block is successfully executed, continuing to execute the write-in operation; and
and if the current data block is skipped and the write-in operation executed again in the next data block fails, switching the optical drive from the working state to the dormant state, and returning to execute the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold.
4. The method of any of claims 1-3, wherein the burning buffer has a predetermined storage capacity, the method further comprising:
and in response to meeting a preset adjustment condition, adjusting the storage capacity of the recording cache according to an adjustment strategy corresponding to the adjustment condition, wherein the first capacity threshold is a first preset proportion of the storage capacity of the recording cache, the second capacity threshold is a second preset proportion of the storage capacity of the recording cache, and the first preset proportion is larger than the second preset proportion.
5. The method of claim 4,
if the adjustment condition is that the write operation fails to write data continuously for two data blocks of the optical disc, adjusting the storage capacity of the recording cache, including:
increasing the storage capacity of the recording cache by a first preset capacity;
if the adjustment condition is that the recording start time accumulation reaches a preset adjustment time point and the recording is not in error, adjusting the storage capacity of the recording cache, including:
and reducing the storage capacity of the burning cache by a second preset capacity.
6. The method according to any of claims 1-3, wherein the optical disc has a storage space with a fixed capacity, and a third capacity threshold for ending recording the optical disc is preset, the method further comprising:
monitoring the residual storage capacity of the optical disc in real time;
and if the condition that the residual storage capacity of the optical disk meets the preset end condition is monitored, stopping obtaining the data to be recorded in real time, and continuing to drive the optical drive to write the residual data to be recorded in the recording cache into the optical disk, wherein the end condition is that the residual storage capacity of the optical disk is larger than the third capacity threshold and smaller than or equal to a fourth capacity threshold, and the third capacity threshold is smaller than the fourth capacity threshold.
7. The method according to claim 6, wherein if the remaining storage capacity of the optical disc is not monitored to satisfy a predetermined termination condition, the method further comprises:
and in response to receiving the ending instruction, stopping acquiring the data to be recorded in real time, and continuously driving the optical drive to write the residual data to be recorded in the recording cache into the optical disc.
8. The method according to any of claims 1-3, wherein the optical disc drive writes the data to be recorded in the recording buffer to the optical disc at the maximum writing speed supported by the optical disc drive when in the active state.
9. A data recording apparatus, the method comprising:
the cache unit is configured to respond to the received burning instruction, acquire data to be burned in real time and store the data to the burning cache;
the awakening unit is configured to awaken the optical drive to enter a working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold value, so that the optical drive can write the data to be recorded in the recording cache into an optical disc;
and the dormancy unit is configured to instruct the optical drive to switch from the working state to the dormant state if the data volume of the data to be recorded in the recording cache is monitored to be smaller than a second capacity threshold value when the optical drive is in the working state, and return to execute the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold value.
10. The apparatus of claim 9, wherein the optical disc comprises a plurality of data blocks, and the data blocks have a sequential writing order during recording; the device further comprises:
a write unit configured to:
during writing, if the write operation of the current data block is successfully executed, continuing to execute the write operation aiming at the next data block;
and if the write operation of the current data block fails to be executed, skipping the current data block, and re-executing the write operation aiming at the current data block in the next data block.
11. The apparatus of claim 10, wherein the writing unit is configured to:
if the current data block is skipped over and the write-in operation re-executed in the next data block is successfully executed, continuing to execute the write-in operation; and
and if the current data block is skipped and the write-in operation executed again in the next data block fails, switching the optical drive from the working state to the dormant state, and returning to execute the step of awakening the optical drive to enter the working state if the data volume of the data to be recorded in the recording cache is monitored to be larger than a first capacity threshold.
12. The apparatus of any of claims 9-11, wherein the recording buffer has a predetermined storage capacity, the apparatus further comprising:
and the adjusting unit is configured to adjust the storage capacity of the recording cache according to an adjustment strategy corresponding to a preset adjustment condition in response to the preset adjustment condition being met, where the first capacity threshold is a first preset proportion of the storage capacity of the recording cache, the second capacity threshold is a second preset proportion of the storage capacity of the recording cache, and the first preset proportion is greater than the second preset proportion.
13. The apparatus of claim 12, wherein the adjustment unit is configured to:
if the adjustment condition is that the write operation fails to write data continuously for two data blocks of the optical disc, adjusting the storage capacity of the recording cache, including:
increasing the storage capacity of the recording cache by a first preset capacity;
if the adjustment condition is that the recording start time accumulation reaches a preset adjustment time point and the recording is not in error, adjusting the storage capacity of the recording cache, including:
and reducing the storage capacity of the burning cache by a second preset capacity.
14. The apparatus according to any of claims 9-11, wherein the optical disc has a storage space with a fixed capacity, and a third capacity threshold for ending recording the optical disc is preset, the apparatus further comprising:
an end burning unit configured to:
monitoring the residual storage capacity of the optical disc in real time;
and if the condition that the residual storage capacity of the optical disk meets the preset end condition is monitored, stopping obtaining the data to be recorded in real time, and continuing to drive the optical drive to write the residual data to be recorded in the recording cache into the optical disk, wherein the end condition is that the residual storage capacity of the optical disk is larger than the third capacity threshold and smaller than or equal to a fourth capacity threshold, and the third capacity threshold is smaller than the fourth capacity threshold.
15. The apparatus of claim 14, wherein the end burning unit is configured to:
and if the residual storage capacity of the optical disk is not monitored to meet the preset end condition, responding to the received end instruction, stopping acquiring the data to be recorded in real time, and continuously driving the optical drive to write the residual data to be recorded in the recording cache into the optical disk.
16. The apparatus of any of claims 9-11, wherein the optical disc drive writes the data to be recorded in the recording buffer to the optical disc at a maximum writing speed supported by the optical disc drive when in an active state.
17. A computing device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data burning method of any one of claims 1 to 8.
18. A computer storage medium having stored thereon computer-executable instructions for causing a computer to perform a method of data burning according to any one of claims 1 to 8.
CN201911310518.4A 2019-12-18 2019-12-18 Data recording method, device, computing equipment and storage medium Active CN111128247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911310518.4A CN111128247B (en) 2019-12-18 2019-12-18 Data recording method, device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911310518.4A CN111128247B (en) 2019-12-18 2019-12-18 Data recording method, device, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111128247A true CN111128247A (en) 2020-05-08
CN111128247B CN111128247B (en) 2021-06-15

Family

ID=70499670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911310518.4A Active CN111128247B (en) 2019-12-18 2019-12-18 Data recording method, device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111128247B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112748878A (en) * 2020-12-30 2021-05-04 华录光存储研究院(大连)有限公司 Data writing speed determination method and device and computer equipment
CN113613058A (en) * 2021-07-19 2021-11-05 青岛海信移动通信技术股份有限公司 Local storage method, equipment and medium for network video stream

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1259733A (en) * 1999-01-06 2000-07-12 三洋电机株式会社 Pause control device for recording data onto disc
CN1392541A (en) * 2001-06-18 2003-01-22 松下电器产业株式会社 Optical disc device
KR20040004735A (en) * 2002-07-05 2004-01-14 주식회사 히타치엘지 데이터 스토리지 코리아 Method for recording substitute defect block in optical disc driver
CN104461807A (en) * 2013-09-20 2015-03-25 神讯电脑(昆山)有限公司 Automatic DVD sleeping testing method
CN105139870A (en) * 2015-09-23 2015-12-09 浙江大华技术股份有限公司 Real-time recording method of optical disc and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1259733A (en) * 1999-01-06 2000-07-12 三洋电机株式会社 Pause control device for recording data onto disc
CN1392541A (en) * 2001-06-18 2003-01-22 松下电器产业株式会社 Optical disc device
KR20040004735A (en) * 2002-07-05 2004-01-14 주식회사 히타치엘지 데이터 스토리지 코리아 Method for recording substitute defect block in optical disc driver
CN104461807A (en) * 2013-09-20 2015-03-25 神讯电脑(昆山)有限公司 Automatic DVD sleeping testing method
CN105139870A (en) * 2015-09-23 2015-12-09 浙江大华技术股份有限公司 Real-time recording method of optical disc and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112748878A (en) * 2020-12-30 2021-05-04 华录光存储研究院(大连)有限公司 Data writing speed determination method and device and computer equipment
CN113613058A (en) * 2021-07-19 2021-11-05 青岛海信移动通信技术股份有限公司 Local storage method, equipment and medium for network video stream

Also Published As

Publication number Publication date
CN111128247B (en) 2021-06-15

Similar Documents

Publication Publication Date Title
US7552347B2 (en) Adaptive power management of a disk drive based on user activity
CN103782272B (en) Switch task between isomery core
US9110669B2 (en) Power management of a storage device including multiple processing cores
JP5661874B2 (en) Idle period reporting for power management
US7549065B2 (en) Adaptive power management of a disk drive based on temperature
US9104499B2 (en) System for minimizing resource latency between processor application states in a portable computing device by scheduling resource state set transitions
CN111128247B (en) Data recording method, device, computing equipment and storage medium
CN107851050B (en) Device with watchdog timer and method for operating watchdog timer
US9946467B2 (en) Data storage method and electronic device
US20120110360A1 (en) Application-specific power management
JP2009530709A5 (en)
US20140082314A1 (en) Control apparatus and control method therefor
US20140101469A1 (en) Hard drive energy-saving control method and apparatus, and central processing unit
US20220092722A1 (en) Glitchless gpu switching at a multiplexer
US20150286271A1 (en) System and method for predicting a central processing unit idle pattern for power saving in a modem system on chip
CN111767174A (en) BIOS (basic input output System) refreshing control method, server and storage medium
CN101655774A (en) Magnetic disc control method and system as well as relevant apparatus
CN107272874B (en) Method and system for adjusting state of storage driver of server
CN114967899B (en) Display control method, display control device, display screen and display system
CN113650498B (en) Power-on method and device of electric vehicle, electric vehicle and storage medium
CN114167823B (en) Robot control method, apparatus, electronic device, and storage medium
CN115257591A (en) Vehicle control method, vehicle control device, vehicle control medium, and electronic apparatus
JP5994483B2 (en) Communications system
JPH11184550A (en) Computer system and timer interruption control method
CN117111712A (en) Working state control system, method, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant