CN1889047A - System and method for realizing program resource sharing - Google Patents

System and method for realizing program resource sharing Download PDF

Info

Publication number
CN1889047A
CN1889047A CN 200510079991 CN200510079991A CN1889047A CN 1889047 A CN1889047 A CN 1889047A CN 200510079991 CN200510079991 CN 200510079991 CN 200510079991 A CN200510079991 A CN 200510079991A CN 1889047 A CN1889047 A CN 1889047A
Authority
CN
China
Prior art keywords
resource
shared
pond
module
software program
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
CN 200510079991
Other languages
Chinese (zh)
Other versions
CN100392604C (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CNB2005100799918A priority Critical patent/CN100392604C/en
Publication of CN1889047A publication Critical patent/CN1889047A/en
Application granted granted Critical
Publication of CN100392604C publication Critical patent/CN100392604C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a system to make the program resource share which includes the shared resource pool, the resource query module and the resource generating module. The shared resource pool is used to load the resource for achieving the software function; the resource query module is used to receive the request of getting the resource transformed by the software according to the asking function, then it checks if the pool has the relevant resource according to the request, if it has the resource, it will provide the resource to the software to achieve the function; if not, it will send the resource generating inform to the resource generating module; so the module will generate the relevant resource and load it in the shared resource pool. The invention also discloses the method to achieve the resource share.

Description

A kind of system and method for realizing that program resource is shared
Technical field
The invention belongs to the Computer Applied Technology field, relate in particular to a kind of system and method for realizing that program resource is shared.
Background technology
Current, form (WINDOWS) operating system is used widely, and the pattern manipulation interface that people can utilize this operating system to provide is realized function miscellaneous.Because graphic operation has advantages such as convenient, fast, directly perceived, therefore, various software applications also develop towards the direction that graphical operation is provided respectively, with user friendly operation, improve the service quality of software.
In the prior art, application program provides pattern manipulation interface usually in the following way:
Design display elements such as icon in each pattern manipulation interface, pinup picture in advance, when being installed to application software on the computing machine, these display elements are stored in the hard disk of this computing machine; When a module of application program needs generation and shows certain graphical interfaces for realizing its function, from hard disk, call and the corresponding display element of this graphical interfaces, and these display elements are loaded in the internal memory to realize the demonstration of graphical interfaces.
Though can being embodied as the user, the prior art provides pattern manipulation interface,, have following shortcoming:
In a software program, need provide multiple function usually, and the pairing functional module of each function can be used separately independently resource respectively when realizing separately function.Referring to shown in Figure 1, in the prior art, when a functional module need provide operation interface, this functional module can be called this operation interface graph of a correspondence display element from local file system, and these graphic display elements are loaded in the internal memory as the independent memory resource of this functional module use.And when other functional module need realize separately operation interface, these operation interfaces also needed operation interface graph of a correspondence display element separately is loaded in the internal memory and as the independent memory resource and use.Because in software design procedure; usually need to keep software to show; the consistance of mode of operation etc.; therefore; the pairing pattern manipulation interface of each function in the software program also can comprise many identical display elements usually; in the case; because each functional module general's graphic display element separately respectively is loaded in the internal memory and uses as the independent memory resource; obviously can make identical display graphics element by repetition loading repeatedly in memory headroom; thereby cause the waste of memory source; make program operation speed reduce, and give the user with the very high sensation of the current occupancy of internal memory.
With an Instant Messenger (IM) software program is example, in this software program, talk, session, these three kinds of functions of transmission SMS are provided, referring to Fig. 2, these three kinds of function graph of a correspondence operation interfaces have identical Background, and the pinup picture on each button is also all consistent.If adopt existing techniques in realizing that pattern manipulation interface is provided, then talk functional module, interactive function module and send the SMS functional module respectively that these are identical Background and pinup picture are loaded in the internal memory, and make as separately independent resource and to be used to provide the graphic presentation interface, thereby can cause the memory source waste.
In addition, in the prior art, the independent memory resource of loading the corresponding pattern manipulation interface display element of each function only just is released when quitting a program usually, if program was once used certain function, even then under the current situation of not using this function, the memory source that loads the corresponding display element of this function can not be released yet, thereby causes the waste to memory source.Especially obvious during being wasted in software program a fairly large number of function can be provided of this memory source, memory source can more and more be taken along with the increase of the function quantity of moving, thereby reduced the service efficiency of memory source, program operation speed is reduced, and user's use experience is affected greatly.
In addition, for employed other resource of software program, equally also there are the problems referred to above.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of system and method for realizing that program resource is shared, can realize sharing to identical graphic display element, thereby avoid waste to memory source, further, also can the operating position according to graphic display element be carried out active to memory source and be discharged, thus the service efficiency of raising memory source.
For achieving the above object, the invention provides a kind of system that realizes that program resource is shared, this system comprises: shared resource pond, resource query module and resource generation module, wherein:
The shared resource pond is used for loading needed each resource of realization software program function;
The resource query module is used for the obtain resource request of receiving software program according to its required realization function transmission, according to whether being mounted with corresponding resource in this request inquiry shared resource pond, when inquiry obtains respective resources, from the shared resource pond, quote this resource and realize described function to offer software program, when inquiring about, send resource to the resource generation module and generate notice less than respective resources;
The resource generation module is used for generating according to the resource that receives the resource parameters of notice and input, dynamically generate described inquiry less than respective resources, and quote this resource and use to program, and, the resource of this generation is loaded in the shared resource pond.
Wherein, this system further comprises: quoting resource administration module, managing resource state module and resource are destroyed module, wherein:
The quoting resource administration module is used for calculating the current number of times that is cited of each resource of shared resource pond, and this number of times is offered resource destruction module;
The managing resource state module is used for basis to the current operation of carrying out of each resource of shared resource pond, the current state of each resource in the managing shared resource pond;
Resource is destroyed the current state that the resource that the quoting resource number of times that provided according to the quoting resource administration module and managing resource state module provided is provided module, delete the current resource that is not cited and is in idle condition, and discharge the shared memory headroom of this resource.
Wherein, the resource generation module comprises resource type administration module and the dynamic generation module of memory source, wherein:
The resource type administration module is used for preserving dissimilar templates respectively according to the type difference of each resource, calls corresponding template and offers the dynamic generation module of memory source according to the resource generation notice that the resource query module sends;
The template that provides according to the resource parameters of described input and resource type administration module is provided the dynamic generation module of memory source, dynamically generate described inquiry less than resource, quote the resource of this generation and use, and in the shared resource pond, load this resource to program.
Wherein, this system further comprises the adaptive administration module of resource, be used for described each module is converted into and the operation of sharing the unified type that resource type that resource pool loads adapts the operation in shared resource pond, and, the resource type that the resource generation module is generated is converted to and the corresponding to type of sharing in the resource pool to be loaded of resource, and the resource that the resource query module is quoted from the shared resource pond is converted to software program resource needed type.
Wherein, described resource query module is further used for preserving each resource and its corresponding relation of resource identification separately, and the resource query module is according to whether being mounted with corresponding resource in this corresponding relation inquiry shared resource pond; The resource generation module is further used for setting up the respective resources of described dynamic generation and the corresponding relation of its resource identification, and this corresponding relation is offered the preservation of resource query module.
The present invention also provides a kind of method that realizes that program resource is shared, and this method comprises:
Steps A: software program initializes, shared resource pond are obtained each required resource of this software program from the file system of this software program, and load these resources in this shared resource pond;
Step B: software program begins its function implementation procedure, function according to its required realization, send the resource acquisition resource request, obtain in the resource request inquiry shared resource pond whether be mounted with respective resources according to what receive, if inquire respective resources, then to this resource execution in step C, if do not inquire respective resources, execution in step D then;
Step C: quote the respective resources that in the shared resource pond, inquires, and the resource that this is quoted is offered software program to realize its corresponding function, process ends then;
Step D: generate the described respective resources that is not queried to according to described acquisition request conforms, quote this resource and offer software program realizing its corresponding function, and the resource that will generate is loaded in the shared resource pond.
Wherein, this method further comprises:
Judge current whether being cited of each resource in the shared resource pond respectively, if, undo then, otherwise, delete this current resource that is not cited, discharge the memory headroom of this resource in the shared resource pond.
Wherein, this method further comprises: in advance for being loaded into each resource settings quoting resource time number variable in the shared resource pond, and be 0 with this initialization of variable;
The described respective resources that inquires in the shared resource pond of quoting of step C further comprises: the value of the quoting resource time number variable of the resource quoted is added 1;
Describedly judge that the current method that whether is cited of resource is:
Whether the value of judging the quoting resource time number variable of this resource is 0, if, then judge to obtain that this resource is current not to be cited, otherwise, judge to obtain that this resource is current to be cited.
Wherein, the method for the current resource that is not cited of described deletion is:
Utilize the resource of preservation and the corresponding relation of its resource identification, search according to the resource identification of the current resource that is not cited and obtain the resource that this is not cited, delete this resource, and delete the corresponding relation of this resource and its resource identification.
Wherein, before the current resource that is not cited of described deletion, this method further comprises:
Whether the current state of judging this current resource that is not cited is idle condition, if then carry out the step of this current resource that is not cited of described deletion.
Wherein, the described shared resource of steps A pond obtains the method for each required resource of this software program and is from the file system of this software program:
Steps A 1: software program begins initialization procedure, sends the initialization sign on to the shared resource pond, wherein, comprises the sign of this software program in the initialization sign on;
Steps A 2: the shared resource pond obtains each required resource of this software program according to the sign of the software program in the initialization sign on that receives to the file system requests of this software program;
Steps A 3: each resource that the file system of described software program will be preserved this software program thereon sends to the shared resource pond.
Wherein, described these resources of loading in this shared resource pond of steps A further comprise:
Set up described resource and its corresponding relation of resource identification separately, and preserve this corresponding relation;
The method that whether is mounted with respective resources in the resource request inquiry shared resource pond of obtaining that the described basis of step B is received is:
According to the resource of being preserved and the corresponding relation of resource identification separately, whether be mounted with in the inquiry shared resource pond and obtain resource specified in the resource request.
Wherein, the described generation of step D is not further comprised by the respective resources that inquiry obtains:
Set up the resource of this generation and the corresponding relation of its resource identification, and preserve this corresponding relation;
The method that whether is mounted with respective resources in the resource request inquiry shared resource pond of obtaining that the described basis of step B is received is:
According to the resource of being preserved and the corresponding relation of resource identification separately, whether be mounted with in the inquiry shared resource pond and obtain resource specified in the resource request.
Wherein, described resource is the display graphics element resource.
As seen, the present invention adopts the shared resource pond that the resource of each function of software program is carried out unified management, thereby make each function no longer waste internal memory owing to independent committed memory space respectively, thereby significantly reduced the occupancy of software memory, every function that the user can use software to provide smoothly has been provided.In addition, the present invention can carry out active to each resource in the shared resource pond and discharge, thereby the internal memory that will not be cited is in time deleted and is discharged its memory headroom, makes software can not take too much memory source because of long-play, has realized the internal memory resources effective is managed.
Description of drawings
Fig. 1 is an independent resource internal storage structure synoptic diagram used in the prior art.
Fig. 2 is the synoptic diagram of a software program pattern manipulation interface.
Fig. 3 is the synoptic diagram of system provided by the present invention.
Fig. 4 is the system schematic in one embodiment of the present invention.
Fig. 5 is the system schematic in one embodiment of the present invention.
Fig. 6 is for realizing process flow diagram of the present invention.
Fig. 7 is the process flow diagram of performing step 600.
Fig. 8 is the process flow diagram of performing step 602.
Fig. 9 is the process flow diagram of performing step 604.
Figure 10 is the process flow diagram of performing step 605.
Embodiment
The present invention is a kind of shared system and method for program resource, adopt the mode unified management program resource in shared resource pond, when each module in program realizes separately function respectively, judge whether have required resource in the shared resource pond, if then use this resource in the shared resource pond, thereby realization corresponding function, if no, then generate resource requirement and be stored in the shared resource pond, utilize resource newly-generated in the shared resource pond to realize corresponding function.In addition, the present invention also judges the situation of calling of each resource in the shared resource pond, if judgement obtains current not being called of resource, then initiatively discharges the shared memory headroom of this resource, thereby reduction takies internal memory, improves the service efficiency of internal memory.
Describe the present invention below in conjunction with accompanying drawing.
Referring to Fig. 3, system provided by the present invention comprises shared resource pond, resource query module, resource generation module at least, wherein:
The shared resource pond is used for obtaining each resource that realizes this program function from the file system of software program in advance, and loads these resources of being obtained;
The resource query module is used for the resource request of obtaining according to the program transmission, in the shared resource pond, inquire about the resource corresponding and quote this resource and offer the program use with this request, and, when inquiring about, send resource to the resource generation module and generate notice less than corresponding resource;
The resource generation module is used for receiving after resource that the resource query module sends generates notice, resource parameters according to input dynamically generates and obtains the corresponding resource of resource request and quote this resource and use to program, and, this resource is loaded in the shared resource pond.
Referring to Fig. 4, in one embodiment of the present invention, the resource generation module comprises resource type administration module and the dynamic generation module of memory source, wherein:
The resource type administration module is preserved the template of each resource type correspondence respectively according to the difference of resource type, and receiving after resource that the resource query module sends generates notice, inquiry obtains and the corresponding template of the resource of required generation, and this template is offered the dynamic generation module of memory source; Wherein, comprise contents such as needed common parameter, generating mode in the process that generates the type resource in the template of described each resource type correspondence respectively;
The dynamic generation module of memory source is used for receiving and required generation resource corresponding type parameter, the template of utilizing the type parameter and resource type administration module to provide dynamically generates the resource of required generation, quote the resource of this generation and use, and in the shared resource pond, load this resource to program.
Referring to Fig. 5, in one embodiment of the present invention, in order to realize that the resource in the shared resource pond is carried out active management, so that can in time discharge the shared memory headroom of this resource when resource is not called, system provided by the present invention can further include:
Quoting resource administration module, managing resource state module and resource are destroyed module, wherein:
The quoting resource administration module is used for calculating the current number of times that is cited of each resource of shared resource pond, and this number of times is offered resource destruction module; Its concrete computing method are: quote time number variable for each resources definition in the shared resource pond in advance, and be 0 with this initialization of variable, during a certain resource in quoting the shared resource pond, time number variable of quoting of this resource is added 1, when making that owing to the software program closing function a certain resource no longer is cited, the inferior number variable of quoting of this resource is subtracted 1;
The managing resource state module is used for the current state of each resource of managing shared resource pond, according to the current institute of resource is operated, with this state of resources setting or switch to query State, ready state, user mode or non-working condition; Wherein, query State and user mode show that this resource is in busy condition, under this state, because this resource or be about to be used, therefore can not delete this resource; Ready state and non-working condition show that this resource is in idle condition, under this state, because resource is not used, therefore, can delete this resource;
Resource is destroyed module the quoting resource number of times that provided according to the quoting resource administration module is provided, whether judge that each resource is current is cited, when judgement obtains a resource and is not cited, obtain the current state of this resource from the managing resource state module, when being in ready state or non-working condition, this resource deletes this resource, to discharge the shared memory headroom of this resource.
In specific implementation process of the present invention, in order effectively to realize inquiry to resource, in the resource query module, further preserve each resource and its corresponding relation of resource identification separately, after the resource query module is received and is obtained resource request, extract the resource identification in this resource request, according to the resource of being preserved and the corresponding relation of resource identification separately, judge whether with resource request in the corresponding resource of resource identification, realize whether the judgement of the corresponding resource of request is arranged in the shared resource pond with this.Corresponding with it, the resource generation module is further used for giving birth to the corresponding relation of setting up newly-generated resource and its resource identification when newly-generated resource, and this corresponding relation is offered the preservation of resource query module.
At above Fig. 4, in each preferred embodiment shown in Figure 5, system provided by the present invention further comprises the adaptive administration module of resource, this module is used for above-mentioned each module is converted into and the operation of sharing the unified type that resource type that resource pool loads adapts the operation in shared resource pond, and be used for the resource type that the resource generation module generates being converted to and sharing the corresponding to type of resource that resource pool loads, the resource that the resource query module is quoted from the shared resource pond is converted to software program resource needed type, thereby realize the transparent operation between above-mentioned each module and the shared resource pool, reduce since the shared resource pond that the resource type difference is caused and above-mentioned each module can't collaborative work problem, thereby reduce the coupling requirement between shared resource pond and above-mentioned each module, make the easier realization of system provided by the present invention.
The above is the specific implementation of system provided by the present invention, below method provided by the present invention is described in detail.
Referring to Fig. 6, method provided by the present invention comprises:
Step 600: software program initializes, shared resource pond are obtained each required resource of this software program from the file system of this software program, and load these resources in this shared resource pond;
Step 601: software program begins its function implementation procedure, sends the resource acquisition resource request, obtains to realize described function resource needed with request;
Step 602: in the shared resource pond, whether be mounted with respective resources according to the acquisition request conforms inquiry that receives, if inquire respective resources, then to this resource execution in step 603, otherwise, execution in step 604;
Step 603: quote the resource that inquires in the shared resource pond, and the resource that this is quoted is offered software program, software program utilizes this resource realizing its corresponding function, and process ends;
Step 604: generate the resource that is not queried to according to described acquisition request conforms, quote this resource and offer software program realizing its corresponding function, and the resource that will generate is loaded in the shared resource pond.
In the present invention, in order in time to delete the resource that is not cited, discharge the shared memory headroom of this resource, this method also can further comprise:
Step 605: judge current whether being cited of each resource in the shared resource pond respectively, if, undo then, otherwise, delete this current resource that is not cited, discharge the memory headroom of this resource in the shared resource pond.Wherein, the realization of step 605 is not influenced by the execution sequence of above-mentioned steps 600~step 604, can realize any time execution in step 605 of method provided by the present invention not influencing realization of the present invention.
Below the specific implementation of above-mentioned steps is described in detail respectively.
(1) specific implementation of step 600:
Referring to Fig. 7, in embodiments of the present invention, adopt following steps performing step 600:
Step 6001: software program begins initialization procedure, sends the initialization sign on to the shared resource pond, wherein, comprises the sign of this software program in the initialization sign on;
Step 6002: the shared resource pond obtains each required resource of this software program according to the sign of the software program in the initialization sign on that receives to the file system requests of this software program;
Step 6003: each resource that the file system of described software program will be preserved thereon sends to the shared resource pond, and the shared resource pond receives each resource and loads these resources;
Step 6004: set up the corresponding relation of each resource and its resource identification, and preserve this corresponding relation, use during for step 602 query resource; Wherein, in embodiments of the present invention, set up Map table in advance, the mapping relations of described resource and resource identification are kept at during this Map shows, thereby realize the above-mentioned step of setting up corresponding relation; In other embodiment of the present invention, also can adopt alternate manner to set up and preserve the corresponding relation of resource and its resource identification, do not influence realization of the present invention; In addition, in embodiments of the present invention, after being loaded in the shared resource pond, resource just carries out the above-mentioned step of setting up corresponding relation, in other embodiment of the present invention, also can be when the shared resource pond receives each resource, set up the corresponding relation and the preservation of these resources and its resource identification, do not influence realization of the present invention.
(2) specific implementation of step 601:
In embodiments of the present invention, after software program begins its function implementation procedure, send acquisition request conforms, comprise the sign of this required realization function in this acquisition request conforms, for carrying out resource query according to this sign in the step 602 to the shared resource pond.
(3) specific implementation of step 602:
In the specific embodiment of the invention, owing to set up the corresponding relation of each resource and its resource identification in step 600, therefore, referring to Fig. 8, step 602 can utilize following steps to realize:
Step 6021: the function that this need be realized is determined according to the Function Identification in the acquisition request conforms of receiving in the shared resource pond;
Step 6022: the function that realize according to these needs in the shared resource pond determines to realize the resource identification of needed each resource of this function, utilize the resource set up in these resource identifications and the step 600 and the corresponding relation of resource identification, search and whether be mounted with these resources in the shared resource pond, obtained corresponding resource if search, then utilize this resource execution in step 603, if in the shared resource pond, do not find, then generate this resource by execution in step 604 for some resources.
(4) specific implementation of step 603:
In embodiments of the present invention, need carry out the initiatively step of release to the resource in the shared resource pond in conjunction with follow-up, performing step 603 in such a way:
The described resource that inquires is quoted in the shared resource pond, offering software program uses to realize its function, and, the current number of times of quoting of this resource that adds up in embodiments of the present invention, is each resource settings quoting resource time number variable in advance, and be 0 with this initialization of variable, when quoting each resource, the quoting resource time number variable with this resource correspondence adds 1 respectively, thereby realizes the number of times of quoting of resource is counted.
(5) specific implementation of step 604:
Referring to Fig. 9, in embodiments of the present invention, adopt following steps performing step 604:
Step 6041: according to described acquisition request conforms, determine the type that this resource is affiliated, and receive the type parameter of this resource of input;
Step 6042: determine the template corresponding according to the type under the described resource with this resource, the type parameter that utilizes this template and receive, the generation acquisition request conforms requires the resource obtained;
Step 6043: the resource that will generate is loaded in the shared resource pond, and, set up the resource of this generation and the corresponding relation of its resource identification, and be kept at this corresponding relation; Wherein, in embodiments of the present invention, adopt the mode of Map table to preserve above-mentioned corresponding relation, in other embodiment of the present invention, also can adopt alternate manner to preserve, do not influence realization of the present invention;
Step 6044: the shared resource pond is quoted the resource of this generation and this resource of quoting is offered software program and realizes its corresponding function.
(6) specific implementation of step 605:
Referring to Figure 10, in embodiments of the present invention, show performing step 605 by utilizing above-mentioned Map, specifically may further comprise the steps:
Step 6051: read the quoting resource time number variable of each resource of being loaded in the shared resource pond respectively, judge respectively whether the quoting resource time number variable of each resource is 0, if, then to this resource execution in step 6052, otherwise, undo, and process ends;
Step 6052: according to the Map table of preserving resource identification and resource corresponding relation, currently quote the resource identification that number of times is 0 resource, in the shared resource pond, search and obtain corresponding resource by what judgement obtained;
Step 6053: the current state of the resource that is found in the determining step 6052, if this state is query State or user mode, then do not carry out subsequent step, process ends, otherwise, showing that this resource is current is in ready or is not used such idle condition, and then execution in step 6054;
Step 6054: the resource that obtains of searching in the deletion step 6052 in the shared resource pond, discharge the shared memory headroom of this resource, and the corresponding relation of deleting this resource and its resource identification.
In above embodiment, described resource can be the display graphics element resource, also can be the program resource of other type, and implementation method is consistent with the foregoing description, does not influence realization of the present invention.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1, a kind of system that realizes that program resource is shared is characterized in that this system comprises: shared resource pond, resource query module and resource generation module, wherein:
The shared resource pond is used for loading needed each resource of realization software program function;
The resource query module is used for the obtain resource request of receiving software program according to its required realization function transmission, according to whether being mounted with corresponding resource in this request inquiry shared resource pond, when inquiry obtains respective resources, from the shared resource pond, quote this resource and realize described function to offer software program, when inquiring about, send resource to the resource generation module and generate notice less than respective resources;
The resource generation module is used for generating according to the resource that receives the resource parameters of notice and input, dynamically generate described inquiry less than respective resources, and quote this resource and use to program, and, the resource of this generation is loaded in the shared resource pond.
2, system according to claim 1 is characterized in that, this system further comprises: quoting resource administration module, managing resource state module and resource are destroyed module, wherein:
The quoting resource administration module is used for calculating the current number of times that is cited of each resource of shared resource pond, and this number of times is offered resource destruction module;
The managing resource state module is used for basis to the current operation of carrying out of each resource of shared resource pond, the current state of each resource in the managing shared resource pond;
Resource is destroyed the current state that the resource that the quoting resource number of times that provided according to the quoting resource administration module and managing resource state module provided is provided module, delete the current resource that is not cited and is in idle condition, and discharge the shared memory headroom of this resource.
3, system according to claim 1 and 2 is characterized in that, the resource generation module comprises resource type administration module and the dynamic generation module of memory source, wherein:
The resource type administration module is used for preserving dissimilar templates respectively according to the type difference of each resource, calls corresponding template and offers the dynamic generation module of memory source according to the resource generation notice that the resource query module sends;
The template that provides according to the resource parameters of described input and resource type administration module is provided the dynamic generation module of memory source, dynamically generate described inquiry less than resource, quote the resource of this generation and use, and in the shared resource pond, load this resource to program.
4, system according to claim 3, it is characterized in that, this system further comprises the adaptive administration module of resource, be used for described each module is converted into and the operation of sharing the unified type that resource type that resource pool loads adapts the operation in shared resource pond, and, the resource type that the resource generation module is generated is converted to and the corresponding to type of sharing in the resource pool to be loaded of resource, and the resource that the resource query module is quoted from the shared resource pond is converted to software program resource needed type.
5, system according to claim 1, it is characterized in that, described resource query module is further used for preserving each resource and its corresponding relation of resource identification separately, and the resource query module is according to whether being mounted with corresponding resource in this corresponding relation inquiry shared resource pond; The resource generation module is further used for setting up the respective resources of described dynamic generation and the corresponding relation of its resource identification, and this corresponding relation is offered the preservation of resource query module.
6, a kind of method that realizes that program resource is shared is characterized in that this method comprises:
Steps A: software program initializes, shared resource pond are obtained each required resource of this software program from the file system of this software program, and load these resources in this shared resource pond;
Step B: software program begins its function implementation procedure, function according to its required realization, send the resource acquisition resource request, obtain in the resource request inquiry shared resource pond whether be mounted with respective resources according to what receive, if inquire respective resources, then to this resource execution in step C, if do not inquire respective resources, execution in step D then;
Step C: quote the respective resources that in the shared resource pond, inquires, and the resource that this is quoted is offered software program to realize its corresponding function, process ends then;
Step D: generate the described respective resources that is not queried to according to described acquisition request conforms, quote this resource and offer software program realizing its corresponding function, and the resource that will generate is loaded in the shared resource pond.
7, method according to claim 6 is characterized in that this method further comprises:
Judge current whether being cited of each resource in the shared resource pond respectively, if, undo then, otherwise, delete this current resource that is not cited, discharge the memory headroom of this resource in the shared resource pond.
8, method according to claim 7 is characterized in that, this method further comprises: in advance for being loaded into each resource settings quoting resource time number variable in the shared resource pond, and be 0 with this initialization of variable;
The described respective resources that inquires in the shared resource pond of quoting of step C further comprises: the value of the quoting resource time number variable of the resource quoted is added 1;
Describedly judge that the current method that whether is cited of resource is:
Whether the value of judging the quoting resource time number variable of this resource is 0, if, then judge to obtain that this resource is current not to be cited, otherwise, judge to obtain that this resource is current to be cited.
9, method according to claim 7 is characterized in that, the method for the current resource that is not cited of described deletion is:
Utilize the resource of preservation and the corresponding relation of its resource identification, search according to the resource identification of the current resource that is not cited and obtain the resource that this is not cited, delete this resource, and delete the corresponding relation of this resource and its resource identification.
According to claim 7 or 9 described methods, it is characterized in that 10, before the current resource that is not cited of described deletion, this method further comprises:
Whether the current state of judging this current resource that is not cited is idle condition, if then carry out the step of this current resource that is not cited of described deletion.
11, method according to claim 6 is characterized in that, the described shared resource of steps A pond obtains each required resource of this software program from the file system of this software program method is:
Steps A 1: software program begins initialization procedure, sends the initialization sign on to the shared resource pond, wherein, comprises the sign of this software program in the initialization sign on;
Steps A 2: the shared resource pond obtains each required resource of this software program according to the sign of the software program in the initialization sign on that receives to the file system requests of this software program;
Steps A 3: each resource that the file system of described software program will be preserved this software program thereon sends to the shared resource pond.
12, method according to claim 6 is characterized in that, described these resources of loading in this shared resource pond of steps A further comprise:
Set up described resource and its corresponding relation of resource identification separately, and preserve this corresponding relation;
The method that whether is mounted with respective resources in the resource request inquiry shared resource pond of obtaining that the described basis of step B is received is:
According to the resource of being preserved and the corresponding relation of resource identification separately, whether be mounted with in the inquiry shared resource pond and obtain resource specified in the resource request.
13, method according to claim 6 is characterized in that, the described generation of step D is not further comprised by the respective resources that inquiry obtains:
Set up the resource of this generation and the corresponding relation of its resource identification, and preserve this corresponding relation;
The method that whether is mounted with respective resources in the resource request inquiry shared resource pond of obtaining that the described basis of step B is received is:
According to the resource of being preserved and the corresponding relation of resource identification separately, whether be mounted with in the inquiry shared resource pond and obtain resource specified in the resource request.
14, method according to claim 6 is characterized in that, described resource is the display graphics element resource.
CNB2005100799918A 2005-06-27 2005-06-27 System and method for realizing program resource sharing Active CN100392604C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100799918A CN100392604C (en) 2005-06-27 2005-06-27 System and method for realizing program resource sharing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100799918A CN100392604C (en) 2005-06-27 2005-06-27 System and method for realizing program resource sharing

Publications (2)

Publication Number Publication Date
CN1889047A true CN1889047A (en) 2007-01-03
CN100392604C CN100392604C (en) 2008-06-04

Family

ID=37578325

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100799918A Active CN100392604C (en) 2005-06-27 2005-06-27 System and method for realizing program resource sharing

Country Status (1)

Country Link
CN (1) CN100392604C (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103522A (en) * 2009-12-18 2011-06-22 中兴通讯股份有限公司 Resource management method and system
CN102520929A (en) * 2011-11-24 2012-06-27 宇龙计算机通信科技(深圳)有限公司 Management method and device of system resource
CN102594848A (en) * 2011-01-06 2012-07-18 中兴通讯股份有限公司 Open type developing method and system for application of internet of things
CN101697136B (en) * 2009-10-27 2013-01-16 金蝶软件(中国)有限公司 Method and device for controlling resource
CN103019808A (en) * 2011-09-28 2013-04-03 中国移动通信集团公司 Business state regulating device and method
CN103227809A (en) * 2011-12-19 2013-07-31 西门子公司 Method and system for managing resources among different clients for an exclusive use
CN103546508A (en) * 2012-07-12 2014-01-29 阿里巴巴集团控股有限公司 Information synchronization system and method
CN103946831A (en) * 2011-11-25 2014-07-23 国际商业机器公司 System, method and program product for cost-aware selection of templates for provisioning shared resources
CN101788906B (en) * 2010-01-21 2015-06-10 中兴通讯股份有限公司 Resource management method and system thereof
CN106528294A (en) * 2016-11-04 2017-03-22 郑州云海信息技术有限公司 Resource pool management method and system
CN106569880A (en) * 2016-11-07 2017-04-19 Tcl集团股份有限公司 Method and system for dynamically sharing resources between Android applications
CN106648877A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Resource application and release method and device
CN107844371A (en) * 2017-10-12 2018-03-27 北京京东尚科信息技术有限公司 Task processing method, system and electronic equipment
CN109710436A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Space method for cleaning, device, equipment and computer readable storage medium
CN110227265A (en) * 2019-06-18 2019-09-13 贵阳动视云科技有限公司 A kind of computer graphical resource share method and device
WO2021081745A1 (en) * 2019-10-29 2021-05-06 北京嗨动视觉科技有限公司 Hardware resource allocation method and apparatus, video processor, and display system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1186317B1 (en) * 2000-06-13 2009-12-02 Microsoft Corporation Multilingual user interface for an operating system
US7131120B2 (en) * 2002-05-16 2006-10-31 Sun Microsystems, Inc. Inter Java virtual machine (JVM) resource locking mechanism
CN1601479A (en) * 2003-09-22 2005-03-30 英业达股份有限公司 Graphical source processing method in application program

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697136B (en) * 2009-10-27 2013-01-16 金蝶软件(中国)有限公司 Method and device for controlling resource
CN102103522A (en) * 2009-12-18 2011-06-22 中兴通讯股份有限公司 Resource management method and system
CN101788906B (en) * 2010-01-21 2015-06-10 中兴通讯股份有限公司 Resource management method and system thereof
CN102594848B (en) * 2011-01-06 2015-09-16 中兴通讯股份有限公司 A kind of method and system of Internet of Things application being carried out to open type developing
CN102594848A (en) * 2011-01-06 2012-07-18 中兴通讯股份有限公司 Open type developing method and system for application of internet of things
CN103019808A (en) * 2011-09-28 2013-04-03 中国移动通信集团公司 Business state regulating device and method
CN103019808B (en) * 2011-09-28 2016-08-10 中国移动通信集团公司 The adjusting means of a kind of service condition and method
CN102520929A (en) * 2011-11-24 2012-06-27 宇龙计算机通信科技(深圳)有限公司 Management method and device of system resource
CN103946831A (en) * 2011-11-25 2014-07-23 国际商业机器公司 System, method and program product for cost-aware selection of templates for provisioning shared resources
CN103227809A (en) * 2011-12-19 2013-07-31 西门子公司 Method and system for managing resources among different clients for an exclusive use
CN103546508A (en) * 2012-07-12 2014-01-29 阿里巴巴集团控股有限公司 Information synchronization system and method
CN103546508B (en) * 2012-07-12 2016-08-10 阿里巴巴集团控股有限公司 Information synchronization system and method
CN106648877A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Resource application and release method and device
CN106648877B (en) * 2015-10-28 2020-08-25 阿里巴巴集团控股有限公司 Resource application and release method and device
CN106528294A (en) * 2016-11-04 2017-03-22 郑州云海信息技术有限公司 Resource pool management method and system
CN106569880A (en) * 2016-11-07 2017-04-19 Tcl集团股份有限公司 Method and system for dynamically sharing resources between Android applications
CN106569880B (en) * 2016-11-07 2020-12-22 Tcl科技集团股份有限公司 Method and system for dynamically sharing resources between Android applications
CN107844371A (en) * 2017-10-12 2018-03-27 北京京东尚科信息技术有限公司 Task processing method, system and electronic equipment
CN109710436A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Space method for cleaning, device, equipment and computer readable storage medium
CN110227265A (en) * 2019-06-18 2019-09-13 贵阳动视云科技有限公司 A kind of computer graphical resource share method and device
CN110227265B (en) * 2019-06-18 2020-06-26 贵阳动视云科技有限公司 Computer graphic resource sharing method and device
WO2021081745A1 (en) * 2019-10-29 2021-05-06 北京嗨动视觉科技有限公司 Hardware resource allocation method and apparatus, video processor, and display system

Also Published As

Publication number Publication date
CN100392604C (en) 2008-06-04

Similar Documents

Publication Publication Date Title
CN1889047A (en) System and method for realizing program resource sharing
CN1133308C (en) Radio communication system and method for changing displaying speech of radio user's device
CN1852101A (en) Parallel downloading method and terminal
CN1708753A (en) Download system, communication terminal, server, and download method
CN1773456A (en) Automatic mounting system and method for printer driving program
CN1761200A (en) System and method for leveraging end-users' preferences for efficient communications
CN101034990A (en) Right management method and device
CN1622055A (en) Application data management method for mobile terminal and mobile terminal used therein
CN1383301A (en) Appts. and method for automatically classifying recording medium thereof
CN1901537A (en) Self adaptive conversation compression managing method and compression managing device and conversation managing system
CN1852137A (en) Method for realizing synchronization of client end data and server end data
CN1848760A (en) Software assembly parameter configuration method, and system and terminal equipment thereof
CN1581142A (en) Method, server and subscriber machine used in subscriber machine-server distribution type system
CN1852537A (en) Method and apparatus for processing fault task in apparatus management
CN1859140A (en) Method for realizing enabled positioning and positioning platform system
CN1889048A (en) Package realizing method and system
CN1794633A (en) Unloading method and terminal
CN1848761A (en) Software assembly parameter configuration method and system and terminal equipment thereof
CN1841285A (en) Remote monitoring method for network computer
CN101080015A (en) System and method for uploading third party video and audio content in IPTV system
CN1917484A (en) Method of fast access of instant communicating system and system thereof
CN1889729A (en) Method and system for extending storing space of mobile terminal
CN1863085A (en) Method and system for ensuring network managment and element configuration data consistency
CN101068190A (en) Object sharing method, object management server and network system
CN1225133C (en) Method of opening control point business capacity of intelligent network service to the third party

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant