CN105426253A - Hardware management method and device for self-service equipment - Google Patents

Hardware management method and device for self-service equipment Download PDF

Info

Publication number
CN105426253A
CN105426253A CN201510967254.5A CN201510967254A CN105426253A CN 105426253 A CN105426253 A CN 105426253A CN 201510967254 A CN201510967254 A CN 201510967254A CN 105426253 A CN105426253 A CN 105426253A
Authority
CN
China
Prior art keywords
equipment
application program
port
newly
module
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
CN201510967254.5A
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.)
GRG Banking Equipment Co Ltd
Guangdian Yuntong Financial Electronic Co Ltd
Original Assignee
Guangdian Yuntong Financial Electronic 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 Guangdian Yuntong Financial Electronic Co Ltd filed Critical Guangdian Yuntong Financial Electronic Co Ltd
Priority to CN201510967254.5A priority Critical patent/CN105426253A/en
Publication of CN105426253A publication Critical patent/CN105426253A/en
Priority to PCT/CN2016/081805 priority patent/WO2017101247A1/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/46Multiprogramming arrangements
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5013Request control

Abstract

An embodiment of the invention discloses a hardware management method for self-service equipment. The method is used for solving the technical problems that application scenarios of functions of two application programs cannot be completed at the same time, and efficiency of control over hardware of the equipment is reduced as the two application programs cannot coexist in the prior art. The method of the embodiment comprises the steps that equipment and ports to be called by the application programs are obtained during running of the application programs; whether the equipment and the ports exist is judged, the equipment is controlled according to the application programs and the existing control equipment of the embodiment if the equipment and the ports exist, otherwise, further judgment is performed, wherein the further judgment includes determining whether the ports to be called by the application programs are occupied, controlling the application programs to redistribute the ports to be called if the application programs are occupied and creating an example according to the equipment and the ports to be called by the application programs if not; the equipment is controlled in accordance with the application programs and the created example. The embodiment of the invention further provides a hardware management device for the self-service equipment.

Description

