Disclosure of Invention
In order to solve the above technical problems, the present invention aims to: a Gantt chart processing method, system and storage medium based on motion localization are provided, which can effectively calculate the process beat under the condition of process cycle overlapping.
A first aspect of an embodiment of the present invention provides:
a Gantt chart processing method based on motion positioning comprises the following steps:
receiving setting information of relative positions between actions;
acquiring position information of a target action of a process cycle;
searching all actions in the process cycle according to the position information of the target action and the setting information of the relative position;
calculating relative timestamps for all actions within the process cycle;
and generating an action time sequence Gantt chart according to the relative time stamp.
Further, the searching all actions in the process cycle according to the position information of the target action and the setting information of the relative position specifically includes:
calculating the position information of the residual action according to the position information of the target action and the setting information of the relative position;
and searching all actions in the process cycle according to the position information of the target action and the position information of the residual actions.
Further, the searching for all actions in the process cycle according to the position information of the target action and the position information of the remaining actions specifically includes:
searching all actions meeting a first preset requirement according to the position information of the residual actions;
and searching all actions meeting a second preset requirement from all the actions meeting the first preset requirement according to the position information of the target action, and taking all the actions meeting the second preset requirement as the actions in the process cycle.
Further, the calculating of the relative time stamp of all actions within the process cycle specifically comprises:
converting the start time and end time of all actions within the process cycle to a Unix timestamp;
and respectively calculating the relative time stamps of the starting time and the ending time of the residual action and the starting time of the target action according to the Unix time stamps of all the actions, wherein the residual action is the action which does not contain the target action in the process cycle.
Further, the generating an action timing gantt chart according to the relative timestamp specifically includes:
converting the relative time stamp into time data in a specific format;
and generating an action time sequence Gantt chart according to the time data.
Further, all actions of the process cycle are actions in the same period.
Further, the setting information of the relative position includes position information between two adjacent actions.
A second aspect of an embodiment of the present invention provides:
a gantt chart processing system based on motion localization, comprising:
the receiving module is used for receiving setting information of relative positions between actions;
the acquisition module is used for acquiring the position information of the target action of the process cycle;
the searching module is used for searching all actions in the process cycle according to the position information of the target action and the setting information of the relative position;
a calculation module for calculating relative timestamps for all actions within the process cycle;
and the generating module is used for generating an action time sequence Gantt chart according to the relative timestamp.
A third aspect of an embodiment of the present invention provides:
a gantt chart processing system based on motion localization, comprising:
at least one memory for storing a program;
at least one processor, configured to load the program to perform the above-mentioned method for processing a gantt chart based on motion estimation.
A fourth aspect of an embodiment of the present invention provides:
a storage medium having stored therein processor-executable instructions for implementing a motion-localization-based gantt chart processing method as described above when executed by a processor.
The invention has the beneficial effects that: according to the invention, the setting information of the relative position between the actions is received, all the actions in the process CYCLE are searched by combining the position information of the target action of the process CYCLE, and then the action time sequence Gantt chart is generated according to the calculated relative time stamps of all the actions, so that the condition that the CYCLE calculation error is caused by overlapping factors among a plurality of CYCLEs is effectively avoided, and the accuracy of the CYCLE calculation result is improved.
Detailed Description
The invention is described in further detail below with reference to the figures and the specific embodiments. The step numbers in the following embodiments are provided only for convenience of illustration, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
Referring to fig. 3, an embodiment of the present invention provides a gantt chart processing method based on motion positioning, and this embodiment is applied to a control end of process timing analysis software, where the control end communicates with multiple terminals respectively, and the multiple terminals may be data acquisition terminals.
The present embodiment includes steps S310 to S350:
s310, receiving setting information of relative positions between actions; the setting information may be position information between two adjacent actions in a process cycle, for example, orientation information of a second action relative to a first action and orientation information of a third action relative to the second action in the same process cycle of the same time series gantt chart. The orientation information may be left, right, up, down, left up, left down, right up, right down, etc., and specifically, the orientation information of the second action is different between the different actions, for example, the orientation information of the second action is below the first action relative to the first action, and may be left, right, and right below the first action, where the right below may be understood as two actions occurring at the same time; the second action is above the third action relative to the third action, and may be left, right, or above the third action, where directly above may also mean that the two actions occur simultaneously. The spacing between the relative positions between different adjacent actions may be different or the same during a same process cycle. When the intervals are the same, a fixed value can be set according to the process; when the intervals are different, the interval data of the relative positions need to be set respectively by combining with the actual process information. The start timestamp of the second action described in this embodiment is to the right of the start timestamp of the first action, i.e. the start timestamp of the following action is later than the start timestamp of the preceding action.
S320, acquiring position information of a target action of the process cycle; the target action may be the first action in the current process cycle or may be other actions. When all actions of the current process cycle need to be acquired, the target action is the first action of the current process cycle; when only part of actions in the current process cycle need to be acquired, the target action is one of the part of actions needing to be acquired.
S330, searching all actions in the process cycle according to the position information of the target action and the setting information of the relative position; all actions of the process cycle are actions in the same period.
In some embodiments, assuming that the current process cycle includes actions a, B, C, D, and a, action a is a target action, the position information of action B is determined according to the position information of action a in combination with the setting information of the relative position, then the position information of action C is determined according to the position information of action B in combination with the setting information of the relative position, then the position information of action D is determined according to the position information of C in combination with the setting information of the relative position, and the determination is sequentially performed until the position information of the last action is determined, and then all actions are sequentially found in combination with the position information of all actions.
In other embodiments, rather than specifying a target action, the remaining actions may be looked up based on any one action and the relative position to another action.
The two embodiments have different calculation modes, and in an actual application process, the calculation modes can be switched according to actual requirements.
S340, calculating relative time stamps of all actions in the process cycle; after all actions are determined, the relative time stamp of each action relative to the target action is calculated according to the position information of all actions.
And S350, generating an action time sequence Gantt chart according to the relative timestamp.
According to the method and the device, the setting information of the relative positions between the actions is received, all the actions in the process CYCLE are searched by combining the position information of the target action of the process CYCLE, and then the action time sequence Gantt chart is generated according to the calculated relative time stamps of all the actions, so that the condition that the CYCLE calculation errors are caused by overlapping factors among a plurality of CYCLEs is effectively avoided, and the accuracy of the CYCLE calculation result is improved.
As a preferred embodiment, the searching for all actions in the process cycle according to the position information of the target action and the setting information of the relative position specifically includes:
calculating the position information of the residual action according to the position information of the target action and the setting information of the relative position; specifically, the position vector of the next action and the position vector of the previous action are calculated according to the position information of the target action and the setting information of the relative position, and the specific position of the next action relative to the previous action is determined according to the position vectors.
And searching all actions in the process cycle according to the position information of the target action and the position information of the residual actions.
The embodiment searches the residual actions by calculating the position vectors of the residual actions and the target actions, and improves the accuracy of the search result.
As a preferred embodiment, the searching for all actions in the process cycle according to the position information of the target action and the position information of the remaining actions specifically includes:
searching all actions meeting a first preset requirement according to the position information of the residual actions; the first preset requirement is a preset azimuth range.
And searching all actions meeting a second preset requirement from all the actions meeting the first preset requirement according to the position information of the target action, and taking all the actions meeting the second preset requirement as the actions in the process cycle. The second preset requirement is a position vector between adjacent actions.
As shown in fig. 4, in the first process cycle, the target action is action A1, the remaining actions include actions A2, A3, A4, and A5, and the actions meeting the first preset requirement include action A2 in the first process cycle and action A1 in the second process cycle, however, in the same process cycle, the position vector between adjacent actions is preset and unchanged, as can be seen from fig. 4, only action A2 in the first process cycle meets the second preset requirement in actions A2 in the first process cycle and action A1 in the second process cycle.
Therefore, in the embodiment, the actions meeting the first preset requirement and the second preset requirement are searched as the actions in the same cycle according to the position information of the remaining actions, so that the actions of the searched process cycles all belong to the same process cycle, and the searching result is more accurate.
As a preferred embodiment, said calculating the relative time stamp of all actions within said process cycle specifically comprises:
converting the start time and end time of all actions within the process cycle to a Unix timestamp; the Unix timestamp is the number of seconds elapsed since 1 month 1 day 1970 (UTC/GMT), regardless of leap seconds. One hour is expressed in the Unix timestamp format as: 3600 seconds, with a Unix timestamp of 86400 seconds for one day.
And respectively calculating the relative time stamps of the start time and the end time of the residual action and the start time of the target action according to the Unix time stamps of all the actions, wherein the residual action is the action which does not comprise the target action in the process cycle.
The invention calculates the relative time between each action by converting the time of the action of the process cycle into the Unix time stamp, so as to improve the accuracy of the calculation result.
As a preferred embodiment, the generating an action timing gantt chart according to the relative timestamp specifically includes:
converting the relative time stamp into time data in a specific format; the time data in the specific format can be Beijing time or time of other countries, and is converted according to actual needs.
And generating an action time sequence Gantt chart according to the time data.
In the embodiment, by converting the relative time stamp into the time data in a specific format, analysis of the meaning expressed by the human understanding action time sequence Gantt chart is facilitated.
The embodiment of the invention also provides a Gantt chart processing system based on action positioning corresponding to the method in the figure 3, which comprises the following steps:
the receiving module is used for receiving setting information of relative positions between actions;
the acquisition module is used for acquiring the position information of the target action of the process cycle;
the searching module is used for searching all actions in the process cycle according to the position information of the target action and the setting information of the relative position;
a calculation module for calculating relative timestamps for all actions within the process cycle;
and the generating module is used for generating an action time sequence Gantt chart according to the relative timestamp.
The content of the embodiment of the method of the invention is all applicable to the embodiment of the system, the function of the embodiment of the system is the same as the embodiment of the method, and the beneficial effect achieved by the embodiment of the system is the same as the beneficial effect achieved by the method.
The embodiment of the invention also provides a Gantt chart processing system based on action positioning, which comprises:
at least one memory for storing a program;
at least one processor for loading the program to execute a Gantt chart processing method based on motion positioning.
The content of the embodiment of the method of the invention is all applicable to the embodiment of the system, the function of the embodiment of the system is the same as the embodiment of the method, and the beneficial effect achieved by the embodiment of the system is the same as the beneficial effect achieved by the method.
Furthermore, a storage medium is provided in an embodiment of the present invention, in which processor-executable instructions are stored, and when the processor-executable instructions are executed by a processor, the storage medium is configured to implement a gantt chart processing method based on motion positioning.
In summary, in the embodiments of the present invention, setting information of relative positions between actions is received, all actions in a process CYCLE are searched by combining position information of a target action of the process CYCLE, and then an action timing gantt chart is generated according to the calculated relative timestamps of all actions, so that a situation that CYCLE calculation errors occur due to overlapping factors among multiple CYCLEs is effectively avoided, and accuracy of CYCLE calculation results is improved.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.