CN114625317A - Method and device for adjusting code rate, electronic equipment and readable storage medium - Google Patents

Method and device for adjusting code rate, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114625317A
CN114625317A CN202210169972.8A CN202210169972A CN114625317A CN 114625317 A CN114625317 A CN 114625317A CN 202210169972 A CN202210169972 A CN 202210169972A CN 114625317 A CN114625317 A CN 114625317A
Authority
CN
China
Prior art keywords
hard disk
code rate
temperature interval
target
temperature
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.)
Pending
Application number
CN202210169972.8A
Other languages
Chinese (zh)
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.)
Streamax Technology Co Ltd
Original Assignee
Streamax 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 Streamax Technology Co Ltd filed Critical Streamax Technology Co Ltd
Priority to CN202210169972.8A priority Critical patent/CN114625317A/en
Publication of CN114625317A publication Critical patent/CN114625317A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0634Configuration or reconfiguration of storage systems by changing the state or mode of one or more devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a method and a device for adjusting code rate, electronic equipment and a readable storage medium, wherein the method comprises the following steps: acquiring a current temperature value of a hard disk, and determining a target hard disk temperature interval in which the current temperature value is based on a pre-stored hard disk temperature interval set; determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation; the code rate written into the hard disk is adjusted to the target code rate, the code rate percentage corresponding to the target code rate is smaller than or equal to the target code rate percentage, the code rate of the hard disk can be dynamically adjusted based on the code rate percentages of different hard disk temperature intervals to adjust the data bandwidth written into the hard disk, and the data loss caused by the fact that the difference between the written data bandwidth and the actual bandwidth of the hard disk is large is avoided, so that the performance and the reliability of the hard disk are guaranteed.

Description

