Time sequence diagram time scale generation method and device, equipment and medium

By limiting the number of time scales and selecting the best scale unit, a uniform time scale is generated, which solves the problem of uneven scale intervals in the prior art and optimizes the display effect of the timing diagram.

CN120631487APending Publication Date: 2025-09-12SHANGHAI DAMENG DATABASE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510743651.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the prior art, when generating a timing diagram, the number of time scales is estimated inaccurately, resulting in the scale interval being too large or too small, affecting the display effect.

Method used

The number of time scales is limited by presetting the maximum number of scales, and the best secondary time scale unit and primary time scale unit are selected from the primary and secondary time scale unit arrays in combination with the timestamp of the data to be generated, the optimal step size is determined, and a uniform time scale is generated.

Benefits of technology

Ensure that the time scale intervals are evenly spaced and contain an integer number of major time units to optimize the display effect of the timing diagram.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631487A_ABST
    Figure CN120631487A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence diagram time scale generation method and device, equipment and a medium. The method comprises the steps that to-be-generated data, the maximum number of preset scales and to-be-selected primary and secondary time scale unit arrays are acquired; determining primary and secondary time scale units of the time sequence diagram in combination with the timestamp of the to-be-generated data and the primary and secondary time scale unit array; determining a candidate step length list according to the time stamp extreme value and the primary and secondary time scale units of the to-be-generated data; and according to the candidate step length list and the first main time scale value, determining a pre-selected time scale of the time sequence diagram. The maximum number of the time scales is limited through the maximum number of the preset scales, the number of the time scales of the pre-selected time sequence diagram is screened, and then the optimal step length and the final time scale are determined. It is ensured that the key time scale, namely the integer number of main time units in the time range, is certainly selected, then it is ensured that the scales are uniform, and display of the time sequence diagram is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and medium for generating a time scale of a timing diagram. Background Art

[0002] Time series charts are a very common graphical component used in the display and analysis of historical data. Historical data here refers to data with timestamps. When a time series chart displays large amounts of historical data, the time axis does not display the timestamps for each data point. This is partly due to limitations on the display page width, and partly because displaying too many timestamps would be visually redundant. A common solution is to display representative time scales on the time axis. These time scales provide a rough idea of ​​the time range within which the historical data falls. Therefore, generating representative time scales is a very important function of time series charts.

[0003] The usual method for generating time scales is: first estimate the maximum number of time scales that can be displayed based on the pixel width of the time series diagram and the pixel width of a time scale, then calculate the interval time between adjacent time scales based on the time range interval of the historical data timestamp with the minimum time and the historical data timestamp with the maximum time in the time series diagram and the maximum number of time scales, and finally calculate all time scales in sequence.

[0004] However, this method has two problems. First, the estimated number of time scales is based on the maximum number of displayed items, resulting in a relatively large number of time scales. Second, the interval between adjacent time scales may be too large or too small. If the interval is too large, there will be too few time scales, while if the interval is too small, there will be too many time scales. For example, if the historical data range is from September 19th, 9:00:00 - September 20th, 13:00:00, if the interval between adjacent time scales is one hour, there will be a total of 29 time scales. If the interval is one day, there will be only one time scale. Summary of the Invention

[0005] The present invention provides a method, device, equipment and medium for generating a time scale of a timing diagram, so as to achieve accurate selection of the time scale, ensure that the scales are uniform, and optimize the display of the timing diagram.

[0006] According to a first aspect of the present invention, there is provided a method for generating a time scale of a timing diagram, comprising:

[0007] Get the data to be generated, the maximum number of preset scales, and the array of primary and secondary time scale units to be selected;

[0008] Determine the primary and secondary time scale units of the timing diagram according to the timestamp of the data to be generated, the preset maximum number of scales, and the primary and secondary time scale unit arrays, wherein the primary and secondary time scale units include a primary time scale unit and a secondary time scale unit;

[0009] Determining a candidate step size list according to the maximum timestamp value of the data to be generated and the primary and secondary time scale units;

[0010] The timing diagram time scale of the timing diagram is determined according to the candidate step size list, the first main time scale value and the preset maximum number of scales.

[0011] According to a second aspect of the present invention, there is provided a device for generating a time scale of a timing diagram, comprising:

[0012] An information acquisition module is used to obtain the data to be generated, the maximum number of preset scales, and the array of primary and secondary time scale units to be selected;

[0013] a unit determination module, configured to determine the primary and secondary time scale units of the time sequence diagram according to the timestamp of the data to be generated, the preset maximum number of scales, and the primary and secondary time scale unit arrays, wherein the primary and secondary time scale units include a primary time scale unit and a secondary time scale unit;

[0014] a list determination module, configured to determine a candidate step size list according to the maximum timestamp value of the data to be generated and the primary and secondary time scale units;

[0015] The timing diagram determining module is used to determine the timing diagram time scale of the timing diagram according to the candidate step size list, the first main time scale value and the preset maximum number of scales.

[0016] According to a third aspect of the present invention, there is provided an electronic device, comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method for generating a time scale of a timing diagram according to any embodiment of the present invention.

[0020] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for generating a time scale of a timing diagram according to any embodiment of the present invention when executed.

[0021] According to a fifth aspect of the present invention, an embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method for generating a time scale of a timing diagram according to any embodiment of the present invention.

