CN110471713A - A kind of ultrasonic system method for managing resource and device - Google Patents

A kind of ultrasonic system method for managing resource and device Download PDF

Info

Publication number
CN110471713A
CN110471713A CN201910755675.XA CN201910755675A CN110471713A CN 110471713 A CN110471713 A CN 110471713A CN 201910755675 A CN201910755675 A CN 201910755675A CN 110471713 A CN110471713 A CN 110471713A
Authority
CN
China
Prior art keywords
user
resource
target
resource user
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910755675.XA
Other languages
Chinese (zh)
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.)
Sonoscape Medical Corp
Original Assignee
Sonoscape Medical Corp
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 Sonoscape Medical Corp filed Critical Sonoscape Medical Corp
Priority to CN201910755675.XA priority Critical patent/CN110471713A/en
Publication of CN110471713A publication Critical patent/CN110471713A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44552Conflict resolution, i.e. enabling coexistence of conflicting executables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application proposes a kind of method for managing resource and device, this method comprises: obtaining the target resource solicited message that first resource user sends;The priority of the priority of the first resource user and Secondary resource user is compared;If the priority of the first resource user is equal to the priority of the Secondary resource user, judge whether the first resource user meets the condition of user's set where the Secondary resource user is added;If the first resource user meets the condition of user's set where the Secondary resource user is added, the user is added in the first resource user and is gathered.Above-mentioned treatment process realizes first resource user and Secondary resource user common source, effectively prevents the resource that first resource user seizes Secondary resource user, it is therefore prevented that the case where resource user's function is interrupted.

Description

