CN115509465A - Sector management method and device, electronic equipment and storage medium - Google Patents

Sector management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115509465A
CN115509465A CN202211454252.2A CN202211454252A CN115509465A CN 115509465 A CN115509465 A CN 115509465A CN 202211454252 A CN202211454252 A CN 202211454252A CN 115509465 A CN115509465 A CN 115509465A
Authority
CN
China
Prior art keywords
sector
sectors
processed
expired
renewal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211454252.2A
Other languages
Chinese (zh)
Other versions
CN115509465B (en
Inventor
李浩天
杨海波
郝增
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fangzhou Technology Co ltd
Original Assignee
Hangzhou Fangzhou 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 Hangzhou Fangzhou Technology Co ltd filed Critical Hangzhou Fangzhou Technology Co ltd
Priority to CN202211454252.2A priority Critical patent/CN115509465B/en
Publication of CN115509465A publication Critical patent/CN115509465A/en
Application granted granted Critical
Publication of CN115509465B publication Critical patent/CN115509465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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/0604Improving or facilitating administration, e.g. storage management
    • 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/0637Permissions

Abstract

The method comprises the steps of determining expired sectors and provisional sectors from target sectors, wherein the provisional sectors are unexpired sectors with a time length less than or equal to a first preset time length from an expiration date, then inquiring the qualification for each expired sector to obtain all qualified sectors, the qualified sectors are sectors with qualification for continuation, then obtaining the respective corresponding continuation periods of the to-be-processed sectors, and the to-be-processed sectors comprise the provisional sectors and the qualified sectors and are respectively subjected to continuation on the basis of the respective corresponding continuation periods of the to-be-processed sectors. The method and the device have the effect of facilitating management of continuation of the sector.

Description

Sector management method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of disk management and utilization, and in particular, to a sector management method and apparatus, an electronic device, and a storage medium.
Background
A sector refers to a divided area on a disk. Each magnetic track on the magnetic disk is equally divided into a plurality of arc segments, the arc segments are sectors of the magnetic disk, and the reading and writing of the hard disk take the sectors as basic units. The sectors are used to store data that is needed or generated at the time of operation.
However, if a user activates and uses a large number of sectors, the user may spend a great deal of time and effort in renewing the expired sectors at a later time.
Disclosure of Invention
In order to facilitate management of continuation of a sector, the present application provides, inter alia, a method, an apparatus, an electronic device, and a storage medium for sector management.
In a first aspect, the present application provides a sector management method, which adopts the following technical solutions:
a method of sector management, comprising:
determining an expired sector and a temporary sector from target sectors, wherein the temporary sector is an unexpired sector with the time length less than or equal to a first preset time length from an expiration date;
inquiring the renewal qualification of each expired sector to obtain all qualified sectors, wherein the qualified sectors are sectors with the renewal qualification;
obtaining a continuation period corresponding to each to-be-processed sector, wherein the to-be-processed sectors comprise temporary sectors and qualified sectors;
and respectively carrying out the continuation on each sector to be processed based on the continuation period respectively corresponding to each sector to be processed.
By adopting the technical scheme, the electronic equipment can determine an expired sector and an adjacent sector to be expired from the target sector, and further determine a qualified sector which can be renewed in the expired sector; and then acquiring a renewal period corresponding to each qualified sector and each provisional sector, and renewing each qualified sector and each provisional sector based on the corresponding renewal period, so that the expired sectors can be normally used, and meanwhile, the use time of the sectors to be expired can be prolonged.
In one possible implementation, the determining an expired sector and a provisional sector from among the target sectors includes:
calling a mapping table corresponding to the target sectors, wherein the mapping table comprises the expiration date of each target sector;
querying a mapping table to determine all expired sectors and unexpired sectors;
determining all pre-expired sectors based on the expiration date and the first preset time length of each unexpired sector;
judging whether the number of all the pre-provisional sectors is greater than a preset economic threshold value, wherein the economic threshold value is a positive integer;
if yes, determining all the pre-temporary sectors as temporary sectors;
if not, determining the number of the temporary sectors to be 0.
By adopting the technical scheme, after all the pre-temporary sectors are determined by the expiration date and the first preset time, in order to reduce the number of subsequent renewals, when the number of the pre-temporary sectors is greater than or equal to the economic threshold, all the pre-temporary sectors are determined as sectors needing to be renewed, and if the number of the pre-temporary sectors is less than the economic threshold, the number of the temporary sectors is determined to be 0, so that all the pre-temporary sectors need to wait for the renewal.
In one possible implementation, before querying for renewal qualification for each of the expired sectors, the method further comprises:
querying each of said expired sectors for expiration duration and renewability duration;
and determining the renewal qualification of each sector based on the expiration time length and the resumable time length of each expired sector, wherein the expiration time length of the sectors with the renewal qualification does not exceed the preset default time length, and the difference between the resumable time length and the expiration time length is not less than a preset second preset time length.
By adopting the technical scheme, before the qualification for renewal of the expired sectors is inquired, the expiration time of the expired sectors is determined according to the expiration time and the resumable time of the expired sectors, and the qualification for renewal of each expired sector is determined according to the comparison between the difference value of the expiration time and the default time and the second preset time.
In a possible implementation manner, the obtaining the continuation periods corresponding to the sectors to be processed respectively includes:
acquiring a preset first period as a continuation period corresponding to each to-be-processed sector; or
And acquiring the renewal period corresponding to each sector to be processed in the designated period input by the user.
By adopting the technical scheme, the renewal cycle of each to-be-processed sector is determined to be the same first cycle, so that the expired sectors can expire in the same date later, and the convenience of subsequent batch sector management is improved; and acquiring a designated period input by the user as a renewal period corresponding to each to-be-processed sector, so that the actual requirements of the user can be met.
In a possible implementation manner, if the first cycle and the specified cycle are not acquired, the method further includes:
acquiring the resumable duration corresponding to each to-be-processed sector as the resumable period corresponding to each to-be-processed sector; or
And acquiring a shortest period which is the duration period of each to-be-processed sector, wherein the shortest period is the shortest duration in the available duration periods respectively corresponding to each to-be-processed sector.
By adopting the technical scheme, the number of times of late-stage renewal can be reduced, so that the current to-be-processed sector can be stably used for a long time; each to-be-processed period is continued through the shortest period, so that the current to-be-processed sectors can expire on the same date, and the convenience of batch sector management is further improved.
In a possible implementation manner, the respectively performing continuation on the sectors to be processed based on the continuation cycles respectively corresponding to the sectors to be processed includes, for any sector to be processed:
acquiring a version type corresponding to any sector to be processed;
acquiring a corresponding renewal instruction based on the version type corresponding to any sector to be processed;
and carrying out reservation on any sector to be processed based on the reservation instruction and the reservation period corresponding to the sector to be processed.
By adopting the technical scheme, the corresponding renewal instruction is determined according to the version of the sector, so that the renewal step is smooth, the probability of errors is reduced, and the renewal efficiency is improved.
In one possible implementation manner, the approving any sector to be processed based on the renewal instruction and the renewal cycle corresponding to the sector to be processed includes:
carrying out real-time renewal on any expired sector based on a renewal command and a renewal period corresponding to the expired sector;
and before a reservation date, carrying out reservation on any temporary sector based on a reservation instruction and a reservation period corresponding to any temporary sector, wherein the reservation date is the earliest expiration date corresponding to all temporary sectors.
By adopting the technical scheme, the renewal is carried out when all current temporary sectors are to become the expired sectors, and new adjacent sectors can be generated between the current time and the appointment date, so that the newly generated temporary dates can be renewed together on the renewal date, and meanwhile, more sectors can be renewed to expire on the same date, thereby improving the convenience of the management of the sectors in batches.
In a second aspect, the present application provides a sector management apparatus, which adopts the following technical solutions:
a sector management apparatus, comprising:
the system comprises a determining module, a determining module and a judging module, wherein the determining module is used for determining an expired sector and a provisional sector from target sectors, and the provisional sector is an unexpired sector with the expiration date less than or equal to a first preset time length;
the first inquiry module is used for inquiring the renewal qualification of each expired sector to obtain all qualified sectors, and the qualified sectors are sectors with the renewal qualification;
a renewal cycle acquiring module, configured to acquire a renewal cycle corresponding to each to-be-processed sector, where the to-be-processed sectors include a temporary sector and a qualified sector;
and the appointment continuation module is used for respectively carrying out appointment continuation on each sector to be processed based on the appointment continuation period respectively corresponding to each sector to be processed.
By adopting the technical scheme, the device can determine an expired sector and an adjacent sector to be expired from the target sector, and further determine a qualified sector which can be renewed in the expired sector; and then acquiring a renewal period corresponding to each qualified sector and each temporary sector, and renewing each qualified sector and each temporary sector based on the corresponding renewal period, so that the expired sectors can be normally used, and meanwhile, the use time of the sectors to be expired can be prolonged.
In a possible implementation manner, when the determining module determines the expired sector and the provisional sector from the target sectors, the determining module is specifically configured to:
calling a mapping table corresponding to the target sectors, wherein the mapping table comprises the expiration date of each target sector;
querying a mapping table to determine all expired sectors and unexpired sectors;
determining all pre-dated sectors based on the expiration date and a first preset time duration of each non-expired sector;
judging whether the number of all the pre-temporary sectors is greater than a preset economic threshold value, wherein the economic threshold value is a positive integer;
if yes, determining all the pre-temporary sectors as temporary sectors;
and if not, determining that the number of the temporary sectors is 0.
In one possible implementation, the apparatus further includes:
a second query module, configured to query an expiration duration and a resumable duration of each of the expired sectors;
and the renewal qualification determining module is used for determining the renewal qualification of each sector based on the expiration time length and the resumable time length of each expired sector, wherein the expiration time length of the renewal qualified sector does not exceed the preset default time length, and the difference between the resumable time length and the expiration time length is not less than the preset second preset time length.
In a possible implementation manner, when the continuation period acquiring module acquires the continuation periods corresponding to the sectors to be processed, the continuation period acquiring module is specifically configured to:
acquiring a preset first period as a continuation period corresponding to each to-be-processed sector; or
And acquiring a renewal period corresponding to each sector to be processed in the designated period input by the user.
In one possible implementation, the apparatus further includes:
the first obtaining module is used for obtaining the renewable duration corresponding to each to-be-processed sector as the renew period corresponding to each to-be-processed sector; or
And the second acquisition module is used for acquiring a shortest period which is the duration period of each to-be-processed sector, wherein the shortest period is the shortest duration in the duration periods which respectively correspond to each to-be-processed sector.
In a possible implementation manner, when the continuation module performs respective continuation on each to-be-processed sector based on the continuation cycle respectively corresponding to each to-be-processed sector, for any to-be-processed sector, the continuation module is specifically configured to:
acquiring a version type corresponding to any sector to be processed;
acquiring a corresponding continuation instruction based on the version type corresponding to any sector to be processed;
and carrying out reservation on any sector to be processed based on the reservation instruction and the reservation period corresponding to the sector to be processed.
In one possible implementation manner, when the renewal module renews any pending sector based on the renewal instruction and the renewal cycle corresponding to the pending sector, the renewal module is specifically configured to:
carrying out real-time renewal on any expired sector based on a renewal command and a renewal period corresponding to the expired sector;
and before a reservation date, carrying out reservation on any temporary sector based on a reservation instruction and a reservation period corresponding to any temporary sector, wherein the reservation date is the earliest expiration date corresponding to all temporary sectors.
In a third aspect, the present application provides an electronic device, which adopts the following technical solutions:
an electronic device, comprising:
at least one processor;
a memory;
at least one application, wherein the at least one application is stored in the memory and configured to be executed by the at least one processor, the at least one application configured to: the sector continuation method described above is performed.
In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions:
a computer-readable storage medium, comprising: a computer program is stored which can be loaded by a processor and which performs the above-described sector renewal method.
In summary, the present application includes at least one of the following beneficial technical effects:
1. the electronic equipment can determine expired sectors and adjacent sectors to be expired from the target sectors, and further determine qualified sectors which can be renewed in the expired sectors; then obtaining a renewal cycle corresponding to each qualified sector and the temporary sector, and renewing each qualified sector and the temporary sector based on the corresponding renewal cycle, so that the expired sectors can be normally used, and meanwhile, the use time of the sectors to be expired can be prolonged;
2. the renewal period of each to-be-processed sector is determined as the same first period, so that the expired sectors can expire in the same date later, and the convenience of subsequent batch sector management is improved; acquiring a designated period input by a user as a renewal period corresponding to each to-be-processed sector, so that the actual requirements of the user can be met;
3. the number of times of late renewals can be reduced, so that the current to-be-processed sector can be stably used for a long time; each to-be-processed period is continued through the shortest period, so that the current to-be-processed sectors can expire on the same date, and the convenience of batch sector management is further improved.
Drawings
FIG. 1 is a flow chart illustrating a sector management method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a sector management apparatus in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
The present application is described in further detail below with reference to figures 1-3.
A person skilled in the art, after reading the present specification, may make modifications to the present embodiments as necessary without inventive contribution, but only within the scope of the claims of the present application are protected by patent laws.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship, unless otherwise specified.
An embodiment of the present application provides a sector management method, which is executed by an electronic device, and referring to fig. 1, the method includes steps S101 to S104, where:
step S101, an expired sector and a provisional sector are determined from the target sectors, wherein the provisional sector is an unexpired sector with a time length less than or equal to a first preset time length from an expiration date.
The sectors have an activation period and a maximum usage duration when the encapsulation is activated. The last day of the activation period, i.e., the expiration date; sectors that exceed the expiration date are expired sectors where the use of data in the sector is limited or unusable.
In this embodiment, the target sector may be a sector within a specified range of the user, or may be all sectors under the account of the user. Therefore, each time of the renewal needs to pack data uplink, so a certain Gas cost is needed, when the expired sector is determined, the temporary sector is determined at the same time, so that the occurrence of the situation that a plurality of renewals are needed is reduced, and the consumption of the Gas cost can also be reduced. The first preset time period is a positive integer, but for a specific value, the embodiment of the present application is not particularly limited, as long as it is convenient to screen out the sectors to be expired for renewal, so as to reduce the number of renewals.
Step S102, inquiring the renewal qualification of each expired sector to obtain all qualified sectors, wherein the qualified sectors are sectors with the renewal qualification.
In the embodiment of the present application, it can be determined, through querying, which of the expired sectors are qualified sectors qualified for renewal and which are sectors not qualified for renewal, and the renewal is performed on the qualified sectors.
Step S103, obtaining a renewal cycle corresponding to each to-be-processed sector, wherein the to-be-processed sectors comprise temporary sectors and qualified sectors.
In the embodiment of the present application, for each to-be-processed sector, its continuation period may be the same period, or may be different periods corresponding to each other. The renewal period should be a positive integer and greater than a predetermined threshold to reduce low value sector renewal; because the renewal cycle is shorter, the number of renewal times is increased, and more Gas cost is generated. For example, the preset threshold may be 50 days; if a sector has a maximum usage duration of 540 days, has been used for 500 days, and is currently in an expired state, then a time duration is agreed upon, and the time duration is only 40 days at the maximum, so that the duration period of the sector may be changed to 0, i.e., the sector may not be agreed upon. The specific value of the preset threshold is not limited in the embodiments of the present application.
And step S104, respectively carrying out continuation on each sector to be processed based on the continuation period respectively corresponding to each sector to be processed.
In the embodiment of the application, the renewal is performed based on the renewal period corresponding to each to-be-processed sector, so as to prolong the use duration of the unexpired sectors, and simultaneously enable the expired sectors to be used.
The electronic equipment can determine expired sectors and adjacent sectors to be expired from the target sectors, and further determine qualified sectors which can be renewed in the expired sectors; and then acquiring a renewal period corresponding to each qualified sector and each temporary sector, and renewing each qualified sector and each temporary sector based on the corresponding renewal period, so that the expired sectors can be normally used, and meanwhile, the use time of the sectors to be expired can be prolonged.
Further, in order to reduce the number of successive rounds and thus save the Gas cost, step S101 may further include steps S1011 (not shown) -S1016 (not shown), wherein:
step S1011, calling a mapping table corresponding to the target sector, wherein the mapping table comprises the expiration date of each target sector;
step S1012, look up mapping table to determine all expired sectors and unexpired sectors.
Specifically, the mapping table at least includes an expiration date corresponding to each target sector, and in order to determine the identity of each sector, each sector should be set with a unique number, and in the mapping table, the expiration date should be associated with the number of the corresponding sector. All expired sectors and all unexpired sectors are obtained through query by the current time and the expiration date of each target sector. Further, in order to improve the accuracy of the query result, the mapping table may further store a first activation time corresponding to each sector, historical renewal period information, and a maximum available duration of each sector. The expiration status of each sector can be verified based on the first activation date of each sector, as well as the historical renewal period and current date of each sector.
Step S1013, all pre-dated sectors are determined based on the expiration date and the first preset time length of each non-expired sector.
Specifically, the time to be expired corresponding to each unexpired sector is determined based on the current time and the expiration date of each unexpired sector, and if the time to be expired is less than a first preset time length, the time is a pre-provisional sector; however, whether the pre-temporary sector can be determined as a temporary sector that needs to be renewed requires a further determination in step S104.
Step S1014, judging whether the number of all the pre-provisional sectors is larger than a preset economic threshold value, wherein the economic threshold value is a positive integer;
step S1015, if yes, all the pre-temporary sectors are determined to be temporary sectors;
step S1016, if not, determining that the number of the temporary sectors is 0.
Specifically, if the number of currently determined temporary sectors is small, because the temporary sectors are still in a usable state, it is not necessary to perform a previous renewal, and therefore, the number of temporary sectors is determined to be 0, and only the expired sectors need to be renewed; when a new temporary sector is generated later, the number of the temporary sectors is large, and the temporary sectors can be completely renewed at one time so as to reduce the number of times of renewal. The specific number of economic thresholds is not specifically limited in this application, so long as it is convenient to reduce the number of renewals.
Further, before step S102, the sector management method further includes step SA1 (not shown in the figure) and step SA2 (not shown in the figure), wherein:
step SA1, inquiring the expiration time and the resumable time of each expired sector.
Specifically, in step S1011, the mapping table is already obtained, the expiration date of each expired sector is determined from the mapping table, and the expired duration is determined by combining the current time; and determining the first activation packaging date of the expired sector and the maximum use duration corresponding to the expired sector from the mapping table, and further determining the sustainable duration of the expired sector.
Step SA12, determining a renewal qualification of each sector based on the expiration time length of each expired sector and the resumable time length, wherein the expiration time length of the sectors with the renewal qualification does not exceed the preset default time length, and the difference between the renewal time length and the expiration time length is not less than the preset second preset time length.
Specifically, a default duration for an expired sector, i.e., an expiration time that does not exceed the default duration, may be used again. For an expired sector, the expired sector is qualified for renewal by screening expired sectors having expired durations less than or equal to the buffer period and then determining that their duration of renewal is positive.
Further, in step S103, four ways including a way one, a way two, a way three, and a way four are obtained for the continuation cycle, wherein:
and in the first mode, the preset first period is obtained as the continuation period corresponding to each to-be-processed sector.
Specifically, the first period is a preset positive integer, that is, for each sector to be processed, the continuation period for which it will continue is the same. On the one hand, the method can meet the special requirements of users, and simultaneously can simplify the renewal step.
And secondly, acquiring a renewal period corresponding to each sector to be processed in the designated period input by the user.
Specifically, the user can set conditions to determine different formulation periods for different sectors to be processed, so that the actual requirements of the user can be further met. Meanwhile, the same renewal cycle is used, so that the current expired sectors can expire on the same date next time, the expiration of different sector intervals is reduced, and the unified management of the batch sectors is facilitated.
When the user inputs a designated period, the second execution mode is prioritized; if the user does not input the designated period under the condition that the mode three or the mode four is not triggered, the mode one is preferentially executed.
Further, if the first cycle in the first mode is not acquired and the specified cycle in the second mode is not acquired, the third mode or the fourth mode is executed.
And thirdly, acquiring the resumable time duration corresponding to each to-be-processed sector as the resumable period corresponding to each to-be-processed sector.
Specifically, after the mapping table has been obtained, the maximum usage duration corresponding to each to-be-processed sector can be obtained from the mapping table, and the maximum duration of continuation corresponding to each to-be-processed sector, that is, the duration of continuation, can be obtained by combining the current time and the first activation encapsulation date of each sector. And carrying out the continuation by the corresponding sustainable duration of each to-be-processed sector, so that the number of times of late-stage continuation can be reduced, and the current to-be-processed sector can be stably used for a longer time.
And fourthly, acquiring the shortest period as the duration period of each to-be-processed sector, wherein the shortest period is the shortest duration in the duration periods respectively corresponding to the to-be-processed sectors.
Specifically, the first method can only enable the sectors which are expired currently to expire at the same date in the later period; and by determining the shortest period of the sustainable duration in each sector to be processed and carrying out the sustainable duration on each sector to be processed through the shortest period, the sectors to be processed can expire on the same date, and the convenience of batch sector management is further improved.
Further, step S104 may include step SB1 (not shown in the figure) -step SB3 (not shown in the figure), in which:
step SB1, obtaining the version type corresponding to any sector to be processed;
step SB2, obtaining a corresponding renewal instruction based on the version type corresponding to any sector to be processed;
and step SB3, continuing the contract for any sector to be processed based on the contract order and the contract continuation period corresponding to the sector to be processed.
Specifically, different versions correspond to different sectors with different succession parameters and requirements. For example, for sector continuation of V1 version, the instruction setup-miner sectors extend is needed; the command setup-miner sectors renew is required for sector continuation of the V1-1 version. After the version of the sector is determined, the corresponding instruction is selected to continue the corresponding continuation period for the corresponding to-be-processed sector.
Further, when proceeding with the continuation of the sectors to be processed, the expired sectors and the temporary sectors may be separately continued, that is, step SB3 may include steps SB31 and SB32, in which:
step SB31, any expired sector is subject to real-time renewal based on the renewal command and the renewal period corresponding to the expired sector.
In particular, for expired sectors, real-time renewal enables the expired sectors to be returned to service sooner.
Step SB32, before the reservation date, a reservation is made to any temporary sector based on the renewal instruction and the renewal period corresponding to any temporary sector, and the reservation date is the earliest expiration date corresponding to all temporary sectors.
Specifically, when the provisional sector is subjected to the renewal, the immediate renewal may not be performed. The method comprises the steps of firstly determining the corresponding expiration date of each temporary sector needing to be renewed, then determining the earliest expiration date as the date when all temporary sectors needing to be renewed start to be renewed, namely, renewing when all temporary sectors are to become the expiration sectors, and possibly returning a new adjacent sector to be generated between the current time and the reservation date, so that the newly generated temporary dates can be renewed together on the renewal date, the number of times of renewal can be reduced, meanwhile, more sectors can be renewed to expire on the same date, and the convenience of batch sector management is improved.
The foregoing embodiments describe a sector management method from the perspective of method flow, and the following embodiments describe a sector management apparatus from the perspective of virtual modules or virtual units, for details, see the following embodiments.
As shown in fig. 2, the sector management apparatus 200 may specifically include a determining module 201, a first querying module 202, an offer cycle acquiring module 203, and an offer module 204, where:
a determining module 201, configured to determine an expired sector and a provisional sector from the target sectors, where the provisional sector is an unexpired sector with a time length less than or equal to a first preset time length from an expiration date;
a first query module 202, configured to query a renewal qualification of each expired sector to obtain all qualified sectors, where a qualified sector is a sector with a renewal qualification;
a renewal cycle acquiring module 203, configured to acquire a renewal cycle corresponding to each to-be-processed sector, where the to-be-processed sectors include a temporary sector and a qualified sector;
the continuation module 204 is configured to continue each of the sectors to be processed based on the continuation periods respectively corresponding to the sectors to be processed.
By adopting the technical scheme, the method has the advantages that,
in a possible implementation manner, when the determining module 201 determines the expired sector and the provisional sector from the target sectors, it is specifically configured to:
calling a mapping table corresponding to the target sectors, wherein the mapping table comprises the expiration date of each target sector;
querying a mapping table to determine all expired sectors and unexpired sectors;
determining all pre-expired sectors based on the expiration date and the first preset time length of each unexpired sector;
judging whether the number of all the pre-temporary sectors is greater than a preset economic threshold value, wherein the economic threshold value is a positive integer;
if yes, determining all the pre-temporary sectors as temporary sectors;
if not, determining the number of the temporary sectors to be 0.
In a possible implementation manner, the sector management apparatus 200 further includes:
the second query module is used for querying the expiration time and the sustainable time of each expired sector;
and the renewal qualification determining module is used for determining the renewal qualification of each sector based on the expiration time length and the resumable time length of each expired sector, wherein the expiration time length of the sectors with the renewal qualification does not exceed the preset default time length, and the difference between the resumable time length and the expiration time length is not less than the preset second preset time length.
In a possible implementation manner, when the continuation period acquiring module 203 acquires the continuation periods corresponding to the sectors to be processed, it is specifically configured to:
acquiring a preset first period as a continuation period corresponding to each to-be-processed sector; or
And acquiring the renewal period corresponding to each sector to be processed in the designated period input by the user.
In a possible implementation manner, the sector management apparatus 200 further includes:
the first obtaining module is used for obtaining the renewable duration corresponding to each to-be-processed sector as the renew period corresponding to each to-be-processed sector; or
And the second acquisition module is used for acquiring the shortest period which is the duration period of each to-be-processed sector, and the shortest period is the shortest duration in the available duration periods respectively corresponding to each to-be-processed sector.
In a possible implementation manner, when the continuation module 204 performs continuation on each to-be-processed sector based on the continuation cycle respectively corresponding to each to-be-processed sector, for any to-be-processed sector, specifically:
acquiring a version type corresponding to any sector to be processed;
acquiring a corresponding continuation instruction based on the version type corresponding to any sector to be processed;
and carrying out continuation on any sector to be processed based on the continuation instruction and the continuation period corresponding to the sector to be processed.
In one possible implementation manner, when the reservation module 204 performs a reservation on any pending sector based on a reservation instruction and a reservation period corresponding to the pending sector, the method is specifically configured to:
carrying out real-time renewal on any expired sector based on a renewal command and a renewal period corresponding to the expired sector;
and before the reservation date, carrying out the renewal on any temporary sector based on the renewal instruction and the renewal period corresponding to any temporary sector, wherein the reservation date is the earliest expiration date corresponding to all temporary sectors.
In an embodiment of the present application, an electronic device is provided, as shown in fig. 3, where the electronic device 300 shown in fig. 3 includes: a processor 301 and a memory 303. Wherein the processor 301 is coupled to the memory 303, such as via bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that the transceiver 304 is not limited to one in practical applications, and the structure of the electronic device 300 is not limited to the embodiment of the present application.
The Processor 301 may be a CPU (Central Processing Unit), a general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other Programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 301 may also be a combination of computing functions, e.g., comprising one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 302 may include a path that transfers information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 302 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
The Memory 303 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
The memory 303 is used for storing application program codes for executing the scheme of the application, and the processor 301 controls the execution. The processor 301 is configured to execute application program code stored in the memory 303 to implement the aspects illustrated in the foregoing method embodiments.
Wherein, the electronic device includes but is not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. But also a server, etc. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The present application provides a computer-readable storage medium, on which a computer program is stored, which, when running on a computer, enables the computer to execute the corresponding content in the foregoing method embodiments.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless otherwise indicated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (10)

1. A method for sector management, comprising:
determining an expired sector and a provisional sector from target sectors, wherein the provisional sector is an unexpired sector with an expiration date less than or equal to a first preset time length;
inquiring the continuation qualification of each expired sector to obtain all qualified sectors, wherein the qualified sectors are sectors with the continuation qualification;
acquiring a continuation period corresponding to each to-be-processed sector, wherein the to-be-processed sectors comprise a temporary sector and a qualified sector;
and respectively carrying out the continuation on each sector to be processed based on the continuation period respectively corresponding to each sector to be processed.
2. The method of claim 1, wherein the determining the expired sector and the temporary sector from the target sectors comprises:
calling a mapping table corresponding to the target sectors, wherein the mapping table comprises the expiration date of each target sector;
querying a mapping table to determine all expired sectors and unexpired sectors;
determining all pre-dated sectors based on the expiration date and a first preset time duration of each non-expired sector;
judging whether the number of all the pre-temporary sectors is greater than a preset economic threshold value, wherein the economic threshold value is a positive integer;
if yes, determining all the pre-temporary sectors as temporary sectors;
and if not, determining that the number of the temporary sectors is 0.
3. The sector management method according to claim 1, wherein before querying for renewal qualification for each of said expired sectors, further comprising:
querying an expiration time and a resumable time for each of the expired sectors;
and determining the renewal qualification of each sector based on the expiration time length and the resumable time length of each expired sector, wherein the expiration time length of the renewal qualification sector does not exceed the preset default time length, and the difference between the resumable time length and the expiration time length is not less than a preset second preset time length.
4. The method according to claim 1, wherein the obtaining the renewal cycle corresponding to each of the sectors to be processed comprises:
acquiring a preset first period as a continuation period corresponding to each to-be-processed sector; or
And acquiring a renewal period corresponding to each sector to be processed in the designated period input by the user.
5. The method according to claim 4, wherein if the first cycle and the specified cycle are not acquired, the method further comprises:
acquiring the resumable duration corresponding to each to-be-processed sector as the resumable period corresponding to each to-be-processed sector; or
And acquiring a shortest period which is the duration period of each to-be-processed sector, wherein the shortest period is the shortest duration in the available duration periods respectively corresponding to each to-be-processed sector.
6. The method according to any one of claims 1 to 5, wherein the respectively proceeding of the persistent scheduling for each of the sectors to be processed based on the persistent scheduling respectively corresponding to each of the sectors to be processed comprises, for any one of the sectors to be processed:
acquiring a version type corresponding to any sector to be processed;
acquiring a corresponding continuation instruction based on the version type corresponding to any sector to be processed;
and carrying out reservation on any sector to be processed based on the reservation instruction and the reservation period corresponding to the sector to be processed.
7. The method of claim 6, wherein the reserving any pending sector based on the renewal command and the renewal cycle corresponding to the pending sector comprises:
carrying out real-time renewal on any expired sector based on a renewal command and a renewal period corresponding to the expired sector;
and before a reservation date, carrying out reservation on any temporary sector based on a reservation instruction and a reservation period corresponding to any temporary sector, wherein the reservation date is the earliest expiration date corresponding to all temporary sectors.
8. A sector management apparatus, comprising:
the system comprises a determining module, a determining module and a judging module, wherein the determining module is used for determining an expired sector and a provisional sector from target sectors, and the provisional sector is an unexpired sector with the expiration date less than or equal to a first preset time length;
the first inquiry module is used for inquiring the renewal qualification of each expired sector to obtain all qualified sectors, and the qualified sectors are sectors with the renewal qualification;
a continuation period obtaining module, configured to obtain a continuation period corresponding to each to-be-processed sector, where the to-be-processed sectors include a temporary sector and a qualified sector;
and the appointment continuation module is used for respectively carrying out appointment continuation on each sector to be processed based on the appointment continuation period respectively corresponding to each sector to be processed.
9. An electronic device, comprising:
at least one processor;
a memory;
at least one application, wherein the at least one application is stored in the memory and configured to be executed by the at least one processor, the at least one application configured to: performing the sector management method of any of claims 1-7.
10. A computer-readable storage medium, comprising: a computer program which can be loaded by a processor and which performs the method according to any of claims 1-7.
CN202211454252.2A 2022-11-21 2022-11-21 Sector management method and device, electronic equipment and storage medium Active CN115509465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211454252.2A CN115509465B (en) 2022-11-21 2022-11-21 Sector management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211454252.2A CN115509465B (en) 2022-11-21 2022-11-21 Sector management method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115509465A true CN115509465A (en) 2022-12-23
CN115509465B CN115509465B (en) 2023-03-28

Family

ID=84513891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211454252.2A Active CN115509465B (en) 2022-11-21 2022-11-21 Sector management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115509465B (en)

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060158976A1 (en) * 2003-09-05 2006-07-20 Fujitsu Limited Magneto-optical disc device and method for writing data on magneto-optical disc
US20060215294A1 (en) * 2005-03-22 2006-09-28 Fujitsu Limited Magnetic disk apparatus, method for adjusting performance of magnetic disk apparatus, and method for accessing magnetic disk
US20120134207A1 (en) * 2010-11-25 2012-05-31 Samsung Electronics Co., Ltd. Non-Volatile Memory Device And Read Method Thereof
CN103842974A (en) * 2011-06-22 2014-06-04 星芯公司 Method of managing the endurance of non-volatile memories
US20140185157A1 (en) * 2013-01-03 2014-07-03 International Business Machines Corporation Utilization of disk buffer for background replication processes
CN104268040A (en) * 2014-09-16 2015-01-07 深圳市腾讯计算机系统有限公司 Method and device for detecting disk performance
CN108234483A (en) * 2017-12-29 2018-06-29 五八有限公司 User logs in renewed treaty method, apparatus, terminal and storage medium
US20180196598A1 (en) * 2017-01-10 2018-07-12 Winbond Electronics Corporation Memory control scheme for flash memory devices
CN111124294A (en) * 2019-12-11 2020-05-08 大唐微电子技术有限公司 Sector mapping information management method and device, storage medium and equipment
CN111400298A (en) * 2020-04-17 2020-07-10 Oppo广东移动通信有限公司 Data processing method and device and computer readable storage medium
WO2021068113A1 (en) * 2019-10-08 2021-04-15 深圳市欢太科技有限公司 Method and apparatus for compiling duration statistics, electronic device, and computer-readable medium
CN112817527A (en) * 2021-01-21 2021-05-18 深圳市显控科技股份有限公司 Power failure data storage method, single chip microcomputer and computer readable storage medium
CN112948287A (en) * 2021-03-29 2021-06-11 成都新易盛通信技术股份有限公司 SD card read-write method and system based on Hashmap caching mechanism
CN113468274A (en) * 2021-07-28 2021-10-01 浙江大华技术股份有限公司 Data storage method and device, storage medium and electronic equipment
CN113672415A (en) * 2021-07-09 2021-11-19 济南浪潮数据技术有限公司 Disk fault processing method, device, equipment and storage medium
CN113778977A (en) * 2020-10-29 2021-12-10 北京京东尚科信息技术有限公司 Data processing method and data processing device
CN114035741A (en) * 2021-09-27 2022-02-11 北京航天时代激光导航技术有限责任公司 Data storage method, device, equipment and medium for FLASH life optimization
CN114153392A (en) * 2021-11-29 2022-03-08 浙江大华技术股份有限公司 Object storage data storage management method, device and equipment
CN114968121A (en) * 2022-06-06 2022-08-30 北京万里红科技有限公司 Method and device for reading data in storage medium, electronic equipment and medium
CN115017236A (en) * 2022-07-04 2022-09-06 北京百度网讯科技有限公司 Data processing method, device and equipment based on block chain and storage medium

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060158976A1 (en) * 2003-09-05 2006-07-20 Fujitsu Limited Magneto-optical disc device and method for writing data on magneto-optical disc
US20060215294A1 (en) * 2005-03-22 2006-09-28 Fujitsu Limited Magnetic disk apparatus, method for adjusting performance of magnetic disk apparatus, and method for accessing magnetic disk
US20120134207A1 (en) * 2010-11-25 2012-05-31 Samsung Electronics Co., Ltd. Non-Volatile Memory Device And Read Method Thereof
CN103842974A (en) * 2011-06-22 2014-06-04 星芯公司 Method of managing the endurance of non-volatile memories
US20140185157A1 (en) * 2013-01-03 2014-07-03 International Business Machines Corporation Utilization of disk buffer for background replication processes
CN104268040A (en) * 2014-09-16 2015-01-07 深圳市腾讯计算机系统有限公司 Method and device for detecting disk performance
US20180196598A1 (en) * 2017-01-10 2018-07-12 Winbond Electronics Corporation Memory control scheme for flash memory devices
CN108234483A (en) * 2017-12-29 2018-06-29 五八有限公司 User logs in renewed treaty method, apparatus, terminal and storage medium
WO2021068113A1 (en) * 2019-10-08 2021-04-15 深圳市欢太科技有限公司 Method and apparatus for compiling duration statistics, electronic device, and computer-readable medium
CN111124294A (en) * 2019-12-11 2020-05-08 大唐微电子技术有限公司 Sector mapping information management method and device, storage medium and equipment
CN111400298A (en) * 2020-04-17 2020-07-10 Oppo广东移动通信有限公司 Data processing method and device and computer readable storage medium
CN113778977A (en) * 2020-10-29 2021-12-10 北京京东尚科信息技术有限公司 Data processing method and data processing device
CN112817527A (en) * 2021-01-21 2021-05-18 深圳市显控科技股份有限公司 Power failure data storage method, single chip microcomputer and computer readable storage medium
CN112948287A (en) * 2021-03-29 2021-06-11 成都新易盛通信技术股份有限公司 SD card read-write method and system based on Hashmap caching mechanism
CN113672415A (en) * 2021-07-09 2021-11-19 济南浪潮数据技术有限公司 Disk fault processing method, device, equipment and storage medium
CN113468274A (en) * 2021-07-28 2021-10-01 浙江大华技术股份有限公司 Data storage method and device, storage medium and electronic equipment
CN114035741A (en) * 2021-09-27 2022-02-11 北京航天时代激光导航技术有限责任公司 Data storage method, device, equipment and medium for FLASH life optimization
CN114153392A (en) * 2021-11-29 2022-03-08 浙江大华技术股份有限公司 Object storage data storage management method, device and equipment
CN114968121A (en) * 2022-06-06 2022-08-30 北京万里红科技有限公司 Method and device for reading data in storage medium, electronic equipment and medium
CN115017236A (en) * 2022-07-04 2022-09-06 北京百度网讯科技有限公司 Data processing method, device and equipment based on block chain and storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
BUĞRA GEDIK等: "Disk-Based Management of Interaction Graphs" *
李为;刘嘉勇;: "一种基于分区引导扇区控制的移动存储介质安全控制方法" *
瞿国梁等: "民航维修人员资格授权持续有效性管理", 《航空维修与工程》 *
詹磊,李强,潘清: "实时磁盘调度算法研究" *
郑嘉琦: "保存硬盘主引导扇区数据一法" *

Also Published As

Publication number Publication date
CN115509465B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
US20190155770A1 (en) Deferred inter-processor interrupts
KR101752042B1 (en) Allocation of alias registers in a pipelined schedule
US9569381B2 (en) Scheduler for memory
US20110161637A1 (en) Apparatus and method for parallel processing
CN108228482B (en) Method and system for managing cache devices in a storage system
US9081658B2 (en) Storage device and data management method thereof
US20110307677A1 (en) Device for managing data buffers in a memory space divided into a plurality of memory elements
CN112882663B (en) Random writing method, electronic equipment and storage medium
CN113625973B (en) Data writing method, device, electronic equipment and computer readable storage medium
US20170052979A1 (en) Input/Output (IO) Request Processing Method and File Server
TWI728357B (en) Method and device for generating serial number
US20140115600A1 (en) Submitting operations to a shared resource based on busy-to-success ratios
CN113312182B (en) Cloud computing node, file processing method and device
CN115509465B (en) Sector management method and device, electronic equipment and storage medium
CN101799832A (en) Method for rapidly writing mass data into database once
US8555005B2 (en) Memory managing apparatus and method using a pointer indicator bit to perform garbage collection
US20210011759A1 (en) Multi-core system and method of controlling operation of the same
CN116028013B (en) Optimization method, device, divider and medium for FPGA division operation
CN106991058B (en) Method and device for processing pre-fetched files
US11099739B2 (en) System and method for accessing redundant array of independent disks
CN113031908B (en) Ordered data processing method and computing device
EP4180939A1 (en) Storage device and method performing processing operation requested by host
WO2021244212A1 (en) Method and system for dynamically assigning cpu resources to one or more applications
CN114912990A (en) Data processing method and device
CN115695432A (en) Load balancing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A sector management method, device, electronic device, and storage medium

Effective date of registration: 20231108

Granted publication date: 20230328

Pledgee: Guotou Taikang Trust Co.,Ltd.

Pledgor: Hangzhou Fangzhou Technology Co.,Ltd.

Registration number: Y2023980064456

PE01 Entry into force of the registration of the contract for pledge of patent right