[0022] The technical solution of the embodiments of the present invention limits the maximum number of time scales by presetting a maximum number of scales. This allows the optimal secondary and primary time scale units to be selected from the array of primary and secondary time scale units, based on the timestamp of the data to be generated. This allows the optimal step size to be determined, thereby determining the preselected time scale for the timing diagram. By limiting the number of time scales to a stable range, the resulting time scales are more evenly spaced and contain an integral number of primary time units, a critical time scale, thereby optimizing the display of the timing diagram.

[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 This is a flowchart of a method for generating a time scale of a timing diagram according to the first embodiment of the present invention;

[0026] Figure 2 This is a flow chart of a method for generating a time scale of a timing diagram according to a second embodiment of the present invention;

[0027] Figure 3 This is an example flow chart of a method for generating a time scale of a timing diagram according to a second embodiment of the present invention;

[0028] Figure 4 This is a schematic structural diagram of a timing diagram time scale generating device provided according to a third embodiment of the present invention;

[0029] Figure 5 It is a schematic structural diagram of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Example 1

[0033] Figure 1 A flowchart of a method for generating a time scale of a timing diagram is provided for the first embodiment of the present invention. This embodiment is applicable to the case of generating a timing diagram with a uniform scale based on data. The method can be executed by a timing diagram time scale generating device. The timing diagram time scale generating device can be implemented in the form of hardware and / or software. The timing diagram time scale generating device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0034] S110 , obtaining data to be generated, a preset maximum number of scales, and an array of primary and secondary time scale units to be selected.

[0035] In this embodiment, the data to be generated can be understood as historical data including the timestamp of the generated data. The preset maximum number of scales can be understood as a pre-set maximum number of scales to limit the display in a time series diagram. According to historical experience, 6 is determined to be a value with a relatively good display effect to limit the maximum number of scales to be selected. The array of primary and secondary time scale units to be selected can be understood as an array stored for representing different primary and secondary time scale units, and the stored information is as follows: seconds, minutes, hours, days, months, years, and centuries. The primary and secondary time scale units are arranged in ascending order. Let i be the subscript of the array unit_values, and the initial value is 0.

[0036] Specifically, the processor may obtain a plurality of data to be generated for generating a timing diagram, as well as a preset maximum number of preset scales and an array of primary and secondary time scale units to be selected.

[0037] S120 , determining the primary and secondary time scale units of the time series diagram according to the timestamp of the data to be generated, the preset maximum number of scales, and the primary and secondary time scale unit arrays, where the primary and secondary time scale units include a primary time scale unit and a secondary time scale unit.

[0038] In this embodiment, the timestamp can be understood as recording the time when the data to be generated is generated. A time series chart can be understood as a visual chart with the time series as the horizontal axis and the data value as the vertical axis. It connects data points in chronological order to form one or more broken lines, allowing people to intuitively observe the changes in data at different time points. The primary and secondary time scale units can be understood as units used to limit the display granularity of the time series chart, and can include primary and secondary time scale units.

[0039] Specifically, the processor can determine the time interval of all data to be generated based on the maximum and minimum values ​​of the timestamps of the data to be generated, and determine the actual maximum number of scales by determining the maximum number of preset scales and the number of data to be generated, combined with the product between each scale unit in the primary and secondary time scale unit array, and determine the secondary time scale unit by the time interval and each product. The upper-level primary time scale unit adjacent to the secondary time scale unit is the primary time scale unit, thereby determining the primary and secondary time scale units of the timing diagram.

[0040] S130 : Determine a candidate step size list according to the maximum timestamp value and the primary and secondary time scale units of the data to be generated.

[0041] In this embodiment, the timestamp maximum value can be understood as the maximum timestamp and the minimum timestamp, which are used to determine the time range of all data to be generated. The candidate step list can be understood as a list for storing candidate step sizes, and the candidate step size can be understood as the interval step size between two adjacent time scales.

[0042] Specifically, the processor may determine all major-scale unit values ​​and all minor-scale unit values ​​between the maximum and minimum timestamp values ​​of the to-be-generated data based on the selected major and minor time-scale units. The number of minor time-scales between the first and last major time-scale values ​​may be determined based on whether a complete major time-scale unit exists between the maximum and minimum timestamp values. Furthermore, a candidate step size list may be determined based on the number of minor time-scales and the number of minor time-scale units contained in the major time-scale unit.

[0043] S140 , determining a timing diagram time scale of the timing diagram according to the candidate step size list, the first main time scale value, and the preset maximum number of scales.

[0044] In this embodiment, the first major time scale value can be understood as the major time scale value of the smallest timestamp on the right side of the time axis after the major and minor time scale units are divided. For example, if the smallest timestamp is 7:30, then after dividing the major and minor time scale units into hours, the first major time scale value is 8:00. The preselected time series diagram time scale can be understood as the display scale of the time series diagram.

[0045] Specifically, the processor can prioritize the candidate step lengths in the candidate step length list, and then select the candidate step lengths in order from high to low in the order of sorting, determine all pre-selected time scales within the maximum timestamp and minimum timestamp range through the candidate step lengths, and compare the maximum number of preset scales with the number of pre-selected time scales to determine whether the candidate step length meets the quantity condition, until the optimal candidate step length is selected, confirm the starting scale value of the timing diagram time scale through the first main time scale value, superimpose the optimal candidate step lengths, and determine all time scales within the timestamp maximum value range as the final timing diagram time scale of the timing diagram.

