CN110943871A - Resource interval adjusting method and device - Google Patents

Resource interval adjusting method and device Download PDF

Info

Publication number
CN110943871A
CN110943871A CN201911376124.9A CN201911376124A CN110943871A CN 110943871 A CN110943871 A CN 110943871A CN 201911376124 A CN201911376124 A CN 201911376124A CN 110943871 A CN110943871 A CN 110943871A
Authority
CN
China
Prior art keywords
function
resource interval
version
resource
entry
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
CN201911376124.9A
Other languages
Chinese (zh)
Other versions
CN110943871B (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 DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911376124.9A priority Critical patent/CN110943871B/en
Publication of CN110943871A publication Critical patent/CN110943871A/en
Application granted granted Critical
Publication of CN110943871B publication Critical patent/CN110943871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0859Retrieval of network configuration; Tracking network configuration history by keeping history of different configuration generations or by rolling back to previous configuration versions

Abstract

The application provides a resource interval adjusting method and device. A resource interval adjusting method comprises the following steps: when the software version of the equipment is restarted after being upgraded from a first version to a second version, checking whether a first table item resource interval corresponding to a first function defined by the second version and a second table item resource interval corresponding to a second function defined by the first version have intersection; if so, determining a current table resource interval corresponding to the first function and a current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection. By the method, the method and the device, whether intersection exists in the table item resource intervals corresponding to the functions defined by the first version and the second version of the network equipment and whether the table item resources are recorded in the intersection to adjust the table item resource intervals corresponding to the functions are achieved, and therefore the table item resources are prevented from being lost due to adjustment of the table item resource intervals.

Description

Resource interval adjusting method and device
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and an apparatus for adjusting resource zones.
Background
Generally, a network device has a plurality of service modules for implementing different functions, and these functions generally require the use of table entry resources of the network device chip hardware. However, the table entry resources of the network device chip hardware are limited, so when there are at least two functions that need to use the same table entry resource area, the table entry resource area is generally divided into a plurality of table entry resource intervals, and the table entry resources of each interval are allocated to different functions for use.
When the network device is upgraded from the old version to the new version, it is assumed that the table entry resource interval allocated to the function a is expanded in the new version, and the expanded part of the table entry resource interval is allocated to the function B in the old version, and the function B has used the table entry resources in the part of the table entry resource interval. After the new version is upgraded, the function a may cover the part of the table entry resources, which may cause the part of the table entry resources to be lost, and the function B may be abnormal, which may even cause a network failure.
Disclosure of Invention
The application provides a resource interval adjusting method and device, which are used for adjusting a table entry resource interval corresponding to each function. The technical scheme provided by the application comprises the following steps:
in a first aspect, the present application provides a method for adjusting resource zones, which is applied to a network device, and includes:
when the software version of the equipment is restarted after being upgraded from a first version to a second version, checking whether a first table item resource interval corresponding to a first function defined by the second version has intersection with a second table item resource interval corresponding to a second function defined by the first version;
if so, determining a current table resource interval corresponding to the first function and a current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection.
In a second aspect, the present application provides a resource interval adjusting apparatus, applied to a network device, including:
a checking module, configured to check whether a first entry resource interval corresponding to a first function defined by a second version has an intersection with a second entry resource interval corresponding to a second function defined by the first version when a software version of the device is restarted after being upgraded from the first version to the second version;
and a determining module, configured to determine, when the checking result of the checking module is yes, a current table resource interval corresponding to the first function and a current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection.
When the device is restarted after being upgraded from the first version to the second version, whether the table entry resource interval corresponding to any function defined by the second version is intersected with the table entry resource intervals of other functions defined by the first version is checked, if yes, whether table entry resources are recorded in the intersection is further determined, and accordingly the table entry resource intervals corresponding to all the functions are determined, so that the table entry resources can be effectively prevented from being lost due to adjustment of the table entry resource intervals.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a resource interval adjustment method provided in the present application;
fig. 2 is a schematic diagram of a table entry resource interval according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating an implementation of step 102 provided by an embodiment of the present application;
fig. 4 is a schematic diagram of a fourth entry resource interval structure provided in the embodiment of the present application;
fig. 5 is a structural diagram of a resource interval adjusting apparatus according to the present application;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Generally, a network device has a plurality of service modules for implementing different functions, and these functions generally require using table entry resources of a network device chip hardware, such as table entry resources of an ASIC chip, for example, a routing table. Port aggregation, Access Control Lists (ACLs) and other functions of the network device generally require entry resources of the ASIC chip.
However, the table entry resources of the network device chip hardware are fixed and cannot be expanded, so when there are at least two functions that need to use the same table entry resource area at the same time, the table entry resource area is usually divided into a plurality of table entry resource intervals at present, and the table entry resources in different table entry resource intervals are allocated to different functions for use.
When the partitioned entry resource interval needs to be changed, for example, the entry resource interval allocated to a certain function needs to be expanded, which is usually realized by version upgrade. The new software version will generally improve the original version according to the user's requirement, and if the user needs to expand the table entry resource interval allocated to the function a, the table entry resource interval corresponding to the function a defined by the new software version is the expanded table entry resource interval. For example, the entry resource interval corresponding to the function a defined by the old software version is 248-255, and if the user needs to expand the entry resource interval corresponding to the function a, the entry resource interval corresponding to the function a defined by the new software version can be set to 240-255 according to the user's requirement.
Therefore, the user can expand the table resource interval corresponding to the function A only by upgrading the software version of the equipment.
However, the following problems may occur when the change of the table entry resource interval corresponding to a certain function is realized through version upgrade:
when the network device is upgraded from the first version to the second version, because the table entry resource interval corresponding to the function a defined by the second version is changed from the table entry resource interval corresponding to the function a defined by the first version, an intersection exists between the table entry resource interval corresponding to the function a defined by the second version and the table entry resource interval of the function B defined by the first version, and then, after the device is upgraded to the second version, the table entry resource of the function a recorded in the intersection is covered by the table entry resource of the function B. This may cause an abnormality in function a and in severe cases also cause a network failure.
Therefore, the present application provides a resource interval adjusting method, which adjusts the entry resource interval corresponding to each function according to whether an intersection exists in the entry resource intervals corresponding to each function defined by different versions before and after the upgrade of the network device, and whether entry resources are recorded in the intersection. Therefore, the loss of the table item resources caused by the adjustment of the table item resource interval is avoided.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in detail below with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1, fig. 1 is a flowchart of a resource interval adjusting method provided in the present application. In one embodiment, the method is applicable to a network device. As shown in fig. 1, the process includes the following steps:
step 101, when the software version of the device is restarted after being upgraded from a first version to a second version, checking whether a first entry resource interval corresponding to a first function defined by the second version has an intersection with a second entry resource interval corresponding to a second function defined by the first version.
As an embodiment, the first version in this step 101 is a software version currently used by the network device, and the second version is a new version to which the network device can be upgraded.
The second version may generally comprise, compared to the first version: new functions of the network equipment, modification of original functions of the network equipment, adjustment of table resource intervals of a certain function and the like.
Generally, to upgrade the software version of the network device from the first version to the second version, the second version needs to be written into a nonvolatile storage medium of the network device, such as a hard disk, and then the network device is restarted. And when the network equipment is restarted, the second version is loaded into the memory from the nonvolatile storage medium to run, so that the current software version of the network equipment is upgraded to the second version.
In order to avoid the entry resource loss caused by the adjustment of the entry resource interval in the second version, in this step 101, when the network device is restarted after being upgraded from the first version to the second version, it is checked whether an intersection exists between a first entry resource interval corresponding to the first function defined by the second version and a second entry resource interval corresponding to the second function defined by the first version.
As an embodiment, when checking whether there is an intersection between a first entry resource interval corresponding to a first function defined by a second version and a second entry resource interval corresponding to a second function defined by a first version, a function in which each entry resource interval defined by the second version is changed from the entry resource interval defined by the first version may be sequentially checked as the first function.
To facilitate understanding of this step 101, the following description is described with reference to fig. 2 by way of example, and fig. 2 is a schematic diagram of an entry resource interval provided in this embodiment of the present application.
It is assumed that the table entry resource intervals corresponding to the first function and the second function defined by the first version and the second version are as shown in fig. 2, that is, the second table entry resource interval corresponding to the second function defined by the first version is 0 to 246, and the first table entry resource interval corresponding to the first function defined by the second version is 245 to 255.
It may be determined that there is an intersection between the first entry resource interval corresponding to the first function of the second version definition and the second entry resource interval corresponding to the second function of the first version definition, where the intersection is 245-246.
The intersection may also represent a portion of the second version of the first entry resource interval corresponding to the first function that is extended compared to the third entry resource interval corresponding to the first function that is defined by the first version. This also corresponds to the table entry resource interval in the first version being divided into the intersection portion of the second function, in which the first function is divided.
Step 102, if yes, determining a current table resource interval corresponding to the first function and a current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection.
In a specific implementation, there are a plurality of implementation manners of this step 102, which are described below by way of example and are not described herein again.
As an embodiment, if it is found that there is no intersection between the first entry resource interval corresponding to the first function defined by the second version and the second entry resource interval corresponding to the second function defined by the first version, the entry resource intervals corresponding to the first function and the second function may be directly determined as the entry resource intervals defined by the second version.
Specifically, the current table entry resource interval corresponding to the first function may be updated from the third table entry resource interval corresponding to the first function defined by the first version to the first table entry resource interval, and the current table entry resource interval corresponding to the second function may be updated from the second table entry resource interval to the fourth table entry resource interval corresponding to the second function defined by the second version.
Thus, the flow shown in fig. 1 is completed.
Through the process shown in fig. 1, according to the present application, after the device is upgraded from the first version to the second version, the entry resource intervals corresponding to the functions defined by the first version and the second version are adjusted according to whether an intersection exists between the entry resource intervals corresponding to the functions defined by the first version and the second version, and whether entry resources are recorded in the intersection, so that the entry resource loss caused by the adjustment of the entry resource intervals is avoided.
As an embodiment, after completing the above-mentioned flow of fig. 1, the network device continues to complete the restart according to the normal flow, such as performing a flow of recovering the configuration file.
The above step 102 is described below by way of example with reference to fig. 3:
referring to fig. 3, fig. 3 is a flowchart illustrating an implementation of step 102 provided in an embodiment of the present application. The process shown in fig. 3 is executed when it is checked through step 101 that there is an intersection between a first entry resource interval corresponding to a first function defined by a second version and a second entry resource interval corresponding to a second function defined by a first version. As shown in fig. 3, the process may include the following steps:
step 301, checking whether at least one entry resource corresponding to the second function is recorded in the intersection, if not, executing step 302; if yes, go to step 303.
In an example, step 301 may first check whether the entry resource is recorded in the intersection determined in step 101, and if so, may further determine to which function of the network device the entry resource recorded in the intersection corresponds.
Step 302, when no entry resource corresponding to the second function is recorded in the intersection, updating the current entry resource interval corresponding to the first function from a third entry resource interval corresponding to the first function defined by the first version to the first entry resource interval, and updating the current entry resource interval corresponding to the second function from the second entry resource interval to a fourth entry resource interval corresponding to the second function defined by the second version.
As an embodiment, the third entry resource interval and the second entry resource interval are different intervals in a defined chip hardware entry resource region;
the first table resource interval and the fourth table resource interval are different intervals in a defined chip hardware table resource area.
In practical application, the hardware table entry resource area of the same chip can be divided into two or more intervals, and the two or more intervals are respectively allocated to different functions for use.
Since any table resource corresponding to the second function is not recorded in the intersection, the device determines the table resource interval corresponding to the first function as the first table resource interval corresponding to the first function defined by the second version, which does not result in the loss of the resource table entry of the second function, and thus the current table resource interval corresponding to the first function can be updated to the first table resource interval. Correspondingly, since the first function and the second function use different intervals of the same table resource area, the current table resource interval corresponding to the second function can be updated to the fourth table resource interval corresponding to the second function defined by the second version. That is, the first function and the second function both use the entry resource interval defined by the second version.
It is convenient to understand the step 302, which is described below with reference to fig. 2 as an example:
referring to each table entry resource interval shown in fig. 2, if it is determined through the check in step 301 that no table entry resource of the second function is recorded in the intersection 245-246 between the first table entry resource interval corresponding to the first function and the second table entry resource interval corresponding to the second function, the current table entry resource interval corresponding to the first function may be updated to the first table entry resource interval, that is, the current table entry resource interval corresponding to the first function is updated to 245-255; and updating the table item resource interval corresponding to the second function to a fourth table item resource interval corresponding to the second function defined by the second version, namely updating the current table item resource interval corresponding to the second function to 0-244.
Step 303, when at least one entry resource corresponding to the second function is recorded in the intersection, determining the current entry resource interval corresponding to the first function as a third entry resource interval corresponding to the first function defined by the first version, and determining the current entry resource interval corresponding to the second function as the second entry resource interval.
Since at least one entry resource corresponding to the second function is recorded in the intersection, if the device determines the current entry resource interval corresponding to the first function as the first entry resource interval corresponding to the first function defined by the second version, the entry resource of the second function in the intersection is covered by the entry resource of the first function and lost.
The entry resource interval for both the first function and the second function may be determined to be the entry resource interval that it defined in the first version. Specifically, the current table resource interval corresponding to the first function may be determined as a first table resource interval, and the table resource interval corresponding to the second function may be determined as a second table resource interval.
This is convenient to understand and is described below by way of example in connection with fig. 2:
referring to each table entry resource interval shown in fig. 2, if it is determined that at least one table entry resource of the second function is recorded in the intersection, for example, the table entry 245 records a table entry resource of the second function, the current table entry resource interval corresponding to the first function may be determined as a third table entry resource interval corresponding to the first function defined by the first version, that is, the current table entry resource interval corresponding to the first function is determined as 247 to 255, and the table entry resource interval corresponding to the second function is determined as 0 to 246 corresponding to the second table entry resource interval corresponding to the second function defined by the first version, according to the check in step 301.
Since the first entry resource interval of the first function defined by the second version is actually equivalent to the capacity expansion of the third entry resource interval of the first function defined by the first version, after this step 303, since the current entry resource interval corresponding to the first function is determined to be the third entry resource interval, it is equivalent to that although the network device is upgraded to the second version, the capacity expansion of the third entry resource interval corresponding to the first function defined by the first version is not performed, and the third entry resource interval corresponding to the first function defined by the first version is still used.
In order to meet the capacity expansion requirement of the user for the third entry resource interval, after step 303, some other steps may be further performed to implement the capacity expansion for the third entry resource interval, which is described in the following by way of example and is not described herein again.
The flow shown in fig. 3 is completed.
Through the process shown in fig. 3, the present application realizes that, in step 102, the current table resource interval corresponding to the first function and the current table resource interval corresponding to the second function are determined according to whether at least one table resource corresponding to the second function is recorded in the intersection.
It should be noted that fig. 3 illustrates only one implementation of the step 102, and is not intended to be limiting.
How to expand the third entry resource interval corresponding to the first function defined in the first version based on the execution of the step 303 is described as follows:
in an example, it may be first determined whether the user has a capacity expansion requirement for an entry resource interval corresponding to a first function defined in a first version.
As an embodiment, after executing step 303, query information may be sent to the user to query whether the user needs to expand the table resource interval corresponding to the first function defined by the first version.
In order to avoid that the user doubts the individual inquiry information, prompt information can be sent to the user to prompt the user that the upgrade of the network equipment does not expand the third entry resource interval corresponding to the first function in the first version.
The query information and the prompt information may be set according to an actual application scenario, for example, to avoid that a user who does not need to expand the capacity of the first function has a question about the prompt information in this embodiment, the prompt information may be added with a content that the second version is updated compared with the first version, and it is described that the version update does not expand the capacity of the table resource interval corresponding to the first function defined in the first version.
The prompt message may further indicate a reason for not expanding the first function, that is, there is an intersection between the first entry resource interval corresponding to the first function defined by the second version and the second entry resource interval corresponding to the second function defined by the first version, and entry resources corresponding to the second function are recorded in the intersection.
After determining that the user has a capacity expansion requirement for the table resource interval corresponding to the first function defined by the first version, capacity expansion can be performed in multiple ways.
For example, the main reason why the current table entry resource interval corresponding to the first function is determined as the third table entry resource interval corresponding to the first function defined by the first version through the above step 303 is that there is an intersection between the first table entry resource interval corresponding to the first function defined by the second version and the second table entry resource interval corresponding to the second function defined by the first version, and the table entry resource corresponding to the second function is recorded in the intersection.
Therefore, to expand the third entry resource interval corresponding to the first function defined in the first version, the current entry resource interval corresponding to the first function needs to be updated to the first entry resource interval, and it is ensured that the entry resource corresponding to the second function recorded in the intersection is not lost. Therefore, the entry resource corresponding to the second function recorded in the intersection can be transferred to other entries, and then the entry resource interval corresponding to the first function is expanded.
Generally, functions of the network device are not sequentially stored when storing the table entry resources, that is, if a second table entry resource interval corresponding to a second function defined by a first version is 0 to 246, where the table entry 246 records the table entry resources corresponding to the second function, and other table entries, such as table entry 1, may still not record the table entry resources corresponding to the second function.
Therefore, an empty entry of the unrecorded entry resource can be determined in a fourth entry resource interval corresponding to the second function defined by the second version, the entry resource corresponding to the second function recorded in the intersection is moved to the determined empty entry, and the entry resource corresponding to the second function recorded in the intersection is deleted.
During specific implementation, the empty table entry is determined in multiple ways, for example, whether table entry resources are stored in each table entry in the table entry resource interval is checked, and the table entry not storing the table entry resources is determined as the empty table entry; if a selection condition is further set, selecting an empty table entry meeting the condition from the empty table entries of the non-stored table entry resources; further, for example, information related to the empty entries of the non-stored resources may be sent to the user, selected by the user, and so on. This is not particularly limited by the present application.
After the entry resource corresponding to the second function recorded in the intersection is transferred to other entries, the current entry resource interval corresponding to the first function is updated to the first entry resource interval defined by the second version, that is, the entry resource interval corresponding to the first function defined by the first version is expanded, so that it is ensured that the entry resource corresponding to the second function recorded in the intersection is not lost.
In order to facilitate understanding of the above, the following description will be made by way of example with reference to fig. 2 and 4.
As shown in FIG. 2, there are intersections 245-246 between the first table resource interval corresponding to the first function defined by the second version and the second table resource interval corresponding to the second function defined by the first version. Referring to fig. 4, assuming that the entry resource corresponding to the second function is recorded in the entry 245, an empty entry of the unrecorded entry resource may be determined in a fourth entry resource interval corresponding to the second function defined by the second version. If it is determined 99-101 as an empty entry not recording the entry resource as shown in fig. 4, the entry resource recorded in the entry 245 may be stored in the determined empty entry, for example, stored in the entry 99, and the entry resource recorded in the entry 245 is deleted.
After that, the current table resource interval corresponding to the first function is updated to the first table resource interval, that is, the current table resource interval corresponding to the first function is updated from 247 to 255 to 245 to 255 according to each table resource interval shown in fig. 2, so that the capacity expansion of the table resource interval corresponding to the first function defined by the first version is realized.
As another embodiment, a prompt message may also be sent to the user after step 303 is executed to prompt the user that the network device has been upgraded to the second version but does not perform capacity expansion on the entry resource interval corresponding to the first function, and an operation instruction for performing capacity expansion manually is provided to the user, so that the user may perform capacity expansion manually by using the operation instruction.
So far, how to implement the description of expanding the capacity of the third entry resource interval corresponding to the first function defined by the first version is completed on the basis of executing the step 303. It should be noted that the above-mentioned embodiments are only examples and are not intended to limit the present application. In practical applications, the above embodiments may also be used in combination, and the specific combination method is not described in detail herein.
Corresponding to the resource interval adjusting method provided by the present application, the present application also provides a resource interval adjusting apparatus, which is described below:
referring to fig. 5, fig. 5 is a structural diagram of a resource interval adjusting apparatus according to the present application. As an embodiment, the apparatus may be applied to a network device. As shown in fig. 5, the apparatus includes an inspection module 501 and a determination module 502.
In an example, the checking module 501 is configured to check whether there is an intersection between a first entry resource interval corresponding to a first function defined by the second version and a second entry resource interval corresponding to a second function defined by the first version when the software version of the device is restarted after being upgraded from the first version to the second version;
a determining module 502, configured to determine, when the checking result of the checking module is yes, a current table resource interval corresponding to the first function and a current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection.
As an embodiment, the determining module 502 is specifically configured to:
when any table resource corresponding to the second function is not recorded in the intersection, updating the current table resource interval corresponding to the first function from a third table resource interval defined by the first version and corresponding to the first function to the first table resource interval, and updating the current table resource interval corresponding to the second function from the second table resource interval to a fourth table resource interval defined by the second version and corresponding to the second function.
As an embodiment, the determining module 502 is specifically configured to:
when at least one entry resource corresponding to the second function is recorded in the intersection, determining the current entry resource interval corresponding to the first function as a third entry resource interval corresponding to the first function defined by the first version, and determining the current entry resource interval corresponding to the second function as the second entry resource interval.
As an embodiment, the third entry resource interval and the second entry resource interval are different intervals in a defined chip hardware entry resource region;
the first table resource interval and the fourth table resource interval are different intervals in the defined chip hardware table resource area.
The implementation process of the functions and actions of the modules in the apparatus is specifically described in the implementation process of the corresponding steps in the method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed over a plurality of network modules. The modules can be selected according to actual needs to achieve the purpose of the scheme in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
Referring to fig. 6, fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. The electronic device may include a processor 601, memory 602, and a communication bus 603. The processor 601 and the memory 602 communicate with each other via a communication bus 603. Wherein, the memory 602 stores a computer program; the processor 601 may perform the above-described resource interval adjusting method by executing the program stored on the memory 602.
The memory 602 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the memory 602 may be: RAM (random access memory), volatile memory, non-volatile memory, flash memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, dvd, etc.), or similar storage medium, or a combination thereof.
Embodiments of the present application also provide a machine-readable storage medium, such as the memory 602 in fig. 6, storing a computer program, which can be executed by the processor 601 in the electronic device shown in fig. 6 to implement the resource interval adjusting method described above. The method at least comprises the following steps:
when the software version of the equipment is restarted after being upgraded from a first version to a second version, checking whether a first table item resource interval corresponding to a first function defined by the second version has intersection with a second table item resource interval corresponding to a second function defined by the first version;
if so, determining a current table resource interval corresponding to the first function and a current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A resource interval adjusting method is applied to network equipment and comprises the following steps:
when the software version of the equipment is restarted after being upgraded from a first version to a second version, checking whether a first table item resource interval corresponding to a first function defined by the second version and a second table item resource interval corresponding to a second function defined by the first version have intersection;
if so, determining a current table resource interval corresponding to the first function and a current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection.
2. The method of claim 1, wherein determining the current table resource interval corresponding to the first function and the current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection comprises:
when any table entry resource corresponding to the second function is not recorded in the intersection, updating the current table entry resource interval corresponding to the first function from a third table entry resource interval defined by the first version and corresponding to the first function to the first table entry resource interval, and updating the current table entry resource interval corresponding to the second function from the second table entry resource interval to a fourth table entry resource interval defined by the second version and corresponding to the second function.
3. The method of claim 1, wherein determining the current table resource interval corresponding to the first function and the current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection comprises:
when at least one entry resource corresponding to the second function is recorded in the intersection, determining the current entry resource interval corresponding to the first function as a third entry resource interval defined by the first version and corresponding to the first function, and determining the current entry resource interval corresponding to the second function as the second entry resource interval.
4. The method according to claim 2 or 3,
the third table entry resource interval and the second table entry resource interval are different intervals in a defined chip hardware table entry resource area;
the first table item resource interval and the fourth table item resource interval are different intervals in a defined chip hardware table item resource area.
5. A resource interval adjusting device applied to a network device includes:
the checking module is used for checking whether a first table resource interval corresponding to a first function defined by a second version has intersection with a second table resource interval corresponding to a second function defined by a first version when the software version of the equipment is restarted after being upgraded from the first version to the second version;
and a determining module, configured to determine, when the checking result of the checking module is yes, a current entry resource interval corresponding to the first function and a current entry resource interval corresponding to the second function according to whether at least one entry resource corresponding to the second function is recorded in the intersection.
6. The apparatus of claim 1, wherein the determining module is specifically configured to:
when any table entry resource corresponding to the second function is not recorded in the intersection, updating the current table entry resource interval corresponding to the first function from a third table entry resource interval defined by the first version and corresponding to the first function to the first table entry resource interval, and updating the current table entry resource interval corresponding to the second function from the second table entry resource interval to a fourth table entry resource interval defined by the second version and corresponding to the second function.
7. The apparatus of claim 1, wherein the determining module is specifically configured to:
when at least one entry resource corresponding to the second function is recorded in the intersection, determining the current entry resource interval corresponding to the first function as a third entry resource interval defined by the first version and corresponding to the first function, and determining the current entry resource interval corresponding to the second function as the second entry resource interval.
8. The apparatus according to claim 6 or 7,
the third table entry resource interval and the second table entry resource interval are different intervals in a defined chip hardware table entry resource area;
the first table item resource interval and the fourth table item resource interval are different intervals in a defined chip hardware table item resource area.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of:
when the software version of the equipment is restarted after being upgraded from a first version to a second version, checking whether a first table item resource interval corresponding to a first function defined by the second version and a second table item resource interval corresponding to a second function defined by the first version have intersection;
if so, determining a current table resource interval corresponding to the first function and a current table resource interval corresponding to the second function according to whether at least one table resource corresponding to the second function is recorded in the intersection.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN201911376124.9A 2019-12-27 2019-12-27 Resource interval adjusting method and device Active CN110943871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911376124.9A CN110943871B (en) 2019-12-27 2019-12-27 Resource interval adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911376124.9A CN110943871B (en) 2019-12-27 2019-12-27 Resource interval adjusting method and device