Method and device for adjusting code rate, electronic equipment and readable storage medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a method and an apparatus for adjusting a code rate, an electronic device, and a readable storage medium.
Background
At present, for an apparatus whose internal storage medium is a mechanical hard disk, when the temperature of the mechanical hard disk increases, the read-write speed of the mechanical hard disk decreases, and this may cause data to be lost when the data is written into the mechanical hard disk, thereby reducing the performance and reliability of the apparatus.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting code rate, electronic equipment and a readable storage medium, which can solve the problem that data is lost when being written into a mechanical hard disk due to high temperature of the mechanical hard disk.
In a first aspect, an embodiment of the present application provides a method for adjusting a code rate, including:
acquiring a current temperature value of a hard disk, and determining a target hard disk temperature interval where the current temperature value is based on a pre-stored hard disk temperature interval set;
determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation;
and adjusting the code rate written into the hard disk to a target code rate, wherein the code rate percentage corresponding to the target code rate is less than or equal to the target code rate percentage.
Further, the hard disk temperature interval set includes at least one hard disk temperature interval, and before acquiring the current temperature value of the hard disk, the method further includes:
calculating the theoretical rate of writing the external equipment into the hard disk aiming at each hard disk temperature interval;
measuring the actual speed of the external equipment written into the hard disk;
calculating the code rate percentage of the hard disk in the hard disk temperature interval according to the theoretical rate and the actual rate;
and obtaining the corresponding relation of the temperature-code rate percentage according to each hard disk temperature interval and the corresponding code rate percentage.
Further, the calculating a theoretical rate of writing the external device into the hard disk includes:
multiplying the theoretical bandwidth written into the hard disk by the external equipment by the number of written paths to obtain the theoretical rate;
and the number of the writing paths is the number of external equipment connected with the hard disk.
Further, the calculating, according to the theoretical rate and the actual rate, a code rate percentage of the hard disk in the hard disk temperature interval includes:
and dividing the theoretical rate and the actual rate to obtain the code rate percentage of the hard disk in the hard disk temperature interval.
Further, before obtaining the current temperature value of the hard disk, the method further includes:
and acquiring the temperature value of the hard disk based on a preset environment temperature interval set to obtain the hard disk temperature interval set corresponding to the environment temperature interval set.
Further, after the adjusting the code rate written into the hard disk to the target code rate, the method further includes:
and writing the data acquired by the external equipment into the hard disk based on the target code rate.
Further, after obtaining the current temperature value of the hard disk, the method further includes:
and if the current temperature value is greater than the warning temperature value, performing hard disk power-off processing and/or alarming.
In a second aspect, an embodiment of the present application provides an apparatus for adjusting a code rate, including:
the acquisition unit is used for acquiring the current temperature value of the hard disk;
the determining unit is used for determining a target hard disk temperature interval where the current temperature value is based on a pre-stored hard disk temperature interval set;
determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation;
and the adjusting unit is used for adjusting the code rate written into the hard disk to a target code rate, and the code rate percentage corresponding to the target code rate is less than or equal to the target code rate percentage.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor, when executing the computer program, implements the method according to any one of the above first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when executed by a processor, the computer program implements the method according to any one of the above first aspects.
In a fifth aspect, embodiments of the present application provide a computer program product, which, when run on an electronic device, causes the electronic device to perform the method of any one of the above first aspects.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that:
the method comprises the steps of obtaining a current temperature value of a hard disk, and determining a target hard disk temperature interval where the current temperature value is located based on a pre-stored hard disk temperature interval set; determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation; the code rate written into the hard disk is adjusted to the target code rate, the code rate percentage corresponding to the target code rate is smaller than or equal to the target code rate percentage, the code rate of the hard disk can be dynamically adjusted to adjust the data bandwidth written into the hard disk based on the code rate percentages of different hard disk temperature intervals, and data loss caused by large difference between the written data bandwidth and the actual bandwidth of the hard disk is avoided, so that the performance and reliability of the hard disk are guaranteed, and further the performance and reliability of equipment using the hard disk are guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for adjusting a code rate according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for adjusting a code rate according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of an apparatus for adjusting a code rate according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
When the temperature of the mechanical hard disk in the device is increased, the read-write speed of the mechanical hard disk is reduced, so that data is lost when being written into the mechanical hard disk, and the performance and reliability of the device are reduced.
For example: most of storage media used by the vehicle-mounted security equipment are mechanical hard disks, and when the temperature of the mechanical hard disks is high, data written into the mechanical hard disks in the vehicle-mounted security equipment is lost, so that the performance and the reliability of the vehicle-mounted security equipment are reduced.
Fig. 1 is a flowchart illustrating a method for adjusting a code rate according to an embodiment of the present application. By way of example and not limitation, as shown in fig. 1, the method comprises:
s101: the method comprises the steps of obtaining a current temperature value of a hard disk, and determining a target hard disk temperature interval where the current temperature value is located based on a pre-stored hard disk temperature interval set.
For example, the current temperature value of the hard disk may be obtained by reading a temperature value of the hard disk through SMART (Self Monitoring Analysis And Reporting Technology) in the hard disk.
Specifically, the hard disk temperature interval set comprises at least one hard disk temperature interval, and the corresponding hard disk temperature interval is determined according to the current temperature value so as to obtain the target hard disk temperature interval.
S102: and determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation.
The code rate percentage is the percentage of the original code rate in the hard disk temperature interval and the code rate written into the hard disk. The code rate percentage shows that in the hard disk temperature interval, the actual rate of writing into the hard disk is changed, and is not equal to the theoretical rate of writing into the hard disk, and the code rate is changed along with the change and becomes a few percent of the original code rate.
S103: and adjusting the code rate written into the hard disk to a target code rate, wherein the code rate percentage corresponding to the target code rate is less than or equal to the target code rate percentage.
When the code rate percentage corresponding to the target code rate is smaller than or equal to the target code rate percentage, the data volume written into the hard disk can be adjusted to enable the data bandwidth written into the hard disk to be matched with the actual bandwidth written into the hard disk.
The method comprises the steps of obtaining a current temperature value of a hard disk, and determining a target hard disk temperature interval where the current temperature value is located based on a pre-stored hard disk temperature interval set; determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation; the code rate written into the hard disk is adjusted to the target code rate, the code rate percentage corresponding to the target code rate is smaller than or equal to the target code rate percentage, the code rate of the hard disk can be dynamically adjusted to adjust the data bandwidth written into the hard disk based on the code rate percentages of different hard disk temperature intervals, and data loss caused by large difference between the written data bandwidth and the actual bandwidth of the hard disk is avoided, so that the performance and reliability of the hard disk are guaranteed, and further the performance and reliability of equipment using the hard disk are guaranteed.
Fig. 2 is a flowchart illustrating a method for adjusting a code rate according to another embodiment of the present application. As an example and not by way of limitation, as shown in fig. 2, before obtaining the current temperature value of the hard disk, the method further includes:
s201: and calculating the theoretical rate of writing the external equipment into the hard disk aiming at each hard disk temperature interval.
Specifically, the theoretical bandwidth written into the hard disk by the external device is multiplied by the number of written paths to obtain a theoretical rate; the number of write paths is the number of external devices connected to the hard disk.
Illustratively, the external device is a 1080P camera, and the theoretical bandwidth of the corresponding write-in hard disk is 1.5 MB/s; and 15 1080P cameras connected with the hard disk, namely 15 writing paths, so that the theoretical rate is 1.5MB/s 15-22.5 MB/s.
S202: the actual rate at which the external device writes to the hard disk is measured.
For example, the actual speed of writing to the hard disk by the external device may be printed in real time by entering a hard disk write command into the hard disk, so as to measure the actual speed. Hard disk write command: srfs _ test _ tool _ v500 mixwrite/dev/sdam n; wherein, the smrfs _ test _ tool _ v500 is a compiled file of theoretical bandwidth written into the hard disk by external equipment, the mixwrite is a dual-stream write, and the sda is a current hard disk drive identifier; m represents a printing level, and the printing level is 0-4, wherein the larger the level is, the more printing is performed, and m is 0, 1, 2, 3, 4; n represents the number of write paths.
S203: and calculating the code rate percentage of the hard disk in the hard disk temperature interval according to the theoretical rate and the actual rate.
Specifically, the theoretical rate is divided by the actual rate to obtain the code rate percentage of the hard disk in the hard disk temperature interval.
For example, if the theoretical rate is 22.5MB/s and the actual rate is 20MB/s in a certain hard disk temperature interval, the code rate percentage is 20 MB/s/22.5 MB/s or 88%.
S204: and obtaining the corresponding relation of the temperature-code rate percentage according to the temperature interval of each hard disk and the corresponding code rate percentage.
For example, the pre-stored set of hard disk temperature intervals comprises [60 ℃, 65 ℃ (65 ℃, 70 ℃ (70 ℃, 75 ℃ (75 ℃, 80 ℃ (80 ℃, 87 ℃), and the code rate percentage of each hard disk temperature interval is shown in the following table:
temperature interval of hard disk Number of write paths Theoretical rate of speed Actual rate Percentage of code rate
60℃-65℃ 15 22.5MB/s 22.5MB/s 100%
65℃-70℃ 15 22.5MB/s 22.5MB/s 100%
70℃-75℃ 15 22.5MB/s 20MB/s 88%
75℃-80℃ 15 22.5MB/s 18MB/s 80%
80℃-87℃ 15 22.5MB/s 5MB/s 22%
In the embodiment, the theoretical rate of writing the external equipment into the hard disk is calculated by aiming at each hard disk temperature interval; measuring the actual speed of writing the external equipment into the hard disk; calculating the code rate percentage of the hard disk in the hard disk temperature interval according to the theoretical rate and the actual rate; and obtaining a temperature-code rate percentage corresponding relation according to each hard disk temperature interval and the corresponding code rate percentage so as to obtain an accurate code rate percentage and further obtain an accurate temperature-code rate percentage corresponding relation.
In another embodiment, before calculating the theoretical rate of writing the data collected by the external device into the hard disk for each hard disk temperature interval, the method further includes:
and acquiring the temperature value of the hard disk based on a preset environment temperature interval set to obtain a hard disk temperature interval set corresponding to the environment temperature interval set.
For example, the environmental temperature is divided every 5 ℃ to obtain an environmental temperature interval set [40 ℃, 45 ℃ (45 ℃), (45 ℃, 50 ℃), (50 ℃, 55 ℃ (55 ℃, 60 ℃ (60 ℃, 65 ℃), and the temperature value of the hard disk is correspondingly obtained based on the environmental temperature interval to obtain a hard disk temperature interval corresponding to the environmental temperature interval, so as to obtain a corresponding hard disk temperature interval set, and the corresponding relationship is shown in the following table:
interval of ambient temperature Temperature interval of hard disk
40℃-45℃ 60℃-65℃
45℃-50℃ 65℃-70℃
50℃-55℃ 70℃-75℃
55℃-60℃ 75℃-80℃
60℃-65℃ 80℃-87℃
On the basis, the code rate percentage of each environment temperature interval is obtained, and is shown in the following table:
interval of ambient temperature Temperature interval of hard disk Number of write paths Theoretical rate of speed Actual rate Percentage of code rate
40℃-45℃ 60℃-65℃ 15 22.5MB/s 22.5MB/s 100%
45℃-50℃ 65℃-70℃ 15 22.5MB/s 22.5MB/s 100%
50℃-55℃ 70℃-75℃ 15 22.5MB/s 20MB/s 88%
55℃-60℃ 75℃-80℃ 15 22.5MB/s 18MB/s 80%
60℃-65℃ 80℃-87℃ 15 22.5MB/s 5MB/s 22%
In another embodiment, after adjusting the bitrate of the hard disk to the target bitrate, the method further includes:
and writing the data acquired by the external equipment into the hard disk based on the target code rate.
In the embodiment, data is written into the hard disk through the external device based on the target code rate, so that data loss caused by a large difference between the written data bandwidth and the actual bandwidth of the hard disk is avoided, and the performance and the reliability of the hard disk are ensured.
In another embodiment, after obtaining the current temperature value of the hard disk, the method further includes:
and if the current temperature value is greater than the warning temperature value, performing hard disk power-off processing and/or alarming.
The warning temperature value can be set according to the actual application scene or the hardware performance. And the warning temperature value indicates that the current temperature value of the hard disk exceeds the working temperature limit, and hard disk power-off processing is required to protect the hard disk. An alarm may also be provided to alert the user.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Corresponding to the methods described in the above embodiments, only the portions related to the embodiments of the present application are shown for convenience of explanation.
Fig. 3 is a schematic structural diagram of an apparatus for adjusting a code rate according to an embodiment of the present application. By way of example and not limitation, as shown in fig. 3, the apparatus comprises:
the acquiring unit 10 is configured to acquire a current temperature value of the hard disk.
The determining unit 11 is configured to determine, based on a set of prestored hard disk temperature intervals, a target hard disk temperature interval in which the current temperature value is located.
And determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation.
An adjusting unit 12, configured to adjust a code rate written in a hard disk to a target code rate, where a code rate percentage corresponding to the target code rate is smaller than or equal to the target code rate percentage.
In another embodiment, the system further comprises a computing unit and a corresponding unit;
the calculation unit is used for calculating the theoretical rate of writing the external equipment into the hard disk aiming at each hard disk temperature interval;
the device is used for measuring the actual speed of writing the external equipment into the hard disk;
and the code rate percentage of the hard disk in the hard disk temperature interval is calculated according to the theoretical rate and the actual rate.
And the corresponding unit is used for obtaining the corresponding relation of the temperature and the code rate percentage according to the temperature interval of each hard disk and the corresponding code rate percentage.
In another embodiment, the obtaining unit is further configured to obtain a temperature value of the hard disk based on a preset environment temperature interval set, so as to obtain a hard disk temperature interval set corresponding to the environment temperature interval set.
In another embodiment, the apparatus further comprises an exception handling unit,
and the abnormality processing unit is used for carrying out hard disk power-off processing and/or alarming if the current temperature value is greater than the warning temperature value.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 2 of the embodiment includes: at least one processor 20 (only one shown in fig. 4), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, the steps of any of the various method embodiments described above being implemented when the computer program 22 is executed by the processor 20.
The electronic device 2 may be a vehicle-mounted security device, a detection device, an auxiliary device, or other computing device. The electronic device 2 may include, but is not limited to, a processor 20, a memory 21. Those skilled in the art will appreciate that fig. 4 is merely an example of the electronic device 2, and does not constitute a limitation of the electronic device 2, and may include more or less components than those shown, or combine some of the components, or different components, such as an input-output device, a network access device, etc.
The Processor 20 may be a Central Processing Unit (CPU), and the Processor 20 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 21 may in some embodiments be an internal storage unit of the electronic device 2, such as a hard disk or a memory of the electronic device 2. The memory 21 may also be an external storage device of the electronic device 2 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the electronic device 2. The memory 21 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments may be implemented.
Embodiments of the present application provide a computer program product, which when executed on an electronic device, enables the electronic device to implement the steps in the above method embodiments.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In some jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and proprietary practices.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for adjusting a code rate, comprising:
acquiring a current temperature value of a hard disk, and determining a target hard disk temperature interval where the current temperature value is based on a pre-stored hard disk temperature interval set;
determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation;
and adjusting the code rate written into the hard disk to a target code rate, wherein the code rate percentage corresponding to the target code rate is less than or equal to the target code rate percentage.
2. The method of claim 1, wherein the set of hard disk temperature intervals comprises at least one hard disk temperature interval, and before obtaining the current temperature value of the hard disk, the method further comprises:
calculating the theoretical rate of writing the external equipment into the hard disk aiming at each hard disk temperature interval;
measuring the actual speed of the external equipment written into the hard disk;
calculating the code rate percentage of the hard disk in the hard disk temperature interval according to the theoretical rate and the actual rate;
and obtaining the corresponding relation of the temperature-code rate percentage according to each hard disk temperature interval and the corresponding code rate percentage.
3. The method of claim 2, wherein said calculating a theoretical rate at which the external device writes to the hard disk comprises:
multiplying the theoretical bandwidth written into the hard disk by the external equipment by the number of written paths to obtain the theoretical rate;
and the number of the writing paths is the number of external equipment connected with the hard disk.
4. The method of claim 2, wherein calculating the percentage of code rate of the hard disk in the temperature interval of the hard disk according to the theoretical rate and the actual rate comprises:
and dividing the theoretical rate and the actual rate to obtain the code rate percentage of the hard disk in the hard disk temperature interval.
5. The method of claim 1, wherein before obtaining the current temperature value of the hard disk, the method further comprises:
and acquiring the temperature value of the hard disk based on a preset environment temperature interval set to obtain the hard disk temperature interval set corresponding to the environment temperature interval set.
6. The method of claim 1, wherein after adjusting the code rate for writing to the hard disk to the target code rate, further comprising:
and writing the data acquired by the external equipment into the hard disk based on the target code rate.
7. The method of claim 1, wherein after obtaining the current temperature value of the hard disk, the method further comprises:
and if the current temperature value is greater than the warning temperature value, performing hard disk power-off processing and/or alarming.
8. An apparatus for adjusting a code rate, comprising:
the acquisition unit is used for acquiring the current temperature value of the hard disk;
the determining unit is used for determining a target hard disk temperature interval where the current temperature value is based on a pre-stored hard disk temperature interval set;
determining the target code rate percentage corresponding to the target hard disk temperature interval based on the temperature-code rate percentage corresponding relation;
and the adjusting unit is used for adjusting the code rate written into the hard disk to a target code rate, wherein the code rate percentage corresponding to the target code rate is less than or equal to the target code rate percentage.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202210169972.8A 2022-02-23 2022-02-23 Method and device for adjusting code rate, electronic equipment and readable storage medium Pending CN114625317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210169972.8A CN114625317A (en) 2022-02-23 2022-02-23 Method and device for adjusting code rate, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210169972.8A CN114625317A (en) 2022-02-23 2022-02-23 Method and device for adjusting code rate, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114625317A true CN114625317A (en) 2022-06-14

Family

ID=81899947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210169972.8A Pending CN114625317A (en) 2022-02-23 2022-02-23 Method and device for adjusting code rate, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114625317A (en)

Similar Documents

Publication Publication Date Title
CN111045881A (en) Slow disk detection method and system
CN109656487B (en) Data processing method, device, equipment and storage medium
CN107608630B (en) Data reading and writing method and device
CN113643746A (en) Flash memory data analysis method and device, terminal equipment and storage medium
CN110580220A (en) method for measuring execution time of code segment and terminal equipment
US11093361B2 (en) Bus monitoring system, method and apparatus
CN113516453A (en) Construction project investment fund control early warning method, device, equipment and medium
CN114625317A (en) Method and device for adjusting code rate, electronic equipment and readable storage medium
CN113177045A (en) Data extraction method and device, computable storage equipment and data request equipment
CN112883765B (en) Target movement track acquisition method and device, storage medium and electronic equipment
CN112395144A (en) Test method, test system, terminal equipment and readable storage medium
CN110390463B (en) Wind control data processing method and device and terminal equipment
CN114697440B (en) Network management method and mobile terminal
CN112950961B (en) Traffic flow statistical method, device, equipment and storage medium
CN115454335A (en) Address generation method, device, equipment and storage medium
US11120652B2 (en) Method and system for graphically displaying data stream, and vehicle diagnostic device
CN113779926A (en) Circuit detection method and device, electronic equipment and readable storage medium
CN112882659A (en) Information obtaining method and device, electronic equipment and storage medium
CN113254304A (en) Method for determining shutdown type of server, server and storage medium
CN113342430A (en) Fault code processing method and device, terminal equipment and readable storage medium
CN112216333A (en) Chip testing method and device
CN112712610A (en) Vehicle diagnosis log processing method and device, terminal device and readable storage medium
CN112306040A (en) Vehicle detection method, device, equipment and server
CN112579207B (en) Data loading method, device and equipment
US10191481B2 (en) Numerical controller and numerical control system in which the controller is connected by network

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