[0046] The technical solution of the embodiments of the present invention limits the maximum number of time scales by presetting a maximum number of scales. This allows the optimal secondary and primary time scale units to be selected from the array of primary and secondary time scale units, based on the timestamp of the data to be generated. This allows the optimal step size to be determined, thereby determining the preselected time scale for the timing diagram. By limiting the number of time scales to a stable range, the resulting time scales are more evenly spaced and contain an integral number of primary time units, a critical time scale, thereby optimizing the display of the timing diagram.

[0047] Example 2

[0048] Figure 2 This is a flow chart of a method for generating a time scale of a timing diagram provided by the second embodiment of the present invention. This embodiment is a further refinement of the above embodiments. Figure 2 As shown, the method includes:

[0049] Beneficial effects of

[0050] S201: Obtain data to be generated, a preset maximum number of scales, and an array of primary and secondary time scale units to be selected.

[0051] S202: Determine the maximum number of time scales for the data to be generated according to the number of data to be generated and the preset maximum number of scales.

[0052] In this embodiment, the maximum number of time scales can be understood as the maximum number of scales in the timing diagram.

[0053] Specifically, the processor may determine the maximum number of time scales for the data to be generated according to the minimum value of the number of data to be generated and the preset maximum number of scales.

[0054] For example, the maximum number of time scales is min(number of data, 6). Here, 6 is an empirical value for better display effect. The maximum number of time scales described below can be represented by MAX_TICKS.

[0055] S203: Determine a time interval value according to the minimum timestamp and the maximum timestamp of the data to be generated.

[0056] In this embodiment, the time interval value can be understood as the time span of the data to be generated.

[0057] Specifically, the processor may determine the time interval value according to the difference between the minimum timestamp and the maximum timestamp of the data to be generated.

[0058] For example, the minimum timestamp is minTs, the maximum timestamp is maxTs, and the difference between the two is calculated and recorded as diff.

[0059] S204: Using the time interval value as a selection condition and combining it with the maximum number of time scales, determine the secondary time scale unit of the data to be generated from the primary and secondary time scale unit arrays.

[0060] In this embodiment, the selection condition can be understood as a condition for making a judgment.

[0061] Specifically, the processor can use the time interval value as a selection condition. The processor can sequentially select scale units from the primary and secondary time scale unit arrays, multiply the scale unit by the maximum number of time scales, and determine whether the product is less than or equal to the time interval value. If so, it is determined whether the scale unit is the minimum scale unit or whether it is equal to the minimum scale unit. If so, the scale unit is used as the secondary time scale unit. If not, the adjacent scale unit that is smaller than the scale unit (for example, if the scale unit is hours, the adjacent and smaller scale unit is minutes) is used as the secondary time scale unit. If it is greater, the next scale unit is taken from the primary and secondary time scale unit arrays.

[0062] For example, using the representation symbols in the above example, take the scale units unit_values[i] from unit_values ​​in turn, and judge whether the time interval value diff is less than or equal to the product of the scale unit and the maximum number of time scales, that is, whether diff<=unit_values[i]*MAX_TICKS is established. If it is established, that is, diff<=unit_values[i]*MAX_TICKS, then judge whether i is equal to 0 or diff==MAX_TICKS*unit_values[i]. If the condition is met, take the scale unit at position i as the secondary scale unit, otherwise take the scale unit at position i-1 as the secondary scale unit, and the secondary scale unit is recorded as UNIT_VALUE. If it is not established, that is, diff>unit_values[i]*MAX_TICKS, then after calculating i=i+1 (that is, obtaining the next scale unit), continue the multiplication calculation, wherein the calculation of the primary and secondary time scale units mentioned in the article are all based on milliseconds.

[0063] S205 : Determine the major time scale unit based on the minor time scale unit to obtain the major and minor time scale units of the time sequence diagram.

[0064] Specifically, the processor may use the scale unit that is adjacent to and larger than the secondary time scale unit as the primary time scale unit, that is, if the secondary time scale unit is an hour, the primary time scale unit is a day.

[0065] S206 : Determine the last main time scale value before the maximum timestamp and the first main time scale value after the minimum timestamp among the timestamp values ​​of the data to be generated.

[0066] In this embodiment, the last main time scale value can be understood as the main time scale value of the adjacent maximum timestamp after division according to the main time scale unit. For example, if the maximum timestamp is 15:20, then after division according to the main time scale unit hour, the last main time scale value is 15:00.

[0067] Specifically, the processor can first divide the time range within the minimum timestamp and maximum timestamp of the data to be generated according to the main time scale unit, determine all the main time scale values ​​contained therein, and then determine the last main time scale value before the maximum timestamp and the first main time scale value after the minimum timestamp among the timestamp values ​​of the data to be generated.

[0068] S207: Determine the total number of sub-time scale units included in the main time scale unit.

[0069] In this embodiment, the total number of secondary time scale units can be understood as the total number of secondary time scale units contained in a main time scale unit. For example, if the main time scale unit is hours, the total number of secondary time scale units is 60; if the main time scale unit is days, the total number of secondary time scale units is 24.

[0070] For example, the total number of sub-timescale units may be represented by carry.

