A method and apparatus for constructing Gantt charts for UAF models

By constructing the Gantt chart data structure and style conversion of the UAF model, the problem that the periodic layer of the Gantt chart of the UAF model cannot be switched in the existing technology is solved, and the automatic construction of the UAF model and the flexible display of multiple periodic layers are realized.

CN121213719BActive Publication Date: 2026-03-06BEIJING RESEARCH INSTITUTE OF MECHANICAL & ELECTRICAL TECHNOLOGY CO LTD CAM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511742014.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-03-06
Estimated Expiration
2045-11-25

AI Technical Summary

Technical Problem

Existing open-source and commercial Gantt chart technologies cannot meet the needs of building UAF models, especially when switching lifecycle layers during maintenance, and the data interaction format is limited.

Method used

This paper provides a method and apparatus for constructing Gantt charts for UAF models. By obtaining the extended domain model of the UAF model, the Gantt chart data structure is constructed using the Type, Owner, EntryData, HiddenEntryData and Orders attributes. The style conversion is achieved through the Colunms and Options attributes, supporting flexible switching of the cycle layer and data display. By combining the collaborative work of the data display area, cycle layer area and progress display area, the automatic construction and drawing of the UAF model is realized.

Benefits of technology

It enables automatic construction of Gantt charts for UAF models and flexible switching of periodic layers, supports dynamic drawing of multiple periodic layers, and meets the complex data display needs of UAF models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121213719B_ABST
    Figure CN121213719B_ABST
Patent Text Reader

Abstract

This invention provides a method and apparatus for constructing Gantt charts for UAF models. It achieves automatic derivation of Gantt chart construction data through a UAF model maintenance engine and a UAF model driving engine, achieves automatic drawing of the graph through a Gantt chart drawing engine, and achieves dynamic drawing of the Gantt chart period through a custom unit time width conversion formula and a time positioning coordinate point formula, thereby supporting flexible switching of the period layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information technology, specifically relating to a method and apparatus for constructing Gantt charts for UAF models. Background Technology

[0002] Existing open-source Gantt chart technologies can only draw Gantt graphs and do not support switching cycle layers during UAF model maintenance, which is insufficient to meet the requirements for building Gantt charts for UAF models. Moreover, existing commercial Gantt chart technologies have a single data interaction format and do not support UAF model maintenance. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and apparatus for constructing Gantt charts for UAF models. The solution of this invention can solve the problems existing in the prior art.

[0004] The technical solution of this invention:

[0005] Based on the first aspect, a method for constructing Gantt charts for UAF models is provided, including the following steps:

[0006] Step 1: Obtain the extended domain model GanttDiagram of the UAF model;

[0007] Step two, based on the Type, Owner, EntryData, HiddenEntryData, and Orders attributes of the extended domain model, construct the Gantt chart data structure, including the following steps:

[0008] S2.1 Determine whether the UAF model belongs to the selected UAF models by using Type and Owner;

[0009] S2.2 Filters the selected UAF models using the model information stored in EntryData to obtain Gantt chart root node data;

[0010] S2.3 constructs a Gantt chart model tree using the inclusion attribute inherent in the UAF model;

[0011] S2.4 uses the model information stored by the HiddenEntryData attribute to filter child nodes in the Gantt chart model tree and remove the hidden models of the child nodes.

[0012] S2.5 sorts all child nodes by storing model information through the Orders attribute;

[0013] Step 3: Using the Colunms and Options attributes of the domain model, convert the UAF model into a Gantt chart-style drawing language, including the following steps;

[0014] S3.1 The delimiter model information stored in the Colunms attribute is used to map the UAF model attributes to the Gantt chart table area;

[0015] S3.2 The model information stored in the Options attribute is used to map UAF model attributes to Gantt chart drawing styles;

[0016] Step four: Transform the UAF model context from model data to rendering data by defining rules. The specific rules are as follows:

[0017] UAF model composition structure data is converted into Gantt chart structure data;

[0018] Convert UAF model attribute data to Gantt chart attribute data;

[0019] The model data for drawing the graph is converted into Gantt chart style data;

[0020] Step 5: Through the collaborative work of the data display area, the cycle layer area, and the progress display area, the UAF model is presented in the form of a Gantt chart, and the cycle layer can be switched. The data display area displays the attribute value information of the UAF model in an itemized manner, the cycle layer area displays the time axis, including year, quarter, month, week, day, hour, and minute, and the progress display area displays the progress of the task according to the selected cycle layer.

[0021] The method for drawing the periodic layer region includes the following steps:

[0022] S5.1, determine the cycle layer, current date, central axis coordinate, and total width of the progress area;

[0023] Construct a periodic linked list N, and construct the periodic linked list in reverse order of year, quarter, month, week, day, hour, and minute, where the shortest time is set to N=0;

[0024] Starting from the highest value in the periodic linked list N, if the value is greater than or equal to 0, calculate the starting coordinate PStart of the current date; if the value is less than 0, end the drawing process.

[0025] The unit time width PWidth is calculated based on the starting coordinates of the level and the logical calculation of the current level in the periodic layer linked list.

[0026] Draw from the starting coordinate to the left according to the unit time width, until the coordinate is less than zero;

[0027] Draw from the starting coordinates to the right until the coordinates are greater than the total width, thus completing the drawing of one cycle layer;

[0028] S5.2, decrement the value of the periodic layer linked list N by one, and return to step S5.1.

[0029] Step Six: Following the steps above, after drawing the data display area and periodic layer area, draw the data of the UAF model in the process display area.

[0030] Furthermore, the method for calculating the unit time width is as follows:

[0031] The periodic layer can be any combination of year, quarter, month, week, day, hour, and minute, and can be selected as needed. The time axis is drawn according to the width of a unit of time, and the width of a unit of time needs to be dynamically calculated based on the width of the time in the next layer. If the unit of time is the bottom layer of the periodic layer, the width is the default width of that unit of time. For specific formulas, refer to the description of the conditions for year, quarter, month, week, day, and hour, where YearWidth is the width of the year, QuartWidth is the width of the quarter, MonthWidth is the width of the month, WeekWidth is the width of the week, HourWidth is the width of the hour, and MinuteWidth is the width of the minute.

[0032] (1) If the top layer is year, then it is necessary to consider one or more of the following layers: quarter, month, week, day, hour, minute. The specific calculation formula is as follows, where days is the number of days in the year for the input date:

[0033] Quarter: YearWidth = 4 * QuartWidth;

[0034] Month: YearWidth = 12 * MonthWidth;

[0035] Week: YearWidth = WeekWidth / 7 * days;

[0036] Day: YearWidth = DayWidth * days;

[0037] Hour: YearWidth = HourWidth * 24 * days;

[0038] Minutes: YearWidth = MinuteWidth * 60 * 24 * days;

[0039] (2) If the top layer is a quarter, then it is necessary to consider one or more of the lower layers as month, week, day, hour, and minute. The specific calculation formula is as follows, where days is the number of days in the quarter of the input date:

[0040] Month: QuartWidth = 3 * MonthWidth;

[0041] Week: QuartWidth = WeekWidth / 7 * days;

[0042] Day: QuartWidth = DayWidth * days;

[0043] Hours: QuartWidth = HourWidth * 24 * days;

[0044] Minutes: QuartWidth = MinuteWidth * 60 * 24 * days;

[0045] (3) If the top layer is month, then it is necessary to consider one or more of the lower layers as week, day, hour, and minute. The specific calculation formula is as follows, where days is the number of days in the month of the input date:

[0046] Week: MonthWidth = WeekWidth / 7 * days;

[0047] Day: MonthWidth = DayWidth * days;

[0048] Hour: MonthWidth = HourWidth * 24 * days;

[0049] Minutes: MonthWidth = MinuteWidth * 60 * 24 * days;

[0050] (4) If the top layer is the week, then it is necessary to consider one or more of the lower layers as day, hour, and minute. The specific calculation formula is as follows:

[0051] Day: WeekWidth = DayWidth * 7;

[0052] Time: WeekWidth = HourWidth * 24 * 7;

[0053] Minutes: WeekWidth = MinuteWidth * 60 * 24 * 7;

[0054] (5) If the top layer is the day, then it is necessary to consider one or more of the lower layers, such as the hour and minute. The specific calculation formula is as follows:

[0055] Time: DayWidth = HourWidth * 24;

[0056] Minutes: DayWidth = MinuteWidth * 60 * 24;

[0057] (6) If the top layer is zero, then the lower layer needs to be considered. The specific calculation formula is as follows:

[0058] Minutes: HourWidth = MinuteWidth * 60.

[0059] Furthermore, the method for calculating the starting coordinate PStart is as follows:

[0060] To draw unit tick marks on the timeline of a periodic layer, the starting position needs to be calculated. The specific formula is described in the section on year, quarter, month, week, day, and hour conditions. Here, YearStart is the starting position of the input date's year, QuartStart is the starting position of the input date's quarter, MonthStart is the starting position of the input date's month, WeekStart is the starting position of the input date's week, HourStart is the starting position of the input date's hour, MinuteStart is the starting position of the input date's minute, Month is the month of the input date, DayOfWeek is the day of the week of the input date, DayOfMonth is the calendar date of the input date, DayOfYear is the day of the year of the input date, Hour is the hour of the input date, and Minute is the minute of the input date.

[0061] (1) If the unit of time is a year, then the lower levels need to be considered as quarters, months, weeks, days, hours, and minutes. The specific calculation formula is as follows:

[0062] Quarter: YearStart = QuartStart - (Month / 3) * QuartWidth;

[0063] Month: YearStart = MonthStart –Month * MonthWidth;

[0064] Zhou: If DayOfWeek > DayOfYear:

[0065] YearStart = WeekStart + (DayOfWeek – DayOfYear) * WeekWidth / 7

[0066] Otherwise: YearStart = WeekStart - (DayOfYear - DayOfWeek) * WeekWidth / 7

[0067] Day: YearStart = DayStart - (DayOfYear - 1) * DayWidth;

[0068] Hour: YearStart = HourStart- Hour * HourWidth – 24 * (DayOfYear -1) *HourWidth;

[0069] Minutes: YearStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * (DayOfYear – 1) * MinuteWidth;

[0070] (2) If the unit of time is a quarter, then the lower level needs to be considered as month, week, day, hour, and minute. The specific calculation formula is as follows, where DaysBetween is the number of days between the current date and the start of the current quarter:

[0071] Month: QuartStart = MonthStart – (Month % 3)* MonthWidth;

[0072] Zhou: If DayOfWeek > DaysBetween:

[0073] YearStart = WeekStart + (DayOfWeek –DaysBetween - 1) * WeekWidth / 7;

[0074] Otherwise: YearStart = WeekStart - (DaysBetween - DayOfWeek + 1) *WeekWidth / 7;

[0075] Day: QuartStart = DayStart - DaysBetween * DayWidth;

[0076] Hour: QuartStart = HourStart- Hour * HourWidth – 24 * DaysBetween *HourWidth;

[0077] Minutes: QuartStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * DaysBetween * MinuteWidth;

[0078] (3) If the unit of time is a month, then the lower levels need to be considered as week, day, hour, and minute. The specific calculation formula is as follows:

[0079] Zhou: If DayOfWeek > DayOfMonth:

[0080] MonthStart = WeekStart + (DayOfWeek –DayOfMonth)* WeekWidth / 7;

[0081] Otherwise: MonthStart = WeekStart - (DayOfMonth - DayOfWeek)* WeekWidth / 7

[0082] Day: MonthStart = DayStart – (DayOfMonth -1) * DayWidth;

[0083] Hour: MonthStart = HourStart- Hour * HourWidth – 24 * (DayOfMonth – 1) *HourWidth;

[0084] Minutes: MonthStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth - 24 * 60 * (DayOfMonth -1) * MinuteWidth;

[0085] (4) If the unit of time is a week, then the lower level needs to be considered as day, hour, and minute. The specific calculation formula is as follows:

[0086] Day: WeekStart = DayStart – (DayOfWeek -1) * DayWidth;

[0087] Hour: WeekStart = HourStart- Hour * HourWidth – 24 * DayOfWeek *HourWidth;

[0088] Minutes: WeekStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * DayOfWeek * MinuteWidth;

[0089] (5) If the time unit is day, then the lower level needs to be considered as hour and minute. The specific calculation formula is as follows:

[0090] Hour: HourStart = HourStart - Hour * HourWidth;

[0091] Minutes: HourStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth.