A kind of Possum method of hardware management and device
Technical field
The present invention relates to Possum control technology field, particularly relate to a kind of Possum method of hardware management and device.
Background technology
Generally adopt serial ports or USB to carry out to the Control on Communication of self-help terminal equipment module, a module only can carry out connection control by a communication line usually, which results in different application and can only exclusively mutually exclusive access physically the control of equipment.And in the application scenarios of reality, usually have multiple application program to need to control same module, such as two methods program all needs to control movement, one of them application program carries out note output, another one application program carries out the equipment state obtaining movement, in order to meet the demand of this scene, at present, domestic and international common way is: be Development of Module hardware device control DLL (dynamic link library), the different instances that different application loads this DLL respectively completes and controls the exclusive access of equipment, when the multiple application program of needs accesses this equipment, need an application program to complete and control backed off after random taking device link, then control by after the taking of Another application program equipment link.
Such process can there are the following problems: 1, reduce the efficiency that application program controls equipment.Two methods needs constantly to obtain, discharge link, expends link circuit resource, the waste processing time.2, two methods program can not coexist simultaneously, reduces user to the experience of self-help terminal equipment.
Summary of the invention
Embodiments provide a kind of Possum method of hardware management and device, prior art can be solved cannot realize two methods program and coexist simultaneously, cause the application scenarios needing simultaneously to complete two methods program function to realize, reduce the technical matters to device hardware control efficiency.
A kind of Possum method of hardware management that the embodiment of the present invention provides, comprising:
When running application, obtain the equipment and port that call needed for described application program;
Judge whether to exist existing example call described needed for the equipment that calls and port, if so, then according to described application program and described existing example opertaing device, if not, then do to judge further;
Describedly to be judged as further: judge that whether the port called needed for described application program is occupied, if, then control described application program redistribute needed for the port that calls, if not, then the equipment called needed for described application program and the newly-built example of port;
According to described application program and newly-built example opertaing device.
Alternatively, before according to described application program and described existing example opertaing device, the reference count of described existing example adds 1;
Before according to described application program and newly-built example opertaing device, the reference count of described newly-built example adds 1;
When described application program exits the described equipment of control, the reference count of corresponding instance subtracts 1;
When the reference count of example is 0, delete described example.
Alternatively, after the equipment called needed for described application program and the newly-built example of port, the example information of newly-built example is saved in default device instance table, described example information comprise described newly-built example institute invocation facility implementor name, call the status information of equipment of the port numbers of port, corresponding reference count and institute's invocation facility.
Alternatively, the status information of equipment of Real-time Obtaining equipment, and described status information of equipment is updated to described device instance table;
When needing the status information of equipment of the equipment obtaining described application program controlling, obtaining from described device instance table and returning described status information of equipment.
Alternatively, when according to application program controlling equipment, judge whether described equipment is in normal condition according to the status information of equipment of the described equipment got, if so, then do not carry out the initialization operation of equipment, directly control described equipment work.
A kind of Possum hardware management device that the embodiment of the present invention provides, comprising:
First acquisition module, for when running application, obtains the equipment and port that call needed for described application program;
Existing example judge module, for judge whether to exist existing example call described needed for the equipment that calls and port;
First control module, for when the judged result of described existing example judge module is for being, according to described application program and described existing example opertaing device;
Port takies judge module, for when the judged result of described existing example judge module is no, judges that whether the port called needed for described application program is occupied;
Reallocation module, for take judge module when described port judged result for being time, control described application program redistribute needed for the port that calls;
Newly-built example module, when being no for taking the judged result of judge module when described port, then the equipment called needed for described application program and the newly-built example of port;
Second control module, for according to described application program and newly-built example opertaing device.
Alternatively, described device comprises:
First reference count module, for before described first control module is according to described application program and described existing example opertaing device, the reference count of described existing example adds 1;
Second reference count module, for before described second control module is according to described application program and newly-built example opertaing device, the reference count of described newly-built example adds 1;
3rd reference count module, when controlling described equipment for exiting when described application program, the reference count of corresponding instance subtracts 1;
Example removing module, for when the reference count of example is 0, deletes described example.
Alternatively, described device comprises:
Example information preserves module, after the equipment that calls needed for described application program at described newly-built example module and the newly-built example of port, the example information of newly-built example is saved in default device instance table, described example information comprise described newly-built example institute invocation facility implementor name, call the status information of equipment of the port numbers of port, corresponding reference count and institute's invocation facility.
Alternatively, described device comprises:
State information updating module, for the status information of equipment of Real-time Obtaining equipment, and is updated to described device instance table by described status information of equipment;
State information acquisition module, for when needing the status information of equipment of the equipment obtaining described application program controlling, obtaining and returning described status information of equipment from described device instance table.
Alternatively, described device comprises:
According to the status information of equipment of the described equipment got, equipment state judge module, for when described first control module or described second control module are according to application program controlling equipment, judges whether described equipment is in normal condition;
Direct control module, for when the judged result of described equipment state judge module is for being, does not then carry out the initialization operation of equipment, directly controls described equipment work.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, first, when running application, the equipment and port that call needed for described application program is obtained; Then, judge whether to exist existing example call described needed for the equipment that calls and port, if so, then according to described application program and described existing example opertaing device, if not, then do to judge further; Then judge that whether the port called needed for described application program occupied further, if so, then control described application program redistribute needed for the port that calls, if not, then the equipment called needed for described application program and the newly-built example of port; Finally, according to described application program and newly-built example opertaing device.In embodiments of the present invention, this Possum method of hardware management can solve prior art and cannot realize two methods program and coexist simultaneously, cause the application scenarios needing simultaneously to complete two methods program function to realize, reduce the technical matters to device hardware control efficiency.
Accompanying drawing explanation
Fig. 1 is a kind of Possum method of hardware management embodiment process flow diagram in the embodiment of the present invention;
Fig. 2 is another embodiment process flow diagram of a kind of Possum method of hardware management in the embodiment of the present invention;
Fig. 3 is a kind of Possum hardware management device example structure figure in the embodiment of the present invention;
Fig. 4 is a kind of another example structure figure of Possum hardware management device in the embodiment of the present invention.
Embodiment
Embodiments provide a kind of Possum method of hardware management and device, two methods program cannot be realized coexist simultaneously for solving prior art, cause the application scenarios needing simultaneously to complete two methods program function to realize, reduce the technical matters to device hardware control efficiency.
For making goal of the invention of the present invention, feature, advantage can be more obvious and understandable, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, the embodiments described below are only the present invention's part embodiments, and the embodiment of not all.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 1, in the embodiment of the present invention, a kind of Possum method of hardware management embodiment comprises:
101, when running application, the equipment and port that call needed for this application program is obtained;
First, when running application, the equipment and port that call needed for this application program can be obtained.
102, judge whether to exist existing example and call this required equipment of calling and port, if so, then perform step 103, if not, then perform step 104;
When running application, after obtaining the equipment and port called needed for this application program, can judge whether to exist existing example and calling this required equipment of calling and port, if so, then performing step 103, if not, then perform step 104.
103, according to this application program and this existing example opertaing device;
Learn that if judge there is existing example calls this required equipment of calling and port, then according to this application program and this existing example opertaing device.
104, judge that whether the port called needed for this application program is occupied, if so, then perform step 105, if not, then perform step 106;
Learn that if judge there is not existing example calls this required equipment of calling and port, then judge that whether the port called needed for this application program is occupied further, if so, then perform step 105, if not, then perform step 106.
105, control this application program redistribute needed for the port that calls;
Learn that the port called needed for this application program is occupied if judge further, then control this application program redistribute needed for the port that calls.
106, the equipment called needed for this application program and the newly-built example of port;
Learn that the port called needed for this application program is unoccupied, then the equipment called needed for this application program and the newly-built example of port if judge further.
107, according to this application program and newly-built example opertaing device.
After the equipment called needed for this application program and the newly-built example of port, can according to this application program and newly-built example opertaing device.
In the present embodiment, first, when running application, the equipment and port that call needed for this application program is obtained; Then, judge whether to exist existing example and call this required equipment of calling and port, if so, then according to this application program and this existing example opertaing device, if not, then do to judge further; Then judge that whether the port called needed for this application program occupied further, if so, then control this application program redistribute needed for the port that calls, if not, then the equipment called needed for this application program and the newly-built example of port; Finally, according to this application program and newly-built example opertaing device.In the present embodiment, this Possum method of hardware management can solve prior art and cannot realize two methods program and coexist simultaneously, cause the application scenarios needing simultaneously to complete two methods program function to realize, reduce the technical matters to device hardware control efficiency.
For ease of understanding, be described in detail a kind of Possum method of hardware management in the embodiment of the present invention below, refer to Fig. 2, in the embodiment of the present invention, a kind of another embodiment of Possum method of hardware management comprises:
201, when running application, the equipment and port that call needed for this application program is obtained;
First, when running application, obtain the equipment and port that call needed for this application program.Be understandable that, when application program needs invocation facility hardware, the equipment called needed for simultaneously needing, and the port corresponding with this equipment.In general, port is distributed by application program itself.In the present embodiment, can know by the acquisition implementor name of equipment and the port numbers of port the equipment and port that call needed for this application program.
202, judge whether to exist existing example and call this required equipment of calling and port, if so, then perform step 203, if not, then perform step 205;
After obtaining the equipment and port called needed for this application program, can judge whether to exist existing example and call this required equipment of calling and port, if so, then perform step 203, if not, then perform step 205.Be understandable that, system, before this application program of operation, may run other one or more application programs, therefore, there is existing example and calling some equipment and port in system.When finding to exist existing example when calling this required equipment of calling and port, illustrate this existing example can call by this application program, and re-establish a new example without the need to wasting resource.
203, the reference count of this existing example adds 1;
Learn that if judge there is existing example calls this required equipment of calling and port, then the reference count of this existing example adds 1.It should be noted that, each example all can comprise " reference count " this attribute, " reference count " attribute show this example at present call by how many application programs.Such as, the reference count of hypothesis instance A is 2, then represent that example A is at present just by 2 application calls.
204, according to this application program and this existing example opertaing device;
Add after 1 in the reference count of this existing example, can according to this application program and this existing example opertaing device.
205, judge that whether the port called needed for this application program is occupied, if so, then perform step 206, if not, then perform step 207;
Learn that if judge there is not existing example calls this required equipment of calling and port, then judge that whether the port called needed for this application program is occupied further, if so, then perform step 206, if not, then perform step 207.Be understandable that, when there is not existing example and calling this required equipment of calling and port, mean and need for the newly-built example of this application program, if and this port is occupied, then cannot carry out newly-built example according to this port, therefore need the port that judges to call needed for this application program whether occupied.
206, control this application program redistribute needed for the port that calls;
Learn that the port called needed for this application program is occupied if judge, then control this application program redistribute needed for the port that calls.
Be understandable that, if the port redistributed is unoccupied, then can carry out newly-built example; And if the port redistributed is still occupied, then redistribute again, until the port be assigned to is unoccupied, then carry out newly-built example.
207, the equipment called needed for this application program and the newly-built example of port;
Learn that the port called needed for this application program is unoccupied, the equipment that can call needed for this application program and the newly-built example of port if judge.
208, the example information of newly-built example is saved in default device instance table;
After the equipment called needed for this application program and the newly-built example of port, the example information of newly-built example can be saved in default device instance table, this example information comprise this newly-built example institute invocation facility implementor name, call the status information of equipment of the port numbers of port, corresponding reference count and institute's invocation facility.The list structure of this device instance table can be as follows:
Implementor name Serial ports ID Example Application count Status information of equipment
It should be noted that, the example information of each example is all saved in this device instance table, is the real-time effectiveness ensureing device instance table, can the status information of equipment of Real-time Obtaining equipment, and this status information of equipment is updated to this device instance table; When needing the status information of equipment of the equipment obtaining this application program controlling, obtaining from this device instance table and returning this status information of equipment.
209, the reference count of this newly-built example adds 1;
Before according to this application program and newly-built example opertaing device, the reference count of this newly-built example adds 1.
210, according to this application program and newly-built example opertaing device;
After newly-built example, can according to this application program and newly-built example opertaing device.
It should be noted that, when according to application program controlling equipment, be the efficiency that raising operation performs, can judge whether this equipment is in normal condition according to the status information of equipment of this equipment got, if so, then do not carry out the initialization operation of equipment, directly control the work of this equipment.Without the need to all carrying out initialization before each opertaing device work, reduce the wearing and tearing of equipment.
211, judge whether this application program exits and control this equipment, if so, then perform step 212, if not, then the reference count of corresponding instance remains unchanged;
After according to this application program and newly-built example opertaing device, can judge whether this application program exits and control this equipment, if so, then perform step 212, if not, then the reference count of corresponding instance remains unchanged.
212, the reference count of corresponding instance subtracts 1;
Learn that if judge this application program exits and control this equipment, then the reference count of corresponding instance subtracts 1.
213, when the reference count of example is 0, this example is deleted.
When the reference count of example is 0, delete this example.Be understandable that, when the reference count of example is 0, show this example at present not call by any application program, therefore, in order to save system resource, this example can be deleted.
For ease of understanding, the embodiment described by Fig. 2, is described a kind of Possum method of hardware management in the embodiment of the present invention with three practical application scenes below:
Scene one: normal condition: two methods program controls same equipment by same port.
1, first application A pp1.exe invocation facility manager DeviceServie.exe designated port (as serial ports COM2) opens equipment, equipment manager calls hardware driving storehouse DevDriver.dll and physically opens device port, open successfully, newly-built equipment connection example, device port 2 is occupied, this equipment connection example information is saved in device instance table by equipment manager, the reference count+1 of this example.List structure is as follows:
Implementor name Serial ports ID Example Application count Status information of equipment
2, the initialization command of first application call equipment manager, equipment manager calls hardware driving storehouse physically initialization apparatus, action hardware, initialization success.
3, the appointment same port (as serial ports COM2) of second application A pp2.exe invocation facility management opens identical device, equipment manager adopts implementor name+serial ports numbering device instance table from 1 to search whether there is this equipment connection example, if existed, use existing example.If there is no, check whether as same port, if same port, return failure, App2.exe re-executes step 3 after needing to reset new serial ports ID or implementor name; If different port, a newly-built equipment connection example, opens physical equipment according to designated equipment name+port.In this example, specify same port to adopt identical device name, use existing example, namely share same instance.
4, initialization (Init) order of second application call equipment manager, because initialization command physical operations is more consuming time, equipment manager can obtain the current state of equipment, if belong to normal condition, initial physical operation is not carried out to hardware device, directly return successfully.Like this, namely improve the efficiency that order performs, again reduce the wearing and tearing of equipment.
5, such as, the note output instruction of first application call equipment manager, equipment manager calls hardware dynamic storehouse and carries out note output to equipment, and the status information of equipment that in manager of updating the equipment, this device instance is corresponding (as list structure in step 1).
6, the acquisition status command of second application call equipment manager, the status information of equipment manager acquisition equipment from device instance table (i.e. internal storage data) directly returns, without operational hardware equipment, improve the efficiency obtaining status information of equipment.Meanwhile, in order to improve the promptness of status information of equipment, in equipment manager, having the hardware state of a status poll thread timing acquisition equipment, guaranteeing that the state in equipment manager internal memory is real-time.
7, after running, the order of the closing device of first application call equipment manager.The reference count of corresponding equipment connection example is subtracted 1 by equipment manager in logic, until just physically disconnect the connection with equipment by hardware driving storehouse when this reference count is 0.
8, after running, the order of the closing device of second application call equipment manager.The reference count of corresponding equipment connection example is subtracted 1 by equipment manager in logic, until just physically disconnect the connection with equipment by hardware driving storehouse when this reference count is 0.
Scene two: two methods program controls different equipment by same port.
1, first application A pp1.exe invocation facility manager DeviceServie.exe designated port (as serial ports COM2) opens equipment, equipment manager calls hardware driving storehouse DevDriver.dll and physically opens device port, open successfully, device port 2 is occupied, this equipment connection example information is saved in device instance table by equipment manager, the reference count+1 of this example.
2, the initialization command of first application call equipment manager, equipment manager calls hardware driving storehouse physically initialization apparatus, action hardware, initialization success.
3, the appointment same port (as serial ports COM2) of second application A pp2.exe invocation facility management opens another distinct device, equipment manager adopts implementor name+serial ports numbering to search whether there is this equipment connection example, if existed, use existing example.If there is no, check whether as same port, if same port, return failure, App2.exe re-executes step 3 after needing to reset new serial ports ID or implementor name; If different port, a newly-built equipment connection example, opens physical equipment according to designated equipment name+port.In this example, specify same port but adopt distinct device name, returning and open equipment failure.
Scene three: two methods program controls different equipment by different port.
1, first application A pp1.exe invocation facility manager DeviceServie.exe designated port (as serial ports COM2) opens equipment, equipment manager calls hardware driving storehouse DevDriver.dll and physically opens device port, open successfully, newly-built equipment connection example, device port 2 is occupied, this equipment connection example information is saved in device instance table by equipment manager, the reference count+1 of this example.
2, the initialization command of first application call equipment manager, equipment manager calls hardware driving storehouse physically initialization apparatus, action hardware, initialization success.
3, the appointment same port (as serial ports COM2) of second application A pp2.exe invocation facility management opens another distinct device, equipment manager adopts implementor name+serial ports numbering to search whether there is this equipment connection example, if existed, use existing example.If there is no, check whether as same port, if same port, return failure; If different port, a newly-built equipment connection example, opens physical equipment according to designated equipment name+port.In this example, different port is specified to adopt distinct device name, a new establishment equipment connection example.
4, the initialization command of second application call equipment manager, because in equipment manager, the example of this request correspondence carries out initialization operation at first time, the initialization command that equipment manager calls hardware dynamic storehouse completes the initialization to equipment, has physical action.
5, the note output instruction of first application call equipment manager, equipment manager calls hardware dynamic storehouse and carries out note output to equipment.
6, the acquisition status command of second application call equipment manager, the state that equipment manager obtains equipment in internal memory directly returns.
7, after running, the order of the closing device of first application call equipment manager.The reference count of corresponding equipment connection example is subtracted 1 by equipment manager in logic, until just physically disconnect the connection with equipment by hardware driving storehouse when this reference count is 0.
8, after running, the order of the closing device of second application call equipment manager.The reference count of corresponding equipment connection example is subtracted 1 by equipment manager in logic, until just physically disconnect the connection with equipment by hardware driving storehouse when this reference count is 0.
Essentially describe a kind of Possum method of hardware management above, will be described in detail below, and refer to Fig. 3 to a kind of Possum hardware management device, in the embodiment of the present invention, a kind of Possum hardware management device embodiment comprises:
First acquisition module 301, for when running application, obtains the equipment and port that call needed for this application program;
Existing example judge module 302, calls this required equipment of calling and port for judging whether to exist existing example;
First control module 303, for when the judged result of this existing example judge module 302 is for being, according to this application program and this existing example opertaing device;
Port takies judge module 304, for when the judged result of this existing example judge module 302 is no, judges that whether the port called needed for this application program is occupied;
Reallocation module 305, for take judge module 304 when this port judged result for being time, control this application program redistribute needed for the port that calls;
Newly-built example module 306, when being no for taking the judged result of judge module 304 when this port, then the equipment called needed for this application program and the newly-built example of port;
Second control module 307, for according to this application program and newly-built example opertaing device.
In the present embodiment, first, when running application, the first acquisition module 301 obtains the equipment and port that call needed for this application program; Then, existing example judge module 302 judges whether to exist existing example and calls this required equipment of calling and port; When the judged result of this existing example judge module 302 is for being, the first control module 303 is according to this application program and this existing example opertaing device; When the judged result of this existing example judge module 302 is no, whether port takies the port that judge module 304 judges to call needed for this application program occupied; Then, when the judged result that this port takies judge module 304 is for being, reallocation module 305 control this application program redistribute needed for the port that calls; When the judged result that this port takies judge module 304 is no, then the equipment that calls needed for this application program of newly-built example module 306 and the newly-built example of port; Finally, the second control module 307 is according to this application program and newly-built example opertaing device.In the present embodiment, this Possum hardware management device can solve prior art and cannot realize two methods program and coexist simultaneously, cause the application scenarios needing simultaneously to complete two methods program function to realize, reduce the technical matters to device hardware control efficiency.
For ease of understanding, be described in detail a kind of Possum hardware management device in the embodiment of the present invention below, refer to Fig. 4, in the embodiment of the present invention, a kind of another embodiment of Possum hardware management device comprises:
First acquisition module 401, for when running application, obtains the equipment and port that call needed for this application program;
Existing example judge module 402, calls this required equipment of calling and port for judging whether to exist existing example;
First control module 403, for when the judged result of this existing example judge module 402 is for being, according to this application program and this existing example opertaing device;
Port takies judge module 404, for when the judged result of this existing example judge module 402 is no, judges that whether the port called needed for this application program is occupied;
Reallocation module 405, for take judge module 404 when this port judged result for being time, control this application program redistribute needed for the port that calls;
Newly-built example module 406, when being no for taking the judged result of judge module 404 when this port, then the equipment called needed for this application program and the newly-built example of port;
Second control module 407, for according to this application program and newly-built example opertaing device.
In the present embodiment, this device can comprise:
First reference count module 408, for before this first control module 403 is according to this application program and this existing example opertaing device, the reference count of this existing example adds 1;
Second reference count module 409, for before this second control module 407 is according to this application program and newly-built example opertaing device, the reference count of this newly-built example adds 1;
3rd reference count module 410, when controlling this equipment for exiting when this application program, the reference count of corresponding instance subtracts 1;
Example removing module 411, for when the reference count of example is 0, deletes this example.
In the present embodiment, this device can comprise:
Example information preserves module 412, after the equipment that calls needed for this application program at this newly-built example module 406 and the newly-built example of port, the example information of newly-built example is saved in default device instance table, this example information comprise this newly-built example institute invocation facility implementor name, call the status information of equipment of the port numbers of port, corresponding reference count and institute's invocation facility.
In the present embodiment, this device can comprise:
State information updating module 413, for the status information of equipment of Real-time Obtaining equipment, and is updated to this device instance table by this status information of equipment;
State information acquisition module 414, for when needing the status information of equipment of the equipment obtaining this application program controlling, obtaining and returning this status information of equipment from this device instance table.
In the present embodiment, this device can comprise:
According to the status information of equipment of this equipment got, equipment state judge module 415, for when this first control module 403 or this second control module 407 are according to application program controlling equipment, judges whether this equipment is in normal condition;
Direct control module 416, for when the judged result of this equipment state judge module 415 is for being, does not then carry out the initialization operation of equipment, directly controls the work of this equipment.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiments that the application provides, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc. various can be program code stored medium.
The above, above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. a Possum method of hardware management, is characterized in that, comprising:
When running application, obtain the equipment and port that call needed for described application program;
Judge whether to exist existing example call described needed for the equipment that calls and port, if so, then according to described application program and described existing example opertaing device, if not, then do to judge further;
Describedly to be judged as further: judge that whether the port called needed for described application program is occupied, if, then control described application program redistribute needed for the port that calls, if not, then the equipment called needed for described application program and the newly-built example of port;
According to described application program and newly-built example opertaing device.
2. method according to claim 1, is characterized in that, before according to described application program and described existing example opertaing device, the reference count of described existing example adds 1;
Before according to described application program and newly-built example opertaing device, the reference count of described newly-built example adds 1;
When described application program exits the described equipment of control, the reference count of corresponding instance subtracts 1;
When the reference count of example is 0, delete described example.
3. method according to claim 1, it is characterized in that, after the equipment called needed for described application program and the newly-built example of port, the example information of newly-built example is saved in default device instance table, described example information comprise described newly-built example institute invocation facility implementor name, call the status information of equipment of the port numbers of port, corresponding reference count and institute's invocation facility.
4. method according to claim 3, is characterized in that, the status information of equipment of Real-time Obtaining equipment, and described status information of equipment is updated to described device instance table;
When needing the status information of equipment of the equipment obtaining described application program controlling, obtaining from described device instance table and returning described status information of equipment.
5. method according to claim 4, is characterized in that, when according to application program controlling equipment, judge whether described equipment is in normal condition according to the status information of equipment of the described equipment got, if so, then do not carry out the initialization operation of equipment, directly control described equipment work.
6. a Possum hardware management device, is characterized in that, comprising:
First acquisition module, for when running application, obtains the equipment and port that call needed for described application program;
Existing example judge module, for judge whether to exist existing example call described needed for the equipment that calls and port;
First control module, for when the judged result of described existing example judge module is for being, according to described application program and described existing example opertaing device;
Port takies judge module, for when the judged result of described existing example judge module is no, judges that whether the port called needed for described application program is occupied;
Reallocation module, for take judge module when described port judged result for being time, control described application program redistribute needed for the port that calls;
Newly-built example module, when being no for taking the judged result of judge module when described port, then the equipment called needed for described application program and the newly-built example of port;
Second control module, for according to described application program and newly-built example opertaing device.
7. device according to claim 6, is characterized in that, described device comprises:
First reference count module, for before described first control module is according to described application program and described existing example opertaing device, the reference count of described existing example adds 1;
Second reference count module, for before described second control module is according to described application program and newly-built example opertaing device, the reference count of described newly-built example adds 1;
3rd reference count module, when controlling described equipment for exiting when described application program, the reference count of corresponding instance subtracts 1;
Example removing module, for when the reference count of example is 0, deletes described example.
8. device according to claim 6, is characterized in that, described device comprises:
Example information preserves module, after the equipment that calls needed for described application program at described newly-built example module and the newly-built example of port, the example information of newly-built example is saved in default device instance table, described example information comprise described newly-built example institute invocation facility implementor name, call the status information of equipment of the port numbers of port, corresponding reference count and institute's invocation facility.
9. device according to claim 8, is characterized in that, described device comprises:
State information updating module, for the status information of equipment of Real-time Obtaining equipment, and is updated to described device instance table by described status information of equipment;
State information acquisition module, for when needing the status information of equipment of the equipment obtaining described application program controlling, obtaining and returning described status information of equipment from described device instance table.
10. device according to claim 9, is characterized in that, described device comprises:
According to the status information of equipment of the described equipment got, equipment state judge module, for when described first control module or described second control module are according to application program controlling equipment, judges whether described equipment is in normal condition;
Direct control module, for when the judged result of described equipment state judge module is for being, does not then carry out the initialization operation of equipment, directly controls described equipment work.
CN201510967254.5A 2015-12-18 2015-12-18 Hardware management method and device for self-service equipment Pending CN105426253A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510967254.5A CN105426253A (en) 2015-12-18 2015-12-18 Hardware management method and device for self-service equipment
PCT/CN2016/081805 WO2017101247A1 (en) 2015-12-18 2016-05-12 Self-service equipment hardware management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510967254.5A CN105426253A (en) 2015-12-18 2015-12-18 Hardware management method and device for self-service equipment