[0071] S208: Determine a candidate step size list according to the last major time scale value, the first major time scale value, and the total number of minor time scale units.

[0072] Specifically, the processor can distinguish whether there is a complete main time scale unit between the last main time scale value and the first main time scale value, and then determine the calculation method of the valid number of sub-time scales. It judges by the total number of sub-time scale units and the valid number of sub-time scales to determine the candidate step list between adjacent time scales.

[0073] Furthermore, based on the above embodiment, a candidate step size list may be determined according to the last major time scale value, the first major time scale value, and the total number of minor time scale units, including:

[0074] Determine whether there is a complete major time scale unit between the last major time scale value and the first major time scale value, and obtain a judgment result; determine the number of valid minor time scales based on the judgment result and the first and last major time scale values; if the number of valid minor time scales is 0, output the first minor time scale value after the minimum timestamp as the only time scale; otherwise, determine a candidate step list based on the number of valid minor time scales and the total number of minor time scale units.

[0075] In this embodiment, the judgment result can be understood as indicating whether a complete major time scale unit exists. The first minor time scale value can be understood as the value corresponding to the first minor time scale after the minimum timestamp.

[0076] Specifically, the processor can determine whether there is a complete main time scale unit between the last main time scale value and the first main time scale value to obtain a judgment result. The processor can determine the number of valid sub-time scales between the last main time scale value and the first main time scale value based on the judgment result and the sub-time scale unit combined with the difference between the first main time scale value and the last main time scale value. If the number of valid sub-time scales is 0, the processor can output the first sub-time scale value after the minimum timestamp as the only time scale, the algorithm ends, and the timing diagram is directly obtained. If the number of valid sub-time scales is not 0, the processor can determine the candidate step list based on the number of valid sub-time scales and the total number of sub-time scale units.

[0077] Further, on the basis of the above embodiments, the step of determining the number of valid sub-time scale values can be refined as follows:

[0078] The processor can determine the number of valid sub-time scale values by combining the first sub-time scale value and the last sub-time scale value in two ways according to the magnitude relationship between the first main time scale value and the last main time scale value. Here, the last sub-time scale value can be understood as the value corresponding to the last sub-time scale before the maximum timestamp, and is subsequently represented by lastUnitTick.

[0079] Specifically, when firstMarjorTick (the first main time scale value) < lastMarjorTick (the last main time scale value), the number of valid sub-time scale values diff_count = (lastMarjorTick - firstMarjor) / unit_value.

[0080] In addition, when firstMarjorTick (the first main time scale value) >= lastMarjorTick (the last main time scale value), the first sub-time scale value after minTs is taken as firstUnitTick again, and the last sub-time scale value before maxTs is taken as lastUnitTick, that is, the relationship minTs <= firstUnitTick <= lastUnitTick <= maxTs is satisfied, then diff_count = lastUnitTick – firstUnitTick. At this time, diff_count may be greater than carry.

[0081] Among them, on the basis of the above embodiments, the step of determining the candidate step size list according to the number of valid sub-time scale values and the total number of sub-time scale units can be refined as follows:

[0082] If the number of valid sub-time scale values is greater than or equal to the total number of sub-time scale units, determine the first divisor list of the total number of sub-time scale units in the first interval; determine the candidate step size list according to the first divisor list and the number of valid sub-time scale values; otherwise, determine the second divisor list of the total number of sub-time scale units in the second interval; determine the candidate step size list according to the second divisor list and the number of valid sub-time scale values.

[0083] In this embodiment, the first interval can be understood as an interval consisting of the total number of sub-time scale units, for example, [2, total number of sub-time scale units carry / 2]. The first divisor list can be understood as a list of divisors of the total number of sub-time scale units in the first interval. The second interval can be understood as an interval consisting of the number of valid sub-time scales, for example, [2, valid number of sub-time scales diff_count / 2]. The second divisor list can be understood as a list of divisors of the total number of sub-time scale units in the second interval.

[0084] Specifically, if the number of valid sub-timescales is greater than or equal to the total number of sub-timescale units, a first divisor list for the total number of sub-timescale units in the first interval is determined. The processor may perform a quotient operation on the valid number of sub-timescales and each data in the first divisor list, and add the result of the quotient operation to the candidate step length list. Otherwise, a second divisor list for the total number of sub-timescale units in the second interval is determined. If the valid number of sub-timescales is less than the total number of sub-timescale units, the processor may perform a quotient operation on the valid number of sub-timescales in the second divisor list, and add the result of the operation to the candidate step length list.

[0085] For example, the processor can determine whether diff_count is greater than or equal to carry. If so, the processor obtains a first divisor list of carry in the first interval [2, carry / 2], performs a quotient operation on diff_count and each data in the list, and adds the result to the optional step size list opt_steps. If not, the processor obtains a second divisor list of carry in the second interval [2, diff_count], performs a quotient operation on diff_count and the divisor list, and then adds the result to the optional step size list opt_steps. When diff_count is calculated as diff_count = lastUnitTick (last sub-timescale value) - firstUnitTick (first sub-timescale value), this quotient operation may produce a remainder.

[0086] S209: Determine the priority of each candidate step in the candidate step list according to the number of valid sub-time scales.

[0087] In this embodiment, the priority can be understood as an order for distinguishing candidate step lengths.