[0092] Furthermore, the aforementioned periodic layer region can be adjusted as needed.

[0093] According to the second aspect, a Gantt chart construction device for UAF models is provided, comprising a model maintenance engine, a model driving engine, and a Gantt chart drawing engine. The model driving engine acquires relevant information about the UAF model, including the extended domain model of the UAF model and the included attributes inherent in the UAF model. It parses the UAF model to construct the Gantt chart data structure and transmits it to the model driving engine. Based on the acquired information, the model driving engine converts the UAF model into a Gantt chart-style drawing language and converts the UAF model context into drawing data by defining rules. The converted drawing data is then sent to the Gantt chart drawing engine. The areas drawn by the Gantt chart drawing engine include a data display area, a periodic layer area, and a progress display area. The data display area displays UAF model attribute values ​​in an itemized manner. The periodic layer area displays a timeline, including year, quarter, month, week, day, hour, and minute. The progress display area displays the progress of the task according to the selected periodic layer, thus completing the drawing of the Gantt chart.

[0094] Furthermore, the model maintenance engine also includes a query and monitoring interface for the UAF model, which can detect changes in the UAF model in real time and obtain relevant data of the changed UAF model.

[0095] Furthermore, the aforementioned Gantt chart construction device for UAF models also includes a visual editing engine, which is connected to the Gantt chart drawing engine to support visual editing of the UAF model. The visual editing engine enables editing of the character attributes of the UAF model through a pop-up text dialog box, and editing of the date attributes of the UAF model through progress stretching.

[0096] The beneficial effects of this invention compared to the prior art are as follows:

[0097] (1) This invention breaks through the limitations of traditional Gantt chart construction methods and realizes automatic construction of Gantt charts for UAF models: automatic derivation of Gantt chart construction data is realized through UAF model maintenance engine and UAF model driving engine, and automatic drawing of graphics is realized through Gantt chart drawing engine.

[0098] (2) Flexible switching method for periodic layers in UAF model: This invention realizes the dynamic drawing of Gantt chart period by customizing the unit time width conversion formula and the time positioning coordinate point formula, thereby supporting flexible switching of periodic layers. Attached Figure Description

[0099] The accompanying drawings, which form part of this specification, are provided to further illustrate embodiments of the invention and, together with the textual description, explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0100] Figure 1 The diagram illustrates the steps of a method for constructing a Gantt chart for a UAF model according to an embodiment of the present invention.

[0101] Figure 2 A schematic diagram of a Gantt chart construction device for a UAF model provided according to an embodiment of the present invention is shown.

[0102] Figure 3 A flowchart illustrating the drawing of Gantt chart data structures and styles according to embodiments of the present invention is shown;

[0103] Figure 4 An example diagram of a Gantt chart plotting area provided according to an embodiment of the present invention is shown;

[0104] Figure 5 A flowchart illustrating the drawing process of the progress display area according to an embodiment of the present invention is shown. Detailed Implementation

[0105] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the present invention or its application or use. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0106] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0107] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0108] like Figure 1 As shown, according to a first aspect embodiment of the present invention, a method for constructing a Gantt chart for a UAF model is provided, comprising the following steps:

[0109] Step 1: Obtain the extended domain model GanttDiagram of the UAF model;

[0110] In one embodiment, the extended domain model GanttDiagram is shown in the table below:

[0111]

[0112] Step two, based on the Type, Owner, EntryData, HiddenEntryData, and Orders attributes of the extended domain model, construct the Gantt chart data structure, including the following steps:

[0113] S2.1 Determine whether the UAF model belongs to the selected UAF models by using Type and Owner;

[0114] S2.2 Filters the selected UAF models using the model information stored in EntryData to obtain Gantt chart root node data;

[0115] S2.3 constructs a Gantt chart model tree using the inclusion attribute inherent in the UAF model;

[0116] S2.4 uses the model information stored by the HiddenEntryData attribute to filter child nodes in the Gantt chart model tree and remove the hidden models of the child nodes.

[0117] S2.5 sorts all child nodes by storing model information through the Orders attribute;

[0118] Step 3: Using the Colunms and Options attributes of the domain model, convert the UAF model into a Gantt chart-style drawing language, including the following steps;

[0119] S3.1 The delimiter model information stored in the Colunms attribute is used to map the UAF model attributes to the Gantt chart table area;

[0120] S3.2 The model information stored in the Options attribute is used to map UAF model attributes to Gantt chart drawing styles;

[0121] Step four: Transform the UAF model context from model data to rendering data by defining rules. The specific rules are as follows:

[0122] UAF model composition structure data is converted into Gantt chart structure data;

[0123] Convert UAF model attribute data to Gantt chart attribute data;

[0124] The model data for drawing the graph is converted into Gantt chart style data;

[0125] Step 5: Through the coordinated operation of the data display area, cycle layer area, and progress display area, such as... Figure 4 As shown, the UAF model is presented in the form of a Gantt chart and supports switching of the cycle layer; the data display area displays the attribute value information of the UAF model in an itemized manner, the cycle layer area displays the time axis, including year, quarter, month, week, day, hour and minute, and the progress display area displays the progress of the task according to the selected cycle layer;

[0126] The method for drawing the periodic layer region includes the following steps:

[0127] S5.1, determine the cycle layer, current date, central axis coordinate, and total width of the progress area;

[0128] Construct a periodic linked list N, and construct the periodic linked list in reverse order of year, quarter, month, week, day, hour, and minute, where the shortest time is set to N=0;

[0129] Starting from the highest value in the periodic linked list N, if the value is greater than or equal to 0, calculate the starting coordinate PStart of the current date; if the value is less than 0, end the drawing process.

[0130] The unit time width PWidth is calculated based on the starting coordinates of the level and the logical calculation of the current level in the periodic layer linked list.

[0131] Draw from the starting coordinate to the left according to the unit time width, until the coordinate is less than zero;

[0132] Draw from the starting coordinates to the right until the coordinates are greater than the total width, thus completing the drawing of one cycle layer;

[0133] S5.2, decrement the value of the periodic layer linked list N by one, and return to step S5.1.

[0134] Step Six: Following the steps above, after drawing the data display area and periodic layer area, draw the UAF model data in the process display area.

[0135] In another embodiment, the calculation method for the unit time width is as follows:

[0136] The periodic layer can be any combination of year, quarter, month, week, day, hour, and minute, and can be selected as needed. The time axis is drawn according to the width of a unit of time, and the width of a unit of time needs to be dynamically calculated based on the width of the time in the next layer. If the unit of time is the bottom layer of the periodic layer, the width is the default width of that unit of time. For specific formulas, refer to the description of the conditions for year, quarter, month, week, day, and hour, where YearWidth is the width of the year, QuartWidth is the width of the quarter, MonthWidth is the width of the month, WeekWidth is the width of the week, HourWidth is the width of the hour, and MinuteWidth is the width of the minute.

[0137] (1) If the top layer is year, then it is necessary to consider one or more of the following layers: quarter, month, week, day, hour, minute. The specific calculation formula is as follows, where days is the number of days in the year for the input date:

[0138] Quarter: YearWidth = 4 * QuartWidth;

[0139] Month: YearWidth = 12 * MonthWidth;

[0140] Week: YearWidth = WeekWidth / 7 * days;

[0141] Day: YearWidth = DayWidth * days;

[0142] Hour: YearWidth = HourWidth * 24 * days;

[0143] Minutes: YearWidth = MinuteWidth * 60 * 24 * days;

[0144] (2) If the top layer is a quarter, then it is necessary to consider one or more of the lower layers as month, week, day, hour, and minute. The specific calculation formula is as follows, where days is the number of days in the quarter of the input date:

[0145] Month: QuartWidth = 3 * MonthWidth;

[0146] Week: QuartWidth = WeekWidth / 7 * days;

[0147] Day: QuartWidth = DayWidth * days;

[0148] Hours: QuartWidth = HourWidth * 24 * days;

[0149] Minutes: QuartWidth = MinuteWidth * 60 * 24 * days;

[0150] (3) If the top layer is month, then it is necessary to consider one or more of the lower layers as week, day, hour, and minute. The specific calculation formula is as follows, where days is the number of days in the month of the input date:

[0151] Week: MonthWidth = WeekWidth / 7 * days;

[0152] Day: MonthWidth = DayWidth * days;

[0153] Hour: MonthWidth = HourWidth * 24 * days;

[0154] Minutes: MonthWidth = MinuteWidth * 60 * 24 * days;

[0155] (4) If the top layer is the week, then it is necessary to consider one or more of the lower layers as day, hour, and minute. The specific calculation formula is as follows:

[0156] Day: WeekWidth = DayWidth * 7;

[0157] Time: WeekWidth = HourWidth * 24 * 7;

[0158] Minutes: WeekWidth = MinuteWidth * 60 * 24 * 7;

[0159] (5) If the top layer is the day, then it is necessary to consider one or more of the lower layers, such as the hour and minute. The specific calculation formula is as follows:

[0160] Time: DayWidth = HourWidth * 24;

[0161] Minutes: DayWidth = MinuteWidth * 60 * 24;

[0162] (6) If the top layer is zero, then the lower layer needs to be considered. The specific calculation formula is as follows:

[0163] Minutes: HourWidth = MinuteWidth * 60.

[0164] In a further embodiment, the starting coordinate PStart is calculated as follows:

[0165] To draw unit tick marks on the timeline of a periodic layer, the starting position needs to be calculated. The specific formula is described in the section on year, quarter, month, week, day, and hour conditions. Here, YearStart is the starting position of the input date's year, QuartStart is the starting position of the input date's quarter, MonthStart is the starting position of the input date's month, WeekStart is the starting position of the input date's week, HourStart is the starting position of the input date's hour, MinuteStart is the starting position of the input date's minute, Month is the month of the input date, DayOfWeek is the day of the week of the input date, DayOfMonth is the calendar date of the input date, DayOfYear is the day of the year of the input date, Hour is the hour of the input date, and Minute is the minute of the input date.

[0166] (1) If the unit of time is a year, then the lower levels need to be considered as quarters, months, weeks, days, hours, and minutes. The specific calculation formula is as follows:

[0167] Quarter: YearStart = QuartStart - (Month / 3) * QuartWidth;

[0168] Month: YearStart = MonthStart –Month * MonthWidth;

[0169] Zhou: If DayOfWeek > DayOfYear:

[0170] YearStart = WeekStart + (DayOfWeek – DayOfYear) * WeekWidth / 7

[0171] Otherwise: YearStart = WeekStart - (DayOfYear - DayOfWeek) * WeekWidth / 7

[0172] Day: YearStart = DayStart - (DayOfYear - 1) * DayWidth;

[0173] Hour: YearStart = HourStart- Hour * HourWidth – 24 * (DayOfYear -1) *HourWidth;

[0174] Minutes: YearStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * (DayOfYear – 1) * MinuteWidth;

[0175] (2) If the unit of time is a quarter, then the lower level needs to be considered as month, week, day, hour, and minute. The specific calculation formula is as follows, where DaysBetween is the number of days between the current date and the start of the current quarter:

[0176] Month: QuartStart = MonthStart – (Month % 3)* MonthWidth;

[0177] Zhou: If DayOfWeek > DaysBetween:

[0178] YearStart = WeekStart + (DayOfWeek –DaysBetween - 1) * WeekWidth / 7;

[0179] Otherwise: YearStart = WeekStart - (DaysBetween - DayOfWeek + 1) *WeekWidth / 7;

[0180] Day: QuartStart = DayStart - DaysBetween * DayWidth;

[0181] Hour: QuartStart = HourStart- Hour * HourWidth – 24 * DaysBetween *HourWidth;

[0182] Minutes: QuartStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * DaysBetween * MinuteWidth;

[0183] (3) If the unit of time is a month, then the lower levels need to be considered as week, day, hour, and minute. The specific calculation formula is as follows:

[0184] Zhou: If DayOfWeek > DayOfMonth:

[0185] MonthStart = WeekStart + (DayOfWeek –DayOfMonth)* WeekWidth / 7;

[0186] Otherwise: MonthStart = WeekStart - (DayOfMonth - DayOfWeek)* WeekWidth / 7

[0187] Day: MonthStart = DayStart – (DayOfMonth -1) * DayWidth;

[0188] Hour: MonthStart = HourStart- Hour * HourWidth – 24 * (DayOfMonth – 1)* HourWidth;

[0189] Minutes: MonthStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth - 24 * 60 * (DayOfMonth -1) * MinuteWidth;