A kind of ultrasonic system method for managing resource and device
Technical field
This application involves field of computer technology more particularly to a kind of ultrasonic system method for managing resource and device.
Background technique
The resource occupation mechanism in ultrasonic system is mutual exclusion at present, same resource synchronization resource user only One, a resource user gets a certain resource, then must lose the resource using the resource user of the resource originally.Example Such as, when ultrasonic system shutdown dialog box pop-up, if plug ultrasonic probe, selection interface of popping one's head in just obtain mouse resources simultaneously Mouse resources are hidden, dialog box of shutting down at this time can not then get mouse resources, therefore can not grasp to shutdown dialog box Make.
Above-mentioned resource occupation mechanism is to the managerial confusion of resource, and resource preemption events, cause unnecessary frequent occurrence Function is interrupted.
Summary of the invention
Defect and deficiency based on the above-mentioned prior art, the application propose a kind of ultrasonic system method for managing resource and dress It sets, can effectively avoid that resource preemption events occur in system, and effectively reduce the occurrence of function is interrupted.
In order to achieve the above object, specifically the following technical solutions are proposed by the application:
A kind of ultrasonic system method for managing resource, comprising:
Obtain the target resource solicited message that first resource user sends;Wherein, the target resource solicited message is used The target resource is used in request;
The priority of the priority of the first resource user and Secondary resource user is compared, wherein institute State the currently used person that Secondary resource user is the target resource;
If the priority of the first resource user is equal to the priority of the Secondary resource user, institute is judged State the condition for the user's set whether first resource user meets where the Secondary resource user is added;Wherein, institute The resource user stated in user's set shares the target resource;
If the first resource user meets the item of user's set where the Secondary resource user is added The first resource user is then added the user and gathered by part.
Optionally, the method also includes:
It, will be described if the priority of the first resource user is higher than the priority of the Secondary resource user Target resource distributes to the first resource user.
Optionally, the method also includes:
If the priority of the first resource user is lower than the priority or described of the Secondary resource user First resource user does not meet the condition of user's set where the Secondary resource user is added, then according to described the The first resource user is added in user's queue of the target resource by the priority of one resource user.
Optionally, the method also includes:
When the first resource user exits user's queue, judge the first resource user whether be The currently used person of the target resource;
If it is, controlling the first resource user discharges the target resource;
Whether user's set where judging the first resource user is empty;
If it is sky, by the target resource distribute to it is in user's queue of the target resource, with described the The adjacent next resource user of one resource user;
If being not sky, each user into user's set where the first resource user, which sends, to be made User's exit message;Wherein, user's exit message exits user's set for characterizing the first resource user.
Optionally, the method also includes:
If the first resource user is not the currently used person of the target resource, the first resource is made User deletes from user's queue of the target resource;
Whether user's set where judging the first resource user is empty;
If being not sky, each user into user's set where the first resource user, which sends, to be made User's exit message.
It is optionally, described that user's set is added in the first resource user, comprising:
By calling preset user to add function, the first resource user is added to the user and is collected It closes.
Optionally, the target resource includes mouse resources and/or mode resource.
A kind of ultrasonic system resource management apparatus, comprising:
Request unit, for obtaining the target resource solicited message of first resource user transmission;Wherein, the mesh It marks resource request information and uses the target resource for requesting;
Processing unit is compared, for by the priority of the priority of the first resource user and Secondary resource user It compares, wherein the Secondary resource user is the currently used person of the target resource;
First judging unit is equal to the Secondary resource user's for the priority as the first resource user When priority, judge whether the first resource user meets user's set where the Secondary resource user is added Condition;Wherein, the resource user in user's set shares the target resource;
First processing units, for where the first resource user meets and the Secondary resource user is added When the condition of user's set, the user is added in the first resource user and is gathered.
Optionally, described device further include:
The second processing unit is higher than the Secondary resource user's for the priority as the first resource user When priority, the target resource is distributed into the first resource user.
Optionally, described device further include:
Third processing unit, for the priority as the first resource user lower than the Secondary resource user's Priority or the first resource user do not meet the item of user's set where the Secondary resource user is added When part, according to the priority of the first resource user, the first resource user is added to the target resource In user's queue.
Optionally, described device further include:
Second judgment unit, for when the first resource user exits user's queue, judging described One resource user whether be the target resource currently used person;It is released if it is, controlling the first resource user Put the target resource;
Whether third judging unit is empty for user's set where judging the first resource user;
If it is sky, by the target resource distribute to it is in user's queue of the target resource, with described the The adjacent next resource user of one resource user;
If being not sky, each user into user's set where the first resource user, which sends, to be made User's exit message;Wherein, user's exit message exits user's set for characterizing the first resource user.
Optionally, described device further include:
4th judging unit, for when the first resource user is not the currently used person of the target resource, The first resource user is deleted from user's queue of the target resource;Judge the first resource user institute User's set whether be empty;If being not sky, into user's set where the first resource user Each user sends user's exit message.
Optionally, when user set is added in the first resource user by the first processing units, specifically For:
By calling preset user to add function, the first resource user is added to the user and is collected It closes.
Optionally, the target resource includes mouse resources and/or mode resource.
First judged using technical scheme when getting the target resource request of first resource user transmission Whether the priority of first resource user is equal to the priority of Secondary resource user, and first is further judged if being equal to Whether resource user meets the user's set being added where the Secondary resource user of the target resource is used;Such as Fruit meets, then the user where first resource user to be added to Secondary resource user gathers, and makes first resource user Target resource is shared with Secondary resource user.Above-mentioned treatment process realizes first resource user and Secondary resource user Common source effectively prevents the resource that first resource user seizes Secondary resource user, it is therefore prevented that resource user's function The case where capable of interrupting.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow diagram of ultrasonic system method for managing resource provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another ultrasonic system method for managing resource provided by the embodiments of the present application;
Fig. 3 is the schematic diagram of user's queue provided by the embodiments of the present application;
Fig. 4 is a kind of structural schematic diagram of ultrasonic system resource management apparatus provided by the embodiments of the present application.
Specific embodiment
The embodiment of the present application technical solution is suitable for carrying out ultrasonic system resource according to the resource request of resource user The application scenarios for managing distribution can be provided reasonably for resource user distribution system using the embodiment of the present application technical solution Generation resource preemption events between resource user can be effectively prevented to keep system resource management more orderly in source.
Illustratively, the embodiment of the present application technical solution is applicable to the hardware handles equipment such as processor, computer, or Software program can also be written as to be run.When above-mentioned hardware handles equipment executes the embodiment of the present application technical solution, or When above-mentioned software program is run, the method for managing resource that the embodiment of the present application is proposed can be executed, realizes and system is provided The reasonable distribution and management in source.
Preferably, the method for managing resource that the embodiment of the present application proposes the application be applied to system resource management module, Or the resource management blocks such as system resource managers or device, the resource management block or device are by executing the embodiment of the present application Technical solution realizes the reasonable distribution to system resource, to guarantee the order of each function of whole system.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Ultrasonic system method for managing resource shown in Figure 1, that the embodiment of the present application proposes, comprising:
S101, the target resource solicited message that first resource user sends is obtained;Wherein, the target resource request letter Breath uses the target resource for requesting;
Specifically, above-mentioned target resource, refers to the resource in computer system, Above-mentioned target resource can be mouse resources, mode resource etc..Wherein, mouse resources include the shape of mouse, size, display, The routing etc. of mouse information;Mode resource is abstract resource model, is used as unit of application scenarios, such as color mode, Mode resource may insure the correctness of hang-up and recovery of each application scenarios in handoff procedure.
Above-mentioned first resource user refers to request and uses the resource user of above-mentioned target resource, such as system In a certain functional module, certain Single port etc., it is theoretically, all to request the system program using above-mentioned target resource, function Energy module, port etc., all can serve as above-mentioned first resource user.
When above-mentioned first resource user needs to request using above-mentioned target resource, first to system or system resource Management module sends above-mentioned target resource request, uses above-mentioned target resource for requesting.
S102, the priority of the priority of the first resource user and Secondary resource user is compared, In, the Secondary resource user is the currently used person of the target resource;
Specifically, the embodiment of the present application is set, system resource management module is preparatory to resource user all in system Priority is set, the priority of the resource of the priority of resource user, that is, corresponding.
When the resource management module of system is in the target resource solicited message for receiving above-mentioned first resource user transmission When, the identity information of first resource user is identified first, determines the priority of first resource user.
Then, by the currently used person of the priority of first resource user and target resource, i.e. Secondary resource user Priority compare.
By above-mentioned comparison, resource management module judges whether the priority of above-mentioned first resource user is equal to currently just The priority of the Secondary resource user of target resource is stated in use.
It should be noted that above-mentioned Secondary resource user, which refers to, uses mesh in above-mentioned first resource user request Mark resource when, occupying and using above-mentioned target resource resource user.If when above-mentioned first resource user requests When using target resource, target resource is in idle condition, i.e., target resource is used in no resource user, then can be straight Situations such as connecing and target resource distributed into first resource user, being seized at this time there is no resource request conflict, resource.
The embodiment of the present application technical solution is intended to solve as multiple resource users while when requesting to occupy same resource Resource seize with function disruption, therefore, the embodiment of the present application technical solution is defined in when above-mentioned first resource user asks When seeking target resource, target resource is just in occupied scene, and above-mentioned Secondary resource user, then for referring to above-mentioned mesh Mark the currently used person of resource.
In the above scenario, after resource management module receives the target resource request of first resource user transmission, Whether the priority for comparing first resource user first is equal to the priority of above-mentioned Secondary resource user.
It is first resource user if it is not, thening follow the steps S105, according to the priority of first resource user Distribute resource.At this point, resource management system can priority according to first resource user relative to Secondary resource user Just, target resource is distributed to the target to be obtained such as first resource user or control first resource user and provided by selection Source.
If the priority of the first resource user is equal to the priority of the Secondary resource user, step is executed Rapid S103, judge whether the first resource user meets user's set where the Secondary resource user is added Condition;Wherein, the resource user in user's set shares the target resource;
Specifically, the embodiment of the present application is that shared mechanism is arranged in resource occupation, that is, it is directed to system resource, the person's of being set using collection It closes, user's set of correspondence system resource, the resource user comprising using system resource, Secondary resource as escribed above makes User is located in the corresponding resource user set of above-mentioned target resource.It is each in the corresponding user's set of system resource Resource user can share the system resource.
On the basis of above-mentioned user's set is arranged for above-mentioned target resource, when Secondary resource user uses mesh When marking resource, enter in the corresponding user's set of target resource.It is used when resource management module receives first resource The target resource request that person sends, and determine that the priority of first resource user is equal to and be used the second of target resource It is not target resource directly to be distributed into first resource user, but further sentence when the priority of resource user Whether the first resource user for breaking above-mentioned meets the condition of user's set where the Secondary resource user is added.
It is appreciated that user's set where Secondary resource user, the corresponding use of as above-mentioned target resource Person's set, that is, the set that can be constituted with the resource user of common target resource.
Illustratively, above-mentioned to judge first resource user whether to meet where above-mentioned Secondary resource user is added to make The condition of user's set, is determined by practical application request, specifically can be by judging first resource user and Secondary resource The type of user judges usage scenario of target resource etc..If first resource user and Secondary resource use The type of person is identical, identical to the usage scenario of target resource, then can determine that first resource user can be with Secondary resource User's common target resource, that is, first resource user meet user's set where Secondary resource user is added Condition.
If the first resource user meets the item of user's set where the Secondary resource user is added Part thens follow the steps S104, user's set is added in the first resource user.
Specifically, if first resource user meets the item of user's set where Secondary resource user is added Part, the then user where Secondary resource user is added in first resource user by the embodiment of the present application gather.At this point, first Resource user gets above-mentioned target resource, while Secondary resource user gets in above-mentioned first resource user addition The message of user's set is stated, first resource user and Secondary resource user share above-mentioned target resource.
In shared state, first resource user can be used target resource and realize function, while Secondary resource uses The function that person is realized using target resource will not interrupt.
Illustratively, the embodiment of the present application is used above-mentioned first resource by calling preset user to add function Person is added to above-mentioned user's set.
For example, adding function KResource::AddCoexistUser (int in user built in ultrasonic system ICoexistUserObjId), gather (m_CoexistResUser) to above-mentioned user when needs and add resource user When iCoexistUserObjId, the function is called directly, resource user iCoexistUserObjId to be added is added To (m_CoexistResUser).
Further, if first resource user does not meet user's set where Secondary resource user is added Condition, then the embodiment of the present application executes step S105, according to the priority of first resource user, for first resource user point With resource, at this point, resource management system can be high relative to the priority of Secondary resource user according to first resource user Low, target resource is distributed to the target resource to be obtained such as first resource user or control first resource user by selection.
The embodiment of the present application can make resource allocation more reasonable, in same a period of time by setting priority for resource user It carves, when the resource user of equal priority needs using same target resource, pays the utmost attention to make resource user jointly With target resource, so that the resource user for initiating target resource request after preventing seizes and the resource of target resource is used makes The resource of user can be fought for happening, make resource occupation more orderly on the whole to avoid resource.
In the prior art scheme, mutual exclusion mechanism is used for the allocation processing of resource, for the user of same resource Uniquely, a resource user gets resource, then another resource user that the resource is used must lose the money Source.Such as in ultrasonic system, according to existing treatment mechanism, it is assumed that body mark obtains mode resource and runs, when switching is lived When dynamic width, double width color pattern acquiring mode resource, then body mark must be exited, to give mode resource to double width color mould Formula.This is very inconvenient in practical applications because in many cases, user need simultaneously using double width color mode with Body mark.
And the embodiment of the present application technical solution is used, due to being provided with priority for resource user, and it is provided with money Source shared mechanism sets equal priority for above-mentioned double width color mode and body mark on this basis, then when body mark When occupying mode resource operation, if double width color mode also requests the mode resource, according to the embodiment of the present application technical side Case, the user where double width color mode can be added to body mark gather, and occupy double width color mode and body mark jointly The mode resource, double width color mode and body mark can be run simultaneously at this time, and both sides do not conflict mutually.
It can be seen that using the embodiment of the present application technical solution, when the target money for getting first resource user transmission When source is requested, first judge whether the priority of first resource user is equal to the Secondary resource user that target resource is used Priority, if be equal to if further judge first resource user whether meet addition Secondary resource user where make User's set;If met, the user where first resource user to be added to Secondary resource user gathers, and makes first Resource user and Secondary resource user share target resource.Above-mentioned treatment process realizes first resource user and second Resource user's common source effectively prevents the resource that first resource user seizes Secondary resource user, it is therefore prevented that money The case where source user's function is interrupted.
As preferred implementation, another embodiment of the application also discloses above-mentioned steps S105, according to first resource The priority of user distributes the specific process content of resource for first resource user.
Shown in Figure 2, the embodiment of the present application also discloses above-mentioned method for managing resource further include:
If the priority of above-mentioned first resource user is higher than the priority of above-mentioned Secondary resource user, step is executed Rapid S205, the target resource is distributed into the first resource user.
Specifically, working as since the priority of the priority ratio Secondary resource user of first resource user is higher When first resource user request is using target resource, target resource should be given first resource use by Secondary resource user Person, itself function is interrupted, to guarantee the higher first resource user normal use target resource of priority.
Further, if the priority of above-mentioned first resource user is preferential lower than above-mentioned Secondary resource user Grade or the first resource user do not meet the condition of user's set where the Secondary resource user is added, It thens follow the steps S206, according to the priority of the first resource user, the first resource user is added to target In user's queue of resource.
Specifically, user's queue of above-mentioned target resource, refers to that request occupies each resource use of target resource The queue that person is sequentially arranged to make up from high to low according to priority.
As shown in figure 3, existing is to gather one by one in resource queue, there may be single or multiple in set Resource user.Resource user in identity set belongs to the resource user that can share target resource;Different set Between, the priority of the resource user in the set above queue is not less than the resource in the set below queue The priority of user.The resource user in each set in queue is in the position in queue according to it, according to by upper Sequence under successively occupies target resource.
Such as in Fig. 3, Res1, ResN+1, ResN+2 are in identity set, and are the set of the top in queue, Each resource user (Res1, ResN+1, ResN+2) in the set is all that the resource of target resource is being currently used to make User, shared target resource between them.
If the priority of above-mentioned first resource user is lower than the Secondary resource use that target resource is being currently used The priority of person or first resource user do not meet the condition of user's set where Secondary resource user is added, Namely cannot be with Secondary resource user's common target resource, then the embodiment of the present application is according to the preferential of first resource user Grade, is added in user's queue of target resource.When first resource user is in user's queue of target resource When middle, the priority of the resource user in a resource user set, preferential not less than first resource user thereon Grade, the priority of the resource user in next resource user set, not higher than the priority of first resource user.
According to the above-mentioned processing for distributing target resource for resource user according to resource user's priority, can make more A resource user is more orderly to the occupancy of resource.
Generally speaking, using the embodiment of the present application technical solution, the second money is added in first resource user due to having The judgement processing of user's set where the user of source, therefore it is direct to reduce to a certain extent first resource user The case where seizing the resource of Secondary resource user, and the setting of priority can make the business of high priority not by low preferential The resource user interference of grade, therefore can guarantee the execution of ultrasonic system items business function more rationally, more orderly.
Such as in conventional ultrasonic system, due to the setting of its resource acquisition alternative, when dialog box of shutting down pops up, If plug probe, selection interface of popping one's head in just obtains mouse resources, and mouse resources are hidden.Since mouse resources are hidden Hiding, user can not just operate shutdown dialog box again.
And the embodiment of the present application technical solution is used, by the way that priority is arranged, the priority of shutdown dialog box can be set Higher than the priority of probe selection interface, after shutdown dialog box pop-up, then dialog box of shutting down obtains mouse resources, if at this time User plugs probe, then since the priority of shutdown dialog box is higher than the priority of probe selection interface, selection interface quilt of popping one's head in It is added to below the shutdown dialog box in user's queue of mouse resources, selection interface of popping one's head at this time will not be with shutdown dialog box Mouse resources are fought for, therefore will not influence the operation of shutdown dialog box.
In another example in ultrasonic system, according to existing treatment mechanism, it is assumed that body mark obtains mode resource and runs, When switching activity width, double width color obtaining mode resource, then body mark must be exited, to give mode resource to double width Color mode will cause the interruption of body mark function at this time.
And the embodiment of the present application technical solution is used, phase isopreference is set by above-mentioned double width color mode and body mark Grade, then when body mark has occupied mode resource operation, if double width color mode also requests the mode resource, according to this Shen Please embodiment technical solution, can by double width color mode be added body mark where user gather, make double width color mode The mode resource is occupied jointly with body mark, and double width color mode and body mark can be run simultaneously at this time, and both sides do not conflict mutually.
It is appreciated that being based on the embodiment of the present application technical solution, can be realized by the priority of setting resource user The ordered arrangement of resource is used each resource user, such as high priority is arranged in more urgent, important resource user, it will Low priority is arranged in general or unessential resource user, can guarantee the resource of resource user of high priority so not It is preempted.On the other hand, resource user set can be set, realize that multiple resource users are used in conjunction with same resource, this Sample may be implemented multi-functional while carry out, and enrich system function.It, can be by practical application the embodiment of the present application technical solution According to the above-mentioned introduction of the embodiment of the present application, the priority of flexible setting resource user, and setting resource user's coexists machine System.
Further, when first resource user exits user's queue, the embodiment of the present application executes step S207, judge the first resource user whether be the target resource currently used person;
Specifically, the application is implemented when user's queue of the target resource is exited in first resource user request Example first determines whether that first resource user is the currently used person of target resource, that is, judges that first resource user is It is no that target resource is used.If first resource user is the currently used person of target resource, first resource user Release target resource can be related to other resource users whether available the problem of arriving target resource, therefore the application is implemented Whether example is that the currently used person of target resource judges for first resource user.
If so, thening follow the steps S208, the control first resource user discharges the target resource;
S209, judge whether user's set where the first resource user is empty;
Specifically, the form of user's queue based on above-mentioned target resource shown in Fig. 3, each of queue queue Resource user at position constitutes resource user set.Again since the resource user in identity set shares target money Source, therefore the embodiment of the present application is set, and when above-mentioned first resource user discharges target resource, further judges the first money Whether user's set where the user of source is sky, i.e., confirmation is at current time, if is having other resource users Use target resource.
If it is sky, thens follow the steps S210, the target resource is distributed to user's queue of the target resource In, adjacent with the first resource user next resource user;
Specifically, user's collection where first resource user is combined into sky, then illustrate no resource user and first Resource user shares target resource, at this point, first resource user discharges target resource, then can determine that current time has not had There is resource user to reuse target resource, thus by target resource distribute to it is in user's queue of target resource, with the The adjacent next resource user of one resource user.
If being not sky, then follow the steps each in user's set where S211, Xiang Suoshu first resource user A user sends user's exit message;Wherein, user's exit message is for characterizing the first resource user Exit user's set.
Meanwhile above-mentioned first resource user being deleted from user's queue of above-mentioned target resource.Illustratively, The embodiment of the present application is by calling the resource user in ultrasonic system to delete function, by above-mentioned first resource user from upper It states and is deleted in user's queue of target resource.
For example, built-in resource user deletes function KResource::SubtractCoexistUser in ultrasonic system (int iCoexistUserObjId) deletes resource user when needing to gather from user in (m_CoexistResUser) When iCoexistUserObjId, calls directly the function and deleted.
Specifically, if user's set where first resource user is not sky, to first resource user institute User's set in each user send user's exit message, user's exit message is for informing each make First resource user described in user exits user's set.
If the first resource user is not the currently used person of the target resource, thens follow the steps S212, incites somebody to action The first resource user deletes from user's queue of the target resource;
S213, judge whether user's set where the first resource user is empty;
If being not sky, then follow the steps each in user's set where S214, Xiang Suoshu first resource user A user sends user's exit message.
Specifically, if above-mentioned first resource user is not the currently used person of target resource, directly by first Resource user deletes from user's queue of target resource.
Then, whether user's set where judging first resource user is sky, is then ended processing if it is sky;Such as Fruit is not sky, then each user into user's set where first resource user sends user's exit message.
It should be noted that step S201~S204 in embodiment of the method shown in Fig. 2 respectively corresponds side shown in FIG. 1 Step S101~S104 in method embodiment, the content of particular content embodiment of the method shown in Figure 1, herein no longer It repeats.
Corresponding with above-mentioned method for managing resource, another embodiment of the application also discloses a kind of ultrasonic system resource Managing device, shown in Figure 4, which includes:
Request unit 100, for obtaining the target resource solicited message of first resource user transmission;Wherein, institute State target resource solicited message for request use the target resource;
Processing unit 110 is compared, for by the excellent of the priority of the first resource user and Secondary resource user First grade compares, wherein the Secondary resource user is the currently used person of the target resource;
First judging unit 120 is used for the priority as the first resource user equal to the Secondary resource When the priority of person, judge whether the first resource user meets the user being added where the Secondary resource user The condition of set;Wherein, the resource user in user's set shares the target resource;
First processing units 130, for the Secondary resource user institute to be added when the first resource user meets User's set condition when, the user is added in the first resource user and is gathered.
Optionally, another embodiment of the application also discloses, described device further include:
The second processing unit is higher than the Secondary resource user's for the priority as the first resource user When priority, the target resource is distributed into the first resource user.
Optionally, another embodiment of the application also discloses, described device further include:
Third processing unit, for the priority as the first resource user lower than the Secondary resource user's Priority or the first resource user do not meet the item of user's set where the Secondary resource user is added When part, according to the priority of the first resource user, the first resource user is added to the target resource In user's queue.
Optionally, another embodiment of the application also discloses, described device further include:
Second judgment unit, for when the first resource user exits user's queue, judging described One resource user whether be the target resource currently used person;It is released if it is, controlling the first resource user Put the target resource;
Whether third judging unit is empty for user's set where judging the first resource user;
If it is sky, by the target resource distribute to it is in user's queue of the target resource, with described the The adjacent next resource user of one resource user;
If being not sky, each user into user's set where the first resource user, which sends, to be made User's exit message;Wherein, user's exit message exits user's set for characterizing the first resource user.
Optionally, another embodiment of the application also discloses, described device further include:
4th judging unit, for when the first resource user is not the currently used person of the target resource, The first resource user is deleted from user's queue of the target resource;Judge the first resource user institute User's set whether be empty;If being not sky, into user's set where the first resource user Each user sends user's exit message.
Optionally, when user set is added in the first resource user by the first processing units, specifically For:
By calling preset user to add function, the first resource user is added to the user and is collected It closes.
Optionally, above-mentioned target resource includes mouse resources and/or mode resource.
Specifically, the specific works content of each unit in each embodiment of above-mentioned resource management apparatus, refers to The content of above method embodiment, details are not described herein again.
For the various method embodiments described above, for simple description, therefore, it is stated as a series of action combinations, but Be those skilled in the art should understand that, the application is not limited by the described action sequence because according to the application, certain A little steps can be performed in other orders or simultaneously.Secondly, those skilled in the art should also know that, it is retouched in specification The embodiment stated belongs to preferred embodiment, necessary to related actions and modules not necessarily the application.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For device class embodiment, since it is basically similar to the method embodiment, so being described relatively simple, related place ginseng See the part explanation of embodiment of the method.
Step in each embodiment method of the application can be sequentially adjusted, merged and deleted according to actual needs.
Each embodiment kind device of the application and module in terminal and submodule can be merged according to actual needs, be drawn Divide and deletes.
In several embodiments provided herein, it should be understood that disclosed terminal, device and method, Ke Yitong Other modes are crossed to realize.For example, terminal embodiment described above is only schematical, for example, module or submodule Division, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple submodule or Module may be combined or can be integrated into another module, or some features can be ignored or not executed.Another point is shown The mutual coupling, direct-coupling or communication connection shown or discussed can be through some interfaces, between device or module Coupling or communication connection are connect, can be electrical property, mechanical or other forms.
Module or submodule may or may not be physically separated as illustrated by the separation member, as mould The component of block or submodule may or may not be physical module or submodule, it can and it is in one place, or It may be distributed on multiple network modules or submodule.Some or all of mould therein can be selected according to the actual needs Block or submodule achieve the purpose of the solution of this embodiment.
In addition, each functional module or submodule in each embodiment of the application can integrate in a processing module In, it is also possible to modules or submodule physically exists alone, it can also be integrated with two or more modules or submodule In a module.Above-mentioned integrated module or submodule both can take the form of hardware realization, can also use software function Energy module or the form of submodule are realized.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software unit or the two is implemented.Software unit can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (14)