[0088] Specifically, the criterion for evaluating the optimal step size is to ensure that the time intervals between ticks are as uniform as possible. To achieve this goal, the processor can first determine the priority of each candidate step size in the candidate step size list. The processor can calculate the candidate step size by dividing the number of valid sub-time ticks by the number of valid sub-time ticks. The smaller the remainder, the higher the priority. If the remainders are equal, the larger the quotient, the higher the priority.

[0089] S210 , sorting the candidate step lengths according to their priorities to obtain a sorted candidate step length list.

[0090] Specifically, the processor may sort the candidate step lengths in descending order of priority to obtain a sorted candidate step length list.

[0091] S211 . Based on the first major time scale value and the minor time scale unit, determine an optimal step length that meets the conditions from the sorted candidate step length list.

[0092] Specifically, the processor can select candidate step lengths from the sorted candidate step length list in turn as the starting point for simulating the candidate step length, determine all time scale values ​​within the time interval range according to the sub-time scale unit, and compare the total number of time scale values ​​with the determined maximum number of time scales. When the total number is less than or equal to the maximum number of time scales, it is used as the optimal step length. When it is greater than, the condition is not met, and the next candidate step length can be selected from the sorted candidate step length list for simulation calculation until the optimal step length is determined.

[0093] Furthermore, based on the above embodiment, the step of determining the optimal step length that meets the conditions from the sorted candidate step length list based on the first major time scale value and the minor time scale unit can be refined as follows:

[0094] Determine the preselected step length from the sorted candidate step length list in order of priority, and select the starting point of the preselected step length; determine the preselected time scale value within the time period corresponding to the maximum timestamp value based on the preselected step length starting point and the sub-time scale unit; determine the total number of preselected scale values ​​of the preselected time scale values ​​within the range from the minimum timestamp to the maximum timestamp; if the total number of preselected scale values ​​does not meet the maximum number condition, return to the step of determining the preselected step length; otherwise, use the preselected step length as the optimal step length that meets the maximum number condition.

[0095] In this embodiment, the preselected step size can be understood as the candidate step size currently selected for subsequent calculation. The preselected step size starting point can be understood as the first point under the current preselected step size of the data to be generated. The preselected time scale value can be understood as all time scale values ​​within the time period formed by the minimum and maximum timestamps. The total number of preselected scale values ​​can be understood as the total number of time scale values ​​within the time period. The maximum number condition can be understood as the condition used to determine whether the maximum number of time scale values ​​calculated above is exceeded.

[0096] Specifically, the processor can sequentially select preselected step lengths from the sorted candidate step length list in the order of priority, and select the starting point of the preselected step length. The starting point of the preselected step length satisfies the following conditions: the length of the preselected step length that is an integer multiple of the first major tick (the first major time scale value), and 0 <= minimum timestamp - starting point of the preselected step length < preselected step length. The processor can multiply the starting point of the preselected step length by the secondary time scale unit and incrementally determine the preselected time scale values within the time period corresponding to the maximum and minimum timestamp values. The processor can determine the total number of preselected scale values of the preselected time scale values within the range from the minimum timestamp to the maximum timestamp. The processor can compare the total number of preselected scale values with the maximum value of the number of time scale values calculated above. If it is greater than the maximum value of the number of time scale values, it does not meet the maximum number condition, and the determination step of the preselected step length is returned, that is, select the next preselected step length from the candidate step length list. If the total number of preselected scale values is less than or equal to the maximum value of the number of time scale values, the processor can use the preselected step length as the optimal step length that meets the maximum number condition.

[0097] Exemplarily, let the index value of the sorted candidate step length list opt_steps be j, and the initial value of j is 0. Take opt_steps[j] as the preselected step length, and select the starting point of the preselected step length firstTick, which satisfies the following conditions: the length of opt_steps[j] that is an integer multiple of the first major tick, and 0 <= minTS - firstTick < opt_steps[j]. Calculate each preselected time scale value by incrementing firstTick (opt_steps[j], with the unit of unit_value) until it is greater than or equal to maxTs. Count the total number of preselected scale values of all preselected time scale values within the range [minTs, maxTs]. When the total number of preselected scale values is greater than MAX_TICKS, it means that this step length does not meet the maximum number condition. Calculate j = j + 1, and repeat the determination step of the starting point of the preselected step length. When the total number of preselected scale values is less than or equal to MAX_TICKS, it means that this step length meets the maximum number condition and is the optimal step length. The time scale values calculated with this step length are the final displayed time scale values, and the algorithm ends.

[0098] Since the selected starting point of the preselected step size, firstTick, satisfies the following conditions: the length of opt_steps[j] which is an integer multiple of the distance from firstMarjorTick, and 0 <= minTS - firstTick < opt_steps[j], then firstMarjorTick = firstTick + opt_steps[j] * n. Therefore, as long as firstMarjorTick is within the range of [minTs, maxTs], it will definitely be selected. When there are multiple major time scales within [minTS, maxTS], diff_count must be an integer multiple of carry, and the obtained step size must also be a factor of carry. Therefore, the time scales that are an integer number of carry away from firstMarjorTick will also definitely be selected, that is, the major scales within the [minTs, maxTs] interval will definitely be selected. Therefore, it can ensure the selection of such key time scales as integer multiples of the major time units.