[0190] (4) If the unit of time is a week, then the lower level needs to be considered as day, hour, and minute. The specific calculation formula is as follows:

[0191] Day: WeekStart = DayStart – (DayOfWeek -1) * DayWidth;

[0192] Hour: WeekStart = HourStart- Hour * HourWidth – 24 * DayOfWeek *HourWidth;

[0193] Minutes: WeekStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * DayOfWeek * MinuteWidth;

[0194] (5) If the time unit is day, then the lower level needs to be considered as hour and minute. The specific calculation formula is as follows:

[0195] Hour: HourStart = HourStart - Hour * HourWidth;

[0196] Minutes: HourStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth.

[0197] In another embodiment, the periodic layer region can be adjusted as needed.

[0198] According to the second aspect of the embodiment, such as Figure 2As shown, a Gantt chart construction device for UAF models is provided, including a model maintenance engine, a model driving engine, a Gantt chart drawing engine, and a visualization editing engine. The model driving engine acquires relevant information about the UAF model, including the extended domain model and the inherent inclusion attributes of the UAF model. It parses the UAF model, constructs the Gantt chart data structure, and transmits it to the model driving engine. Based on the acquired information, the model driving engine converts the UAF model into a Gantt chart-style drawing language and uses defined rules to convert the model data into drawing data. The data is sent to the Gantt chart drawing engine. The Gantt chart drawing engine draws data in three areas: a data display area, a periodic layer area, and a progress display area. The data display area displays UAF model attribute values ​​in an itemized manner. The periodic layer area displays a timeline, including year, quarter, month, week, day, hour, and minute. The progress display area displays the progress of the task according to the selected periodic layer, thus completing the Gantt chart drawing. The visualization editing engine is connected to the Gantt chart drawing engine to support the visualization editing of the UAF model. It allows editing of the character attributes of the UAF model through a pop-up text dialog box and editing of the date attributes of the UAF model through progress stretching.

[0199] In a further embodiment, the model maintenance engine also includes a query and monitoring interface for the UAF model, which detects changes in the UAF model in real time and obtains relevant data of the changed UAF model.

[0200] To gain a better understanding of the method and apparatus for constructing Gantt charts for UAF models provided by this invention, a detailed description is provided below with reference to specific examples and accompanying drawings.

[0201] This invention proposes a Gantt chart construction scheme for UAF models, which solves the aforementioned technical problems. The implementation idea of ​​the scheme is as follows: Figure 2 As shown, the software tool consists of a UAF model maintenance engine, a model-driven engine, a Gantt chart drawing engine, and a visual editing engine.

[0202] Model maintenance engine: Used for building Gantt chart base data and maintaining UAF models.

[0203] (I) Construction of Gantt Chart Basic Data

[0204] The Gantt Diagram, an extended domain model based on the UAF metamodel, has the following model structure:

[0205]

[0206] The Gantt chart data structure is constructed using the Type, Owner, EntryData, HiddenEntryData, and Orders attributes of the domain model; the Gantt chart style is drawn using the Colunms and Options attributes of the domain model, such as... Figure 3 As shown.

[0207] (ii) UAF model maintenance

[0208] By injecting model change listeners, the model maintenance engine can monitor changes in model data in real time. When model data changes, the listeners immediately capture these changes and pass them to the model-driving engine. Editing of the UAF model is achieved by providing a model editing interface.

[0209] (7) Model-driven engine: This engine converts model context and model change notifications into plotting data that the Gantt chart plotting engine can recognize. The conversion from model data to plotting data is achieved by defining rules, as follows:

[0210] UAF model composition structure data converted into Gantt chart structure data

[0211] Task Nodes: Convert task nodes in the UAF model into task bars in a Gantt chart.

[0212] Dependency: Convert the task dependencies in the UAF model into dependency lines in the Gantt chart.

[0213] Milestone: Convert milestone nodes in the UAF model into milestone markers in the Gantt chart.

[0214] (8) Convert UAF model attribute data into Gantt chart attribute data

[0215] Task Name: Convert the task names in the UAF model to the task names in the Gantt chart.

[0216] Start Time: Convert the task start time in the UAF model to the task start time in the Gantt chart.

[0217] End Time: Convert the task end time in the UAF model to the task end time in the Gantt chart.

[0218] Duration: Convert the task duration in the UAF model to the task duration in the Gantt chart.

[0219] Progress: Convert the task progress in the UAF model into a progress bar in a Gantt chart.

[0220] (9) Convert the model data for drawing the graph into Gantt chart style data.

[0221] Color: Converts the color information in the model from which the graphics are drawn into the task bar colors in the Gantt chart.

[0222] Line style: Converts the line style information in the model of the drawn graphic into the dependency line style in the Gantt chart.

[0223] Font: Converts the font information in the model from which the graphics are drawn into the font of the task names in the Gantt chart.

[0224] Icons: Convert icon information from the model in which the graphics are drawn into task icons or milestone icons in the Gantt chart.

[0225] The Gantt chart rendering engine, through the collaborative work of the data display area, periodic layer area, and progress display area, presents the UAF model in a Gantt chart format and supports flexible switching of periodic layers. The data display area shows UAF model attribute values ​​in an itemized manner. The periodic layer area displays the timeline, including year, quarter, month, week, day, hour, and minute. The progress display area shows the task's progress based on the selected periodic layer. Switching timelines requires changing the unit length of the time scale; therefore, an algorithm needs to be designed to recalculate the timeline and unit width duration for each level based on the different timelines. The specific algorithm flow is as follows: Figure 5 As shown:

[0226] The algorithm takes the number of cycle layers, central axis date, central axis coordinates, and progress zone width as input. It constructs a cycle layer linked list in reverse order of year, quarter, month, week, day, hour, and minute. Based on the selected time unit, it starts drawing from the smallest time unit. According to the time positioning coordinate point formula, it calculates the starting point coordinates of the unit time away from the current time. Then, according to the unit time width conversion formula, it calculates the width of the unit time. It first draws to the left until the coordinate is less than zero, then draws to the right until the coordinate is greater than the total width, and so on to draw the upper-level unit time axis.

[0227] I. Conversion Formula for Unit Time Width