Publications (2)

Publication Number Publication Date
CN110943871A true CN110943871A (en) 2020-03-31
CN110943871B CN110943871B (en) 2022-11-01

Family

ID=69913351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911376124.9A Active CN110943871B (en) 2019-12-27 2019-12-27 Resource interval adjusting method and device

Country Status (1)

Country Link
CN (1) CN110943871B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980447A (en) * 2005-12-06 2007-06-13 中兴通讯股份有限公司 Smooth upgrading method of communication system software edition
CN101196824A (en) * 2008-01-07 2008-06-11 中兴通讯股份有限公司 Method for automatically adjusting version memory space
CN101866357A (en) * 2010-06-11 2010-10-20 福建星网锐捷网络有限公司 Method and device for updating items of three-state content addressing memory
CN102065118A (en) * 2010-09-16 2011-05-18 深圳市九洲电器有限公司 Method for updating network equipment and device for implementing method
CN103455348A (en) * 2013-08-27 2013-12-18 小米科技有限责任公司 Subarea adjustment method, device, terminal, server and system
CN103713911A (en) * 2012-09-28 2014-04-09 中兴通讯股份有限公司 Single version upgrading method and single version upgrading device
US20160321003A1 (en) * 2013-12-26 2016-11-03 Gemalto Sa Method for updating a firmware on a low memory device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980447A (en) * 2005-12-06 2007-06-13 中兴通讯股份有限公司 Smooth upgrading method of communication system software edition
CN101196824A (en) * 2008-01-07 2008-06-11 中兴通讯股份有限公司 Method for automatically adjusting version memory space
CN101866357A (en) * 2010-06-11 2010-10-20 福建星网锐捷网络有限公司 Method and device for updating items of three-state content addressing memory
CN102065118A (en) * 2010-09-16 2011-05-18 深圳市九洲电器有限公司 Method for updating network equipment and device for implementing method
CN103713911A (en) * 2012-09-28 2014-04-09 中兴通讯股份有限公司 Single version upgrading method and single version upgrading device
CN103455348A (en) * 2013-08-27 2013-12-18 小米科技有限责任公司 Subarea adjustment method, device, terminal, server and system
US20160321003A1 (en) * 2013-12-26 2016-11-03 Gemalto Sa Method for updating a firmware on a low memory device

