Summary of the invention
The invention provides a kind of method for processing resource and device, handle the problem of failure to solve the institute's requested operation that exists in the prior art at least.
According to an aspect of the present invention, a kind of method for processing resource is provided, it comprises: receive request message; In shared resource, obtain the required resource of request message institute processing of request operation, wherein, shared resource is obtained by the resource-sharing on the polylith veneer; Use the resource of being obtained to carry out the processing of request operation of request message institute.
Preferably; Before receiving request message; Above-mentioned method for processing resource also comprises: create the virtual map relation table that is used to shine upon shared resource according to the state of resources on the polylith veneer; Wherein, the record of each in virtual map relation table item comprises the sign of resource, the sign of the veneer under this resource.
Preferably, the step of in shared resource, obtaining the required resource of request message institute processing of request operation comprises: judge the required resource of request message institute processing of request operation; Obtain the record item corresponding from the virtual map relation table with the resource of judging, wherein, this record have the sign of the resource of judging and the resource judged under the sign of veneer; The sign of request message, the resource judged is sent to the veneer under the said resource of judging.
Preferably, the step of using the resource of being obtained to carry out the processing of request operation of request message institute comprises: the entity that receives request message calls the resource with sign through affiliated veneer and carries out the processing of request operation of request message institute; Veneer under perhaps calls the resource of judging through the sign of the resource judged and carries out the processing of request operation of request message institute.
Preferably, after the establishment of the state of resources on polylith veneer virtual map relation table, above-mentioned method for processing resource also comprises: judge whether the state of resources on the polylith veneer changes; Sign according to the veneer at the sign of the resource of generating change of state and this resource place is upgraded the record item in the virtual map relation table.
Preferably; Judge through following steps whether the state of resources on the polylith veneer changes: every determining step below the predetermined cycle carries out once: judge whether the state of resources on the polylith veneer becomes busy state from idle condition, and judge whether the state of resources on the polylith veneer becomes idle condition from busy state.
Preferably, at least two veneers in the polylith veneer have different types.
According to a further aspect in the invention, a kind of resource processing unit is provided, it comprises: receiving element is used to receive request message; Acquiring unit is used for obtaining the required resource of request message institute processing of request operation at shared resource, and wherein, shared resource is obtained by the resource-sharing on the polylith veneer; Processing unit is used to use the resource of being obtained to carry out the processing of request operation of request message institute.
Preferably; The resource processing unit also comprises: create the unit; Be used for before receiving request message; Create the virtual map relation table that is used to shine upon shared resource according to the state of resources on the polylith veneer, wherein, each the record item in the virtual map relation table comprises the sign of resource, the sign of the veneer under this resource.
Preferably, acquiring unit comprises: judge module, be used for obtaining in the process of the required resource of request message institute processing of request operation at shared resource, and judge the required resource of request message institute processing of request operation; Acquisition module is used for obtaining the record item corresponding with the resource of judging from the virtual map relation table, wherein, this record have the sign of the resource of judging and the resource judged under the sign of veneer; Sending module is used for the sign of the sign of request message, the resource judged and affiliated veneer is sent to processing unit.
In the present invention; Use polylith veneer resources shared to carry out Business Processing; Like this, when not having the required resource of request on the veneer, can use on other veneers resources shared to carry out institute's requested operation; Solve the institute's requested operation that exists in the prior art and handled the problem of failure, thereby made institute's requested operation all have corresponding resource to handle.
In addition; Owing between the polylith veneer, set up resource-sharing; Thereby; Receive that request message and current single board need guarantee to reserve resource on more this veneer and can't call resource on this veneer and respond this request message the time in current single board, can call on other veneers resources shared and carry out the indicated processing operation of above-mentioned request, thereby reduce the utilization rate of the resource on the current single board.Certainly, use shared resource can dynamically arrange according to the demand of current single board on which piece veneer.
Embodiment
Hereinafter will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
Embodiment 1
Fig. 1 is a kind of preferred construction block diagram of the resource processing unit of the embodiment of the invention, and is as shown in Figure 1, and the resource processing unit in the present embodiment comprises: receiving element 102 is used to receive request message; Acquiring unit 104 is communicated by letter with receiving element 102, is used for obtaining the required resource of request message institute processing of request operation at shared resource, and wherein, shared resource is obtained by the resource-sharing on the polylith veneer; Processing unit 106 is communicated by letter with acquiring unit 104, is used to use the resource of being obtained to carry out the processing of request operation of request message institute.
In above-mentioned preferably embodiment; After receiving element 102 received request message, acquiring unit 104 response request message were obtained the required resource of request message institute processing of request operation in shared resource, wherein; Shared resource is obtained by the resource-sharing on the polylith veneer; Processing unit 106 re-uses the resource execution request message institute processing of request operation that processing unit 106 is obtained, and realizes using polylith veneer resources shared to carry out Business Processing, like this; When not having the required resource of request on the veneer; Can use on other veneers resources shared to carry out institute's requested operation, solve the institute's requested operation that exists in the prior art and handled the problem of failure, thereby make institute's requested operation all have corresponding resource to handle.In addition; Owing between the polylith veneer, set up resource-sharing; Thereby; Receive that request message and current single board need guarantee to reserve resource on more this veneer and can't call resource on this veneer and respond this request message the time in current single board, can call on other veneers resources shared and carry out the indicated processing operation of above-mentioned request, thereby reduce the utilization rate of the resource on the current single board.Certainly, use shared resource can dynamically arrange according to the demand of current single board on which piece veneer.
Preferably; On the basis of the foregoing description; The resource processing unit also comprises: create unit 108, be used for before receiving request message, create the virtual map relation table that is used to shine upon shared resource according to the state of resources on the polylith veneer; Wherein, the record of each in virtual map relation table item comprises the sign of resource, the sign of the veneer under this resource.In this preferred embodiment, through creating the virtual map relation table, make it possible to search apace required shared resource, and can realize shared resource dynamically, upgrade apace.
Preferably, on the basis of the foregoing description, the present invention also improves acquiring unit 104, so that can obtain required resource through above-mentioned virtual map relation table.Particularly, in the present embodiment, acquiring unit 104 comprises: judge module, be used for obtaining in the process of the required resource of described request message institute processing of request operation at shared resource, and judge the required resource of described request message institute processing of request operation; Acquisition module is communicated by letter with judge module, be used for obtaining the record item corresponding with the resource of judging from said virtual map relation table, wherein, this record have the sign of the resource of judging and the resource judged under the sign of veneer; Sending module is communicated by letter with acquisition module, is used for the sign of the sign of described request message, the resource judged and affiliated veneer is sent to said processing unit.In this preferred embodiment,, can obtain required shared resource apace through searching the virtual map relation table.
In addition, the present invention's resource of also providing multiple mode to realize using to be obtained is carried out the step of described request message institute processing of request operation.Particularly, on the basis of the foregoing description, processing unit 106 can use the resource of being obtained to carry out the processing of request operation of described request message institute through following dual mode:
1) processing unit 106 calls the resource with said sign through affiliated veneer (promptly with the corresponding veneer of the above-mentioned veneer sign that finds out) and carries out the processing of request operation of described request message institute; Perhaps
2) veneer (promptly with the corresponding veneer of the above-mentioned veneer sign that finds out) under calls the said resource of judging through the sign of the said resource of judging and carries out the processing of request operation of described request message institute.
Through above-mentioned different implementation, make to satisfy and under several scenes, call the processing of request operation of resource execution institute, increased the applicability of scheme.
Preferably, on the basis of the foregoing description, the present invention also provides a kind of the virtual map relation table has been carried out method for updating.Particularly, after creating the virtual map relation table, create unit 108 and also be used to carry out following steps: judge whether the state of resources on the polylith veneer changes according to the state of resources on the polylith veneer; Sign according to the veneer at the sign of the resource of generating change of state and this resource place is upgraded the record item in the virtual map relation table.In the present embodiment, the renewal of virtual map relation table can be realized in real time, that is, current shared resource can be used exactly, effectively.
In a preferred embodiment of the invention, a kind of scheme that periodically updates the virtual map relation table also is provided.Particularly; In the process of upgrading the virtual map relation table; Create unit 108 every determining steps below the predetermined cycle carries out once: judge whether the state of resources on the said polylith veneer becomes busy state from idle condition, and judge whether the state of resources on the said polylith veneer becomes idle condition from busy state; Then, according to the sign of the veneer at the sign of the resource of generating change of state and this resource place the record item in the virtual map relation table is upgraded.In the present embodiment, adopt the mode of periodically updating, can and take in real-time and average out aspect the resource, promptly can be implemented in real-time update virtual map relation table under the situation that does not take more resource.
Preferably, the virtual map relation table among above-mentioned each embodiment can write down the sign of the resource identification and the veneer under this resource of the idling-resource on the every veneer, and is as shown in table 1 below.
Table 1
| Veneer sign | Resource identification |
| Veneer 1 | Resource 1-1 |
| Veneer 1 | Resource 1-2 |
| Veneer 2 | Resource 2-1 |
| Veneer 2 | Resource 2-2 |
Certainly; The existence form of above-mentioned virtual map relation table is a kind of example, and the present invention is not limited only to this, for example; The virtual map relation table can also write down sign and this state of resources of the resource identification and the veneer under this resource of all resources on the every veneer, and is as shown in table 2.
Table 2
| Veneer sign | Resource identification | Resource status |
| Veneer 1 | Resource 1-1 | Idle |
| Veneer 1 | Resource 1-2 | Idle |
| Veneer 1 | Resource 1-3 | Busy |
| Veneer 2 | Resource 2-1 | Idle |
| Veneer 2 | Resource 2-2 | Idle |
| Veneer 2 | Resource 2-3 | Busy |
Preferably, at least two veneers in the above-mentioned polylith veneer have different types.Like this, can increase applicability of the present invention, can on different classes of veneer, realize resource-sharing.
Fig. 2 is the another kind of preferred construction block diagram of the resource processing system of the embodiment of the invention, and as shown in Figure 2, this system comprises:resource interface plate 202 is used between the said veneer of polylith, creating the virtual map relation table according to the resource status of each veneer;Master control veneer 204 is communicated by letter withresource interface plate 202, is used for the virtual map relation table that transparent transmission NM network management system 206 (or abbreviating webmaster as) issues and gives the resource interface plate; NMS 206 is communicated by letter withmaster control veneer 204, is used forveneer 208 andresource interface plate 202 are managed; Polylithveneer 208 is used for handling accordingly according to the resource thatresource interface plate 202 distributes.
In a kind of preferred embodiment of the present invention,resource interface plate 202 can be used for realizing the function of resource processing unit shown in Figure 1,, inresource interface plate 202, receives request message that is; In shared resource, obtain the required resource of request message institute processing of request operation, wherein, shared resource is obtained by the resource-sharing on the polylith veneer; Use the resource of being obtained to carry out the processing of request operation of request message institute.
Embodiment 2
On Fig. 1-resource processing unit shown in Figure 2 and the basis of system, the present invention also provides a kind of preferred method for processing resource, and is as shown in Figure 3, and this method for processing resource comprises the steps:
S302: receive request message;
S304: in shared resource, obtain the required resource of described request message institute processing of request operation, wherein, said shared resource is obtained by the resource-sharing on the polylith veneer;
S306: use the resource of being obtained to carry out the processing of request operation of described request message institute.
In above-mentioned preferably embodiment; After receiving request message, response request message is obtained the required resource of request message institute processing of request operation in shared resource, wherein; Shared resource is obtained by the resource-sharing on the polylith veneer; Use the resource of being obtained to carry out the processing of request operation of request message institute, realize using polylith veneer resources shared to carry out Business Processing, like this; When not having the required resource of request on the veneer; Can use on other veneers resources shared to carry out institute's requested operation, solve the institute's requested operation that exists in the prior art and handled the problem of failure, thereby make institute's requested operation all have corresponding resource to handle.In addition; Owing between the polylith veneer, set up resource-sharing; Thereby; Receive that request message and current single board need guarantee to reserve resource on more this veneer and can't call resource on this veneer and respond this request message the time in current single board, can call on other veneers resources shared and carry out the indicated processing operation of above-mentioned request, thereby reduce the utilization rate of the resource on the current single board.Certainly, use shared resource can dynamically arrange according to the demand of current single board on which piece veneer.
Preferably; On the basis of the foregoing description; Before receiving request message; Method for processing resource also comprises: create the virtual map relation table that is used to shine upon shared resource according to the state of resources on the polylith veneer, wherein, each the record item in the virtual map relation table comprises the sign of resource, the sign of the veneer under this resource.In this preferred embodiment, through creating the virtual map relation table, make it possible to search apace required shared resource, and can realize shared resource dynamically, upgrade apace.
Preferably, the step of in shared resource, obtaining the required resource of request message institute processing of request operation comprises: judge the required resource of request message institute processing of request operation; Obtain the record item corresponding from the virtual map relation table with the resource of judging, wherein, this record have the sign of the resource of judging and the resource judged under the sign of veneer; The sign of request message, the resource judged is sent to the veneer under the said resource of judging.In this preferred embodiment,, can obtain required shared resource apace through searching the virtual map relation table.
Preferably, the present invention's resource of also providing multiple mode to realize using to be obtained is carried out the step of described request message institute processing of request operation.Particularly, the step of using the resource of being obtained to carry out the processing of request operation of described request message institute comprises:
1) entity (for example, shown in Figure 1 resource processing unit or resource interface plate shown in Figure 2) that receives request message calls the resource with said sign through affiliated veneer (promptly with the corresponding veneer of the above-mentioned veneer sign that finds out) and carries out request message institute processing of request and operate; Perhaps
2) (promptly corresponding with the above-mentioned veneer sign that finds out veneer calls the resource of judging through the sign of the said resource of judging and carries out the processing of request operation of request message institute the veneer under.
Through above-mentioned different implementation, make to satisfy and under several scenes, call the processing of request operation of resource execution institute, increased the applicability of scheme.
Preferably, on the basis of the foregoing description, the present invention also provides a kind of the virtual map relation table has been carried out method for updating.Particularly, after the establishment of the state of resources on polylith veneer virtual map relation table, method for processing resource also comprises: judge whether the state of resources on the polylith veneer changes; Sign according to the veneer at the sign of the resource of generating change of state and this resource place is upgraded the record item in the virtual map relation table.In the present embodiment, the renewal of virtual map relation table can be realized in real time, that is, current shared resource can be used exactly, effectively.
Preferably, in a preferred embodiment of the invention, a kind of scheme that periodically updates the virtual map relation table is provided also.Particularly; Judge through following steps whether the state of resources on the said polylith veneer changes: every determining step below the predetermined cycle carries out once: judge whether the state of resources on the said polylith veneer becomes busy state from idle condition, and judge whether the state of resources on the said polylith veneer becomes idle condition from busy state.In the present embodiment, adopt the mode of periodically updating, can and take in real-time and average out aspect the resource, promptly can be implemented in real-time update virtual map relation table under the situation that does not take more resource.
Preferably, the virtual map relation table among above-mentioned each embodiment can write down the sign of the resource identification and the veneer under this resource of the idling-resource on the every veneer, shown in the following above-mentioned table 1.Certainly; The existence form of above-mentioned virtual map relation table is a kind of example; The present invention is not limited only to this; For example, the virtual map relation table can also write down sign and this state of resources of the resource identification and the veneer under this resource of all resources on the every veneer, shown in above-mentioned table 2.
Preferably, at least two veneers in the above-mentioned polylith veneer have different types, realize fully sharing the idling-resource on the veneer.Like this, can increase applicability of the present invention, can on different classes of veneer, realize resource-sharing.
On the basis of resource processing system shown in Figure 2, the method that the present invention also provides a kind of preferred veneer and resource interface plate to carry out communication, as shown in Figure 4, it comprises the steps:
S402:veneer 208 normally powers onresource interface plate 202, and 206 pairs of veneers ofNMS 208 are managed withresource interface plate 202;
S404: the resource status ofresource interface plate 202 each veneer of monitoring;
S406:resource interface plate 202 is according to the resource status of each veneer that monitors, and board type or single board chip type calculate, and generates corresponding virtual map relation table;
S408:resource interface plate 202 reports NMS 206 with the virtual map relation table;
S410: afterresource interface plate 202 reports NMS 206 with the virtual map relation table; 206 pairs of virtual map relation tables of NMS are confirmed and are carried out the virtual map relation and dispose; After NMS 206 configuration virtual mapping relations are accomplished; Throughmaster control veneer 204 the virtual map relation table is sent to resourceinterface plate 202,resource interface plate 202 records are also accomplished the configuration that virtual map concerns;
S412:resource interface plate 202 is after accomplishing the configuration of virtual map relation; The virtual map information synchronization is sent to eachveneer 208; And the polylith veneer is carried out integrated operation through the physical connection between the veneer; In some specific occasions, carry out subsequent operation again after the quantity that needs the restriction veneer to integrate;
S414: through after the connection of the physical interface on the hardware, carry out integration testing between theveneer 208;
S416: whether can operate as normal after single-board testing is integrated, if test is normal, go to step S418, if test is unusual, go to step S406;
S418: if test is normal, then veneer adopts the integration mode to carry out work;
In above-mentioned flow process; The resource interface buttress calculates generation virtual map relation table according to the resource status of each veneer, and NMS is confirmed the virtual map relation table and carried out the configuration of virtual map relation, after NMS configuration virtual mapping relations are accomplished; After veneer is integrated completion and is passed through integration testing; The resource interface plate is given veneer with administrative power, and the mode that veneer begins to launch after the integration is handled the module of self or other veneers, and what need to pay close attention to is; The all functions of veneer and incomplete management self this moment module; But, handle the information that is assigned to according to the virtual map relation that the resource interface plate distributes, the information that this moment, the veneer module reported might not be to be handled by this module place veneer.
Preferably, among the above-mentioned process step S406, the resource interface buttress is according to the veneer resource status that monitors; And board type or single board chip type calculate, and generates corresponding virtual map relation table, wherein; Calculate according to board type or single board chip type, realize the veneer resource consolidation.
In a kind of preferred embodiment, the resource of identical veneer is carried out integrated operation can be comprised the steps:
1) after the device power; Monitor the resource operating position of all veneers when resource interface is firm and hard; The resource interface plate can carry out integrated operation through monitoring discovery veneer A and board B; Therefore mapping relations between veneer A and the board B are reported NMS, NMS receive veneer A and board B between after the mapping relations, issue confirmation; Simultaneously mapping relations between veneer A and the board B are sent to the resource interface plate; The resource interface plate is given veneer A and board B with mapping relations synchronized transmission between veneer A of receiving and the board B, and veneer A is configured to integrate mainboard (identical because of veneer A and B, as also can board B to be configured to integrate mainboard);
2) after veneer A and board B are received and integrated order, its other resources opened share, and test mutually, confirm whether can have access to shared resource, if can have access to shared resource, the work after the resource of then distributing according to the resource interface plate is integrated.
In another kind of preferred embodiment, the resource of new and old veneer (dissimilar but the veneer of identical chips) is carried out integrated operation can be comprised the steps:
1) after the device power; Monitor the resource operating position of all veneers when resource interface is firm and hard; The resource interface plate can carry out integrated operation through monitoring new veneer A of discovery and old board B; Therefore the mapping relations between new veneer A and the old board B are reported NMS; NMS issues confirmation after receiving the mapping relations between new veneer A and the old board B, simultaneously mapping relations between new veneer A and the old board B is sent to the resource interface plate; The mapping relations synchronized transmission is given new veneer A and old board B between new veneer A that the resource interface plate will be received and the old board B, and new veneer A is configured to integrate mainboard (only can select new veneer A this moment is mainboard);
2) after new veneer A and old board B are received and integrated order, its other resources opened share, and test mutually; Confirm whether can have access to shared resource; Simultaneously, new veneer A is applied to self the new functional simulation of part on the old board B and tests, if test is passed through; Then control new function by new veneer A, other functions reasonable distribution are again given old board B.
3) after test was accomplished, new veneer A and old board B used the mode after integrating to carry out work.
Further, according to special circumstances, can also two kinds of diverse veneers be carried out virtual map and handle.
In conjunction with above-mentioned preferred embodiment, Fig. 5 is the veneer of the embodiment of the invention and a kind of preferred flow chart of the communication between the veneer, comprises the steps:
S502: the resource interface plate connects through physical interface between the veneer, and intercourses information after accomplishing the virtual map configuration and information synchronization being sent to veneer;
S504: veneer is according to the information in the virtual map allocation list; Open source is shared; Provide own resource to use to the related veneer in the virtual map allocation list, simultaneously, veneer also can remove to search the shared resource of related veneer according to the information in the virtual map allocation list;
S506: after searching completion, veneer is to the administrative power of related veneer application shared resource;
S508: after related veneer is received application; Virtual map allocation list according to the resource interface plate is sent is judged application information, if application information and virtual map allocation list coupling go to step S510; If application information and virtual map allocation list do not match, go to step S502;
S510: if application information and virtual map allocation list coupling are then given the administrative power of shared resource the veneer of the request of transmission, simultaneously, veneer adopts new mode to carry out work.
Preferably, when returning step S502, send request message and give the resource interface plate; Request is confirmed, after the resource interface plate is received request, carries out secondary and judges; If application information and virtual map allocation list coupling; Then the administrative power of shared resource is given the veneer of the request of transmission, simultaneously, veneer adopts new mode to carry out work; If application information and virtual map allocation list do not match, then stop this time request, and all related single-boards of synchronization notice, the virtual map of resource cancellation is this time waited for next time and is carried out virtual map again.
In the present embodiment, distribute the virtual map relation through the resource interface plate after, veneer handle with virtual map not before different; After through the virtual map technology resource of each veneer being set up virtual map and shared; Each veneer is shared out own resource with other veneers and is constituted a shared platform together, and veneer carries out work according to the resource of the shared platform that the resource interface plate distributes, and realizes resources balance; Being convenient to reasonable resources distributes; Solved in the prior art because of the limited problem that can't meet consumers' demand of device resource, realized reasonable distribution, satisfied user's demand real-time and efficiently limited device resource.But this way to manage can not influence the normal operation of original business.
Obviously, it is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize with the general calculation device; They can concentrate on the single calculation element; Perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element; Thereby; Can they be stored in the storage device and carry out, and in some cases, can carry out step shown or that describe with the order that is different from here by calculation element; Perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.