CN118838739A - Data adjustment method and device, storage medium and electronic equipment - Google Patents
Data adjustment method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN118838739A CN118838739A CN202410832487.3A CN202410832487A CN118838739A CN 118838739 A CN118838739 A CN 118838739A CN 202410832487 A CN202410832487 A CN 202410832487A CN 118838739 A CN118838739 A CN 118838739A
- Authority
- CN
- China
- Prior art keywords
- target
- storage
- storage address
- data stored
- target storage
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000012544 monitoring process Methods 0.000 claims description 73
- 238000004590 computer program Methods 0.000 claims description 26
- 230000015654 memory Effects 0.000 claims description 20
- 238000001514 detection method Methods 0.000 claims description 8
- 238000000605 extraction Methods 0.000 claims description 3
- 239000000758 substrate Substances 0.000 claims 4
- 239000000523 sample Substances 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 14
- 238000005192 partition Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 230000006378 damage Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000002159 abnormal effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 3
- 230000006399 behavior Effects 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
- G06F11/0727—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2094—Redundant storage or storage space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3471—Address tracing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
技术领域Technical Field
本申请实施例涉及服务器领域,具体而言,涉及一种数据的调整方法及装置、存储介质及电子设备。The embodiments of the present application relate to the server field, and more specifically, to a data adjustment method and device, a storage medium, and an electronic device.
背景技术Background Art
近年来随着互联网和云计算迅速发展,对于服务器的需求一直处于高速增长,服务器数量不断增多,对服务器的管理需求也越来越高,BMC是可以实现服务器的控制、信息监控等功能的装置,是直观呈现服务器信息的平台。在服务器的远程管理中发挥着重要的作用。In recent years, with the rapid development of the Internet and cloud computing, the demand for servers has been growing rapidly. The number of servers has continued to increase, and the demand for server management has also become higher and higher. BMC is a device that can realize functions such as server control and information monitoring. It is a platform that intuitively presents server information. It plays an important role in the remote management of servers.
相关技术中,BMC在运行过程中需要记录很多日志和信息,而记录的信息又在不停地更新和变化,所以BMC使用的存储介质flash(闪存)需要承受反复的读操作、写操作、擦除操作等,而flash的每个块的擦除和编程寿命都是有限的,当使用达到一定极限后,会导致flash的块损坏,BMC可能会将数据写入已经损坏的flash中,或者对已经损坏的flash中的数据进行调整,导致数据的丢失,影响BMC的稳定运行,进而对整个服务器的运维造成影响,严重的话会导致BMC系统宕机,严重影响用户体验。In the related technology, BMC needs to record a lot of logs and information during operation, and the recorded information is constantly updated and changed, so the storage medium flash (flash memory) used by BMC needs to withstand repeated read operations, write operations, erase operations, etc., and the erase and programming life of each block of flash is limited. When the use reaches a certain limit, the flash block will be damaged. BMC may write data to the damaged flash, or adjust the data in the damaged flash, resulting in data loss, affecting the stable operation of BMC, and then affecting the operation and maintenance of the entire server. In severe cases, it will cause the BMC system to crash, seriously affecting the user experience.
发明内容Summary of the invention
本申请实施例提供了一种数据的调整方法及装置、存储介质及电子设备,以至少解决相关技术中数据的调整效率较低的问题。The embodiments of the present application provide a data adjustment method and device, a storage medium, and an electronic device to at least solve the problem of low data adjustment efficiency in the related art.
根据本申请的一个实施例,提供了一种数据的调整方法,服务器中部署有基板管理控制器、第一存储空间和第二存储空间,所述第一存储空间用于存储所述基板管理控制器监控到的所述服务器中的部件的运行信息,所述第二存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态,所述存储状态用于指示是否允许对所述第一存储空间中对应的存储地址上存储的数据进行调整,所述方法应用于所述基板管理控制器,所述方法包括:在接收到目标调整请求的情况下,检测目标存储地址是否落入所述第一存储空间所对应的存储地址范围,其中,所述目标调整请求用于请求对所述目标存储地址上存储的数据执行数据调整操作;在检测到所述目标存储地址落入所述存储地址范围的情况下,从所述第二存储空间中提取所述目标存储地址所对应的目标存储状态;在所述目标存储状态用于指示不允许对所述目标存储地址上存储的数据进行调整的情况下,根据目标存储状态参数对所述目标存储地址上存储的目标数据执行所述数据调整操作,其中,所述目标存储状态参数是用于确定所述目标存储状态的参数。According to an embodiment of the present application, a data adjustment method is provided. A baseboard management controller, a first storage space, and a second storage space are deployed in a server. The first storage space is used to store operation information of components in the server monitored by the baseboard management controller. The second storage space is used to store storage addresses and storage states in the first storage space that have a corresponding relationship. The storage state is used to indicate whether it is allowed to adjust the data stored at the corresponding storage address in the first storage space. The method is applied to the baseboard management controller. The method includes: upon receiving a target adjustment request, detecting whether a target storage address falls within a storage address range corresponding to the first storage space, wherein the target adjustment request is used to request to perform a data adjustment operation on the data stored at the target storage address; upon detecting that the target storage address falls within the storage address range, extracting a target storage state corresponding to the target storage address from the second storage space; and upon indicating that the target storage state is not allowed to adjust the data stored at the target storage address, performing the data adjustment operation on the target data stored at the target storage address according to a target storage state parameter, wherein the target storage state parameter is a parameter used to determine the target storage state.
在一个示例性实施例中,所述根据目标存储状态参数对所述目标存储地址上存储的目标数据执行所述数据调整操作,包括:检测所述目标存储状态参数与存储状态参数阈值之间的目标关系;根据所述目标关系,对所述目标存储地址上存储的目标数据执行所述数据调整操作。In an exemplary embodiment, performing the data adjustment operation on the target data stored at the target storage address according to the target storage state parameter includes: detecting a target relationship between the target storage state parameter and a storage state parameter threshold; and performing the data adjustment operation on the target data stored at the target storage address according to the target relationship.
在一个示例性实施例中,所述基板管理控制器中部署有监控进程,所述服务器中部署有第三存储空间,所述第三存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态参数,所述检测所述目标存储状态参数与存储状态参数阈值之间的目标关系,包括:通过所述监控进程从所述第三存储空间中提取所述目标存储地址所对应的所述目标存储状态参数;通过所述监控进程检测所述目标存储状态参数和存储状态参数阈值之间的所述目标关系。In an exemplary embodiment, a monitoring process is deployed in the baseboard management controller, and a third storage space is deployed in the server. The third storage space is used to store storage addresses and storage status parameters in the first storage space that have a corresponding relationship. The detection of the target relationship between the target storage status parameter and the storage status parameter threshold includes: extracting the target storage status parameter corresponding to the target storage address from the third storage space through the monitoring process; and detecting the target relationship between the target storage status parameter and the storage status parameter threshold through the monitoring process.
在一个示例性实施例中,所述通过所述监控进程检测所述目标存储状态参数和存储状态参数阈值之间的所述目标关系,包括:通过所述监控进程从所述第三存储空间中提取所述目标存储地址所对应的目标总次数,其中,所述目标总次数是所述目标存储地址上存储的数据已被执行参考数据调整操作的总次数,所述目标存储状态参数包括所述目标总次数;通过所述监控进程检测所述目标总次数减去次数阈值得到的第一差值,并通过所述监控进程检测所述第一差值与第一差值阈值之间的第一大小关系,其中,所述目标总次数高于所述次数阈值,所述存储状态参数阈值包括所述次数阈值,所述目标关系包括所述第一大小关系。In an exemplary embodiment, the target relationship between the target storage status parameter and the storage status parameter threshold is detected by the monitoring process, including: extracting the target total number of times corresponding to the target storage address from the third storage space by the monitoring process, wherein the target total number of times is the total number of times the reference data adjustment operation has been performed on the data stored at the target storage address, and the target storage status parameter includes the target total number of times; detecting a first difference obtained by subtracting a number threshold from the target total number of times by the monitoring process, and detecting a first size relationship between the first difference and a first difference threshold by the monitoring process, wherein the target total number of times is higher than the number threshold, the storage status parameter threshold includes the number threshold, and the target relationship includes the first size relationship.
在一个示例性实施例中,所述基板管理控制器中还部署有目标驱动,所述根据所述目标关系,对所述目标存储地址上存储的目标数据执行所述数据调整操作,包括:在第一大小关系用于指示第一差值小于第一差值阈值的情况下,通过所述目标驱动对所述目标存储地址上存储的目标数据执行所述数据调整操作;在第一大小关系用于指示第一差值大于或者等于第一差值阈值的情况下,通过所述目标驱动拒绝对所述目标存储地址上存储的目标数据执行所述数据调整操作;或者,通过所述监控进程检测次数上限值减去目标总次数得到的第二差值,通过所述监控进程检测所述第二差值与第二差值阈值之间的第二大小关系,其中,所述次数上限值大于所述目标总次数,所述目标总次数大于次数阈值,所述目标关系包括所述第二大小关系,所述存储状态参数阈值包括所述次数上限值,通过所述目标驱动根据所述第二大小关系对所述目标存储地址上存储的目标数据执行所述数据调整操作;其中,所述通过所述目标驱动根据所述第二大小关系对所述目标存储地址上存储的目标数据执行所述数据调整操作,包括:在所述第二大小关系用于指示所述第二差值大于或者等于所述第二差值阈值的情况下,通过所述目标驱动对所述目标存储地址上存储的目标数据执行所述数据调整操作;在所述第二大小关系用于指示所述第二差值小于所述第二差值阈值的情况下,通过所述目标驱动拒绝对所述目标存储地址上存储的目标数据执行所述数据调整操作。In an exemplary embodiment, a target driver is further deployed in the baseboard management controller, and the data adjustment operation is performed on the target data stored at the target storage address according to the target relationship, including: when the first size relationship is used to indicate that the first difference is less than the first difference threshold, the data adjustment operation is performed on the target data stored at the target storage address by the target driver; when the first size relationship is used to indicate that the first difference is greater than or equal to the first difference threshold, the target driver refuses to perform the data adjustment operation on the target data stored at the target storage address; or, a second difference is obtained by subtracting the target total number of times from the upper limit value of the number of times detected by the monitoring process, and a second size relationship between the second difference and the second difference threshold is detected by the monitoring process, wherein the upper limit value of the number of times is greater than the target total number of times, and the The target total number of times is greater than the number threshold, the target relationship includes the second size relationship, the storage state parameter threshold includes the number upper limit value, and the target driver performs the data adjustment operation on the target data stored at the target storage address according to the second size relationship; wherein, the target driver performs the data adjustment operation on the target data stored at the target storage address according to the second size relationship, including: when the second size relationship is used to indicate that the second difference is greater than or equal to the second difference threshold, the target driver performs the data adjustment operation on the target data stored at the target storage address; when the second size relationship is used to indicate that the second difference is less than the second difference threshold, the target driver refuses to perform the data adjustment operation on the target data stored at the target storage address.
在一个示例性实施例中,所述通过所述目标驱动对所述目标存储地址上存储的目标数据执行所述数据调整操作,包括:通过所述目标驱动提取所述目标调整请求中携带的起始存储地址和目标长度,其中,所述目标存储地址包括所述起始存储地址和所述目标长度;通过所述目标驱动在所述第一存储空间中从所述起始存储地址开始对所述目标长度上存储的数据执行所述数据调整操作。In an exemplary embodiment, performing the data adjustment operation on the target data stored at the target storage address by the target driver includes: extracting the starting storage address and the target length carried in the target adjustment request by the target driver, wherein the target storage address includes the starting storage address and the target length; performing the data adjustment operation on the data stored at the target length starting from the starting storage address in the first storage space by the target driver.
在一个示例性实施例中,所述基板管理控制器中部署有监控进程,所述服务器中部署有第三存储空间,所述第三存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态参数,在所述检测目标存储地址是否落入所述第一存储空间所对应的存储地址范围之前,所述方法还包括:通过所述监控进程从所述第一存储空间中提取所述目标存储地址所对应的所述目标存储状态参数,并通过所述监控进程比对所述目标存储状态参数和存储状态参数阈值,得到比对结果;在所述比对结果用于指示所述目标存储状态参数小于存储状态参数阈值的情况下,通过所述监控进程将所述目标存储地址所对应的所述目标存储状态确定为允许对所述目标存储地址上存储的数据进行调整;在所述比对结果用于指示所述目标存储状态参数大于或者等于存储状态参数阈值的情况下,通过所述监控进程将所述目标存储地址所对应的所述目标存储状态确定为不允许对所述目标存储地址上存储的数据进行调整。In an exemplary embodiment, a monitoring process is deployed in the baseboard management controller, and a third storage space is deployed in the server, the third storage space is used to store storage addresses and storage status parameters in the first storage space having a corresponding relationship, and before detecting whether the target storage address falls into the storage address range corresponding to the first storage space, the method also includes: extracting the target storage status parameter corresponding to the target storage address from the first storage space through the monitoring process, and comparing the target storage status parameter with the storage status parameter threshold through the monitoring process to obtain a comparison result; when the comparison result is used to indicate that the target storage status parameter is less than the storage status parameter threshold, the target storage status corresponding to the target storage address is determined by the monitoring process as allowing adjustment of the data stored at the target storage address; when the comparison result is used to indicate that the target storage status parameter is greater than or equal to the storage status parameter threshold, the target storage status corresponding to the target storage address is determined by the monitoring process as not allowing adjustment of the data stored at the target storage address.
根据本申请的另一个实施例,提供了一种数据的调整装置,服务器中部署有基板管理控制器、第一存储空间和第二存储空间,所述第一存储空间用于存储所述基板管理控制器监控到的所述服务器中的部件的运行信息,所述第二存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态,所述存储状态用于指示是否允许对所述第一存储空间中对应的存储地址上存储的数据进行调整,所述装置应用于所述基板管理控制器,上述装置包括:According to another embodiment of the present application, a data adjustment device is provided, wherein a baseboard management controller, a first storage space, and a second storage space are deployed in a server, wherein the first storage space is used to store operation information of components in the server monitored by the baseboard management controller, and the second storage space is used to store storage addresses and storage states in the first storage space having a corresponding relationship, wherein the storage state is used to indicate whether adjustment of data stored at a corresponding storage address in the first storage space is allowed, and the device is applied to the baseboard management controller, and the device comprises:
检测模块,用于在接收到目标调整请求的情况下,检测目标存储地址是否落入所述第一存储空间所对应的存储地址范围,其中,所述目标调整请求用于请求对所述目标存储地址上存储的数据执行数据调整操作;a detection module, configured to detect whether a target storage address falls within a storage address range corresponding to the first storage space when a target adjustment request is received, wherein the target adjustment request is used to request a data adjustment operation to be performed on data stored at the target storage address;
提取模块,用于在检测到所述目标存储地址落入所述存储地址范围的情况下,从所述第二存储空间中提取所述目标存储地址所对应的目标存储状态;an extraction module, configured to extract a target storage state corresponding to the target storage address from the second storage space when detecting that the target storage address falls within the storage address range;
执行模块,用于在所述目标存储状态用于指示不允许对所述目标存储地址上存储的数据进行调整的情况下,根据目标存储状态参数对所述目标存储地址上存储的目标数据执行所述数据调整操作,其中,所述目标存储状态参数是用于确定所述目标存储状态的参数。An execution module is used to perform the data adjustment operation on the target data stored at the target storage address according to a target storage state parameter when the target storage state is used to indicate that adjustment of the data stored at the target storage address is not allowed, wherein the target storage state parameter is a parameter used to determine the target storage state.
根据本申请的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
根据本申请的又一个实施例,还提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
根据本申请的又一个实施例,还提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
通过本申请,服务器中预先存储了具有对应关系的存储空间中的地址和存储状态,在希望对存储地址上的数据进行调整的情况下,可以但不限于检测该存储地址是否落入允许进行调整的存储地址范围,通过这样的方式,避免了对其他不允许进行调整的存储地址上的数据进行调整,保证了数据的安全性,如果该存储地址所对应的存储状态用于指示不允许对该存储地址上的数据进行调整,在这样的情况下,可以但不限于根据用于确定该存储地址的存储状态的存储状态参数,继续对该存储地址上的数据执行所希望的数据调整操作,通过这样的方式,提升了对存储地址上存储的数据进行调整的效率,因此,可以解决数据的调整效率较低的问题,达到提升数据的调整效率的效果。Through the present application, the server pre-stores addresses and storage states in a storage space with a corresponding relationship. When it is desired to adjust the data at the storage address, it is possible but not limited to detecting whether the storage address falls within the storage address range that is allowed to be adjusted. In this way, it is avoided to adjust the data at other storage addresses that are not allowed to be adjusted, thereby ensuring the security of the data. If the storage state corresponding to the storage address is used to indicate that adjustment of the data at the storage address is not allowed, in this case, it is possible but not limited to continue to perform the desired data adjustment operation on the data at the storage address based on the storage state parameter used to determine the storage state of the storage address. In this way, the efficiency of adjusting the data stored at the storage address is improved. Therefore, the problem of low data adjustment efficiency can be solved, thereby achieving the effect of improving data adjustment efficiency.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例的一种数据的调整方法的服务器设备的硬件结构框图;FIG1 is a hardware structure block diagram of a server device of a data adjustment method according to an embodiment of the present application;
图2是根据本申请实施例的数据的调整方法的流程图;FIG2 is a flow chart of a method for adjusting data according to an embodiment of the present application;
图3是根据本申请实施例的一种可选的第一存储空间与备份存储空间的示意图;FIG3 is a schematic diagram of an optional first storage space and a backup storage space according to an embodiment of the present application;
图4是根据本申请实施例的一种可选的存储空间的示意图;FIG4 is a schematic diagram of an optional storage space according to an embodiment of the present application;
图5是根据本申请实施例的一种可选的筛选所需要进行操作的存储空间的示意图;FIG5 is a schematic diagram of a storage space required for an optional screening operation according to an embodiment of the present application;
图6是根据本申请实施例的一种可选的对存储地址上的数据执行数据调整操作的示意图二FIG. 6 is a schematic diagram of an optional data adjustment operation performed on data at a storage address according to an embodiment of the present application.
图7是根据本申请实施例的一种可选的数据的调整方法的示意图;FIG7 is a schematic diagram of an optional data adjustment method according to an embodiment of the present application;
图8是根据本申请实施例的数据的调整装置的结构框图。FIG8 is a structural block diagram of a data adjustment device according to an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下文中将参考附图并结合实施例来详细说明本申请的实施例。The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
本申请实施例中所提供的方法实施例可以在服务器设备或者类似的运算装置中执行。以运行在服务器设备上为例,图1是本申请实施例的一种数据的调整方法的服务器设备的硬件结构框图。如图1所示,服务器设备可以包括一个或多个(图1中仅示出一个)处理器1 02(处理器1 02可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器1 04,其中,上述服务器设备还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述服务器设备的结构造成限定。例如,服务器设备还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided in the embodiment of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, FIG. 1 is a hardware structure block diagram of a server device of a method for adjusting data in an embodiment of the present application. As shown in FIG. 1 , the server device may include one or more (only one is shown in FIG. 1 ) processors 1 02 (the processor 1 02 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 1 04 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input/output device 108 for communication functions. It can be understood by those of ordinary skill in the art that the structure shown in FIG. 1 is only for illustration, and it does not limit the structure of the above-mentioned server device. For example, the server device may also include more or fewer components than those shown in FIG. 1 , or have a configuration different from that shown in FIG. 1 .
存储器1 04可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的数据的调整方法对应的计算机程序,处理器1 02通过运行存储在存储器1 04内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器1 04可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器1 02远程设置的存储器,这些远程存储器可以通过网络连接至服务器设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for adjusting data in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
传输设备106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括服务器设备的通信供应方提供的无线网络。在一个实例中,传输设备1 06包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
首先对本申请实施例中涉及的术语解释如下:First, the terms involved in the embodiments of the present application are explained as follows:
BMC:Baseboard Management Controller,基板管理控制器。BMC: Baseboard Management Controller, baseboard management controller.
SPI:Serial Peripheral interface,串行外围设备接口。SPI: Serial Peripheral interface, serial peripheral interface.
EEPROM:Electrically Erasable Programmable read onlymemory,指带电可擦可编程只读存储器。EEPROM: Electrically Erasable Programmable read only memory, refers to electrically erasable programmable read only memory.
在本实施例中提供了一种数据的调整方法,服务器中部署有基板管理控制器、第一存储空间和第二存储空间,所述第一存储空间用于存储所述基板管理控制器监控到的所述服务器中的部件的运行信息,所述第二存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态,所述存储状态用于指示是否允许对所述第一存储空间中对应的存储地址上存储的数据进行调整,所述方法应用于所述基板管理控制器,图2是根据本申请实施例的数据的调整方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a method for adjusting data is provided. A baseboard management controller, a first storage space, and a second storage space are deployed in a server. The first storage space is used to store operation information of components in the server monitored by the baseboard management controller. The second storage space is used to store storage addresses and storage states in the first storage space having a corresponding relationship. The storage state is used to indicate whether adjustment is allowed for data stored at a corresponding storage address in the first storage space. The method is applied to the baseboard management controller. FIG2 is a flow chart of the method for adjusting data according to an embodiment of the present application. As shown in FIG2, the process includes the following steps:
步骤S202,在接收到目标调整请求的情况下,检测目标存储地址是否落入所述第一存储空间所对应的存储地址范围,其中,所述目标调整请求用于请求对所述目标存储地址上存储的数据执行数据调整操作;Step S202, upon receiving a target adjustment request, detecting whether a target storage address falls within a storage address range corresponding to the first storage space, wherein the target adjustment request is used to request a data adjustment operation to be performed on data stored at the target storage address;
步骤S204,在检测到所述目标存储地址落入所述存储地址范围的情况下,从所述第二存储空间中提取所述目标存储地址所对应的目标存储状态;Step S204, when it is detected that the target storage address falls within the storage address range, extracting the target storage state corresponding to the target storage address from the second storage space;
步骤S206,在所述目标存储状态用于指示不允许对所述目标存储地址上存储的数据进行调整的情况下,根据目标存储状态参数对所述目标存储地址上存储的目标数据执行所述数据调整操作,其中,所述目标存储状态参数是用于确定所述目标存储状态的参数。Step S206, when the target storage state is used to indicate that adjustment of the data stored at the target storage address is not allowed, perform the data adjustment operation on the target data stored at the target storage address according to the target storage state parameter, wherein the target storage state parameter is a parameter used to determine the target storage state.
通过上述步骤,服务器中预先存储了具有对应关系的存储空间中的地址和存储状态,在希望对存储地址上的数据进行调整的情况下,可以但不限于检测该存储地址是否落入允许进行调整的存储地址范围,通过这样的方式,避免了对其他不允许进行调整的存储地址上的数据进行调整,保证了数据的安全性,如果该存储地址所对应的存储状态用于指示不允许对该存储地址上的数据进行调整,在这样的情况下,可以但不限于根据用于确定该存储地址的存储状态的存储状态参数,继续对该存储地址上的数据执行所希望的数据调整操作,通过这样的方式,提升了对存储地址上存储的数据进行调整的效率,因此,可以解决数据的调整效率较低的问题,达到提升数据的调整效率的效果。Through the above steps, the server pre-stores the addresses and storage states in the storage space with corresponding relationships. When it is desired to adjust the data at the storage address, it is possible but not limited to detecting whether the storage address falls within the storage address range that allows adjustment. In this way, it is avoided to adjust the data at other storage addresses that are not allowed to be adjusted, thereby ensuring the security of the data. If the storage state corresponding to the storage address is used to indicate that adjustment of the data at the storage address is not allowed, in this case, it is possible but not limited to continue to perform the desired data adjustment operation on the data at the storage address based on the storage state parameters used to determine the storage state of the storage address. In this way, the efficiency of adjusting the data stored at the storage address is improved. Therefore, the problem of low data adjustment efficiency can be solved, thereby achieving the effect of improving data adjustment efficiency.
在上述步骤S202提供的技术方案中,数据调整操作可以但不限于包括对目标存储地址上存储的数据产生更新的操作和不对目标存储地址上存储的数据产生更新的操作,例如,数据调整操作可以但不限于包括对目标存储地址上存储的数据进行写操作、读操作、擦除操作等等。In the technical solution provided in the above step S202, the data adjustment operation may include but is not limited to operations that update the data stored at the target storage address and operations that do not update the data stored at the target storage address. For example, the data adjustment operation may include but is not limited to write operations, read operations, erase operations, etc. on the data stored at the target storage address.
可选的,在本实施例中,基板管理控制器可以但不限于用于监控服务器中的硬件、软件和固件等的部件的运行信息,例如,基板管理控制器可以但不限于用于监控服务器的风扇的运行风速、处理器的处理速率等等。Optionally, in this embodiment, the baseboard management controller can be used but not limited to monitoring the operating information of components such as hardware, software and firmware in the server. For example, the baseboard management controller can be used but not limited to monitoring the operating wind speed of the server's fan, the processing rate of the processor, etc.
可以但不限于将基板管理控制器所监控到的服务器的部件的运行信息记录在第一存储空间中,作为一种可选的示例,在服务器中还可以但不限于部署有备份存储空间,备份存储空间用于对第一存储空间中存储的数据进行备份,图3是根据本申请实施例的一种可选的第一存储空间与备份存储空间的示意图,如图3所示,BMC的固件一般存在flash中,固件中包含uboot、内核、文件系统、各应用进程等信息,任何一个部分出错均会造成BMC启动失败及功能不生效的问题。严重的镜像损坏会导致BMC无法启动,只能通过拆机刷写BMCflash芯片来完成对BMC的修复;此外BMC系统现在提供的功能也越来越多,需要进行存储的内容也越来越多,更新越来越快。BMC运行时可以但不限于采用双flash架构,例如,BMC所对应的存储空间可以但不限于包括flash0(相当于第一存储空间)和flash1(相当于备份存储空间)。The operation information of the components of the server monitored by the baseboard management controller can be recorded in the first storage space, but not limited to. As an optional example, a backup storage space can also be deployed in the server, but not limited to, and the backup storage space is used to back up the data stored in the first storage space. FIG3 is a schematic diagram of an optional first storage space and a backup storage space according to an embodiment of the present application. As shown in FIG3, the firmware of the BMC is generally stored in the flash, and the firmware contains information such as uboot, kernel, file system, and various application processes. Any error in any part will cause the BMC to fail to start and the function will not take effect. Severe image damage will cause the BMC to be unable to start, and the BMC can only be repaired by disassembling and flashing the BMC flash chip; in addition, the BMC system now provides more and more functions, and more and more content needs to be stored, and the update is getting faster and faster. When the BMC is running, it can be but not limited to using a dual flash architecture. For example, the storage space corresponding to the BMC can be but not limited to flash0 (equivalent to the first storage space) and flash1 (equivalent to the backup storage space).
图4是根据本申请实施例的一种可选的存储空间的示意图,如图4所示,BMC系统将flash分为几个分区,启动分区,系统程序分区,文件系统分区,可以但不限于对每个flash(例如,flash0和flash1)进行分区,例如,可以但不限于将flash0划分为启动分区(uboot),系统程序分区(内核)、文件系统分区等等,而在文件系统分区中又会划分为只读分区和可读写分区,在一个BMC系统中会在可读写分区中创建日志文件,并进行记录,当记录到一定大小后,会将日志文件备份至另一个flash(例如,flash1)中,然后再重新记录一个新的日志文件,当再次记录到一定大小后,会删掉之前备份的记录,把当前的文件重新作为备份,再重新开始记录一份新的日志文件,如此往复,另外也会有两个flash的同步等操作,比如程序版本同步、日志同步备份等。FIG4 is a schematic diagram of an optional storage space according to an embodiment of the present application. As shown in FIG4 , the BMC system divides the flash into several partitions, a boot partition, a system program partition, and a file system partition. Each flash (for example, flash0 and flash1) may be partitioned, but not limited to. For example, flash0 may be divided into a boot partition (uboot), a system program partition (kernel), a file system partition, etc., and the file system partition may be divided into a read-only partition and a read-write partition. In a BMC system, a log file is created in the read-write partition and recorded. When the record reaches a certain size, the log file is backed up to another flash (for example, flash1), and then a new log file is re-recorded. When the record reaches a certain size again, the previously backed-up record is deleted, the current file is used as a backup, and then a new log file is recorded again, and so on. In addition, there will be synchronization operations of the two flashes, such as program version synchronization, log synchronization backup, etc.
可选的,在本实施例中,第一存储空间中的存储地址所对应的存储状态可能会随着对存储地址上的数据进行调整而发生更新,第一存储空间中的存储地址所对应的存储状态并不是固定不变的,例如,第一存储空间中的存储地址1所对应的存储状态在T1时刻为允许对存储地址1上存储的数据进行调整,而随着对存储地址1上存储的数据所执行的数据调整操作,第一存储空间中的存储地址1所对应的存储状态可能会在T2时刻更新为不允许对存储地址1上的存储的数据进行调整。Optionally, in the present embodiment, the storage state corresponding to the storage address in the first storage space may be updated as the data at the storage address is adjusted, and the storage state corresponding to the storage address in the first storage space is not fixed. For example, the storage state corresponding to the storage address 1 in the first storage space at time T1 is to allow adjustment of the data stored at the storage address 1, and as the data adjustment operation is performed on the data stored at the storage address 1, the storage state corresponding to the storage address 1 in the first storage space may be updated at time T2 to not allow adjustment of the data stored at the storage address 1.
在一个示范性实施例中,所述基板管理控制器中部署有监控进程,所述服务器中部署有第三存储空间,所述第三存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态参数,在所述检测目标存储地址是否落入所述第一存储空间所对应的存储地址范围之前,上述方法还包括:通过所述监控进程从所述第一存储空间中提取所述目标存储地址所对应的所述目标存储状态参数,并通过所述监控进程比对所述目标存储状态参数和存储状态参数阈值,得到比对结果;在所述比对结果用于指示所述目标存储状态参数小于存储状态参数阈值的情况下,通过所述监控进程将所述目标存储地址所对应的所述目标存储状态确定为允许对所述目标存储地址上存储的数据进行调整;在所述比对结果用于指示所述目标存储状态参数大于或者等于存储状态参数阈值的情况下,通过所述监控进程将所述目标存储地址所对应的所述目标存储状态确定为不允许对所述目标存储地址上存储的数据进行调整。In an exemplary embodiment, a monitoring process is deployed in the baseboard management controller, and a third storage space is deployed in the server, the third storage space is used to store storage addresses and storage status parameters in the first storage space having a corresponding relationship, and before detecting whether the target storage address falls into the storage address range corresponding to the first storage space, the above method also includes: extracting the target storage status parameter corresponding to the target storage address from the first storage space through the monitoring process, and comparing the target storage status parameter with a storage status parameter threshold through the monitoring process to obtain a comparison result; when the comparison result is used to indicate that the target storage status parameter is less than the storage status parameter threshold, determining the target storage status corresponding to the target storage address through the monitoring process as allowing adjustment of the data stored at the target storage address; when the comparison result is used to indicate that the target storage status parameter is greater than or equal to the storage status parameter threshold, determining the target storage status corresponding to the target storage address through the monitoring process as not allowing adjustment of the data stored at the target storage address.
可选的,在本实施例中,目标存储状态参数可以但不限于包括目标存储地址上存储的目标数据被调整的总次数、或者目标数据已被执行参考数据调整操作的总次数等等,作为一种可选的示例,参考数据调整操作可以但不限于包括擦写操作,擦写操作可以但不限于包括擦除操作和写操作中的至少一个。Optionally, in this embodiment, the target storage status parameter may include but is not limited to the total number of times the target data stored at the target storage address has been adjusted, or the total number of times the target data has been subjected to a reference data adjustment operation, etc. As an optional example, the reference data adjustment operation may include but is not limited to an erase operation, and the erase operation may include but is not limited to at least one of an erase operation and a write operation.
可选的,在本实施例中,不同存储地址所对应的存储状态参数阈值可以但不限于相同或者不同,存储状态参数阈值可以但不限于包括允许对目标存储地址上存储的目标数据进行调整的次数阈值,或者允许对目标数据执行参考数据调整操作的次数阈值等等。Optionally, in this embodiment, the storage status parameter thresholds corresponding to different storage addresses may be but are not limited to being the same or different, and the storage status parameter thresholds may be but are not limited to including a threshold of the number of times that the target data stored at the target storage address is allowed to be adjusted, or a threshold of the number of times that a reference data adjustment operation is allowed to be performed on the target data, and so on.
由于第一存储空间中用于存储日志等文件的位置比较固定,可读写分区频繁使用的范围也相对比较固定,当BMC长期运行时,对flash的某些块进行频繁操作,长时间后会导致块的损坏,而BMC本身无法获取这些信息,另外BMC运行过程中,出现异常操作后有可能会将程序区等影响系统运行的分期损坏,进而影响BMC的稳定运行,而通过本申请实施例,对flash的块的使用情况进行记录、分析和统计,并对可能会出现异常的情况提前进行预警,提升了存储空间中存储的数据的完整性。Since the location of the first storage space for storing files such as logs is relatively fixed, the range of frequent use of the read-write partition is also relatively fixed. When the BMC runs for a long time, some blocks of the flash are frequently operated, which will cause damage to the blocks after a long time, and the BMC itself cannot obtain this information. In addition, during the operation of the BMC, abnormal operations may cause damage to the program area and other parts that affect the operation of the system, thereby affecting the stable operation of the BMC. Through the embodiments of the present application, the use of the flash blocks is recorded, analyzed and counted, and early warning is given for possible abnormal situations, thereby improving the integrity of the data stored in the storage space.
在上述步骤S204提供的技术方案中,在检测到所述目标存储地址未落入所述存储地址范围的情况下,可以表明目标存储地址不是第一存储空间中的存储地址,在这样的情况下,可以但不限于拒绝对目标存储地址上存储的数据执行数据调整操作,并生成告警日志,其中,告警日志用于提示目标存储地址未落入存储地址范围。In the technical solution provided in the above step S204, when it is detected that the target storage address does not fall within the storage address range, it can be indicated that the target storage address is not a storage address in the first storage space. In such a case, it can be but not limited to refusing to perform data adjustment operations on the data stored at the target storage address, and generating an alarm log, wherein the alarm log is used to prompt that the target storage address does not fall within the storage address range.
服务器中还部署有其他的存储空间,这些存储空间可能是用于存储服务器的固件的,通过这样的方式,对BMC的异常越界操作行为进行监控,极大减少了因BMC镜像被破坏,从而导致BMC无法正常运行的情况,避免了对除了第一存储空间外的存储地址上存储的数据进行调整,保证了服务器中的其他存储空间中数据的安全性。Other storage spaces are also deployed in the server, which may be used to store the server's firmware. In this way, the abnormal out-of-bounds operation behavior of the BMC is monitored, which greatly reduces the situation where the BMC cannot operate normally due to the destruction of the BMC image, avoids adjusting the data stored in the storage address other than the first storage space, and ensures the security of the data in other storage spaces in the server.
可选的,在本实施例中,可以但不限于通过以下方式从所述第二存储空间中提取所述目标存储地址所对应的目标存储状态:从具有对应关系的所述第一存储空间中的存储地址和存储状态中提取目标存储地址所对应的目标存储状态。Optionally, in this embodiment, the target storage state corresponding to the target storage address can be extracted from the second storage space in the following manner but is not limited to: extracting the target storage state corresponding to the target storage address from the storage addresses and storage states in the first storage space that have a corresponding relationship.
在上述步骤S206提供的技术方案中,在目标存储状态用于指示允许对目标存储地址上存储的数据进行调整的情况下,对目标存储地址上存储的目标数据执行数据调整操作。In the technical solution provided in the above step S206, when the target storage state is used to indicate that adjustment of the data stored at the target storage address is allowed, a data adjustment operation is performed on the target data stored at the target storage address.
可选的,在本实施例中,在目标存储状态用于指示不允许对目标存储地址上存储的数据进行调整的情况下,可以表明目标存储地址可能是不可用的,在这样的情况下,可以但不限于根据确定目标存储状态的目标存储状态参数对目标存储地址上存储的目标数据执行数据调整操作。Optionally, in this embodiment, when the target storage state is used to indicate that adjustment of the data stored at the target storage address is not allowed, it may indicate that the target storage address may be unavailable. In such a case, data adjustment operations may be performed on the target data stored at the target storage address based on, but not limited to, target storage state parameters that determine the target storage state.
在一个示范性实施例中,可以但不限于通过以下方式根据目标存储状态参数对所述目标存储地址上存储的目标数据执行所述数据调整操作:检测所述目标存储状态参数与存储状态参数阈值之间的目标关系;根据所述目标关系,对所述目标存储地址上存储的目标数据执行所述数据调整操作。In an exemplary embodiment, the data adjustment operation may be performed on the target data stored at the target storage address according to the target storage state parameter in the following manner, but is not limited to: detecting a target relationship between the target storage state parameter and a storage state parameter threshold; and performing the data adjustment operation on the target data stored at the target storage address according to the target relationship.
可选的,在本实施例中,目标存储地址所对应的目标存储状态参数可以但不限于是累计的,作为一种可选的示例,在目标存储状态参数包括目标存储地址上存储的目标数据被调整的总次数、存储状态参数阈值包括允许对目标存储地址上存储的目标数据进行调整的次数阈值的情况下,可以但不限于根据目标数据被调整的总次数与进行调整次数阈值之间的关系,对目标存储地址上存储的目标数据执行数据调整操作。Optionally, in the present embodiment, the target storage status parameter corresponding to the target storage address may be, but is not limited to, cumulative. As an optional example, when the target storage status parameter includes the total number of times the target data stored at the target storage address is adjusted and the storage status parameter threshold includes a threshold number of times that the target data stored at the target storage address is allowed to be adjusted, it is possible but not limited to performing a data adjustment operation on the target data stored at the target storage address based on the relationship between the total number of times the target data is adjusted and the threshold number of adjustments.
或者,在目标存储状态参数包括目标数据已被执行参考数据调整操作的总次数、且存储状态参数阈值包括允许对目标存储地址上存储的目标数据执行参考数据调整操作的次数阈值的情况下,可以但不限于根据目标数据已被执行参考数据调整操作的总次数与执行参考数据调整操作的次数阈值之间的关系,对目标存储地址上存储的目标数据执行数据调整操作。Alternatively, when the target storage status parameter includes the total number of times that the reference data adjustment operation has been performed on the target data, and the storage status parameter threshold includes a threshold number of times that the reference data adjustment operation is allowed to be performed on the target data stored at the target storage address, it is possible, but not limited to, to perform a data adjustment operation on the target data stored at the target storage address based on, but not limited to, the relationship between the total number of times that the reference data adjustment operation has been performed on the target data and the threshold number of times that the reference data adjustment operation is performed.
通过这样的方式,对第一存储空间(例如,flash)中的每个块的使用情况进行统计和分析,对可能出现的异常,进行提前的告警,提升客户对BMC的运维质量和效率,使得客户提前获取镜像损坏情况,并做出相应的处理,降低运维风险,提前了用户发现固件问题的时间点。In this way, the usage of each block in the first storage space (for example, flash) is counted and analyzed, and an early warning is given for possible abnormalities, thereby improving the customer's BMC operation and maintenance quality and efficiency, allowing the customer to obtain image damage in advance and take corresponding measures, reducing operation and maintenance risks and advancing the time point when users discover firmware problems.
在一个示范性实施例中,所述基板管理控制器中部署有监控进程,所述服务器中部署有第三存储空间,所述第三存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态参数,可以但不限于通过以下方式检测所述目标存储状态参数与存储状态参数阈值之间的目标关系,包括:通过所述监控进程从所述第三存储空间中提取所述目标存储地址所对应的所述目标存储状态参数;通过所述监控进程检测所述目标存储状态参数和存储状态参数阈值之间的所述目标关系。In an exemplary embodiment, a monitoring process is deployed in the baseboard management controller, and a third storage space is deployed in the server. The third storage space is used to store storage addresses and storage status parameters in the first storage space that have a corresponding relationship. The target relationship between the target storage status parameter and the storage status parameter threshold can be detected in the following manners, but is not limited to: extracting the target storage status parameter corresponding to the target storage address from the third storage space through the monitoring process; detecting the target relationship between the target storage status parameter and the storage status parameter threshold through the monitoring process.
可选的,在本实施例中,第三存储空间中存储的第一存储空间中的存储地址所对应的存储状态参数可以但不限于包括是会产生更新的,可以理解的是,存储地址所对应的存储状态参数是会发生变化的。Optionally, in this embodiment, the storage state parameter corresponding to the storage address in the first storage space stored in the third storage space may include but is not limited to being updated. It is understandable that the storage state parameter corresponding to the storage address will change.
可选的,在本实施例中,第三存储空间上部署有目标接口,可以但不限于由监控进程通过目标接口从具有对应关系的所述第一存储空间中的存储地址和存储状态参数中提取目标存储地址所对应的目标存储状态参数。Optionally, in this embodiment, a target interface is deployed on the third storage space, and the monitoring process can, but is not limited to, extract the target storage state parameters corresponding to the target storage address from the storage addresses and storage state parameters in the first storage space having a corresponding relationship through the target interface.
在一个示范性实施例中,可以但不限于通过以下方式通过所述监控进程检测所述目标存储状态参数和存储状态参数阈值之间的所述目标关系:通过所述监控进程从所述第三存储空间中提取所述目标存储地址所对应的目标总次数,其中,所述目标总次数是所述目标存储地址上存储的数据已被执行参考数据调整操作的总次数,所述目标存储状态参数包括所述目标总次数;通过所述监控进程检测所述目标总次数减去次数阈值得到的第一差值,并通过所述监控进程检测所述第一差值与第一差值阈值之间的第一大小关系,其中,所述目标总次数高于所述次数阈值,所述存储状态参数阈值包括所述次数阈值,所述目标关系包括所述第一大小关系。In an exemplary embodiment, the target relationship between the target storage status parameter and the storage status parameter threshold can be detected by the monitoring process in the following manner but is not limited to: extracting the target total number of times corresponding to the target storage address from the third storage space by the monitoring process, wherein the target total number of times is the total number of times the reference data adjustment operation has been performed on the data stored at the target storage address, and the target storage status parameter includes the target total number of times; detecting a first difference obtained by subtracting a number threshold from the target total number of times by the monitoring process, and detecting a first size relationship between the first difference and a first difference threshold by the monitoring process, wherein the target total number of times is higher than the number threshold, the storage status parameter threshold includes the number threshold, and the target relationship includes the first size relationship.
可选的,在本实施例中,在目标存储状态用于指示不允许对目标存储地址上存储的数据进行调整的情况下,可以表明目标总次数当前已经大于或者等于了次数阈值,在这样的情况下,次数阈值可能设置得不合理,例如,次数阈值可能设置得过小,导致在目标存储地址实际可用的情况下,而无法对目标存储地址上的数据进行调整,在这样的情况下,可以但不限于检测目标总次数减去次数阈值得到的第一差值与第一差值阈值之间的第一大小关系。Optionally, in this embodiment, when the target storage status is used to indicate that adjustments to the data stored at the target storage address are not allowed, it may indicate that the target total number of times is currently greater than or equal to a number threshold. In such a case, the number threshold may be set unreasonably. For example, the number threshold may be set too small, resulting in the inability to adjust the data at the target storage address when the target storage address is actually available. In such a case, it is possible but not limited to detecting a first size relationship between a first difference value obtained by subtracting the number threshold from the target total number of times and the first difference threshold.
通过这样的方式,避免了在次数阈值设置的不合理的情况下,所导致的实际是允许对存储地址上存储的数据进行调整、却无法对存储地址上存储的数据进行调整的情况下的发生,提升了存储地址的利用率。In this way, the situation in which the data stored at the storage address is allowed to be adjusted but cannot be adjusted due to unreasonable setting of the number threshold is avoided, thereby improving the utilization rate of the storage address.
在一个示范性实施例中,所述基板管理控制器中部署有监控进程和目标驱动,可以但不限于通过以下方式根据所述目标关系,对所述目标存储地址上存储的目标数据执行所述数据调整操作:在第一大小关系用于指示第一差值小于第一差值阈值的情况下,通过所述目标驱动对所述目标存储地址上存储的目标数据执行所述数据调整操作;在第一大小关系用于指示第一差值大于或者等于第一差值阈值的情况下,通过所述目标驱动拒绝对所述目标存储地址上存储的目标数据执行所述数据调整操作;或者,通过所述监控进程检测次数上限值减去目标总次数得到的第二差值,通过所述监控进程检测所述第二差值与第二差值阈值之间的第二大小关系,其中,所述次数上限值大于所述目标总次数,所述目标总次数大于次数阈值,所述目标关系包括所述第二大小关系,所述存储状态参数阈值包括所述次数上限值,通过所述目标驱动根据所述第二大小关系对所述目标存储地址上存储的目标数据执行所述数据调整操作;其中,所述通过所述目标驱动根据所述第二大小关系对所述目标存储地址上存储的目标数据执行所述数据调整操作,包括:在所述第二大小关系用于指示所述第二差值大于或者等于所述第二差值阈值的情况下,通过所述目标驱动对所述目标存储地址上存储的目标数据执行所述数据调整操作;在所述第二大小关系用于指示所述第二差值小于所述第二差值阈值的情况下,通过所述目标驱动拒绝对所述目标存储地址上存储的目标数据执行所述数据调整操作。In an exemplary embodiment, a monitoring process and a target driver are deployed in the baseboard management controller, and the data adjustment operation can be performed on the target data stored at the target storage address according to the target relationship in the following manner, but not limited to: when the first size relationship is used to indicate that the first difference is less than the first difference threshold, the data adjustment operation is performed on the target data stored at the target storage address by the target driver; when the first size relationship is used to indicate that the first difference is greater than or equal to the first difference threshold, the target driver refuses to perform the data adjustment operation on the target data stored at the target storage address; or, a second difference is obtained by subtracting the target total number of times from the upper limit value of the number of times detected by the monitoring process, and a second size relationship between the second difference and the second difference threshold is detected by the monitoring process, wherein the upper limit value of the number of times is greater than the target total number of times. times, the target total times is greater than the times threshold, the target relationship includes the second size relationship, the storage state parameter threshold includes the times upper limit value, and the target driver performs the data adjustment operation on the target data stored at the target storage address according to the second size relationship; wherein, the target driver performs the data adjustment operation on the target data stored at the target storage address according to the second size relationship, including: when the second size relationship is used to indicate that the second difference is greater than or equal to the second difference threshold, the target driver performs the data adjustment operation on the target data stored at the target storage address; when the second size relationship is used to indicate that the second difference is less than the second difference threshold, the target driver refuses to perform the data adjustment operation on the target data stored at the target storage address.
可选的,在本实施例中,次数上限值可以但不限于包括允许对存储地址执行参考数据调整操作的次数的最大值,还可以但不限于通过以下方式对目标存储地址上存储的目标数据执行数据调整操作:在第一大小关系用于指示第一差值小于第一差值阈值的情况下,通过监控进程检测目标总次数与次数上限值之间的第三差值,通过监控进程检测第三差值与第三差值阈值之间的第三大小关系,在第三差值大于或者等于第三阈值的情况下,通过监控进程对目标存储地址上存储的目标数据执行数据调整操作,其中,目标关系包括第三大小关系。Optionally, in this embodiment, the number upper limit value may include but is not limited to the maximum number of times a reference data adjustment operation is allowed to be performed on the storage address, and may also include but is not limited to performing a data adjustment operation on the target data stored at the target storage address in the following manner: when the first size relationship is used to indicate that the first difference is less than the first difference threshold, detecting a third difference between the target total number of times and the number upper limit value through a monitoring process, detecting a third size relationship between the third difference and the third difference threshold through a monitoring process, and when the third difference is greater than or equal to the third threshold, performing a data adjustment operation on the target data stored at the target storage address through the monitoring process, wherein the target relationship includes the third size relationship.
通过本申请实施例,在存储地址所对应的存储状态用于指示不允许对该存储地址上的数据进行调整的情况下,根据该存储地址所对应的实时的存储状态参数与存储状态参数阈值之间的关系,确定该存储地址当前是否可用,提升了确定的存储地址是否可用的准确度。Through the embodiments of the present application, when the storage status corresponding to the storage address is used to indicate that adjustment of the data at the storage address is not allowed, whether the storage address is currently available is determined based on the relationship between the real-time storage status parameter corresponding to the storage address and the storage status parameter threshold, thereby improving the accuracy of determining whether the storage address is available.
在一个示范性实施例中,可以但不限于通过以下方式通过所述目标驱动对所述目标存储地址上存储的目标数据执行所述数据调整操作:通过所述目标驱动提取所述目标调整请求中携带的起始存储地址和目标长度,其中,所述目标存储地址包括所述起始存储地址和所述目标长度;通过所述目标驱动在所述第一存储空间中从所述起始存储地址开始对所述目标长度上存储的数据执行所述数据调整操作。In an exemplary embodiment, the data adjustment operation can be performed on the target data stored at the target storage address by the target driver in the following manner, but is not limited to: extracting the starting storage address and the target length carried in the target adjustment request by the target driver, wherein the target storage address includes the starting storage address and the target length; and performing the data adjustment operation on the data stored at the target length starting from the starting storage address in the first storage space by the target driver.
可选的,在本实施例中,在服务器中部署有第一存储空间和备份存储空间的情况下,可以但不限于根据目标存储地址筛选所需要进行操作的存储空间,图5是根据本申请实施例的一种可选的筛选所需要进行操作的存储空间的示意图,如图5所示,上层应用下发擦写flash命令(相当于目标调整请求),在擦写flash命令中携带了擦写的起始地址(相当于起始存储地址)和长度(相当于目标长度)。目标驱动(例如,spi驱动)接收到应用层下发的命令,选择要进行操作的flash(相当于存储空间),并根据接收到的起始地址和长度执行擦写命令,并生成flsah block擦写记录。Optionally, in this embodiment, when the first storage space and the backup storage space are deployed in the server, the storage space required for operation can be screened according to the target storage address, but not limited to. FIG5 is a schematic diagram of an optional screening of the storage space required for operation according to an embodiment of the present application. As shown in FIG5, the upper layer application sends a flash erase command (equivalent to a target adjustment request), and the flash erase command carries the erase start address (equivalent to the start storage address) and length (equivalent to the target length). The target driver (for example, the spi driver) receives the command sent by the application layer, selects the flash to be operated (equivalent to the storage space), executes the erase command according to the received start address and length, and generates a flsah block erase record.
可选的,在本实施例中,数据调整操作可以但不限于包括读操作、写操作和擦除操作中的至少一个,作为一种可选的示例,在数据调整操作包括擦写操作的情况下,可以但不限于通过目标驱动从起始存储地址开始先对目标长度上的存储的数据执行擦除操作,在完成将目标长度上的存储的数据擦除的情况下,从起始存储地址开始写入待写入的数据,其中,目标调整请求中携带了待写入的数据。Optionally, in this embodiment, the data adjustment operation may include but is not limited to at least one of a read operation, a write operation and an erase operation. As an optional example, when the data adjustment operation includes an erase operation, it may include but is not limited to performing an erase operation on the data stored on the target length starting from the starting storage address through the target driver. After the data stored on the target length is erased, the data to be written is written starting from the starting storage address, wherein the target adjustment request carries the data to be written.
图6是根据本申请实施例的一种可选的对存储地址上的数据执行数据调整操作的示意图,如图6所示,在执行flash擦写操作(相当于数据调整操作)时,会按照块进行操作,根据收到的命令(例如,数据调整操作),从擦写起始地址(相当于起始存储地址)开始,按照块大小进行擦除,块大小一般为32KB或64KB等。Figure 6 is a schematic diagram of an optional data adjustment operation on data at a storage address according to an embodiment of the present application. As shown in Figure 6, when performing a flash erase operation (equivalent to a data adjustment operation), the operation will be performed in blocks. According to the received command (for example, a data adjustment operation), starting from the erase start address (equivalent to the start storage address), erasing is performed according to the block size, and the block size is generally 32KB or 64KB, etc.
可选的,在本实施例中,在通过所述目标驱动在所述第一存储空间中从所述起始存储地址开始对所述目标长度上存储的数据执行所述数据调整操作之后,上述方法还包括:通过目标驱动将所述第三存储空间中存储的所述目标存储地址上所对应的目标总次数加一。Optionally, in this embodiment, after performing the data adjustment operation on the data stored in the target length starting from the starting storage address in the first storage space through the target driver, the above method also includes: increasing the total target number corresponding to the target storage address stored in the third storage space by one through the target driver.
为了更好地理解本申请实施例中数据的调整过程,下面结合可选的实施例,对本申请实施例中的数据的调整过程进行解释和说明,可以但不限于适用于本申请实施例。In order to better understand the data adjustment process in the embodiment of the present application, the data adjustment process in the embodiment of the present application is explained and illustrated in combination with optional embodiments below, which can be applicable to but not limited to the embodiment of the present application.
图7是根据本申请实施例的一种可选的数据的调整方法的示意图,如图7所示,可以但不限于包括以下步骤:FIG. 7 is a schematic diagram of an optional data adjustment method according to an embodiment of the present application. As shown in FIG. 7 , the method may include but is not limited to the following steps:
1.BMC系统启动阶段,会加目标驱动(例如,spi驱动),并启动flash监控预警进程(相当于监控进程)。1. During the BMC system startup phase, the target driver (for example, the spi driver) will be added, and the flash monitoring and warning process (equivalent to the monitoring process) will be started.
2.BMC上层应用下发对flash0(相当于第一存储空间)或者flash1(相当于备份存储空间)的擦写命令(相当于目标调整请求),包含擦写起始地址(相当于起始存储地址)、长度(相当于目标长度)。2. The BMC upper layer application sends an erase command (equivalent to a target adjustment request) to flash0 (equivalent to the first storage space) or flash1 (equivalent to the backup storage space), including the erase start address (equivalent to the start storage address) and length (equivalent to the target length).
3.目标驱动(例如,spi驱动)收到命令(相当于目标调整请求)后,选择需要操作的flash。3. After receiving the command (equivalent to the target adjustment request), the target driver (for example, the SPI driver) selects the flash to be operated.
4.目标驱动(例如,spi驱动)选择flash后,根据收到的擦写起始地址和长度,执行对flash块的擦写命令。4. After the target driver (for example, the SPI driver) selects the flash, it executes the erase command for the flash block according to the received erase start address and length.
5.目标驱动(例如,spi驱动)执行擦写命令成功后,将对应块的擦写次数(相当于被执行参考数据调整操作的总次数)进行加1。5. After the target driver (eg, spi driver) successfully executes the erase command, the erase count of the corresponding block (equivalent to the total number of reference data adjustment operations executed) is increased by 1.
6.flash监控预警进程启动后,首先从第三存储空间(例如,EEPROM)中读取之前存储的flash各块的擦写次数,并记录。6. After the flash monitoring and early warning process is started, the erase and write times of each flash block previously stored are first read from the third storage space (eg, EEPROM) and recorded.
7.flash监控预警进程初始化完成后,通过目标接口(例如spi驱动接口,)获取新的块擦写次数记录。7. After the flash monitoring and warning process is initialized, a new block erase count record is obtained through the target interface (such as the spi driver interface).
8.flash监控进程获取到块有新的擦写次数更新后,首先判断当前擦写的块的位置,是否属于程序区、只读分区等越界操作情况。8. After the flash monitoring process obtains the new erase count update of the block, it first determines the location of the currently erased block to see whether it belongs to the program area, read-only partition, or other out-of-bounds operations.
9.如果flash监控进程判断出是越界操作行为,生成严重告警日志。9. If the flash monitoring process determines that the operation is out of bounds, a serious alarm log is generated.
10.判断完越界操作行为后,flash监控进程判断出不是越界操作行为,将获取的块的擦写次数与之前记录的数据进行累加,然后与设定告警阈值进行比较。10. After determining the out-of-bounds operation behavior, the flash monitoring process determines that it is not an out-of-bounds operation behavior, accumulates the number of erase and write times of the acquired block with the previously recorded data, and then compares it with the set alarm threshold.
11.当达到或者超过告警阈值(相当于存储状态参数阈值)后,生成告警日志。11. When the alarm threshold (equivalent to the storage status parameter threshold) is reached or exceeded, an alarm log is generated.
12.将累加后的块擦写次数存储到第三存储空间(例如,EEPROM)中。12. Store the accumulated block erasure times in a third storage space (eg, EEPROM).
13.flash监控进程继续对第一存储空间(例如,flash0)和备份存储空间(例如,flash1)进行监控。13. The flash monitoring process continues to monitor the first storage space (eg, flash0) and the backup storage space (eg, flash1).
通过本申请实施例,对运行过程中BMC的重要存储介质进行监控和提前预警,为防止BMC运行异常,本发明提出一种对flash的使用情况的全方位监控措施,防止因越界操作、以及长时间的擦写导致存储介质异常,进而影响BMC的稳定性,提升了BMC系统运行的稳定性。Through the embodiments of the present application, important storage media of the BMC are monitored and early warning is provided during operation. To prevent abnormal operation of the BMC, the present invention proposes a comprehensive monitoring measure for the use of the flash, so as to prevent storage medium abnormalities caused by out-of-bounds operations and long-term erasing and writing, thereby affecting the stability of the BMC and improving the stability of the BMC system operation.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
在本实施例中还提供了一种数据的调整装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a data adjustment device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and/or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
图8是根据本申请实施例的数据的调整装置的结构框图,如图8所示,服务器中部署有基板管理控制器、第一存储空间和第二存储空间,所述第一存储空间用于存储所述基板管理控制器监控到的所述服务器中的部件的运行信息,所述第二存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态,所述存储状态用于指示是否允许对所述第一存储空间中对应的存储地址上存储的数据进行调整,所述装置应用于所述基板管理控制器,该装置包括:FIG8 is a structural block diagram of a data adjustment device according to an embodiment of the present application. As shown in FIG8, a baseboard management controller, a first storage space, and a second storage space are deployed in the server. The first storage space is used to store the operation information of the components in the server monitored by the baseboard management controller. The second storage space is used to store the storage address and storage status in the first storage space with a corresponding relationship. The storage status is used to indicate whether it is allowed to adjust the data stored at the corresponding storage address in the first storage space. The device is applied to the baseboard management controller, and the device includes:
检测模块802,用于在接收到目标调整请求的情况下,检测目标存储地址是否落入所述第一存储空间所对应的存储地址范围,其中,所述目标调整请求用于请求对所述目标存储地址上存储的数据执行数据调整操作;a detection module 802, configured to detect whether a target storage address falls within a storage address range corresponding to the first storage space when a target adjustment request is received, wherein the target adjustment request is used to request to perform a data adjustment operation on the data stored at the target storage address;
提取模块804,用于在检测到所述目标存储地址落入所述存储地址范围的情况下,从所述第二存储空间中提取所述目标存储地址所对应的目标存储状态;An extraction module 804 is configured to extract a target storage state corresponding to the target storage address from the second storage space when it is detected that the target storage address falls within the storage address range;
执行模块806,用于在所述目标存储状态用于指示不允许对所述目标存储地址上存储的数据进行调整的情况下,根据目标存储状态参数对所述目标存储地址上存储的目标数据执行所述数据调整操作,其中,所述目标存储状态参数是用于确定所述目标存储状态的参数。An execution module 806 is used to perform the data adjustment operation on the target data stored at the target storage address according to a target storage state parameter when the target storage state indicates that adjustment of the data stored at the target storage address is not allowed, wherein the target storage state parameter is a parameter used to determine the target storage state.
通过上述装置,服务器中预先存储了具有对应关系的存储空间中的地址和存储状态,在希望对存储地址上的数据进行调整的情况下,可以但不限于检测该存储地址是否落入允许进行调整的存储地址范围,通过这样的方式,避免了对其他不允许进行调整的存储地址上的数据进行调整,保证了数据的安全性,如果该存储地址所对应的存储状态用于指示不允许对该存储地址上的数据进行调整,在这样的情况下,可以但不限于根据用于确定该存储地址的存储状态的存储状态参数,继续对该存储地址上的数据执行所希望的数据调整操作,通过这样的方式,提升了对存储地址上存储的数据进行调整的效率,因此,可以解决数据的调整效率较低的问题,达到提升数据的调整效率的效果。Through the above-mentioned device, the server pre-stores the addresses and storage states in the storage space with corresponding relationships. When it is desired to adjust the data at the storage address, it is possible but not limited to detecting whether the storage address falls within the storage address range that allows adjustment. In this way, it is avoided to adjust the data at other storage addresses that are not allowed to be adjusted, thereby ensuring the security of the data. If the storage state corresponding to the storage address is used to indicate that adjustment of the data at the storage address is not allowed, in this case, it is possible but not limited to continue to perform the desired data adjustment operation on the data at the storage address based on the storage state parameters used to determine the storage state of the storage address. In this way, the efficiency of adjusting the data stored at the storage address is improved. Therefore, the problem of low data adjustment efficiency can be solved, thereby achieving the effect of improving data adjustment efficiency.
在一个示范性实施例中,所述执行模块,包括:In an exemplary embodiment, the execution module includes:
检测单元,用于检测所述目标存储状态参数与存储状态参数阈值之间的目标关系;a detection unit, configured to detect a target relationship between the target storage state parameter and a storage state parameter threshold;
执行单元,用于根据所述目标关系,对所述目标存储地址上存储的目标数据执行所述数据调整操作。An execution unit is used to perform the data adjustment operation on the target data stored at the target storage address according to the target relationship.
在一个示范性实施例中,所述基板管理控制器中部署有监控进程,所述服务器中部署有第三存储空间,所述第三存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态参数,所述检测单元,用于:In an exemplary embodiment, a monitoring process is deployed in the baseboard management controller, a third storage space is deployed in the server, and the third storage space is used to store storage addresses and storage state parameters in the first storage space having a corresponding relationship, and the detection unit is used to:
通过所述监控进程从所述第三存储空间中提取所述目标存储地址所对应的所述目标存储状态参数;Extracting the target storage state parameter corresponding to the target storage address from the third storage space through the monitoring process;
通过所述监控进程检测所述目标存储状态参数和存储状态参数阈值之间的所述目标关系。The target relationship between the target storage state parameter and a storage state parameter threshold is detected by the monitoring process.
在一个示范性实施例中,所述检测单元,还用于:In an exemplary embodiment, the detection unit is further used for:
通过所述监控进程从所述第三存储空间中提取所述目标存储地址所对应的目标总次数,其中,所述目标总次数是所述目标存储地址上存储的数据已被执行参考数据调整操作的总次数,所述目标存储状态参数包括所述目标总次数;extracting, from the third storage space through the monitoring process, a target total number of times corresponding to the target storage address, wherein the target total number of times is a total number of times a reference data adjustment operation has been performed on the data stored at the target storage address, and the target storage state parameter includes the target total number of times;
通过所述监控进程检测所述目标总次数减去次数阈值得到的第一差值,并通过所述监控进程检测所述第一差值与第一差值阈值之间的第一大小关系,其中,所述目标总次数高于所述次数阈值,所述存储状态参数阈值包括所述次数阈值,所述目标关系包括所述第一大小关系。The monitoring process detects a first difference value obtained by subtracting a number threshold from the target total number of times, and the monitoring process detects a first size relationship between the first difference value and the first difference threshold, wherein the target total number of times is higher than the number threshold, the storage state parameter threshold includes the number threshold, and the target relationship includes the first size relationship.
在一个示范性实施例中,所述基板管理控制器中还部署有目标驱动,所述执行单元,用于:In an exemplary embodiment, a target driver is further deployed in the baseboard management controller, and the execution unit is used to:
在第一大小关系用于指示第一差值小于第一差值阈值的情况下,通过所述目标驱动对所述目标存储地址上存储的目标数据执行所述数据调整操作;In a case where the first size relationship is used to indicate that the first difference is less than a first difference threshold, performing the data adjustment operation on the target data stored at the target storage address through the target driver;
在第一大小关系用于指示第一差值大于或者等于第一差值阈值的情况下,通过所述目标驱动拒绝对所述目标存储地址上存储的目标数据执行所述数据调整操作;或者,通过所述监控进程检测次数上限值减去目标总次数得到的第二差值,通过所述监控进程检测所述第二差值与第二差值阈值之间的第二大小关系,其中,所述次数上限值大于所述目标总次数,所述目标总次数大于次数阈值,所述目标关系包括所述第二大小关系,所述存储状态参数阈值包括所述次数上限值,通过所述目标驱动根据所述第二大小关系对所述目标存储地址上存储的目标数据执行所述数据调整操作;In the case where the first size relationship is used to indicate that the first difference is greater than or equal to the first difference threshold, the target driver refuses to perform the data adjustment operation on the target data stored at the target storage address; or, the monitoring process detects a second difference obtained by subtracting the target total number of times from the upper limit of the number of times, and the monitoring process detects a second size relationship between the second difference and the second difference threshold, wherein the upper limit of the number of times is greater than the target total number of times, the target total number of times is greater than the number threshold, the target relationship includes the second size relationship, the storage state parameter threshold includes the upper limit of the number of times, and the target driver performs the data adjustment operation on the target data stored at the target storage address according to the second size relationship;
其中,所述通过所述目标驱动根据所述第二大小关系对所述目标存储地址上存储的目标数据执行所述数据调整操作,包括:在所述第二大小关系用于指示所述第二差值大于或者等于所述第二差值阈值的情况下,通过所述目标驱动对所述目标存储地址上存储的目标数据执行所述数据调整操作;在所述第二大小关系用于指示所述第二差值小于所述第二差值阈值的情况下,通过所述目标驱动拒绝对所述目标存储地址上存储的目标数据执行所述数据调整操作。Among them, performing the data adjustment operation on the target data stored at the target storage address according to the second size relationship by the target driver includes: when the second size relationship is used to indicate that the second difference is greater than or equal to the second difference threshold, performing the data adjustment operation on the target data stored at the target storage address by the target driver; when the second size relationship is used to indicate that the second difference is less than the second difference threshold, refusing to perform the data adjustment operation on the target data stored at the target storage address by the target driver.
在一个示范性实施例中,所述执行单元,还用于:In an exemplary embodiment, the execution unit is further configured to:
通过所述目标驱动提取所述目标调整请求中携带的起始存储地址和目标长度,其中,所述目标存储地址包括所述起始存储地址和所述目标长度;Extracting the starting storage address and the target length carried in the target adjustment request through the target driver, wherein the target storage address includes the starting storage address and the target length;
通过所述目标驱动在所述第一存储空间中从所述起始存储地址开始对所述目标长度上存储的数据执行所述数据调整操作。The data adjustment operation is performed on the data stored in the target length in the first storage space starting from the start storage address by the target driver.
在一个示范性实施例中,所述基板管理控制器中部署有监控进程,所述服务器中部署有第三存储空间,所述第三存储空间用于存储具有对应关系的所述第一存储空间中的存储地址和存储状态参数,在所述检测目标存储地址是否落入所述第一存储空间所对应的存储地址范围之前,所述装置还包括:In an exemplary embodiment, a monitoring process is deployed in the baseboard management controller, a third storage space is deployed in the server, and the third storage space is used to store storage addresses and storage state parameters in the first storage space having a corresponding relationship. Before detecting whether the target storage address falls within the storage address range corresponding to the first storage space, the device further includes:
处理模块,用于通过所述监控进程从所述第一存储空间中提取所述目标存储地址所对应的所述目标存储状态参数,并通过所述监控进程比对所述目标存储状态参数和存储状态参数阈值,得到比对结果;a processing module, configured to extract the target storage state parameter corresponding to the target storage address from the first storage space through the monitoring process, and compare the target storage state parameter with a storage state parameter threshold through the monitoring process to obtain a comparison result;
确定模块,用于在所述比对结果用于指示所述目标存储状态参数小于存储状态参数阈值的情况下,通过所述监控进程将所述目标存储地址所对应的所述目标存储状态确定为允许对所述目标存储地址上存储的数据进行调整;在所述比对结果用于指示所述目标存储状态参数大于或者等于存储状态参数阈值的情况下,通过所述监控进程将所述目标存储地址所对应的所述目标存储状态确定为不允许对所述目标存储地址上存储的数据进行调整。A determination module, used for, when the comparison result indicates that the target storage state parameter is less than a storage state parameter threshold, determining, through the monitoring process, the target storage state corresponding to the target storage address as allowing adjustment of the data stored at the target storage address; and when the comparison result indicates that the target storage state parameter is greater than or equal to the storage state parameter threshold, determining, through the monitoring process, the target storage state corresponding to the target storage address as not allowing adjustment of the data stored at the target storage address.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
本申请的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
本申请的实施例还提供了一种电子设备,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
在一个示例性实施例中,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
本申请的实施例还提供了一种计算机程序产品,上述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
本申请的实施例还提供了另一种计算机程序产品,包括非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储计算机程序,所述计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
本申请的实施例还提供了一种计算机程序,该计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中;计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述任一项方法实施例中的步骤。An embodiment of the present application also provides a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410832487.3A CN118838739A (en) | 2024-06-25 | 2024-06-25 | Data adjustment method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410832487.3A CN118838739A (en) | 2024-06-25 | 2024-06-25 | Data adjustment method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118838739A true CN118838739A (en) | 2024-10-25 |
Family
ID=93141504
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410832487.3A Pending CN118838739A (en) | 2024-06-25 | 2024-06-25 | Data adjustment method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118838739A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119065616A (en) * | 2024-11-07 | 2024-12-03 | 山东云海国创云计算装备产业创新中心有限公司 | Data processing method and device in memory, storage medium and electronic device |
-
2024
- 2024-06-25 CN CN202410832487.3A patent/CN118838739A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119065616A (en) * | 2024-11-07 | 2024-12-03 | 山东云海国创云计算装备产业创新中心有限公司 | Data processing method and device in memory, storage medium and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20160283711A1 (en) | eMMC Monitoring Method and Apparatus | |
US10049010B2 (en) | Method, computer, and apparatus for migrating memory data | |
US8402204B2 (en) | Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage system using the same | |
US11507502B2 (en) | Data storage device performance prediction based on valid fragment count | |
US6473569B1 (en) | Camera and information processing apparatus | |
CN118838739A (en) | Data adjustment method and device, storage medium and electronic equipment | |
CN115658113A (en) | Server self-starting method and device, readable storage medium and electronic equipment | |
CN111796959A (en) | Host machine container self-healing method, device and system | |
CN116450244B (en) | Chip starting method, device, computer equipment and storage medium | |
CN109582332B (en) | System upgrading method and device for Internet camera | |
CN112397128A (en) | Control method and device for Flash memory | |
TWI808362B (en) | Computer system and method capable of self-monitoring and restoring an operation of operating system | |
WO2024244642A1 (en) | Method and apparatus for acquiring startup log, and method for transmitting startup log | |
CN115639971A (en) | Data writing method, data writing device, electronic device, storage medium, and program product | |
CN113190256B (en) | Upgrading method, device and equipment | |
US8775768B2 (en) | Information processing apparatus and method of controlling the same | |
CN115514031B (en) | Charging control method, device, computer equipment and storage medium | |
CN110795155B (en) | System starting method and device, electronic equipment and storage medium | |
US10423525B2 (en) | Automatic performance tuning for memory arrangements | |
CN116257384A (en) | Terminal starting method, electronic device and computer readable storage medium | |
US9710319B2 (en) | Information processing apparatus and information collection method | |
CN117215860B (en) | Storage device testing method, system, device, storage medium and electronic device | |
CN119442348A (en) | Method for preventing data leakage in data destruction process | |
JP6723400B1 (en) | Information processing apparatus and information processing method | |
CN116661818A (en) | Upgrading method and device of BMC software system 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 |