[0228] The periodic layer can be year, quarter, month, week, day, hour, or minute. The timeline needs to be drawn with the width of a unit of time, and the width of a unit of time needs to be dynamically calculated based on the width of the time in the next layer. If the unit of time is the bottom layer of the periodic layer, then the width is the default width of that unit of time. For specific formulas, refer to the description of the conditions for year, quarter, month, week, day, and hour, where YearWidth is the width of the year, QuartWidth is the width of the quarter, MonthWidth is the width of the month, WeekWidth is the width of the week, HourWidth is the width of the hour, and MinuteWidth is the width of the minute.

[0229] (1) If the top layer is year, then it is necessary to consider that the lower layers may be quarters, months, weeks, days, hours, and minutes. The specific calculation formula is as follows, where days is the number of days in the year for the input date:

[0230] Quarter: YearWidth = 4 * QuartWidth;

[0231] Month: YearWidth = 12 * MonthWidth;

[0232] Week: YearWidth = WeekWidth / 7 * days;

[0233] Day: YearWidth = DayWidth * days;

[0234] Hour: YearWidth = HourWidth * 24 * days;

[0235] Minutes: YearWidth = MinuteWidth * 60 * 24 * days;

[0236] (2) If the top layer is a quarter, then it is necessary to consider that the lower layers may be months, weeks, days, hours, and minutes. The specific calculation formula is as follows, where days is the number of days in the quarter of the input date:

[0237] Month: QuartWidth = 3 * MonthWidth;

[0238] Week: QuartWidth = WeekWidth / 7 * days;

[0239] Day: QuartWidth = DayWidth * days;

[0240] Hours: QuartWidth = HourWidth * 24 * days;

[0241] Minutes: QuartWidth = MinuteWidth * 60 * 24 * days;

[0242] (3) If the top layer is month, then it is necessary to consider that the lower layers may be week, day, hour, and minute. The specific calculation formula is as follows, where days is the number of days in the month of the input date:

[0243] Week: MonthWidth = WeekWidth / 7 * days;

[0244] Day: MonthWidth = DayWidth * days;

[0245] Hour: MonthWidth = HourWidth * 24 * days;

[0246] Minutes: MonthWidth = MinuteWidth * 60 * 24 * days;

[0247] (4) If the top layer is week, then the lower layers may be day, hour, or minute. The specific calculation formula is as follows:

[0248] Day: WeekWidth = DayWidth * 7;

[0249] Time: WeekWidth = HourWidth * 24 * 7;

[0250] Minutes: WeekWidth = MinuteWidth * 60 * 24 * 7;

[0251] (5) If the top layer is the day, then it is necessary to consider that the lower layers may be the hour or minute. The specific calculation formula is as follows:

[0252] Time: DayWidth = HourWidth * 24;

[0253] Minutes: DayWidth = MinuteWidth * 60 * 24;

[0254] (6) If the top layer is zero, then it is necessary to consider that the lower layer may be zero. The specific calculation formula is as follows:

[0255] Minutes: HourWidth = MinuteWidth * 60;

[0256] II. Formula for Starting Coordinates PStart

[0257] To draw unit tick marks on the timeline of a periodic layer, the starting position needs to be calculated. The specific formula is described in the section on year, quarter, month, week, day, and hour conditions. Here, YearStart is the starting position of the input date's year, QuartStart is the starting position of the input date's quarter, MonthStart is the starting position of the input date's month, WeekStart is the starting position of the input date's week, HourStart is the starting position of the input date's hour, MinuteStart is the starting position of the input date's minute, Month is the month of the input date, DayOfWeek is the day of the week of the input date, DayOfMonth is the calendar date of the input date, DayOfYear is the day of the year of the input date, Hour is the hour of the input date, and Minute is the minute of the input date.

[0258] (1) If the unit of time is a year, then the lower levels need to be considered as quarters, months, weeks, days, hours, and minutes. The specific calculation formula is as follows:

[0259] Quarter: YearStart = QuartStart - (Month / 3) * QuartWidth;

[0260] Month: YearStart = MonthStart –Month * MonthWidth;

[0261] Zhou: If DayOfWeek > DayOfYear:

[0262] YearStart = WeekStart + (DayOfWeek – DayOfYear) * WeekWidth / 7

[0263] Otherwise: YearStart = WeekStart - (DayOfYear - DayOfWeek) * WeekWidth / 7

[0264] Day: YearStart = DayStart - (DayOfYear - 1) * DayWidth;

[0265] Hour: YearStart = HourStart- Hour * HourWidth – 24 * (DayOfYear -1) *HourWidth;

[0266] Minutes: YearStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * (DayOfYear – 1) * MinuteWidth;

[0267] (2) If the unit of time is a quarter, then the lower level needs to be considered as month, week, day, hour, and minute. The specific calculation formula is as follows, where DaysBetween is the number of days between the current date and the start of the current quarter:

[0268] Month: QuartStart = MonthStart – (Month % 3)* MonthWidth;

[0269] Zhou: If DayOfWeek > DaysBetween:

[0270] YearStart = WeekStart + (DayOfWeek –DaysBetween - 1) * WeekWidth / 7;

[0271] Otherwise: YearStart = WeekStart - (DaysBetween - DayOfWeek + 1) *WeekWidth / 7;

[0272] Day: QuartStart = DayStart - DaysBetween * DayWidth;

[0273] Hour: QuartStart = HourStart- Hour * HourWidth – 24 * DaysBetween *HourWidth;

[0274] Minutes: QuartStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * DaysBetween * MinuteWidth;

[0275] (3) If the unit of time is a month, then the lower levels need to be considered as week, day, hour, and minute. The specific calculation formula is as follows:

[0276] Zhou: If DayOfWeek > DayOfMonth:

[0277] MonthStart = WeekStart + (DayOfWeek –DayOfMonth)* WeekWidth / 7;

[0278] Otherwise: MonthStart = WeekStart - (DayOfMonth - DayOfWeek)* WeekWidth / 7

[0279] Day: MonthStart = DayStart – (DayOfMonth -1) * DayWidth;

[0280] Hour: MonthStart = HourStart- Hour * HourWidth – 24 * (DayOfMonth – 1)* HourWidth;

[0281] Minutes: MonthStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth - 24 * 60 * (DayOfMonth -1) * MinuteWidth;

[0282] (4) If the unit of time is a week, then the lower level needs to be considered as day, hour, and minute. The specific calculation formula is as follows:

[0283] Day: WeekStart = DayStart – (DayOfWeek -1) * DayWidth;

[0284] Hour: WeekStart = HourStart- Hour * HourWidth – 24 * DayOfWeek *HourWidth;

[0285] Minutes: WeekStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth – 24 * 60 * DayOfWeek * MinuteWidth;

[0286] (5) If the time unit is day, then the lower level needs to be considered as hour and minute. The specific calculation formula is as follows:

[0287] Hour: HourStart = HourStart - Hour * HourWidth;

[0288] Minutes: HourStart = MinuteStart – Minute * MinuteWidth – Hour * 60 *MinuteWidth;

[0289] Visual Editing Engine: Supports visual editing of the UAF model. The Gantt chart's visual editing methods include two types: table text editing and progress stretching editing. Character attributes of the UAF model are edited via a pop-up text dialog box; date attributes are edited via progress stretching.

[0290] In summary, the Gantt chart construction method and apparatus for UAF models provided by this invention have at least the following advantages compared to existing technologies:

[0291] (1) This invention breaks through the limitations of traditional Gantt chart construction methods and realizes automatic construction of Gantt charts for UAF models: automatic derivation of Gantt chart construction data is realized through UAF model maintenance engine and UAF model driving engine, and automatic drawing of graphics is realized through Gantt chart drawing engine.

[0292] (2) Flexible switching method for periodic layers in UAF model: This invention realizes the dynamic drawing of Gantt chart period by customizing the unit time width conversion formula and the time positioning coordinate point formula, thereby supporting flexible switching of periodic layers.

[0293] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A UAF model Gantt chart construction method, characterized in that, It comprises the following steps: Step one, obtaining the extended field model GanttDiagram of the UAF model; Step two, according to the Type, Owner, EntryData, HiddenEntryData and Orders attributes of the extended field model, realizing the construction of the Gantt chart data structure; Step three, through the Colunms and Options attributes of the field model, converting the UAF model into the drawing language of the Gantt chart style; In step three, the specific rules are as follows: (1) converting the UAF model composition structure data into the Gantt chart structure data; (2) converting the UAF model attribute data into the Gantt chart attribute data; (3) converting the model data of the drawing graphics into the Gantt chart style data; Step four, realizing the conversion of the model data into the drawing data through the definition rules of the UAF model context; Step five, through the collaborative work of the data display area, the period layer area and the progress display area, realizing the presentation of the UAF model in the form of the Gantt chart and supporting the switching of the period layer; the data display area displays the UAF model attribute value information in the form of entries, the period layer area displays the time axis, including year, season, month, week, day, hour and minute, and the progress display area displays the progress of the task according to the selected period layer; The drawing method of the period layer area comprises the following steps: S5.1, determining the period layer, the current date, the central axis coordinate and the total width of the progress area; Constructing a period layer linked list N, constructing the period layer linked list in the reverse order of year, season, month, week, day, hour and minute, wherein the shortest time is set as N=0; Starting from the largest layer value of the period layer linked list N, if it is greater than or equal to 0, calculating the level start coordinate PStart of the current date, if it is less than 0, ending the drawing; According to the level start coordinate and the logical calculation unit time width PWidth of the current layer of the period layer linked list; According to the unit time width, starting from the start coordinate, drawing to the left until the coordinate is less than zero to stop; Starting from the start coordinate, drawing to the right until the coordinate is greater than the total width, thereby completing the drawing of a period layer; S5.2, reducing the value of the period layer linked list N by one and returning to step S5.1; Step six: according to the above steps, drawing the data of the UAF model in the progress display area after the data display area and the period layer area are drawn.

2. The method of claim 1, wherein, The step two comprises the following steps: S2.1 determining whether the UAF model belongs to the screened UAF model through Type and Owner; S2.2 filtering the screened UAF model through the model information stored in EntryData to obtain the Gantt chart root node data; S2.3 constructing the Gantt chart model tree through the containing attributes of the UAF model; S2.4 filtering the child nodes in the Gantt chart model tree through the model information stored in the HiddenEntryData attribute to remove the hidden models of the child nodes; S2.5 sorting all the child nodes through the model information stored in the Orders attribute.

3. The method of claim 2, wherein, The step three comprises the following steps; S3.1 The separator model information stored by the Colunms attribute is used to realize the mapping of the UAF model attribute to the Gantt chart table area; S3.2 The model information stored by the Options attribute is used to realize the mapping of the UAF model attribute to the Gantt chart drawing style.

4. The method of claim 3, wherein, The calculation method of the unit time width is: The period layer is any combination of year, season, month, week, day, hour and minute, which is selected according to the requirement, the time axis is drawn according to the width of the unit time, and the width of the unit time needs to be dynamically calculated according to the width of the time of the next layer, if the unit time is the bottom layer of the period layer, the width is the default width of the unit time, and the specific formula is described with the conditions of year, season, month, week, day and hour, wherein YearWidth is the width of the year, QuartWidth is the width of the season, MonthWidth is the width of the month, WeekWidth is the width of the week, HourWidth is the width of the hour, and MinuteWidth is the width of the minute: (1) if the top layer is year, the lower layer needs to be considered as one or more of season, month, week, day, hour and minute, and the specific calculation formula is as follows, wherein days is the number of days of the input date in the year: Season: YearWidth = 4 * QuartWidth; Month: YearWidth = 12 * MonthWidth; Week: YearWidth = WeekWidth / 7 * days; Day: YearWidth = DayWidth * days; Hour: YearWidth = HourWidth * 24 * days; Minute: YearWidth = MinuteWidth * 60 * 24 * days; (2) if the top layer is season, the lower layer needs to be considered as one or more of month, week, day, hour and minute, and the specific calculation formula is as follows, wherein days is the number of days of the input date in the season: Month: QuartWidth = 3 * MonthWidth; Week: QuartWidth = WeekWidth / 7 * days; Day: QuartWidth = DayWidth * days; Hour: QuartWidth = HourWidth * 24 * days; Minute: QuartWidth = MinuteWidth * 60 * 24 * days; (3) if the top layer is month, the lower layer needs to be considered as one or more of week, day, hour and minute, and the specific calculation formula is as follows, wherein days is the number of days of the input date in the month: Week: MonthWidth = WeekWidth / 7 * days; Day: MonthWidth = DayWidth * days; MonthWidth = HourWidth * 24 * days; MinuteWidth = MinuteWidth * 60 * 24 * days; (4) If the top layer is week, it needs to consider one or several of the lower layers as day, hour, and minute. The specific calculation formula is as follows: DayWidth = DayWidth * 7; HourWidth = HourWidth * 24 * 7; MinuteWidth = MinuteWidth * 60 * 24 * 7; (5) If the top layer is day, it needs to consider one or several of the lower layers as hour and minute. The specific calculation formula is as follows: HourWidth = HourWidth * 24; MinuteWidth = MinuteWidth * 60 * 24; (6) If the top layer is hour, it needs to consider the lower layer as minute. The specific calculation formula is as follows: MinuteWidth = MinuteWidth * 60.