Publications (1)

Publication Number Publication Date
CN105426253A true CN105426253A (en) 2016-03-23

Family

ID=55504477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510967254.5A Pending CN105426253A (en) 2015-12-18 2015-12-18 Hardware management method and device for self-service equipment

Country Status (2)

Country Link
CN (1) CN105426253A (en)
WO (1) WO2017101247A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106354608A (en) * 2016-09-30 2017-01-25 北京海誉动想科技股份有限公司 Device and method for requesting for registration and management of electronic equipment hardware
WO2017101247A1 (en) * 2015-12-18 2017-06-22 广州广电运通金融电子股份有限公司 Self-service equipment hardware management method and device
CN111213127A (en) * 2017-10-23 2020-05-29 微软技术许可有限责任公司 Virtualization operation for directly assigned devices

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965917B (en) * 2021-10-19 2024-04-02 深圳市元征科技股份有限公司 Communication method, device and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020178268A1 (en) * 2001-05-22 2002-11-28 Aiken John Andrew Methods, systems and computer program products for port assignments of multiple application instances using the same source IP address
CN101263483A (en) * 2005-09-12 2008-09-10 微软公司 Sharing a port with multiple processes
CN101495940A (en) * 2006-07-21 2009-07-29 索尼服务中心(欧洲)股份有限公司 Demodulator device and method of operating the same
CN101741832A (en) * 2008-11-25 2010-06-16 宝利通公司 Method and system for dispatching received sessions between a plurality of instances of an application using the same ip port
CN102693159A (en) * 2012-05-09 2012-09-26 上海晨思电子科技有限公司 Method and device for controlling hardware equipment based on user mode multitask

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6412031B1 (en) * 1998-02-10 2002-06-25 Gateway, Inc. Simultaneous control of live video device access by multiple applications via software locks and in accordance with window visibility of applications in a multiwindow environment
US6539441B1 (en) * 1999-11-10 2003-03-25 Logitech Europe, S.A. Multi-instance input device control
US6918118B2 (en) * 1999-11-10 2005-07-12 Logitech Europe S.A. Multi-instance input device control
CN105426253A (en) * 2015-12-18 2016-03-23 广州广电运通金融电子股份有限公司 Hardware management method and device for self-service equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020178268A1 (en) * 2001-05-22 2002-11-28 Aiken John Andrew Methods, systems and computer program products for port assignments of multiple application instances using the same source IP address
CN101263483A (en) * 2005-09-12 2008-09-10 微软公司 Sharing a port with multiple processes
CN101495940A (en) * 2006-07-21 2009-07-29 索尼服务中心(欧洲)股份有限公司 Demodulator device and method of operating the same
CN101741832A (en) * 2008-11-25 2010-06-16 宝利通公司 Method and system for dispatching received sessions between a plurality of instances of an application using the same ip port
CN102693159A (en) * 2012-05-09 2012-09-26 上海晨思电子科技有限公司 Method and device for controlling hardware equipment based on user mode multitask

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017101247A1 (en) * 2015-12-18 2017-06-22 广州广电运通金融电子股份有限公司 Self-service equipment hardware management method and device
CN106354608A (en) * 2016-09-30 2017-01-25 北京海誉动想科技股份有限公司 Device and method for requesting for registration and management of electronic equipment hardware
CN106354608B (en) * 2016-09-30 2019-08-23 北京海誉动想科技股份有限公司 The device and method of electronic equipment hardware requests registration management
CN111213127A (en) * 2017-10-23 2020-05-29 微软技术许可有限责任公司 Virtualization operation for directly assigned devices