[0099] S212. Determine the preselected time scales of the timing diagram according to the optimal step size and the value of the first major time scale.

[0100] In this embodiment, the displayed time scale value is used to represent the abscissa of the timing diagram.

[0101] Specifically, the processor can use the value of the first major time scale as the starting scale value, and successively add the optimal step size until the added scale value is greater than or equal to the maximum time stamp value, so as to determine the preselected time scales of the timing diagram.

[0102] Exemplarily, the time range of the data to be generated is from 9:00:00 on September 18th to 13:00:00 on September 20th, which is divided into three segments: from 9:00:00 on September 1st to 00:00:00 on September 19th, from 00:00:00 on September 19th to 00:00:00 on September 20th, and from 00:00:00 on September 20th to 13:00:00 on September 20th. Among them, the secondary time unit refers to hours, and the major time unit refers to days. The finally generated time scales are 12:00:00 on September 18th, 00:00:00 on September 19th, 12:00:00 on September 19th, 00:00:00 on September 20th, and 12:00:00 on September 20th.

[0103] In the embodiment of the present invention, by dividing the time range of the data to be generated into three segments: an integer number of secondary time units + an integer number of major time units + an integer number of secondary time units, selecting the divisors of the quotient of the major time unit and the secondary time unit to participate in the step size calculation, and restricting the number of time scales to be stable within a suitable range, the interval time of the obtained time scales will be relatively uniform, and it includes such key time scales as integer multiples of the major time units, thus optimizing the display of the timing diagram.

[0104] For better understanding of the present application, a specific example may be used. Figure 3 This is an example flow chart of a method for generating a time scale of a timing diagram provided by the second embodiment of the present invention, such as Figure 3 As shown, the steps may include:

[0105] S301, determine the maximum number of time scales MAX_TICKS by min(number of data, preset maximum number of scales), determine the time interval diff between the minimum timestamp and the maximum timestamp, and select the i-th time scale unit_values[i] from the primary and secondary time scale unit array;

[0106] S302, determine diff<=MAX_TICKS*unit_values[i];

[0107] S303, if otherwise i=i+1 and return to step S302;

[0108] S304, if yes, then determine i==0 or diff=unit_values[i]*MAX_TICKS;

[0109] S305, if not, set the time scale unit UNIT_VALUE=unit_values[i-1],

[0110] Major time scale unit MAJOR_UNIT_VALUE = unit_values[i];

[0111] S306, if yes, set UNIT_VALUE=unit_values[i], and set

[0112] MAJOR_UNIT_VALUE=unit_values[i+1];

[0113] S307, determine the total number of secondary time scale units carry: carry = MAJOR_UNIT_VALUE / UNIT_VALUE;

[0114] S308: Determine whether the first major time scale value is less than the last major time scale value firstMarjorTick <lastMarjorTick;

[0115] S309, if otherwise: diff_count=lastUnitTick (last time tick value)−firstUnitTick (first time tick value);

[0116] S310, if yes, then diff_count (number of valid minor time ticks) = (lastMarjorTick-firstMarjor) / unit_value (minor time tick unit);

[0117] S311, determine diff_count == 0; if so, end;

[0118] S312, if not, determine whether diff_count>=carry; if so, jump to step S314, if not, jump to step S313;

[0119] S313. Obtain a second divisor list of carry in the second interval [2, diff_count], and add the quotient of diff_count and the data in the list to the optional step length list opt_steps.

[0120] S314. Obtain a list of first divisors of carry in the first interval [2, carry / 2], and add the quotient of diff_count and each data in the list to the optional step length list opt_steps.

[0121] S315. Sort the data in opt_steps according to the priority, and set j as the subscript of opt_steps, and the value of j is 0;

[0122] S316. Select the prefetch step starting point firstTick, which satisfies the following conditions: the distance from firstMarjorTick is an integer multiple of opt_steps[j], and 0<=minTS-firstTick <opt_steps[j];

[0123] S317, calculate each time tick value by incrementing firstTick in sequence (opt_steps[j], unit is unit_value) until it is greater than or equal to maxTs, and determine the total number of preselected tick values;

[0124] S318, determine whether the total number of pre-selected scale values ​​is greater than MAX_TICKS; if so, jump to step S319, if not, jump to step S320;

[0125] S319, j=j+1, and jump to step S316;

[0126] S320, the optimal step size step = opt_steps[j], and the displayed time scale value is the time scale value corresponding to opt_steps[j].

[0127] Example 3

[0128] Figure 4This is a schematic diagram of the structure of a timing diagram time scale generating device provided by the third embodiment of the present invention. Figure 4 As shown, the device includes:

[0129] The information acquisition module 41 is used to obtain the data to be generated, the maximum number of preset scales, and the primary and secondary time scale unit arrays to be selected;

[0130] a unit determination module 42 for determining the primary and secondary time scale units of the time sequence diagram according to the timestamp of the data to be generated, the preset maximum number of scales, and the primary and secondary time scale unit arrays, wherein the primary and secondary time scale units include primary time scale units and secondary time scale units;

[0131] A list determination module 43 is configured to determine a candidate step length list according to the maximum timestamp value of the data to be generated and the primary and secondary time scale units;

[0132] The timing diagram determining module 44 is configured to determine the timing diagram time scale of the timing diagram according to the candidate step size list, the first main time scale value and the preset maximum number of scales.

