Abnormal taskbar plug-in type loading method is automatically processed under a kind of Linux
Technical field
The invention belongs to (SuSE) Linux OS technical fields, specifically, automatically processing exception under being related to a kind of Linux
Taskbar plug-in type loading method.
Background technology
(SuSE) Linux OS in the prior art, important component of the taskbar as desktop operating system, usually all
Including the general modules such as start menu, locking applications, window list and pallet.Start task after user enters desktop
When column, it is general usually to press certain execution flow sequence load start menu, locking applications, window list and pallet etc.
After the success of module, only the last one module loading, taskbar just completes load, successfully shows.
In traditional Linux taskbars, the modules such as start menu, locking applications, window list and pallet all exist
In taskbar main interface.Once some module exception occurs in start-up course, such as starts time-out or collapse, may result in and appoint
The load of business column occurs waiting for or collapse.The prior art encounters problems, often require that user must restart manually taskbar or
Person's reboot operation system ability normal use, to which the use to user is made troubles.
Chinese invention patent " method and system for showing taskbar button on taskbar " (application number
CN200510120163.4), the invention provides a kind of system or methods, for showing that the abundant performance of corresponding application programs is appointed
Business column button.In one example, abundant presentation taskbar button can receive the content from application program by programming interface.
The invention further relates to a kind of system and method, for showing abundant presentation taskbar button and for showing and conveying abundant table
The thumbnail of the associated application window of current task column button leaves.The invention further includes a kind of system and method, will be contracted
Sketch map is followed closely on a display screen or thumbnail is allowed to leave, and for showing multiple tasks column button in a taskbar, but
It is the automatic Exception handling for not considering taskbar loading procedure under (SuSE) Linux OS in present patent application.
Chinese invention patent " a kind of management method and device of taskbar button " (application number CN201510792117.2),
A kind of disclosure of the invention management method and device of taskbar button.The method, which is applied to one, has first window and second
The system of window, wherein the first window corresponds to the first button of taskbar, and has the first application program identification, described
Second window corresponds to the second button of the taskbar, and has the second application program identification, including:Receive an administration order;
According to the administration order, second application program identification and first application program identification are set as equal;It will tool
First button and second button for having equal application program identification combine on the taskbar, form third and press
Button.Although the management method and device of taskbar button described in the invention, can flexibly define task according to the demand of user
The grouping of column button brings better user experience to meet the individual demand of user, but does not consider this specially
In profit application under (SuSE) Linux OS taskbar loading procedure automatic Exception handling.
A kind of Chinese invention patent " method and device of linux program codes load " (application number
CN201010531328.8), which proposes a kind of method and device of linux program codes load, existing to solve
The problem of linux programs must just restart the program and then lead to service disruption is changed present in technology, this method includes:It opens
Begin to start linux programs, only the loading code of linux program codes be loaded into address space by linux operating systems,
Loading code is run, the code of other parts is loaded into address space, after the codes of other parts is changed, to loading generation
Code execute reload operation, the code of modified other parts is re-loaded in address space, when only change linux
In program when the code of other parts, it is not necessary to restart the program and then avoidance breakout service.Code load side described in the invention
Method is still to be proposed for linux application programs, but when not being related in present patent application (SuSE) Linux OS and starting
Support automatically processes abnormal taskbar plug-in type loading method.
Chinese invention patent " for generate on the local machine with the taskbar button group entry that is generated on remote machine
Combine the method and system of display " (application number CN201080063399.8), which proposes with indicating to hold on remote machine
The user interface element of capable remote application and the application output generated by the remote application are generated to update by local computer
And the method and system of the taskbar shown.These methods and be to receive and to be generated by remote application including local client
Using output and remote window configuration information, the output window of applying comprising local taskbar packet configuration information is generated, and
And taskbar is updated in response to the local taskbar packet configuration information.The invention is related to for being generated simultaneously by local machine
It shows and generates on the local machine and the mark of graph data that shows and on the remote machine in the taskbar button group of display
The mark of graph data for generating and showing on the local machine, but it is not related to present patent application in present patent application
It supports to automatically process abnormal taskbar plug-in type loading method when middle (SuSE) Linux OS starts.
Invention content
In view of this, the present invention in order to solve defect and deficiency of the existing technology, provide it is automatic under a kind of Linux
Abnormal taskbar plug-in type loading method is handled, it can be in taskbar loading procedure with the automatic loading tasks column of plug-in mode
Modules prevent taskbar main interface from influencing user's use because module leads to load failure extremely.
In order to solve the above-mentioned technical problem, the invention discloses abnormal taskbar plug-in unit is automatically processed under a kind of Linux
Formula loading method, and realized using following technical scheme.
Abnormal taskbar plug-in type loading method is automatically processed under a kind of Linux, step includes:
S1, taskbar main interface obtain the plug-in card configuration file that user specifies;
The plug-in card configuration file of acquisition is transmitted to kernel service layer by S2, the taskbar main interface;
S3, the kernel service layer parse the plug-in card configuration file, obtain the plugin information of corresponding plug-in unit and preservation, accuse
Know plug-in management layer;
S4, the plug-in management layer parse the information being apprised of, and call card i/f module in plug-in framework layer;
S5, the card i/f module are packaged the plug-in unit, and the plug-in framework layer recalls the inserter tube
Service interface module in layer is managed, the corresponding plug-in unit is loaded by the service interface module;
S6, the service interface module give plug-in unit loading result Real-time Feedback to plug-in management layer;
S7, it is shown in the taskbar main interface according to the plug-in unit loading result.
Further, the specific steps of the S7 include:
S71, judge whether the plug-in unit loads success, if then being shown in the taskbar main interface;If it is not,
Then judge whether current load number is more than that preset heavily loaded number carries out if being more than in the taskbar main interface
It has been shown that, if not exceeded, then the kernel service layer initiates to load the request of the plug-in unit again to the plug-in framework layer.
Further, the specific steps shown in the taskbar main interface include:
The loading result of the plug-in unit is notified the kernel service layer by S711, the plug-in management layer;
The loading result of the plug-in unit is sent to the taskbar main interface by S712, the kernel service layer;
If the loading result of S713, the plug-in unit is to load successfully, shows in the taskbar main interface and successfully add
The plug-in unit carried;Fail if the loading result of the plug-in unit is load,
Then the loading result is notified user by the taskbar main interface in the form of pop-up.
Further, when the S5-S7 either steps appearance is abnormal leads to the plug-in unit load failure, the kernel service
Monitoring connection between layer and the plug-in management layer can automatically process reloading for the plug-in unit.
Further, the plugin information is saved in GSettings global configurations in the S3;.
Further, kernel service layer described in the S3 informs the plug-in management layer by DBus interfaces.
Abnormal taskbar plug-in type loading system is automatically processed under a kind of Linux, it is characterised in that:Including:
Taskbar main interface:For plug-in card configuration file to be arranged;
Kernel service layer:The plug-in card configuration file that the taskbar main interface is sent is received, plugin information is parsed
And analysis result is preserved, it is communicated with plug-in management layer and the analysis result is notified into the plug-in management layer;
Plug-in management layer:It parses the notification information that the kernel service layer is sent and calls card i/f in plug-in framework layer
The service interface module of module, the plug-in management layer loads the corresponding plug-in unit, and the unified plug-in unit safeguarded load and completed;
Plug-in framework layer:The plug-in unit is packaged, the service interface module in the plug-in management layer is called to carry out
The load of the plug-in unit;
And layer plug:Including multiple plug-in units, interface uniform registration that the multiple plug-in unit is provided with the plug-in framework layer
At plug-in unit.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, feature
It is:The step of approach described above is realized when the computer program is executed by processor.
It automatically processes abnormal taskbar plug-in type loading device under a kind of Linux, including memory, processor and deposits
The computer program that can be run in the memory and on the processor is stored up, the processor executes the computer journey
The step of approach described above is realized when sequence.
Compared with prior art, the present invention can be obtained including following technique effect:
1) compared to linux task with traditional column, taskbar main interface in the present invention, plug-in management layer, is inserted kernel service layer
Part ccf layer and layer plug are independent from each other process, do not interfere with each other, and are conducive to the stability and working efficiency of raising system;
2) taskbar main interface is responsible for loading tasks column main interface, and plug-in management layer is responsible for loading plug-in card configuration file simultaneously certainly
Dynamic processing is abnormal, and plug-in unit loading result feeds back to main interface by kernel service layer;
3) load of taskbar main interface and plug-in unit load can be carried out at the same time, and the plug-in unit that success loads can be shown automatically takes office
It is engaged on column, the heavily loaded number that kernel service layer and plug-in management layer can be specified according to user when plug-in unit load fails fails to load
Plug-in unit reloaded, plug-in unit load failure will not cause taskbar main interface load failure, avoid traditional Linux appoint
The drawbacks of a certain step load unsuccessfully causes user completely can not be using taskbar in business column loading procedure, and the more plug-in units in backstage are same
When the mechanism that loads can accelerate the ready speed of taskbar to a certain extent;
4) the taskbar load mode of plug-in type, which is advantageous in that, can have different users different taskbar plug-in units
Configuration has better autgmentability, can meet the functional requirement of various different task columns.
Certainly, implementing any of the products of the present invention must be not necessarily required to reach all the above technique effect simultaneously.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and constitutes the part of the present invention, this hair
Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is that the work-based logic for automatically processing abnormal taskbar plug-in type loading method of one embodiment of the invention shows
It is intended to.
Fig. 2 is the implementation steps for automatically processing abnormal taskbar plug-in type loading method of one embodiment of the invention
Figure.
Specific implementation mode
Carry out the embodiment that the present invention will be described in detail below in conjunction with accompanying drawings and embodiments, thereby how the present invention is applied
Technological means solves technical problem and reaches the realization process of technical effect to fully understand and implement.
Support the work-based logic for automatically processing abnormal taskbar plug-in type loading method as shown in Figure 1, main under Linux
Including taskbar main interface, kernel service layer, plug-in management layer, plug-in framework layer and layer plug.
In Fig. 1, taskbar main interface includes interactive module, and user can be arranged self-defined by the interactive module
Plug-in card configuration file;Kernel service layer includes mainly business module, and business module can receive the transmission of taskbar main interface
User-defined plug-in card configuration file can also parse type, position and the number of each plug-in unit, and after parsing
As a result it is saved in GSettings global configurations, while sending DBus message informing plug-in management layers;Plug-in management layer and kernel
Operation layer is connect with DBus interfaces respectively, and process communication between the two is realized using DBus interfaces;Plug-in management layer includes mainly
Management module and service interface module after plug-in management layer receives DBus notification messages, parse GSettings global configurations, so
Card i/f module in plug-in framework layer is called afterwards;Plug-in framework layer includes mainly card i/f module, card i/f module root
Package types, position and the number being passed to according to plug-in management layer, are packaged each plug-in unit, plug-in unit frame after the completion of encapsulation
Rack-layer calls service interface module in plug-in management layer, starts corresponding plug-in unit by service interface module, is opened between each plug-in unit
Dynamic sequence is not interfere with each other;Layer plug includes mainly multiple plug-in units, and plurality of plug-in unit provides interface unified note by plug-in framework layer
Volume becomes plug-in unit, then is responsible for these plug-in units by plug-in management layer;Result is uniformly transferred into inserter tube after plug-in unit start completion
Layer is managed to safeguard, taskbar main interface goes plug-in management layer to obtain result from inner core managing layer;Kernel service layer, plug-in management layer
Between also mutually monitoring connection, be responsible for realize plug-in unit load failure when reloads operation.
Abnormal taskbar plug-in type loading method is automatically processed under a kind of Linux, step includes:
First, after (SuSE) Linux OS starts, self-starting taskbar main interface, taskbar main interface starts kernel industry
Business layer, plug-in management layer and plug-in framework layer;
Secondly, the plug-in card configuration file of user setting is passed to kernel service layer, kernel service layer by taskbar main interface
Type, position and the number of each plug-in unit are parsed after obtaining plug-in card configuration file, and is saved in GSettings global configurations
In, while sending DBus information notice plug-in management layer;
Then, after plug-in management layer receives DBus notification messages, GSettings global configurations is parsed, plug-in unit is then called
Card i/f module in ccf layer, card i/f module can be according to package types, position and the volumes that plug-in management layer is passed to
Number, each plug-in unit is packaged;After the completion of encapsulation, plug-in framework layer recalls service interface module in plug-in management layer,
Corresponding plug-in unit is started by service interface module;
Next, after several plug-in unit start completions, by layer plug by plug-in unit loading result Real-time Feedback to plug-in management
Layer, plug-in management layer send DBus information notice kernel service layer real-time update board state after receiving relevant information, and will knot
Fruit feeds back to taskbar main interface;
Finally, if plug-in unit starts successfully, result can directly display out in taskbar;Otherwise, then by plug-in management
Layer with kernel service layer mutually monitor and be connected, and is realized and is reloaded operation when plug-in unit load failure, is grasped when reloading
When making also unsuccessful, failure result is transmitted to kernel alternation of bed, is informed by taskbar main interface pop-up plug-in unit failure prompt message
User.
Specific implementation step is as follows:
S1:Taskbar main interface obtains the plug-in card configuration file that user specifies;
S2:The plug-in card configuration file of acquisition is transmitted to kernel service layer by taskbar main interface;
S3:After kernel service layer obtains plug-in card configuration file, each package types of parsing plug-in card configuration file acquisition, position
And number, it is saved into GSettings global configurations, and plug-in management layer is informed by DBus interfaces;
S4:After plug-in management layer receives DBus notification messages, GSettings global configurations are parsed, then call plug-in unit frame
Card i/f module in rack-layer;
S5:Package types, position and the volume that the card i/f module of plug-in framework layer is passed to according to plug-in management layer
Number, each plug-in unit is packaged, after the completion of encapsulation, plug-in framework layer recalls service interface module in plug-in management layer, by
Service interface module start-up loading corresponds to plug-in unit;
S6:Layer plug gives plug-in unit loading result Real-time Feedback to plug-in management layer;
S7:Judge whether plug-in unit load succeeds, if plug-in unit load failure, enters in next step;Otherwise it enters step
S10;
S8:Because plug-in unit load failure, plug-in management layer can call in plug-in framework layer card i/f module again repeatedly
Plug-in unit is loaded, judges whether current be more than that heavily loaded number set by user enters next if being not above heavily loaded number
Step;Otherwise S10 is entered step;
S9:If plug-in unit load failure and be not above it is set by user reload number, plug-in management layer again to
Plug-in framework layer sends load plug-in unit and calls, and enters step S5, reloads plug-in unit, repeatedly, until completing user's setting
Heavily loaded number;
S10:Plug-in management layer receives after plug-in unit loading result through DBus interface notification kernel service layers;
S11:The result that plug-in unit loads is sent to taskbar main interface by kernel service layer;
S12:If plug-in unit successfully loads, the plug-in unit of successfully load will be shown in taskbar main interface;Otherwise, taskbar master
Interface notifies user to load the plug-in unit of failure in the form of pop-up.
Wherein, step S1, after the completion of S2 loads, taskbar main interface completes load.When in step S5 to step S9
When the appearance of one step is abnormal to lead to plug-in unit load failure, the monitoring connection between kernel service layer and plug-in management layer then can be automatic
Handle plug-in unit heavy duty;When still failing after plug-in unit repeatedly heavy duty, taskbar main interface will pop up prompt message;Appoint during this
Business column main interface does not wait for plug-in unit load, and after the completion of taskbar main interface is shown, the plug-in unit that success loads will be shown
The plug-in unit for coming, and prompting load to fail by pop-up form.Step S10 to step S12 then shows to load even if plug-in unit and fail,
Taskbar also can normal operation, only having single plug-in unit can not use, and not interfere with entire taskbar function.
Taskbar main interface is interacted by kernel service layer with plug-in management layer in the present invention, and taskbar main interface is not direct
It is communicated with specific plug-in unit.Therefore, taskbar main interface is Real-time Feedback plug-in unit loading result in the present invention, the display of plug-in unit by
Plug-in unit itself processing, taskbar main interface without waiting for plug-in unit and complete load just display, can accelerate task to a certain extent
The startup on column.Meanwhile the present invention in kernel service layer receive be user-defined plug-in card configuration file, this load mode
Attribute is expanded with good, taskbar is supported to load customized style.
The beneficial effects of the invention are as follows:
1) compared to linux task with traditional column, taskbar main interface in the present invention, plug-in management layer, is inserted kernel service layer
Part ccf layer and layer plug are independent from each other process, do not interfere with each other, and are conducive to the stability and working efficiency of raising system;
2) taskbar main interface is responsible for loading tasks column main interface, and plug-in management layer is responsible for loading plug-in card configuration file simultaneously certainly
Dynamic processing is abnormal, and plug-in unit loading result feeds back to main interface by kernel service layer;
3) load of taskbar main interface and plug-in unit load are carried out at the same time, and the plug-in unit that success loads can be shown to taskbar automatically
On, the heavily loaded number that kernel service layer and plug-in management layer can be specified according to user when plug-in unit load fails inserts load failure
Part is reloaded, and plug-in unit load failure will not lead to the load failure of taskbar main interface, avoid traditional Linux taskbars
The drawbacks of a certain step load unsuccessfully causes user completely can not be using taskbar in loading procedure, and the more plug-in units in backstage add simultaneously
The mechanism of load can accelerate the ready speed of taskbar to a certain extent;
4) the taskbar load mode of plug-in type, which is advantageous in that, can have different users different taskbar plug-in units
Configuration has better autgmentability, can meet the functional requirement of various different task columns.
It is provided for the embodiments of the invention above under a kind of Linux and automatically processes abnormal taskbar plug-in type load side
Method is described in detail.The explanation of above example is only intended to facilitate the understanding of the method and its core concept of the invention;Together
When, for those of ordinary skill in the art, according to the thought of the present invention, have in specific embodiments and applications
Change place, in conclusion the content of the present specification should not be construed as limiting the invention.
Some vocabulary has such as been used to censure specific components or module in specification and claim.Art technology
Personnel are, it is to be appreciated that different institutions may call the same component or module with different nouns.This specification and right are wanted
In a manner of asking the difference not by title to be used as differentiation component, but area is used as with the difference of component or module functionally
The criterion divided.As being open language, therefore should solve in specification in the whole text and claim "comprising", " comprising " mentioned in
It is interpreted into " including but not limited to "." substantially " refer in receivable error range, those skilled in the art can be certain
The technical problem is solved in error range, basically reaches the technique effect.Specification subsequent descriptions are to implement the present invention's
Better embodiment, so description is being not limited to the model of the present invention for the purpose of the rule for illustrating the present invention
It encloses.Protection scope of the present invention is when subject to appended claims institute defender.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Including so that commodity or system including a series of elements include not only those elements, but also include not clear
The other element listed, or further include for this commodity or the intrinsic element of system.In the feelings not limited more
Under condition, the element that is limited by sentence "including a ...", it is not excluded that including the element commodity or system in also
There are other identical elements.
Several preferred embodiments of the present invention have shown and described in above description, but as previously described, it should be understood that the present invention
Be not limited to form disclosed herein, be not to be taken as excluding other embodiments, and can be used for various other combinations,
Modification and environment, and can in innovation and creation contemplated scope described herein, by the technology of above-mentioned introduction or related field or
Knowledge is modified.And changes and modifications made by those skilled in the art do not depart from the spirit and scope of the present invention, then it all should be
In the protection domain of appended claims of the present invention.