Also Published As

Publication number Publication date
WO2017101247A1 (en) 2017-06-22

Similar Documents

Publication Publication Date Title
CN102200916B (en) Electronic equipment, configurable member and method for storing configuration information of configurable member
CN110502340A (en) A kind of resource dynamic regulation method, device, equipment and storage medium
CN105426253A (en) Hardware management method and device for self-service equipment
CN105468717A (en) Database operation method and device
CN106603125B (en) Method and device for data interaction with Bluetooth equipment
CN109947487A (en) A kind of method, apparatus, computer equipment and storage medium improving chip starting speed
CN109857471A (en) Method, apparatus, terminal and the storage medium of the tactful real-time synchronization of electricity under a kind of BIOS and BMC
CN104010077A (en) Information processing method and electronic equipment
CN106293805A (en) The method and device that program loads
CN108376110A (en) A kind of automatic testing method, system and terminal device
CN105224489A (en) A kind of integrated management system of hardware device
CN104184614B (en) A kind of configuration rollback method and device
CN104866388A (en) Data processing method and device
CN106874020A (en) Start the method and device of plug-in unit
CN104598243A (en) Multi-user application program management method and device applied to intelligent terminal
CN104750553A (en) Application operating method and device
CN108287761A (en) Method for recovering internal storage and device, terminal device and computer readable storage medium
CN115291891A (en) Cluster management method and device and electronic equipment
CN112912743A (en) Computing power control method, device, equipment and storage medium
CN108228340A (en) terminal control method and device, terminal device and computer readable storage medium
CN103793283A (en) Terminal fault handling method and terminal fault handling device
CN112463645A (en) Test case scheduling method, device, terminal and storage medium
CN112346556A (en) Method, device, computer equipment and medium for improving low power consumption efficiency of chip
CN106991017A (en) Event-handling method and device
CN108055307A (en) server updating method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160323

RJ01 Rejection of invention patent application after publication