[0133] The technical solution of the embodiments of the present invention limits the maximum number of time scales by presetting a maximum number of scales. This allows the optimal secondary and primary time scale units to be selected from the array of primary and secondary time scale units, based on the timestamp of the data to be generated. This allows the optimal step size to be determined, thereby determining the preselected time scale for the timing diagram. By limiting the number of time scales to a stable range, the resulting time scales are more evenly spaced and contain an integral number of primary time units, a critical time scale, thereby optimizing the display of the timing diagram.

[0134] Furthermore, the unit determination module 42 is specifically configured to:

[0135] Determining the maximum number of time scales for the data to be generated according to the number of data to be generated and the preset maximum number of scales;

[0136] Determine a time interval value according to the minimum timestamp and the maximum timestamp of the data to be generated;

[0137] Taking the time interval value as a selection condition and combining the maximum number of time scales, determining the secondary time scale unit of the data to be generated from the primary and secondary time scale unit arrays;

[0138] The major time scale unit is determined based on the minor time scale unit to obtain the major and minor time scale units of the timing diagram.

[0139] Furthermore, the list determination module 43 includes:

[0140] A first determining unit is configured to determine the last main time scale value before the maximum timestamp and the first main time scale value after the minimum timestamp of the timestamp values ​​of the data to be generated;

[0141] A second determining unit, configured to determine the total number of sub-time scale units included in the main time scale unit;

[0142] The third determining unit is configured to determine a candidate step size list according to the last major time scale value, the first major time scale value, and the total number of minor time scale units.

[0143] The third determining unit includes:

[0144] a first determining subunit, configured to determine whether a complete main time scale unit exists between the last main time scale value and the first main time scale value, and obtain a determination result;

[0145] a second determining subunit, configured to determine the number of valid minor time scales between the last major time scale value and the first major time scale value according to the determination result and the minor time scale unit;

[0146] a third determining subunit, configured to output the first sub-timescale value after the minimum timestamp as a unique timescale if the number of valid sub-timescales is 0;

[0147] The fourth determining subunit is configured to determine a candidate step size list according to the number of valid sub-time scales and the total number of sub-time scale units.

[0148] The fourth determining subunit is specifically configured to:

[0149] If the number of valid sub-time scales is greater than or equal to the total number of sub-time scale units, determining a first divisor list of the total number of sub-time scale units in a first interval;

[0150] Determining a candidate step size list according to the first divisor list and the number of valid sub-time scales;

[0151] otherwise, determining a second divisor list of the total number of sub-time scale units in a second interval;

[0152] The candidate step size list is determined according to the second divisor list and the number of valid sub-time scales.

[0153] Furthermore, the timing diagram determining module 44 includes:

[0154] a fourth determining unit, configured to determine a priority of each candidate step length in the candidate step length list according to the number of valid sub-time scales;

[0155] a fifth determining unit, configured to sort the candidate step lengths according to the priorities to obtain a sorted candidate step length list;

[0156] a sixth determining unit, configured to determine an optimal step length that meets a condition from the sorted candidate step length list based on the first major time scale value and the minor time scale unit;

[0157] A seventh determining unit is configured to determine a preselected timing diagram time scale of the timing diagram according to the optimal step size and the first main time scale value.

[0158] The sixth determining unit is specifically configured to:

[0159] Determine a preselected step length from the sorted candidate step length list in order of priority, and select a starting point for the preselected step length;

[0160] Determining a preselected time scale value within the time period corresponding to the maximum value of the timestamp according to the preselected step starting point and the sub-time scale unit;

[0161] Determining a total number of preselected scale values ​​of the preselected time scale value within a range from the minimum timestamp to the maximum timestamp;

[0162] If the total number of the preselected scale values ​​does not meet the maximum number condition, returning to the step of determining the preselected step length;

[0163] Otherwise, the preselected step length is used as the optimal step length that meets the maximum number condition.

[0164] The timing diagram time scale generating device provided by the embodiment of the present invention can execute the timing diagram time scale generating method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0165] Example 4

[0166] Figure 5 A schematic diagram of the structure of an electronic device 50 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0167] like Figure 5 As shown, the electronic device 50 includes at least one processor 51 and a memory, such as a read-only memory (ROM) 52, a random access memory (RAM) 53, etc., which is communicatively connected to the at least one processor 51. The memory stores a computer program that can be executed by the at least one processor. The processor 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 52 or the computer program loaded from the storage unit 58 into the random access memory (RAM) 53. Various programs and data required for the operation of the electronic device 50 can also be stored in the RAM 53. The processor 51, ROM 52, and RAM 53 are connected to each other via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.

[0168] Multiple components in the electronic device 50 are connected to the I / O interface 55, including an input unit 56, such as a keyboard, a mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a magnetic disk, an optical disk, etc.; and a communication unit 59, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0169] The processor 51 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 51 executes the various methods and processes described above, such as the timing diagram timescale generation method.

[0170] In some embodiments, the timing diagram timescale generation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 58. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 50 via the ROM 52 and / or the communication unit 59. When the computer program is loaded into the RAM 53 and executed by the processor 51, one or more steps of the timing diagram timescale generation method described above can be performed. Alternatively, in other embodiments, the processor 51 can be configured to perform the timing diagram timescale generation method by any other appropriate means (e.g., by means of firmware).