1. a kind of ultrasonic system method for managing resource characterized by comprising
Obtain the target resource solicited message that first resource user sends;Wherein, the target resource solicited message is for asking It asks and uses the target resource;
The priority of the priority of the first resource user and Secondary resource user is compared, wherein described Two resource users are the currently used person of the target resource;
If the priority of the first resource user is equal to the priority of the Secondary resource user, described the is judged Whether one resource user meets the condition of user's set where the Secondary resource user is added;Wherein, described to make Resource user in user's set shares the target resource;
If the first resource user meets the condition of user's set where the Secondary resource user is added, User's set is added in the first resource user.
2. the method according to claim 1, wherein the method also includes:
If the priority of the first resource user is higher than the priority of the Secondary resource user, by the target Resource allocation gives the first resource user.
3. the method according to claim 1, wherein the method also includes:
If the priority of the first resource user is lower than the priority or described first of the Secondary resource user Resource user does not meet the condition of user's set where the Secondary resource user is added, then according to first money The first resource user is added in user's queue of the target resource by the priority of source user.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
When the first resource user exits user's queue, judge whether the first resource user is described The currently used person of target resource;
If it is, controlling the first resource user discharges the target resource;
Whether user's set where judging the first resource user is empty;
If it is sky, the target resource is distributed into user's queue of the target resource and described first money The adjacent next resource user of source user;
If being not sky, each user into user's set where the first resource user sends user Exit message;Wherein, user's exit message exits user's set for characterizing the first resource user.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
If the first resource user is not the currently used person of the target resource, by the first resource user It is deleted from user's queue of the target resource;
Whether user's set where judging the first resource user is empty;
If being not sky, each user into user's set where the first resource user sends user Exit message.
6. the method according to claim 1, wherein described be added the use for the first resource user Person's set, comprising:
By calling preset user to add function, the first resource user is added to the user and is gathered.
7. the method according to claim 1, wherein the target resource includes mouse resources and/or mode money Source.
8. a kind of ultrasonic system resource management apparatus characterized by comprising
Request unit, for obtaining the target resource solicited message of first resource user transmission;Wherein, the target money Source solicited message uses the target resource for requesting;
Processing unit is compared, for carrying out the priority of the priority of the first resource user and Secondary resource user Comparison, wherein the Secondary resource user is the currently used person of the target resource;
First judging unit is equal to the preferential of the Secondary resource user for the priority as the first resource user When grade, judge whether the first resource user meets the item of user's set where the Secondary resource user is added Part;Wherein, the resource user in user's set shares the target resource;
First processing units, for meeting the use where the Secondary resource user is added as the first resource user When the condition of person's set, the user is added in the first resource user and is gathered.
9. device according to claim 8, which is characterized in that described device further include:
The second processing unit is higher than the preferential of the Secondary resource user for the priority as the first resource user When grade, the target resource is distributed into the first resource user.
10. device according to claim 8, which is characterized in that described device further include:
Third processing unit, it is preferential lower than the Secondary resource user for the priority as the first resource user Grade or the first resource user do not meet the condition of user's set where the Secondary resource user is added When, according to the priority of the first resource user, the first resource user is added to making for the target resource In user's queue.
11. device according to claim 10, which is characterized in that described device further include:
Second judgment unit, for when the first resource user exits user's queue, judging first money Source user whether be the target resource currently used person;If it is, controlling the first resource user discharges institute State target resource;
Whether third judging unit is empty for user's set where judging the first resource user;
If it is sky, the target resource is distributed into user's queue of the target resource and described first money The adjacent next resource user of source user;
If being not sky, each user into user's set where the first resource user sends user Exit message;Wherein, user's exit message exits user's set for characterizing the first resource user.
12. device according to claim 11, which is characterized in that described device further include:
4th judging unit, for when the first resource user is not the currently used person of the target resource, by institute First resource user is stated to delete from user's queue of the target resource;Where judging the first resource user Whether user's set is empty;It is each into user's set where the first resource user if being not sky User sends user's exit message.
13. device according to claim 8, which is characterized in that the first processing units use the first resource When user set is added in person, it is specifically used for:
By calling preset user to add function, the first resource user is added to the user and is gathered.
14. device according to claim 8, which is characterized in that the target resource includes mouse resources and/or mode money Source.
CN201910755675.XA 2019-08-15 2019-08-15 A kind of ultrasonic system method for managing resource and device Pending CN110471713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910755675.XA CN110471713A (en) 2019-08-15 2019-08-15 A kind of ultrasonic system method for managing resource and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910755675.XA CN110471713A (en) 2019-08-15 2019-08-15 A kind of ultrasonic system method for managing resource and device