Also Published As

Publication number Publication date
CN110943871B (en) 2022-11-01

Similar Documents

Publication Publication Date Title
JP5113700B2 (en) Firmware update apparatus and method
US20180189371A1 (en) Updating sqlite database
US7849060B2 (en) System and method for managing log information for transaction
CN104182255A (en) Method and terminal for upgrading library files of system application
US20090313501A1 (en) Method and arrangement for processing transactions in a flash type memory device
CN109002330A (en) A kind of method, device and equipment identifying UEFI OS startup item
JP2014137711A (en) Storage device, backup program and backup method
CN104915226A (en) Network device software starting method, device and network device
CN105930184A (en) System upgrade method and device
CN114780019A (en) Electronic device management method and device, electronic device and storage medium
CN103309696B (en) Method and device for updating Java card extended library, and Java card
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment
US11176089B2 (en) Systems and methods for implementing dynamic file systems
CN110943871B (en) Resource interval adjusting method and device
JP4613598B2 (en) Disk system
KR102123701B1 (en) Network boot system
CN113391959A (en) Anti-error method, device, equipment and medium for upgrading rollback of container of power monitoring system
CN111124459B (en) Method and device for updating service logic of FPGA cloud server
CN113190244A (en) Method and device for upgrading wireless module, computer equipment and storage medium
JPH11134178A (en) Interrelated check system by information on number of versions of load module and program storage medium
CN111190549A (en) Method, device, equipment and medium for acquiring available capacity of shared volume
US20050044090A1 (en) Computer system and program
KR101449614B1 (en) Method for managing the default data of the flash memory
US8112609B2 (en) Data management apparatus and method
CN113590388B (en) UBOOT-based SPL rollback method and device, storage medium and terminal

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