[0171] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0172] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0173] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0175] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0176] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0177] In one embodiment, the present invention further includes a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the method for generating a time scale of a timing diagram according to any embodiment of the present invention is implemented.

[0178] The computer program product may be implemented by writing computer program code for performing the operations of the present invention in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0179] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0180] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for generating a time scale of a timing diagram, characterized in that: include: Get the data to be generated, the maximum number of preset scales, and the array of primary and secondary time scale units to be selected; Determine the primary and secondary time scale units of the timing diagram according to the timestamp of the data to be generated, the preset maximum number of scales, and the primary and secondary time scale unit arrays, wherein the primary and secondary time scale units include a primary time scale unit and a secondary time scale unit; Determining a candidate step size list according to the maximum timestamp value of the data to be generated and the primary and secondary time scale units; The timing diagram time scale of the timing diagram is determined according to the candidate step size list, the first main time scale value and the preset maximum number of scales.

2. The method according to claim 1, characterized in that The determining of the primary and secondary time scale units of the timing diagram according to the timestamp of the data to be generated, the preset maximum number of scales, and the primary and secondary time scale unit arrays includes: Determining the maximum number of time scales for the data to be generated according to the number of data to be generated and the preset maximum number of scales; Determine a time interval value according to the minimum timestamp and the maximum timestamp of the data to be generated; Taking the time interval value as a selection condition and combining the maximum number of time scales, determining the secondary time scale unit of the data to be generated from the primary and secondary time scale unit arrays; The major time scale unit is determined based on the minor time scale unit to obtain the major and minor time scale units of the timing diagram.

3. The method according to claim 1, characterized in that The step of determining a candidate step length list according to the maximum timestamp value of the data to be generated and the primary and secondary time scale units includes: Determine the last main time scale value before the maximum timestamp and the first main time scale value after the minimum timestamp among the timestamp values ​​of the data to be generated; Determining the total number of sub-time scale units included in the major time scale unit; A candidate step size list is determined according to the last major time scale value, the first major time scale value, and the total number of minor time scale units.

4. The method according to claim 3, characterized in that The determining of a candidate step size list according to the last major time scale value, the first major time scale value, and the total number of minor time scale units includes: Determine whether there is a complete main time scale unit between the last main time scale value and the first main time scale value, and obtain a determination result; Determining the number of valid minor time scales between the last major time scale value and the first major time scale value according to the determination result and the minor time scale unit; If the number of valid sub-time scales is 0, the first sub-time scale value after the minimum timestamp is output as the only time scale; Otherwise, a candidate step size list is determined according to the number of valid sub-time scales and the total number of sub-time scale units.

5. The method according to claim 4, characterized in that The step of determining a candidate step size list according to the number of valid sub-time scales and the total number of sub-time scale units includes: If the number of valid sub-time scales is greater than or equal to the total number of sub-time scale units, determining a first divisor list of the total number of sub-time scale units in a first interval; Determining a candidate step size list according to the first divisor list and the number of valid sub-time scales; otherwise, determining a second divisor list of the total number of sub-time scale units in a second interval; The candidate step size list is determined according to the second divisor list and the number of valid sub-time scales.

6. The method according to claim 4, characterized in that The determining of the timing diagram time scale of the timing diagram according to the candidate step size list, the first main time scale value and the preset maximum number of scales includes: Determining the priority of each candidate step length in the candidate step length list according to the number of valid sub-time scales; Sorting the candidate step lengths according to the priorities to obtain a sorted candidate step length list; Determining an optimal step length that meets a condition from the sorted candidate step length list based on the first major time scale value and the minor time scale unit; The preselected scale value corresponding to the optimal step size is the time scale of the timing diagram finally confirmed.

7. The method according to claim 6, characterized in that The determining, based on the first major time scale value and the minor time scale unit, an optimal step length that meets a condition from the sorted candidate step length list comprises: Determine a preselected step length from the sorted candidate step length list in order of priority, and select a starting point for the preselected step length; Determining a preselected time scale value within the time period corresponding to the maximum value of the timestamp according to the preselected step starting point and the sub-time scale unit; Determining a total number of preselected scale values ​​of the preselected time scale value within a range from the minimum timestamp to the maximum timestamp; If the total number of the preselected scale values ​​does not meet the maximum number condition, returning to the step of determining the preselected step length; Otherwise, the preselected step length is used as the optimal step length that meets the maximum number condition.

8. A timing diagram time scale generating device, characterized in that: include: An information acquisition module is used to obtain the data to be generated, the maximum number of preset scales, and the array of primary and secondary time scale units to be selected; a unit determination module, configured to determine the primary and secondary time scale units of the time sequence diagram according to the timestamp of the data to be generated, the preset maximum number of scales, and the primary and secondary time scale unit arrays, wherein the primary and secondary time scale units include a primary time scale unit and a secondary time scale unit; a list determination module, configured to determine a candidate step size list according to the maximum timestamp value of the data to be generated and the primary and secondary time scale units; The timing diagram determining module is used to determine the timing diagram time scale of the timing diagram according to the candidate step size list, the first main time scale value and the preset maximum number of scales.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method for generating a time scale of a timing diagram according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for generating a time scale of a timing diagram according to any one of claims 1 to 7 when the computer instructions are executed.