5. The method of claim 4, wherein, The calculation method of the starting coordinate PStart is as follows: The starting position of the periodic layer time axis needs to be calculated. The specific formula is referred to the year, season, month, week, day, and hour conditions, wherein YearStart is the starting position of the input date year, QuartStart is the starting position of the input date season, MonthStart is the starting position of the input date month, WeekStart is the starting position of the input date week, HourStart is the starting position of the input date hour, MinuteStart is the starting position of the input date minute, Month is the month of the input date, DayOfWeek is the week time of the input date, DayOfMonth is the calendar of the input date, DayOfYear is the day of the year of the input date, Hour is the hour number of the input date, and Minute is the minute number of the input date: (1) If the unit time is year, it needs to consider one or several of the lower layers as season, month, week, day, hour, and minute. The specific calculation formula is as follows: QuartStart = YearStart - (Month / 3) * QuartWidth; MonthStart = YearStart - Month * MonthWidth; WeekStart = WeekWidth * (DayOfWeek - DayOfYear) / 7 MinuteStart = MinuteWidth * (Minute - Hour * 60) ​ Day: YearStart = DayStart - (DayOfYear - 1) * DayWidth; Hour: YearStart = HourStart- Hour * HourWidth - 24 * (DayOfYear -1) *HourWidth; Minute: YearStart = MinuteStart - Minute * MinuteWidth - Hour * 60 *MinuteWidth - 24 * 60 * (DayOfYear - 1) * MinuteWidth; (2) If the unit time is quarter, then the lower level is month, week, day, hour, minute, and the specific calculation formula is as follows, where DaysBetween is the interval between the current date and the start of the current quarter: Month: QuartStart = MonthStart - (Month % 3) * MonthWidth; Week: If DayOfWeek > DaysBetween: YearStart = WeekStart + (DayOfWeek - DaysBetween - 1) * WeekWidth / 7; Otherwise: YearStart = WeekStart - (DaysBetween - DayOfWeek + 1) * WeekWidth / 7; Day: QuartStart = DayStart - DaysBetween * DayWidth; Hour: QuartStart = HourStart- Hour * HourWidth - 24 * DaysBetween *HourWidth; Minute: QuartStart = MinuteStart - Minute * MinuteWidth - Hour * 60 *MinuteWidth - 24 * 60 * DaysBetween * MinuteWidth; (3) If the unit time is month, then the lower level is week, day, hour, and minute, and the specific calculation formula is as follows: Week: If DayOfWeek > DayOfMonth: MonthStart = WeekStart + (DayOfWeek - DayOfMonth) * WeekWidth / 7; Otherwise: MonthStart = WeekStart - (DayOfMonth - DayOfWeek) * WeekWidth / 7 Day: MonthStart = DayStart - (DayOfMonth -1) * DayWidth; Hour: MonthStart = HourStart- Hour * HourWidth - 24 * (DayOfMonth - 1) *HourWidth; Minute: MonthStart = MinuteStart - Minute * MinuteWidth - Hour * 60 *MinuteWidth - 24 * 60 * (DayOfMonth -1) * MinuteWidth; (4) If the unit time is week, the lower layer is day, hour, minute, and the specific calculation formula is as follows: Day: WeekStart = DayStart - (DayOfWeek -1) * DayWidth; Hour: WeekStart = HourStart- Hour * HourWidth - 24 * DayOfWeek * HourWidth; Minute: WeekStart = MinuteStart - Minute * MinuteWidth - Hour * 60 *MinuteWidth - 24 * 60 * DayOfWeek * MinuteWidth; (5) If the time unit is day, the lower layer is hour and minute, and the specific calculation formula is as follows: Hour: HourStart = HourStart - Hour * HourWidth; Minute: HourStart = MinuteStart - Minute * MinuteWidth - Hour * 60 *MinuteWidth.

6. The method of claim 5, wherein, The period layer area can be adjusted as needed.

7. A device for implementing the method of claim 1-6 for constructing a Gantt chart oriented to a UAF model, characterized in that, The model maintenance engine, the model driving engine and the Gantt chart drawing engine, the model driving engine obtains UAF model related information, including the extended field model of the UAF model, the attribute contained in the UAF model, analyzes the UAF model, realizes the construction of the Gantt chart data structure, and transmits to the model driving engine, the model driving engine converts the UAF model into the drawing language of the Gantt chart according to the obtained information, realizes the conversion of the model data to the drawing data through the defined rules, sends the converted drawing data to the Gantt chart drawing engine, and the drawing area of the Gantt chart drawing engine includes the data display area, the period layer area and the progress display area, the data display area displays the UAF model attribute value information in the form of entries, the period layer area displays the time axis, including year, season, month, week, day, hour and minute, and the progress display area displays the progress of the task according to the selected period layer, and completes the drawing of the Gantt chart.

8. The apparatus of claim 7, wherein, The model maintenance engine further includes a UAF model query and monitoring interface, which detects the changes of the UAF model in real time through the UAF model query and monitoring interface, and obtains the related data of the changed UAF model.

9. The apparatus of claim 8, wherein, The device further includes a visual editing engine connected with the Gantt chart drawing engine, which is used to support the visual editing of the UAF model, realizes the editing of the character attribute of the UAF model through the pop-up text dialog box, and realizes the editing of the date attribute of the UAF model through the progress stretching.

Citation Information

Patent Citations

  • Integrated model construction method, device and system based on multi-architecture modeling language

    CN115840564A

  • Gantt chart generation method and device based on data driving and medium

    CN116630472A