Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute
The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses
Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims
Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is
Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but
These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off
In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed
For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or
" when ... " or " in response to determination ".
This specification embodiment provide a kind of operation system checking method and it is a kind of for execute this method based on appointing
The operation system checking device of business stream.The operation system checking method that the present embodiment is related to is described in detail below, referring to
Shown in Fig. 1, this method be may comprise steps of:
S101 obtains the identification information of operation system to be checked, and is loaded and is corresponded to according to the identification information of the operation system
Preconfigured task flow template;
In traditional scheme, when operation system has new version, it may deposit same on production environment difference host on line
The new early version different situations of one operation system, when being checked, if for operation system a whole set of verification rule not with
The upgrading of operation system and upgrade, have that be likely to occur verification abnormal, report by mistake or fail to report.
In order to enable to check rule with operation system smooth upgrade, on the one hand, the present embodiment sets task flow template
For one group of orderly subtask set, the difference subtask is used to meet the different IPs of operation system to demand, wherein orderly son
Set of tasks is the subtask set after arranging subtask according to predetermined order, when carrying out the verification of corresponding operation system,
The subtask that will successively be executed according to the predetermined order in task flow template.
Subtask is set as minimum verification unit by the present embodiment, can be quickly anti-after new version occurs in operation system
Answer, by combine subtask form new task flow template, compared with it is original for each default pinned task flow template more
Add convenient and efficient.
On the other hand, before verification, the identification information of operation system to be checked is obtained, identification information includes at least system
Version identifier loads corresponding preconfigured task flow template according to the identification information of the operation system.
S102 records the identification information of loaded task flow template, is successively executed wherein according to the task flow template
The subtask for including updates the current subtask implementation progress of the task flow template in the process of implementation, and the subtask is held
Traveling degree is used to check the interruption recovery after exception;
Specifically, can configure a kind of record file, as the execution of verification task updates verification stream in record file
The current implementation progress of journey, the implementation progress can be considered the implementation progress of orderly subtask set in the present embodiment.
S103 determines that checking task flow is abnormal, and terminates operation system to be checked if any subtask executes failure
Current verification process.
Specifically, during according to traffic flow template sequence subtasking, probably due to a variety of causes causes
Task abnormity, such as task flow template and operation system mismatch;After some subtask in task flow template executes exception,
Determine that verification task flow is abnormal and terminates the current verification process of operation system to be checked.
This specification embodiment also provides a kind of more specific operation system checking method, and shown in Figure 2, this method can
With the following steps are included:
S201 obtains the identification information of operation system to be checked, and is loaded and is corresponded to according to the identification information of the operation system
Preconfigured task flow template;
Wherein, the task flow template is one group of orderly subtask set, and the difference subtask is for meeting business system
The different IPs of system identify demand, the identification information including at least system version;
When operation system has new version, need gradually to cover new version each host of production environment on line
On, and during this covering, the same new early version of operation system on production environment difference host on line may be deposited
Different situations have prepared different verification rules in traditional scheme just for different business systems, and there is no be directed to operation system
This application scenarios prepares corresponding treatment measures in edition upgrading progress, when being checked, if for operation system
The whole series verification rule does not upgrade with the upgrading of operation system, has and is likely to occur verification exception, reports by mistake or fail to report.
The present embodiment makes improvement to this, first obtains the identification information of operation system to be checked, in the identification information at least
It is identified including system version, it is generally the case that the identification information can be specifically set as system name and version number.
It is appreciated that in the present embodiment, needing to be pre-configured with comprising operation system identification information and corresponding task flow
The one-to-one relationship of template specifically can be pre-configured with mapping library, by every group of system name and version number, this group of system name
Task flow template ID corresponding with version number pre-establishes mapping relations.
For example: (system name and version number can be considered for the system name for obtaining operation system to be checked and version number
The identification information of operation system), it is inquired in preconfigured mapping library according to system name and version number, is recorded in the mapping library
The system name of operation system and the one-to-one relationship of version number and preconfigured task flow template ID, the mapping relations
The form of expression specifically refer to the following table 1.
|
System A (version 1.1) |
System A (version 1.2) |
System A (version 1.3) |
… |
Task flow template ID |
a110 |
a120 |
a130 |
… |
|
System B (version 2 .2) |
System B (version 2 .3) |
System B (version 2 .4) |
|
Task flow template ID |
b220 |
b230 |
b240 |
|
Table 1
S202 records the identification information of loaded task flow template;
S203 successively starts to execute subtask wherein included according to the task flow template;
S204 after execution starts in any verification subtask, records institute in current subtask implementation progress record file
State subtask mark and corresponding beginning execution information;
Specifically, can configure a kind of record file, as the execution of verification task updates verification stream in record file
The current implementation progress of journey, the implementation progress can be considered the implementation progress of orderly subtask set in the present embodiment.
Citing is illustrated the recording process:
It include a string of orderly subtasks in task flow template, subtask ID is respectively 1000-1006, loading tasks flow template
Afterwards, subtask 1000 is first begun to, while recording corresponding subtask implementation progress, the tool of the record in record file
Body form is permissible are as follows: " subtask ID:1000, current to execute movement: to start to execute ";
Further, after subtask 1000 runs succeeded, corresponding subtask can be recorded in record file again and held
Traveling degree, the concrete form of the record can be with are as follows: " subtask ID:1000, current to execute movement: to run succeeded ";
After subtask 1000 runs succeeded, next height is continued to execute according to the subtask execution sequence in task flow template
Task 1001, while recording corresponding subtask implementation progress in record file, the concrete form of the record can be with are as follows: " son
Task ID: 1001, current to execute movement: to start to execute " ... and so on, with the continuation of verification process, constantly updates son and appoint
The executive condition of business, with the current verification implementation progress of determination.
It is worth noting that: the subtask records the record content of file and recording mode can be according to concrete application scene
Sets itself, as long as meeting record current the needs of checking progress;Such as, it in the implementation procedure of a subtask, can incite somebody to action
Start to execute, executive process, the movements such as run succeeded all are recorded, and it is (as every in only recorded can also only to record one of movement
A subtask starts to execute);Further, more custom contents can also be added in record, such as corresponding movement is touched
The time is sent out, concrete form can be with are as follows: " subtask ID:1001, it is current to execute movement: to start to execute, current time: 10:21 ".
Further, can run succeeded in whole subtasks, for operation system whole verification process after, will be right
The subtask implementation progress record file answered is deleted.
Does S205 judge that currently performed subtask runs succeeded? if current subtask runs succeeded, step is executed
S206 terminates process if current subtask executes failure;
Does S206, judge whether the subtask in the task flow template is all finished? if subtask is without all
It is finished, goes successively to next subtask, and re-execute the steps S203, if subtask is all finished, terminate
Process;
During being executed to task flow template, the case where interruption if there is the verification task abnormity being carrying out, then
The consistency that front and back is checked be must assure that ensure that service link will not be impacted.It in this case, can be according to above
In record information reload original task flow template and continue to execute, to ensure verification consistency.
It is appreciated that can first the appearance reason to the abnormal interrupt be carried out before reloading task flow template and executing
Detection, and reload task flow template because after correcting the exception root and execute verification.
It is shown in Figure 3, method is re-executed after interrupting for verification task abnormity, specifically includes the following steps:
S301 reloads the task flow template according to pre-recorded task flow template identification;
The step includes institute above in the task flow template primarily to reload the task flow template executed originally
It states, the last time executes the subtask implementation progress recorded when verification, and the present embodiment can be completed according to the subtask implementation progress
The abnormal interrupt of verification task restores, i.e., this restores that the verification implementation progress for connecting the last time is continued to execute core after checking
It is right.
S302 determines subsequent pending subtask according to pre-recorded current subtask implementation progress;
S303 continues to execute subsequent pending subtask, updates the current son of the task flow template in the process of implementation
Task execution progress.
Does S304 judge that currently performed subtask runs succeeded? if current subtask runs succeeded, step is executed
S305 terminates process if current subtask executes failure;
Does S305, judge whether the subtask in the task flow template is all finished? if subtask is without all
It is finished, goes successively to next subtask, and re-execute the steps S303, if subtask is all finished, terminate
Process;
Verification is to ensure the important means of an operation system fund security, is needed not in each stage of business processing
Same verification rule carries out business verification.Wherein, main road verification is a kind of verification side being interspersed in operation system logical links
Formula, has operation system certain invasive, needs to ensure the height correctness and stability of verification rule, avoids to operation system
It impacts.
In traditional scheme, need to carry out verification verification, but tradition to operation system according to fixed whole verification template
After operation system upgrading, verification template is not easy with operation system smooth upgrade scheme.And traditional scheme is in verification task hair
After raw abnormal interrupt, it is unable to ensure front and back verification consistency when re-executing verification, in main road audit process, this verification
Exception will affect business following link process.
As can be seen that the present embodiment is split as multiple subtasks by that will check task, and in verification process constantly more
The implementation progress of new record subtask can pass through pre-recorded task flow template identification after abnormal interrupt occurs in verification
Predecessor's business flow template is reloaded, directly starts to execute subsequent subtask by the subtask implementation progress of record, it is ensured that again
It executes front and back when verification and checks consistency.
Task flow template mentioned above is pre-configured with, and illustrates the configuration mode of task flow template below, ginseng
Examine Fig. 4, comprising the following steps:
S401 obtains the basis verification rule write in advance;
S402 determines the corresponding operation system of task flow template to be configured, according to the business scenario of the operation system,
Corresponding business verification rule is obtained in the business verification rule base write in advance;
The basis verification rule and business verification rule are combined configuration, to generate and the industry by S403
The corresponding task flow template of the identification information of business system.
Specifically, the verification demand of the operation system can be analyzed, determines that composition is described according to the verification demand and appoint
The orderly subtask set of business flow template;
By in the set of orderly subtask, the basis verification rule or business of corresponding different subtasks check regular configuration
Into task flow template, to generate task flow template corresponding with the identification information of the operation system.
Before configuration task flow template, it is necessary first to write corresponding verification rule, check rule to meet business system
The verification for different aspect verification demand of uniting executes step.It specifically, can be by verification rule by basis verification rule and service interfacing
Verification rule distinguishes, and verification rule in basis meets the general purpose core of most operation system verification demands to rule, industry
Business docking verification rule meets the non-universal verification rule of operation system a certain kind business verification demand.
Wherein, verification rule is distinguished by basis verification rule and service interfacing verification rule, is for the ease of rear
When continued access enters new business, without the rule code of overlapping development basis verification rule, this part rule of overlapping development is avoided to make
At the wasting of resources.
Citing is illustrated basis verification rule and service interfacing verification rule:
Basis verification rule A is write, business checks rule B and business checks rule C, in configuration task flow template, base
Plinth verification rule A can be applied to most task flow templates, and business verification rule B can be applied to task flow template a, task flow
Wherein, there is the correspondence system of task flow template a, task flow template b template b ... business to check the business that rule B can be checked;Industry
Business verification rule C can be applied to task flow template d, task flow template g ... wherein, task flow template d, task flow template g's
The business that there is correspondence system business verification rule C can check.
After writing the regular verification rule with service interfacing of a lot of basis verification, different rules is formed into task one by one
Flow template.Each verification task flow template establishes corresponding relationship with corresponding operation system name and version number, is to guarantee verification rule
The then key of smooth upgrade and verification consistency.
Corresponding to above method embodiment, this specification embodiment also provides a kind of operation system verification of task based access control stream
Device, it is shown in Figure 5, the apparatus may include: task flow loading module 510, subtask logging modle 520 and exception
Manage module 530;
Task flow loading module 510: for obtaining the identification information of operation system to be checked, according to the operation system
Identification information loads corresponding preconfigured task flow template, wherein the task flow template is one group of orderly subtask collection
It closes, the difference subtask is used to meet the different IPs of operation system to demand, and the identification information includes at least system version
Mark;
Subtask logging modle 520: for recording the identification information of loaded task flow template, according to the task flow
Template successively executes subtask wherein included, update in the process of implementation the task flow template current subtask execute into
Degree, the subtask implementation progress are used to check the interruption recovery after exception;
Exception processing module 530: for determining that verification task flow is abnormal, tying after any subtask executes and fails
The current verification process of beam operation system to be checked.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor realizes aforementioned business system when executing described program
System checking method, the method include at least:
The identification information for obtaining operation system to be checked, it is corresponding in advance according to the load of the identification information of the operation system
The task flow template of configuration, wherein the task flow template is one group of orderly subtask set, and the difference subtask is for full
The different IPs of sufficient operation system identify demand, the identification information including at least system version;
The identification information for recording loaded task flow template, successively executes wherein included according to the task flow template
Subtask updates the current subtask implementation progress of the task flow template, the subtask implementation progress in the process of implementation
Restore for checking the interruption after exception;
If any subtask executes failure, determine that checking task flow is abnormal, and terminates working as operation system to be checked
Pronucleus is to process.
Fig. 6 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram,
The equipment may include: processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus
1050.Wherein processor 1010, memory 1020, input/output interface 1030 and communication interface 1040 are real by bus 1050
The now communication connection inside equipment each other.
Processor 1010 can use general CPU (Central Processing Unit, central processing unit), micro- place
Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one
Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment
Case.
Memory 1020 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 1020 can store
Operation service system and other applications are realizing technology provided by this specification embodiment by software or firmware
When scheme, relevant program code is stored in memory 1020, and execution is called by processor 1010.
Input/output interface 1030 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 1040 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 1050 include an access, equipment various components (such as processor 1010, memory 1020, input/it is defeated
Outgoing interface 1030 and communication interface 1040) between transmit information.
It should be noted that although above equipment illustrates only processor 1010, memory 1020, input/output interface
1030, communication interface 1040 and bus 1050, but in the specific implementation process, which can also include realizing normal fortune
Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment
Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
Operation system checking method above-mentioned is realized when sequence is executed by processor, the method includes at least:
The identification information for obtaining operation system to be checked, it is corresponding in advance according to the load of the identification information of the operation system
The task flow template of configuration, wherein the task flow template is one group of orderly subtask set, and the difference subtask is for full
The different IPs of sufficient operation system identify demand, the identification information including at least system version;
The identification information for recording loaded task flow template, successively executes wherein included according to the task flow template
Subtask updates the current subtask implementation progress of the task flow template, the subtask implementation progress in the process of implementation
Restore for checking the interruption after exception;
If any subtask executes failure, determine that checking task flow is abnormal, and terminates working as operation system to be checked
Pronucleus is to process.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitorymedia), such as the data-signal and carrier wave of modulation.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
Operation system, device, module or the unit that above-described embodiment illustrates, specifically can be real by computer chip or entity
It is existing, or realized by the product with certain function.It is a kind of typically to realize that equipment is computer, the concrete form of computer
It can be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media to broadcast
It puts in device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
Any several equipment combination.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.