Publications (1)

Publication Number Publication Date
CN110471713A true CN110471713A (en) 2019-11-19

Family

ID=68511568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910755675.XA Pending CN110471713A (en) 2019-08-15 2019-08-15 A kind of ultrasonic system method for managing resource and device

Country Status (1)

Country Link
CN (1) CN110471713A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767138A (en) * 2020-06-09 2020-10-13 Oppo广东移动通信有限公司 Resource allocation method, storage medium, and electronic device
CN111858063A (en) * 2020-07-28 2020-10-30 科大讯飞股份有限公司 Resource competition processing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114234A (en) * 2006-07-25 2008-01-30 株式会社Ntt都科摩 A peripheral switching device and a peripheral switching control device
CN101883436A (en) * 2010-06-24 2010-11-10 宇龙计算机通信科技(深圳)有限公司 Concurrent processing method and system for resources and mobile terminal
CN102298539A (en) * 2011-06-07 2011-12-28 华东师范大学 Method and system for scheduling shared resources subjected to distributed parallel treatment
CN103577267A (en) * 2012-08-03 2014-02-12 上海博泰悦臻电子设备制造有限公司 Resource distribution method and resource distribution device of vehicle-mounted device
CN109086142A (en) * 2018-09-25 2018-12-25 郑州云海信息技术有限公司 A kind of resource regulating method and device based on Openlava

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114234A (en) * 2006-07-25 2008-01-30 株式会社Ntt都科摩 A peripheral switching device and a peripheral switching control device
CN101883436A (en) * 2010-06-24 2010-11-10 宇龙计算机通信科技(深圳)有限公司 Concurrent processing method and system for resources and mobile terminal
CN102298539A (en) * 2011-06-07 2011-12-28 华东师范大学 Method and system for scheduling shared resources subjected to distributed parallel treatment
CN103577267A (en) * 2012-08-03 2014-02-12 上海博泰悦臻电子设备制造有限公司 Resource distribution method and resource distribution device of vehicle-mounted device
CN109086142A (en) * 2018-09-25 2018-12-25 郑州云海信息技术有限公司 A kind of resource regulating method and device based on Openlava

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林胜利 等编著: "《Java开发经典模式与实例》", 31 March 2007, 北京:中国铁道出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767138A (en) * 2020-06-09 2020-10-13 Oppo广东移动通信有限公司 Resource allocation method, storage medium, and electronic device
CN111858063A (en) * 2020-07-28 2020-10-30 科大讯飞股份有限公司 Resource competition processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101266633B (en) Seamless super large scale dummy game world platform
CN110392052A (en) A kind of block chain intelligence contract processing system and method
CN109471705A (en) Method, equipment and system, the computer equipment of task schedule
CN105357042B (en) A kind of highly available cluster system and its host node and from node
CN105141400B (en) A kind of high availability cluster management method and relevant device
CN111506404A (en) Kubernetes-based shared GPU (graphics processing Unit) scheduling method
WO2001001241A3 (en) Method and apparatus for identifying network devices on a storage network
CN110471713A (en) A kind of ultrasonic system method for managing resource and device
CN103782275B (en) For the system and method for the resource for managing portable computing
CN104424122B (en) A kind of electronic equipment and memory division methods
CN110389843A (en) A kind of business scheduling method, device, equipment and readable storage medium storing program for executing
CN108170520A (en) A kind of cloud computing resources management method and device
CN110471749A (en) Task processing method, device, computer readable storage medium and computer equipment
CN106445690A (en) Dynamic scheduling method and device for virtual machine resource
CN109802986A (en) Device management method, system, device and server
CN109542627A (en) Node switching method, device, supervisor, node device and distributed system
CN110134541A (en) Switching method, system, equipment and the storage medium of the configuration information of storage cluster
CN113546416A (en) Game scene processing method and device, computer equipment and storage medium
CN109347762A (en) Cross-region rate of discharge concocting method, device, computer equipment and storage medium
JP3683082B2 (en) Call processing equipment
CN110413322A (en) A kind of server network interface management method, system and baseboard management controller
CN110046808A (en) A kind of seating allocation system, method, background server and storage medium
CN115941709A (en) User cooperation method and system for base-plane-oriented multi-available-area storage and storage medium
CN114416329A (en) Computing task deployment method and device, electronic equipment and storage medium
CN108322537A (en) Method, apparatus, equipment and the storage medium in Cloud Server node resource pond

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191119

RJ01 Rejection of invention patent application after publication