Summary of the invention
The embodiment of the present invention provides a kind of rotary-type mechanical equipment state monitoring method and equipment, for solving the prior art
In rotary-type mechanical equipment state monitoring real-time difference problem.
In a first aspect, the embodiment of the present invention provides a kind of rotary-type mechanical equipment state monitoring method, comprising:
Task queue array based on multipriority is polled, and obtains current task, and the current task is rotary-type
The data acquisition session of mechanical equipment state monitoring;
Data acquisition is carried out to the corresponding target device of the data acquisition session, obtains data to be analyzed;
Start and stop analytical judgment is carried out to the target device according to the data to be analyzed and abnormality detection judges, thus
Realize the status monitoring to the target device.
Further, the task queue array based on multipriority is polled, and is obtained current task, is specifically included:
According to the sequence of priority, successively task queue array is polled;
If the task queue array of high priority is not sky, task is popped up as current task;Otherwise it inquires low preferential
The task queue array of grade, until obtaining current task.
Further, described that start and stop analytical judgment is carried out to the target device according to the data to be analyzed, thus real
Now to the status monitoring of the target device, specifically include:
Start and stop analytical judgment is carried out to the target device according to the data to be analyzed, obtains start and stop state;
If start and stop state changes, the anomaly parameter information of the target device is removed, connection network is counted
According to transmission, the target device suspend mode shutdown is indicated;
If start and stop state does not change, according to the open state or off-mode of the target device, detected
Processing.
Further, if the start and stop state does not change, according to the open state of the target device or shutdown shape
State carries out detection processing, specifically includes:
If start and stop state does not change, and the target device is off-mode, then indicates that the target device is stopped
It sleeps and shuts down;
If start and stop state does not change, and the target device is open state, into target device abnormality detection
Judge processing routine.
Further, described to judge processing routine into target device abnormality detection, it specifically includes:
The target device is carried out abnormality detection, if the target device is working properly, removes anomaly parameter information,
Indicate the target device suspend mode shutdown;
If target device operation irregularity, into abnormality processing process.
Further, the abnormality processing process includes:
If judgement knows that Current software is in alarm dormant state, number of dormancy is subtracted 1;If number of dormancy is 0, release
The dormant state of the target device;
Otherwise, it is handled according to whether Current software is in abnormal data upload state.
Further, described to be handled according to whether Current software is in abnormal data upload state, it specifically includes:
If Current software is in abnormal data and uploads state, number will be uploaded and add 1;It is preset if uploading number and meeting first
The state of the target device is then switched to alarm dormant state by number, and is connected network and carried out data transmission, described in instruction
Target device suspend mode shutdown;
Otherwise, if target device continuous abnormal detection number reaches the second preset times, switch the target and set
Standby state is that abnormal data uploads state, and connects network and carry out data transmission, and indicates the target device suspend mode shutdown;It is no
Continuous abnormal detection number is then added 1, indicates the target device suspend mode shutdown.
Second aspect, the embodiment of the present invention provide a kind of rotary-type mechanical equipment state monitoring device, comprising:
Task acquisition module is polled for the task queue array based on multipriority, obtains current task, described
Current task is the data acquisition session of rotary-type mechanical equipment state monitoring;
Data acquisition module, for the corresponding target device of the data acquisition session carry out data acquisition, obtain to
Analyze data;
Data analysis module, for according to the data to be analyzed to the target device carry out start and stop analyze and determine and
Abnormality detection judgement, to realize the status monitoring to the target device.
The third aspect, the embodiment of the present invention provides a kind of electronic equipment, including memory, processor and is stored in memory
Computer program that is upper and can running on a processor, the processor realize the embodiment of the present invention first when executing described program
The step of aspect rotary-type mechanical equipment state monitoring method.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, are stored thereon with calculating
Machine program realizes rotary-type mechanical equipment shape described in first aspect of the embodiment of the present invention when computer program is executed by processor
The step of state monitoring method.
The embodiment of the present invention provides a kind of rotary-type mechanical equipment state monitoring method and equipment, according to the excellent of distribution task
First grade is polled processing, is acquired analysis to device data according to being polled to for task, to realize the state prison of equipment
It surveys.Embedded system structure of the embodiment of the present invention may be implemented to handle in real time and appoint in the case where not using real time operating system
The purpose of business, and system stabilization reliable for operation.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Fig. 1 is the rotary-type mechanical equipment state monitoring method flow diagram of the embodiment of the present invention.Rotation as shown in Figure 1
Type mechanical equipment state monitoring method, comprising:
100, the task queue array based on multipriority is polled, and obtains current task, and the current task is rotation
The data acquisition session of the mechanical equipment condition monitoring of transition;
Task is put into task queue array first by the embodiment of the present invention, while the priority of task queue array is arranged,
Task queue array is polled according to priority, to obtain current task.The task queue array of multipriority is set
Benefit be that, when there is multiple data acquisition sessions, can guarantee that the higher data acquisition session of priority is preferentially performed.
101, data acquisition is carried out to the corresponding target device of the data acquisition session, obtains data to be analyzed;
It should be noted that the corresponding data acquisition session of each task queue array, it may be possible to the same rotary-type machine
The task of the identical or different priority of tool equipment, it is also possible to the identical or different priority of different rotary type mechanical equipment
Task.Wherein, target device refers to some rotary-type mechanical equipment.
Specifically, the embodiment of the present invention carries out data acquisition to rotary-type mechanical equipment by sensor, it is slow to be put into data
It deposits in area, and collected data is carried out with certain pretreatment, pretreated data are as data to be analyzed.
102, start and stop analytical judgment is carried out to the target device according to the data to be analyzed and abnormality detection judges,
To realize the status monitoring to the target device.
The embodiment of the present invention carries out start and stop to the data of the corresponding target device of data acquisition session and analyzes and determines and different
Often detection judgement judges whether that start and stop state change occurs, and obtains current state mark, can according to start and stop state change
To realize the status monitoring to target device.
The embodiment of the present invention provides a kind of rotary-type mechanical equipment state monitoring method and equipment, according to the excellent of distribution task
First grade is polled processing, is acquired analysis to device data according to being polled to for task, to realize the state prison of equipment
It surveys.Embedded system structure of the embodiment of the present invention may be implemented to handle in real time and appoint in the case where not using real time operating system
The purpose of business, and system stabilization reliable for operation.
Based on the above embodiment, step 100, the task queue array based on multipriority is polled, and acquisition is worked as
Preceding task, specifically includes:
According to the sequence of priority, successively task queue array is polled;
If the task queue array of high priority is not sky, task is popped up as current task;Otherwise it inquires low preferential
The task queue array of grade, until obtaining current task.
Specifically, the real-time task processing framework of the embodiment of the present invention, is not use embedded real-time operation to software
System and design, can to task assign different priorities, the purpose handled in real time.
In an alternative embodiment, following definition can be made:
Task structure body: task type and task response results.
Annular task queue: queue head pointer, tail pointer and task structure body array are defined.
Queue initialization function: initialization task queue.
Queue is pressed into mission function: being pressed into a task to the tail portion in task queue.
Mission function is popped up in queue: taking out a task in the head in task team.
Whether queue is do-nothing function: judging whether head pointer and tail pointer are equal.
In an alternative embodiment, the step of specific implementation is as follows:
Step 1: defining a task queue array, array length is 3, illustrates that priority is set as 3 grades.
Step 2: calling queue initialization function in principal function, 3 task queues of array are initialized.
Step 3: 3 grades of priority processings of task are realized in the while of principal function.Poll checks 3 task queues.Tool
The operation of body is as follows:
1, check whether task queue array 1 is sky, does not go out a task for empty, handle function into corresponding task
In handled.
Reenter while circulation.
If 2, task queue array 1 is sky, check whether task queue array 2 is sky, does not go out a task for empty,
It handles into corresponding task and is handled in function.
Reenter while circulation.
If 3, task queue array 2 is sky, check whether task queue array 3 is sky, does not go out a task for empty,
It handles into corresponding task and is handled in function.
Reenter while circulation.
If task queue array 3 is sky, while circulation is reentered.
Step 4: carrying out indentation task operating in the place for needing to handle data.For example, in the reception interrupt function of serial ports 3
In, data will be received and be deposited into reception array, whether terminate, if terminating setting task label, by task pressure if judging to receive
Enter in task queue.
Step 5: calling task to handle function in principal function, start the function of task processing according to task label.
Fig. 2 is data acquisition flow of embodiment of the present invention schematic diagram.Based on any of the above-described embodiment, step 102, described
Start and stop analytical judgment is carried out to the target device according to the data to be analyzed, to realize the state to the target device
Monitoring, specifically includes:
102.1, start and stop analytical judgment is carried out to the target device according to the data to be analyzed, obtains start and stop shape
State;
102.2, if start and stop state changes, the anomaly parameter information of the target device is removed, connects network
Carry out data transmission, indicates the target device suspend mode shutdown;
If 102.3 start and stop states do not change, according to the open state or off-mode of the target device, carry out
Detection processing.
Referring to FIG. 2, the analytical judgment of start and stop of the embodiment of the present invention has two kinds of results: one, state change;Its
Two, state does not change.If state changes, the anomaly parameter information of target device is removed, is carried out data transmission, so
Device sleeps are shut down afterwards, and alarm clock is waited to wake up next time.If state does not change, need further according to target device
Open state or off-mode carry out detection processing.
The transmission of data described in the embodiment of the present invention, refers to that the initial data by device status data or acquisition is sent to cloud and puts down
Platform or local server.The data transmission hereinafter mentioned is also same, hereafter repeats no more.
Based on any of the above-described embodiment, step 102.3, if the start and stop state does not change, according to the target
The open state or off-mode of equipment carry out detection processing, specifically include:
If start and stop state does not change, and the target device is off-mode, then indicates that the target device is stopped
It sleeps and shuts down.Herein, the direct suspend mode shutdown of equipment, waits alarm clock to wake up next time.
If start and stop state does not change, and the target device is open state, into target device abnormality detection
Judge processing routine.Wherein, described to judge processing routine into target device abnormality detection, it specifically includes:
The target device is carried out abnormality detection, if the target device is working properly, removes anomaly parameter information,
Indicate the target device suspend mode shutdown, the direct suspend mode shutdown of equipment, waits alarm clock to wake up next time herein;
If target device operation irregularity, into abnormality processing process.
Wherein, the abnormality processing process includes:
If judgement knows that Current software is in alarm dormant state, number of dormancy is subtracted 1;If number of dormancy is 0, release
The dormant state of the target device;
Otherwise, it is handled according to whether Current software is in abnormal data upload state.
Wherein, described to be handled according to whether Current software is in abnormal data upload state, it specifically includes:
If Current software is in abnormal data and uploads state, number will be uploaded and add 1;It is preset if uploading number and meeting first
The state of the target device is then switched to alarm dormant state by number, and is connected network and carried out data transmission, described in instruction
Target device suspend mode shutdown;
Otherwise, if target device continuous abnormal detection number reaches the second preset times, switch the target and set
Standby state is that abnormal data uploads state, and connects network and carry out data transmission, and indicates the target device suspend mode shutdown;It is no
Continuous abnormal detection number is then added 1, indicates the target device suspend mode shutdown.
In the embodiment of the present invention, the first preset times be may be configured as 5 times, and the second preset times may be configured as 5 times.At one
In optional embodiment, abnormality processing process is as follows:
1, do you judge that software is in alarm dormant state? if it is dormant state, number of dormancy subtracts 1, judges suspend mode time
Number, until being 0, breaking dormancy state, equipment every time shut down by suspend mode, and alarm clock is waited to wake up next time.
If not dormant state, into 2.
2, do you judge that software is in abnormal data and uploads state? if it is the state of upload, uploads number and add 1, in judgement
Number is passed, if Man Wuci, state is switched to alarm dormant state.Then connection network carries out data transmission, suspend mode shutdown, etc.
It is waken up next time to alarm clock.
If not the state of upload, into 3.
3, whether is continuous abnormal detection number less than five times? if number adds 1, and the direct suspend mode of equipment is shut down less than five times,
Alarm clock is waited to wake up next time.If met 5 times, switching state is that abnormal data uploads state, then connects network and is counted
According to transmission, suspend mode shutdown waits alarm clock to wake up next time.
The embodiment of the invention provides a set of embedded multistage task real time processing system frameworks, according to the excellent of distribution task
First grade is polled processing.Data are acquired according to the acquisition interval timing start-up of setting, realize number in conjunction with accurate monitoring algorithm
According to frequency conversion acquisition, judge that data do not have warping apparatus shutdown, if there is it is abnormal walk abnormality processing process, by wirelessly or non-wirelessly
Network uploads data to cloud platform.
The embedded system structure of the embodiment of the present invention may be implemented in real time in the case where not using real time operating system
The purpose of processing task, and system stabilization reliable for operation.It is calculated in combination with the high monitoring of the accuracy of algorithm team design
Method realizes and can be carried out the purpose of data monitoring in equipment end, accomplishes the purpose of frequency conversion acquisition data, reduces unnecessary
Power wastage caused by data are transmitted.
The embodiment of the present invention also provides a kind of rotary-type mechanical equipment state monitoring device, comprising:
Task acquisition module 300 is polled for the task queue array based on multipriority, obtains current task,
The current task is the data acquisition session of rotary-type mechanical equipment state monitoring;
Data acquisition module 301 is obtained for carrying out data acquisition to the corresponding target device of the data acquisition session
Data to be analyzed;
Data analysis module 302 is sentenced for carrying out start and stop analysis to the target device according to the data to be analyzed
Disconnected and abnormality detection judgement, to realize the status monitoring to the target device.
Fig. 4 is the entity structure schematic diagram of a kind of electronic equipment of the embodiment of the present invention, as shown in figure 4, the electronic equipment can
To include: processor (processor) 401,802, memory communication interface (Communications Interface)
(memory) 803 and communication bus 404, wherein processor 401, communication interface 402, memory 403 pass through communication bus 404
Complete mutual communication.Processor 401 can call the logical order in memory 403, to execute following method: based on more
The task queue array of priority is polled, and obtains current task, and the current task is rotary-type mechanical equipment state prison
The data acquisition session of survey;Data acquisition is carried out to the corresponding target device of the data acquisition session, obtains data to be analyzed;
Start and stop analytical judgment is carried out to the target device according to the data to be analyzed and abnormality detection judges, to realize to institute
State the status monitoring of target device.
In addition, the logical order in above-mentioned memory 403 can be realized by way of SFU software functional unit and conduct
Independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, originally
Substantially the part of the part that contributes to existing technology or the technical solution can be in other words for the technical solution of invention
The form of software product embodies, which is stored in a storage medium, including some instructions to
So that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation of the present invention
The all or part of the steps of example the method.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. it is various
It can store the medium of program code.
The embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-transient including being stored in
Computer program on computer readable storage medium, the computer program include program instruction, when described program instructs quilt
When computer executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example, is based on multipriority
Task queue array be polled, obtain current task, the current task be rotary-type mechanical equipment state monitoring number
According to acquisition tasks;Data acquisition is carried out to the corresponding target device of the data acquisition session, obtains data to be analyzed;According to institute
It states data to be analyzed and start and stop analytical judgment and abnormality detection judgement is carried out to the target device, to realize to the target
The status monitoring of equipment.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage
Medium storing computer instruction, the computer instruction make the computer execute side provided by above-mentioned each method embodiment
Method, for example, the task queue array based on multipriority is polled, and obtains current task, and the current task is rotation
The data acquisition session of the mechanical equipment condition monitoring of transition;Data are carried out to the corresponding target device of the data acquisition session to adopt
Collection, obtains data to be analyzed;Start and stop is carried out to the target device according to the data to be analyzed to analyze and determine and abnormal inspection
Judgement is surveyed, to realize the status monitoring to the target device.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.