The content of the invention
(1) technical problems to be solved
In order to preferably utilize the multinuclear computation performance of CPU, the present invention provides a kind of self-aided terminal framework, the self-aided terminal
Including:Business function layer, final drive layer, system monitoring layer, automatically update layer and policy control layer;Business function layer is included eventually
Hold business function thread and business function subsystem;Final drive layer includes final drive thread and final drive subsystem;System
System supervisory layers include system monitoring thread and system monitoring subsystem;Automatically updating layer includes automatically updating thread and automatically updates
Subsystem;Policy control layer includes terminal strategy control thread and terminal strategy control subsystem.
(2) technical solution
In order to achieve the above object, the main technical schemes that the present invention uses include:
A kind of self-aided terminal framework, the self-aided terminal include:Business function layer, final drive layer, system monitoring layer, from
Dynamic update step and policy control layer;
The business function layer includes terminal traffic function thread and business function subsystem;
The final drive layer includes final drive thread and final drive subsystem;
The system monitoring layer includes system monitoring thread and system monitoring subsystem;
The layer that automatically updates includes automatically updating thread and automatically updates subsystem;
The policy control layer includes terminal strategy control thread and terminal strategy control subsystem.
Alternatively, terminal strategy control thread controls the terminal traffic function thread, described by event triggering
Final drive thread, the system monitoring thread and described automatically update thread;
The terminal strategy control thread is obtained by event to communicate with the terminal strategy control subsystem;
The terminal traffic function thread passes through service request and the business function subsystem communication, the business function
Subsystem passes through the return to the service request and the terminal traffic function thread communication;
The final drive thread passes through service request and the final drive subsystem communication, the final drive subsystem
System passes through the return to the service request and the final drive thread communication;
The system monitoring thread passes through service request and the system monitoring subsystem communication, the system monitoring subsystem
System passes through the return to the service request and the system monitoring thread communication;
The thread that automatically updates automatically updates subsystem communication by service request with described, described to automatically update subsystem
System automatically updates thread communication by the return to the service request with described;
The business function subsystem, the final drive subsystem, the system monitoring subsystem and it is described it is automatic more
New subsystem is triggered by event to communicate with the terminal strategy control subsystem;
The terminal strategy control subsystem controls thread communication by event registration and the terminal strategy.
Alternatively, the terminal traffic function thread includes the kernel of encapsulation browser, Web container process and the first strategy
Event process;
The Web container process passes through service request and the business function subsystem communication, the business function subsystem
System passes through the return to the service request and the Web container process communication;
The first policy events process and terminal strategy control thread communication.
Alternatively, the final drive thread includes hardware driving process and the second policy events process;
The hardware driving process passes through service request and the final drive subsystem communication, the final drive subsystem
System passes through the return to the service request and the hardware driving process communication;
The second policy events process and terminal strategy control thread communication.
Alternatively, the system monitoring thread includes the first system order control process and the 3rd policy events process;
The first system order control process passes through service request and the system monitoring subsystem communication, the system
Monitor And Control Subsystem controls process communication by the return to the service request and the first system order;
The 3rd policy events process and terminal strategy control thread communication.
Alternatively, the thread that automatically updates includes automatically updating executive process and second system order control process;
The executive process that automatically updates automatically updates subsystem communication by service request with described, described to automatically update
Subsystem is communicated by the return to the service request with the executive process that automatically updates;
The second system order control process and terminal strategy control thread communication.
Alternatively, Web container process is primary to html and JavaScript progress renders, and passes through Resful Interface integrations
Or the mode that interface integrates obtains return of the business function subsystem to service request;
First policy events process is used to trigger the event-action sent in the terminal strategy control thread, and passes through
Asynchronous mode obtains the result of event-action;
Business function subsystem is used to pass through the telecommunication management terminal traffic function with the terminal strategy control subsystem
Restocking and undercarriage;
The terminal strategy control subsystem is used for systematic function restocking, undercarriage event;
The hardware driving process is used to obtain the terminal strategy control subsystem by the final drive subsystem
Event is called in the driving of distribution, and the used driving calling event performs corresponding hardware operation;
The second policy events process is used to trigger the event-action sent in the terminal strategy control thread, and
The result of event-action is obtained by asynchronous mode;
The final drive subsystem is used for initial configuration needed for management terminal hardware driving and printing template is matched somebody with somebody
Put;
The final drive thread obtains hardware driving initialization in initialization, by the final drive subsystem and matches somebody with somebody
Put;
The first system order control process is restarted for control terminal, system reboot;
The system monitoring subsystem is used to be managed thread initial configuration;
The system monitoring thread obtains configuration information by synchronizing to communicate with system monitoring subsystem, by described
Terminal strategy control subsystem obtains the configuration information of subsystem, and by the change notification of configuration information to policy monitor sub-line
Journey;
It is described to automatically update after executive process obtained by the policy monitor sub-line journey and need the thread that updates and renewal
Event handling, according to default event response policy response event;
The subsystem that automatically updates is used to match somebody with somebody operating system progress patch, each sub-line journey and version to terminal
Put and manage, add configuration information;
The terminal strategy control subsystem is used for the trigger event after being added to configuration information and is managed;
The terminal strategy control thread is used for the event registration and case distribution of other sub-line journeys of terminal;
The terminal strategy control subsystem is used for the tactful thread events of the policy events and terminal in configuration subsystem,
Policy synchronization to the terminal strategy is controlled into thread;
The terminal strategy control thread is used to carry out policy control to terminal.
Alternatively, it is described thread initial configuration is managed including:To the row of terminal hardware equipment and software function
Table, the thread initial configuration of duration of terminal monitoring are managed.
Alternatively, the terminal strategy control thread is put into an event queue by that will ask with asynchronous operation, into
The event registration and case distribution of other sub-line journeys of row terminal.
Alternatively, the event response strategy, including:
If renewal operation is renewal OS Events, response policy is:The reboot operation system of trigger action system
Event, triggers the closing thread events automatically updated, triggers the closing thread events of business function, the closing of triggering terminal monitoring
Thread events, the closing thread events of triggering terminal hardware device, the closing thread events of trigger policy control;
If renewal operation automatically updates thread events for renewal, response policy is:Trigger the reboot operation automatically updated
System event, the reboot operation system event of trigger policy control;
If renewal operation is renewal business function thread events, response policy is:Triggering business function restarts thread
Event, the reboot operation system event of trigger policy control;
If renewal operation is renewal terminal monitoring thread events, response policy is:Thread is restarted in triggering terminal monitoring
Thread events are restarted in event, trigger policy control;
If renewal operation is renewal terminal hardware equipment thread events, response policy is:Triggering terminal hardware device
Restart thread events, thread events are restarted in trigger policy control;
If renewal operation is renewal policy control, response policy is:Thread events are restarted in trigger policy control.
(3) beneficial effect
The beneficial effects of the invention are as follows:By business function layer, final drive layer, system monitoring layer, automatically update layer and
The self-aided terminal framework of policy control layer can preferably utilize the multinuclear computation performance of CPU, realize that self-service terminal system is layered
Administer, lift the operational efficiency of self-aided terminal, meanwhile, the dependence between terminal all parts is reduced, is reached between termination function mutually
Do not disturb, realize the component communication decoupling of self-aided terminal.
Embodiment
In order to preferably explain the present invention, in order to understand, below in conjunction with the accompanying drawings, by embodiment, to this hair
It is bright to be described in detail.
All kinds of self-aided terminal is only general on application architecture at present has been divided into client and server-side.In monokaryon CPU
Under, this method can be rapidly performed by development and application.But under multi-core CPU, how preferably to utilize the multinuclear of CPU
Computation performance, further lifts the computing capability and the speed of service of self-aided terminal, it is clear that the client of monokaryon epoch self-aided terminal
This rough construction method of end/server-side has been unable to meet demand.
In order to preferably utilize the multinuclear computation performance of CPU, the present invention provides a kind of self-aided terminal framework, passes through business work(
Ergosphere, final drive layer, system monitoring layer, automatically update layer and the self-aided terminal framework of policy control layer and can preferably utilize
The multinuclear computation performance of CPU, realizes self-service terminal system separated layer handling, and the operational efficiency for lifting self-aided terminal exists, meanwhile, reduce
Dependence between terminal all parts, reaches and does not interfere with each other between termination function, realizes the component communication decoupling of self-aided terminal.
Self-aided terminal framework provided in this embodiment as shown in Figure 1, including:Business function layer (1), final drive layer (2),
System monitoring layer (3), automatically update layer (4) and policy control layer (5).
Business function layer (1):The termination function for being mainly used for carrying on self-aided terminal shows.Wherein, function, which shows, is
Completed by business function thread, this shows operation and is mainly triggered by policy control layer, and business function layer is responded.
Business function layer (1) actively can also send event request by system monitoring thread to policy control layer (5) at the same time, such as the layer
Need to access final drive layer, it is impossible to the interface of this layer offer is be provided, but policy control is notified by trigger event
The terminal control strategy thread of layer, accesses final drive layer by terminal strategy control thread.
Final drive layer (2):The effect of this layer is to encapsulate the hardware device such as printer, identity card Card Reader that terminal integrates
The device drives such as device, POS machine, and the API for providing unified standard is called for corresponding hardware event.
System monitoring layer (3):Mainly prison examination and the concrete operations of control operation system and the health condition of self-aided terminal.
And receive the dependent event with processing system Monitor And Control Subsystem.
Automatically update layer (4):Mainly trigger the specific behaviour of self-aided terminal operating system and the function renewal event of software
Make.And receive and handle from the dependent event for automatically updating subsystem.
Policy control layer (5):Mainly control the feedback of distribution and the event handling of the event communication of each layer of self-aided terminal.
And receive and handle the dependent event from policy control subsystem.
Wherein, business function layer (1) includes terminal traffic function thread (1.1) and business function subsystem (1.2).
Final drive layer (2) includes final drive thread (2.1) and final drive subsystem (2.2).
System monitoring layer (3) includes system monitoring thread (3.1) and system monitoring subsystem (3.2).
Automatically updating layer (4) includes automatically updating thread (4.1) and automatically updates subsystem (4.2).
Policy control layer (5) includes terminal strategy control thread (5.1) and terminal strategy control subsystem (5.2).
Wherein,
1st, terminal traffic function thread (1.1), final drive thread (2.1), system monitoring thread (3.1), automatically update
Thread (4.1) and terminal strategy control thread (5.1) are located in terminal operating system.
2nd, business function subsystem (1.2), final drive subsystem (2.2), system monitoring subsystem (3.2), it is automatic more
New subsystem (4.2) and terminal strategy control subsystem (5.2) are individually located in server middleware.
3rd, terminal traffic function thread (1.1) is communicated by request event with business function subsystem (1.2), business function
Subsystem (1.2) is communicated by returning to event with terminal traffic function thread (1.1).
4th, final drive thread (2.1) is communicated by request event with final drive subsystem (2.2), final drive subsystem
System (2.2) is communicated by returning to event with final drive thread (2.1).
5th, system monitoring thread (3.1) is communicated by request event with system monitoring subsystem (3.2), system monitoring subsystem
System (3.2) is communicated by returning to event with system monitoring thread (3.1).
6th, automatically update thread (4.1) to communicate with automatically updating subsystem (4.2) by request event, automatically update subsystem
System (4.2) is communicated by return event with automatically updating thread (4.1).
7th, terminal strategy control thread (5.1) is communicated by request event with terminal strategy control subsystem (5.2), terminal
Policy control subsystem (5.2) controls thread (5.1) to communicate by returning to event with terminal strategy.
8th, terminal strategy control thread (5.1) can respectively with terminal traffic function thread (1.1), final drive thread
(2.1), system monitoring thread (3.1) and automatically update thread (4.1) communication.
9th, terminal strategy control subsystem (5.2) can respectively with business function subsystem (1.2), final drive subsystem
(2.2), system monitoring subsystem (3.2) and automatically update subsystem (4.2) communication.
Self-aided terminal under multi-core CPU can be realized by above-mentioned framework, driven by terminal strategy control for the event of core
Ejector half multithreading terminal forming types, layering structure is carried out by self-aided terminal, to reach self-service terminal system separated layer handling, lifting
The operational efficiency of self-aided terminal.Meanwhile the dependence between terminal all parts can be reduced by the framework, reach between termination function
It does not interfere with each other, realizes the purpose of the component communication decoupling of self-aided terminal.
The case distribution process of self-aided terminal framework shown in Fig. 1, as shown in Figure 2.
1st, business function layer (1)
1) terminal traffic function thread (1.1) is communicated by service request with business function subsystem (1.2).
2) business function subsystem (1.2) is logical by the return to the service request and terminal traffic function thread (1.1)
Letter.
3) terminal traffic function thread (1.1) includes:Encapsulate the kernel (1.1.1) of browser, Web container process
(1.1.2) and the first policy events process (1.1.3).
4) Web container process (1.1.2) is communicated by service request with business function subsystem (1.2), business function
System (1.2) is communicated by the return to the service request with Web container process (1.1.2).
5) Web container process (1.1.2) is primary to html and JavaScript progress renders, and passes through Resful sets of interfaces
Into or the mode that integrates of interface obtain return of the business function subsystem to service request.
6) the first policy events process (1.1.3) communicates with terminal strategy control thread (5.1).
7) event that the first policy events process (1.1.3) is used to send in triggering terminal policy control thread (5.1) is moved
Make, and the result of event-action is obtained by asynchronous mode.
8) business function subsystem (1.2) is used to pass through the telecommunication management terminal with terminal strategy control subsystem (5.2)
The restocking of business function and undercarriage.
Terminal strategy control subsystem (5.2) can systematic function restocking, undercarriage event, implementing result can pass through event configuration
Strategy carry out next step event bubbling operation.
2nd, final drive layer (2)
1) final drive thread (2.1) is communicated by service request with final drive subsystem (2.2).
2) final drive subsystem (2.2) is communicated by the return to the service request with final drive thread (2.1).
3) final drive thread (2.1) includes hardware driving process (2.1.1) and the second policy events process (2.1.2).
4) hardware driving process (2.1.1) is communicated by service request with final drive subsystem (2.2), final drive
System (2.2) is communicated by the return to the service request with hardware driving process (2.1.1).
5) the second policy events process (2.1.2) communicates with terminal strategy control thread (5.1).
6) hardware driving process (2.1.1) is used to obtain terminal strategy control subsystem by final drive subsystem (2.2)
Event is called in the driving that (5.2) distribute of uniting, and with overdriving, calling event performs corresponding hardware operation.
7) event that the second policy events process (2.1.2) is used to send in triggering terminal policy control thread (5.1) is moved
Make, and the result of event-action is obtained by asynchronous mode.
8) final drive subsystem (2.2) is used for initial configuration and printing template needed for management terminal hardware driving
Configuration.
9) it is initial to obtain hardware driving in initialization by final drive subsystem (2.2) for final drive thread (2.1)
Change configuration.
Hardware driving process (2.1.1) in the present invention directly invokes relevant hardware not by business function thread and drives
It is dynamic, but the driving distributed by terminal strategy control subsystem (5.2) calls event to perform corresponding hardware operation, reach by
The purpose that business function subprocess is decoupled with software-driven subprocess.
3rd, system monitoring layer (3)
1) system monitoring thread (3.1) is communicated by service request with system monitoring subsystem (3.2).
2) system monitoring subsystem (3.2) is communicated by the return to the service request with system monitoring thread (3.1).
3) system monitoring thread (3.1) includes the first system order control process (3.1.1) and the 3rd policy events process
(3.1.2)。
4) the first system order control process (3.1.1) is communicated by service request with system monitoring subsystem (3.2), is
System Monitor And Control Subsystem (3.2) controls process (3.1.1) to communicate by the return to the service request with the first system order.
5) the 3rd policy events process (3.1.2) communicates with terminal strategy control thread (5.1).
6) the first system order control process (3.1.1) restart for control terminal, system reboot.
7) system monitoring subsystem (3.2) is used to be managed thread initial configuration.
Wherein, thread initial configuration is managed including:List, terminal to terminal hardware equipment and software function
The thread initial configuration of the duration of monitoring is managed.
8) system monitoring thread (3.1) obtains configuration information by synchronizing to communicate with system monitoring subsystem (3.2),
The configuration information of subsystem is obtained by terminal strategy control subsystem (5.2), and by the change notification of configuration information to strategy
Monitor sub-line journey.
4th, layer (4) is automatically updated
1) thread (4.1) is automatically updated to communicate with automatically updating subsystem (4.2) by service request.
2) subsystem (4.2) is automatically updated to communicate with automatically updating thread (4.1) by the return to the service request.
3) automatically updating thread (4.1) includes automatically updating executive process (4.1.1) and second system order control process
(4.1.2)。
4) automatically update executive process (4.1.1) to communicate with automatically updating subsystem (4.2) by service request, automatically more
New subsystem (4.2) is communicated by the return to the service request with automatically updating executive process (4.1.1).
5) second system order control process (4.1.2) communicates with terminal strategy control thread (5.1).
6) automatically update after executive process (4.1.1) obtained by policy monitor sub-line journey and need the thread that updates and renewal
Event handling, according to default event response policy response event.
Wherein, event response strategy, including:
If renewal operation is renewal OS Events, response policy is:The reboot operation system of trigger action system
Event, triggers the closing thread events automatically updated, triggers the closing thread events of business function, the closing of triggering terminal monitoring
Thread events, the closing thread events of triggering terminal hardware device, the closing thread events of trigger policy control.
If renewal operation automatically updates thread events for renewal, response policy is:Trigger the reboot operation automatically updated
System event, the reboot operation system event of trigger policy control.
If renewal operation is renewal business function thread events, response policy is:Triggering business function restarts thread
Event, the reboot operation system event of trigger policy control.
If renewal operation is renewal terminal monitoring thread events, response policy is:Thread is restarted in triggering terminal monitoring
Thread events are restarted in event, trigger policy control.
If renewal operation is renewal terminal hardware equipment thread events, response policy is:Triggering terminal hardware device
Restart thread events, thread events are restarted in trigger policy control.
If renewal operation is renewal policy control, response policy is:Thread events are restarted in trigger policy control.
Details can be shown in Table 1.
Table 1
From table 1 it follows that by using event-driven mode instead, in the event of renewal per thread merely, remove
Operating system update and the renewal of business function thread are outer, and the renewal of remaining thread do not interfere with the normal of business function thread
Operation.
7) automatically update subsystem (4.2) be used to carrying out operating system patch, to each sub-line journey of terminal and version into
Row configuration and management, addition configuration information.
5th, policy control layer (5)
1) terminal strategy control thread (5.1) triggers control terminal business function thread (1.1), final drive by event
Thread (2.1), system monitoring thread (3.1) and automatically update thread (4.1).
2) terminal strategy control thread (5.1) is obtained by event and communicated with terminal strategy control subsystem (5.2).
3) business function subsystem (1.2), final drive subsystem (2.2), system monitoring subsystem (3.2) and it is automatic more
New subsystem (4.2) is triggered by event to communicate with terminal strategy control subsystem (5.2).
4) terminal strategy control subsystem (5.2) controls thread (5.1) to communicate by event registration with terminal strategy.
5) terminal strategy control subsystem (5.2) is used to by event to match somebody with somebody into function restocking, undercarriage event, implementing result
The strategy put carries out the event bubbling operation of next step.
6) terminal strategy control subsystem (5.2) is used to be managed the trigger event after configuration information addition.
7) terminal strategy control thread (5.1) is used for the event registration and case distribution of other sub-line journeys of terminal.
8) terminal strategy control subsystem (5.2) is used for the tactful thread thing of the policy events and terminal in configuration subsystem
Part, by policy synchronization to terminal strategy control thread (5.1).
9) terminal strategy control thread (5.1) is used to carry out policy control to terminal.
The policy control thread (5.1) of terminal is the core of whole self-aided terminal framework, it assume responsibility for terminal other sub-lines
The event registration and case distribution of journey event.All request and asynchronous operation are all put into by terminal strategy control thread (5.1)
In one event queue, since in terminal, each sub-line journey is all singleton, and there is no the problem of concurrent mutual exclusion.Therefore can be
Parallel computation plays sizable effect under multi-core CPU.Meanwhile real event triggering is run in each sub-line journey,
Be not in that there are the problem of business deadlock for strategy controller thread and other-end thread.
Method provided in this embodiment, by business function layer, final drive layer, system monitoring layer, automatically update layer and
The self-aided terminal framework of policy control layer can preferably utilize the multinuclear computation performance of CPU, realize that self-service terminal system is layered
To administer, the operational efficiency for lifting self-aided terminal exists, meanwhile, the dependence between terminal all parts is reduced, is reached between termination function
It does not interfere with each other, realizes the component communication decoupling of self-aided terminal.