A method and apparatus for calculating time limits based on specified dates and time periods
By configuring Cartesian union and self-associative mapping methods for specified dates and time periods, the problem of complex timeliness calculation logic in existing technologies is solved, realizing automated timeliness calculation and improving accuracy and convenience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ICKEY (SHANGHAI) INTERNET & TECH CO LTD
- Filing Date
- 2022-12-28
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies, when processing orders and shipments, involve complex and difficult-to-maintain logic in calculating timeliness due to the involvement of weekdays and working hours, resulting in inaccurate timeliness statistics, especially during holidays or non-working days.
The method employs a Cartesian union and self-associative mapping based on specified dates and time periods. By configuring the specified date and time period configuration file, an intermediate result set is generated and associated mapping is performed to finally obtain the timeliness information of the business table to be calculated.
It enables automatic timeliness calculation based on working days and specified time periods, solving timeliness issues such as whether shipments are overdue and whether logistics deliveries to customers are overdue, thus improving the accuracy of timeliness calculation and ease of maintenance.
Smart Images

Figure CN116245494B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for calculating timeliness based on a specified date and time period. Background Technology
[0002] Currently, the processes for processing orders and shipping involve factors such as whether it is a working day or during working hours, whether the shipment is overdue, and whether the logistics delivery to the customer is overdue. Usually, the timeliness is judged sequentially according to each time period. For example, how to process orders from 9 am to 12 pm on weekdays, and how to process orders from 12 pm to 1:30 pm on weekdays. The logic is very complicated and difficult to maintain. It can only be processed according to a fixed week. If Monday to Friday is a holiday or Saturday and Sunday are normal working days, the timeliness statistics are actually inaccurate. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and apparatus for calculating timeliness based on a specified date and time period, in order to address the shortcomings of the prior art.
[0004] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:
[0005] In a first aspect, this application provides a method for calculating timeliness based on a specified date and time period, the method comprising:
[0006] The timeliness configuration program configures a specified date configuration file, which includes date fields and date field calculation tags;
[0007] The time-efficiency configuration program configures a configuration file for a specified time period, which includes the start time of the specified time period, the end time of the specified time period, the duration of the specified time period, and the calculation flag for the specified time period.
[0008] The time-sensitive configuration program performs a Cartesian union on the specified date configuration file and the specified time period configuration file to obtain a first intermediate result set, and stores the first intermediate result set in a first intermediate table;
[0009] The timeliness configuration program performs a self-associative mapping on the first intermediate result set to obtain a second intermediate result set, and stores the second intermediate result set in a second intermediate table;
[0010] The timeliness configuration program associates and maps the timeliness business data to be calculated with the second intermediate table to obtain the intermediate table of timeliness business data to be calculated.
[0011] The timeliness configuration program processes the intermediate table of the business to be calculated to obtain the timeliness information of the business to be calculated.
[0012] Secondly, this application provides an apparatus for calculating timeliness based on a specified date and time period, the apparatus comprising:
[0013] The first configuration module is used to configure a specified date configuration file, which includes date fields and date field calculation tags.
[0014] The second configuration module is used to configure a specified time period configuration file, which includes the start time of the specified time period, the end time of the specified time period, the duration of the specified time period, and the calculation flag of the specified time period.
[0015] The first processing module is used to perform a Cartesian union on the specified date configuration file and the specified time period configuration file to obtain a first intermediate result set, and store the first intermediate result set in a first intermediate table;
[0016] The second processing module is used to perform self-associative mapping on the first intermediate result set to obtain a second intermediate result set, and store the second intermediate result set into a second intermediate table;
[0017] The third processing module is used to associate and map the time-sensitive business data to be calculated with the second intermediate table to obtain the intermediate table of time-sensitive business data to be calculated.
[0018] The fourth processing module is used to process the intermediate table of time-sensitive business to be calculated, and obtain the time-sensitive information of the time-sensitive business table.
[0019] Thirdly, this application provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of any of the methods described in the above technical solutions.
[0020] Fourthly, this application provides an electronic device, comprising: a memory storing a computer program thereon; and a processor for executing the computer program in the memory to implement the steps of any of the methods described in the above technical solutions.
[0021] The beneficial effects of this invention are as follows: It proposes a method for calculating timeliness based on a specified date and time period, including configuring a timeliness configuration program to configure a specified date configuration file, which includes a date field and a date field calculation flag; configuring a specified time period configuration file, which includes a specified time period start time, a specified time period end time, a specified time duration, and a specified time period calculation flag; performing a Cartesian union on the specified date configuration file and the specified time period configuration file to obtain a first intermediate result set, and storing the first intermediate result set in a first intermediate table; performing a self-associative mapping on the first intermediate result set to obtain a second intermediate result set, and storing the second intermediate result set in a second intermediate table; associating the business data to be calculated with the second intermediate table to obtain a business intermediate table to be calculated; and processing the business intermediate table to be calculated to obtain the timeliness information of the business table to be calculated. This application realizes the automatic determination of timeliness based on working days and specified time periods, solving the problems of timeliness (effective time consumption) in order processing, delivery, and other processes involving whether it is a working day and working hours (i.e., delivery time), whether delivery is overdue, and whether logistics delivery to customers is overdue.
[0022] The advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating a method for calculating timeliness based on a specified date and time period according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart illustrating a method for calculating timeliness based on a specified date and time period, according to another embodiment of the present invention.
[0026] Figure 3 This is a flowchart illustrating a method for calculating timeliness based on a specified date and time period, according to another embodiment of the present invention.
[0027] Figure 4 This is a flowchart illustrating a method for calculating timeliness based on a specified date and time period, according to another embodiment of the present invention.
[0028] Figure 5This is a flowchart illustrating a method for calculating timeliness based on a specified date and time period, according to another embodiment of the present invention.
[0029] Figure 6 This is a schematic diagram of a module of an apparatus for calculating timeliness based on a specified date and time period, according to another embodiment of the present invention. Detailed Implementation
[0030] 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 some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0031] like Figure 1 The method for calculating timeliness based on a specified date and time period, as described in this embodiment of the invention, includes the following steps:
[0032] 110. The timeliness configuration program configures a specified date configuration file, which includes a date field and a date field calculation tag.
[0033] 120. The time-sensitive configuration program configures a configuration file for a specified time period, which includes the start time of the specified time period, the end time of the specified time period, the duration of the specified time period, and the calculation flag for the specified time period.
[0034] 130. The time-sensitive configuration program performs a Cartesian union on the specified date configuration file and the specified time period configuration file to obtain a first intermediate result set, and stores the first intermediate result set in a first intermediate table.
[0035] 140. The timeliness configuration program performs self-associative mapping on the first intermediate result set to obtain the second intermediate result set, and stores the second intermediate result set in the second intermediate table.
[0036] 150. The timeliness configuration program associates and maps the timeliness business data to be calculated with the second intermediate table to obtain the timeliness business intermediate table to be calculated.
[0037] 160. The timeliness configuration program processes the intermediate table of the business to be calculated to obtain the timeliness information of the business table to be calculated.
[0038] Based on the above embodiments, step 130 further includes:
[0039] 131. The time-efficiency configuration program performs a Cartesian combination of the date field in the specified date configuration file and the start time of the specified time period in the specified time period configuration file to generate the first intermediate result set. The first intermediate result set includes the start date and time field, the date field calculation flag, the specified time period calculation flag, the duration, the date and time period calculation flag, and the sorting number.
[0040] 132. The time-of-use configuration program determines the value of the date-time period calculation flag based on the date calculation flag and the specified time period calculation flag.
[0041] 133. The timeliness configuration program sorts the first intermediate result set according to the start date and time field, and determines the sorting number of each intermediate result in the first intermediate result set.
[0042] Based on the above embodiments, step 140 further includes:
[0043] The timeliness configuration program calculates a marker based on the date field. The second intermediate result set is obtained by associating the next intermediate result in the first intermediate result set with the previous intermediate result. The second intermediate result set includes the start date and time, the end date and time, the date field calculation marker, the specified time period calculation marker, the duration, and the date and time period calculation marker.
[0044] Based on the above embodiments, step 150 further includes:
[0045] The timeliness configuration program determines whether the time period between the first time attribute and the second time attribute of each business data record in the timeliness business data to be calculated is cut into the smallest unit.
[0046] If so, then based on the first time attribute and the second time attribute in the business data record, determine the corresponding multiple intermediate result records in the second intermediate table.
[0047] Otherwise, based on the first and second time attributes in the business data records, the intermediate result records in the corresponding second intermediate table are determined.
[0048] The timeliness configuration program extracts the intermediate result records from the second intermediate table corresponding to all the business data records to obtain the intermediate table of the business timeliness to be calculated.
[0049] Based on the above embodiments, step 160 further includes:
[0050] 161. The timeliness configuration program sorts the intermediate table of timeliness to be calculated based on the start date and time in the intermediate table of timeliness to be calculated, and obtains the first sort number in the intermediate table of timeliness to be calculated.
[0051] 162. The timeliness configuration program sorts the intermediate table of timeliness to be calculated based on the end date and time in the intermediate table of timeliness to be calculated, and obtains the second sort number in the intermediate table of timeliness to be calculated.
[0052] 163. The timeliness configuration program determines that when the time period between the first time attribute and the second time attribute of the business data record in the timeliness business data to be calculated belongs to the time period between the start date and end date of the timeliness business intermediate record in the timeliness business intermediate table to be calculated, that is, the first sort number and the second sort number corresponding to the timeliness business intermediate record in the timeliness business intermediate table to be calculated are both first preset values, and the date time period calculation mark of the timeliness business intermediate record is a second preset value, the effective consumption time of the timeliness business intermediate record is the time interval between the first time attribute and the second time attribute.
[0053] 164. Otherwise, when the first time attribute of the business data record in the business data to be calculated is the start date and time of the intermediate record of the business time in the intermediate table to be calculated, and the value of the date time interval calculation mark of the intermediate record of the business time is the second preset value, that is, the first sort number corresponding to the intermediate record of the business time in the intermediate table to be calculated is the first preset value, and the date time interval calculation mark of the intermediate record of the business time is the second preset value, the effective consumption time of the intermediate record of the business time is the time interval between the end date and time of the intermediate record of the business time and the first time attribute.
[0054] 165. Otherwise, when the second time attribute of the business data record in the business data to be calculated is the end date and time of the intermediate record of the business time in the intermediate table to be calculated, and the value of the date time period calculation mark of the intermediate record of the business time is the second preset value, that is, the second sort number corresponding to the intermediate record of the business time in the intermediate table to be calculated is the first preset value, and the date time period calculation mark of the intermediate record of the business time is the second preset value, the effective consumption time of the intermediate record of the business time is the time interval between the start date and time of the intermediate record of the business time and the second time attribute.
[0055] 166. Otherwise, when the date time period of the intermediate record of the time-sensitive service is calculated and marked as the second preset value, the effective consumption time of the intermediate record of the time-sensitive service is the consumption duration of the intermediate record of the time-sensitive service.
[0056] 167. Based on the effective consumption time in the intermediate table of time-sensitive business to be calculated, obtain the time-sensitive information of the time-sensitive business table.
[0057] It should be understood that step 110 involves configuring a specified date configuration file. This file needs to mark which dates need to be calculated and which do not; dates that are calculated are marked with 1, and those not included in the calculation are marked with 0. This configuration file can be named dim_computer_day_config, and the data is as follows: Figure 2 As shown, the table structure is as follows:
[0058]
[0059] The calculation of the above dates is for reference only; in actual application, the settings can be customized.
[0060] In step 120, a time period configuration file is specified. This file allows time periods to be divided by hours, minutes, or seconds; most commonly, they are divided by hours or minutes. A day is divided into 24 hours by time period. Calculated time periods are marked with 1, and those not included in the calculation are marked with 0. This configuration file is named `dim_computer_time_config`, and its table structure is as follows:
[0061]
[0062]
[0063] Data display as follows Figure 3 As shown, the break time is from 12:00 PM to 1:30 PM. The segmentation can be based on this characteristic:
[0064] The above time period settings are for reference only; in actual application, they can be customized.
[0065] Step 130 includes:
[0066] ① Perform a Cartesian union on the two configuration files.
[0067] The Cartesian functions `dim_computer_day_conf i g.natura_l_day` and `dim_computer_time_conf ig.hhmmss_start` are merged to generate a new field `natura_time`.
[0068] For example:
[0069] Datasets: Anatura l_day, 2022-06-01, 2022-06-02, 2022-06-03; Bhhmmss_start, 01:00:00, 02:00:00
[0070] The result of Cartesian union of datasets A and B
[0071] natura l_day hhmmss_start natura l_t ime
[0072] 2022-06-01 01:00:00 2022-06-01 01:00:00
[0073] 2022-06-01 02:00:00 2022-06-01 02:00:00
[0074] 2022-06-02 01:00:00 2022-06-02 01:00:00
[0075] 2022-06-02 02:00:00 2022-06-02 02:00:00
[0076] 2022-06-03 01:00:00 2022-06-03 01:00:00
[0077] 2022-06-03 02:00:00 2022-06-03 02:00:00
[0078] ② Determine whether each time period of the corresponding date has been calculated and label it, naming it is_computer_final.
[0079] The judgment rule is that if both "Calculate?" tags in the two configuration files are set to "Yes", then the calculation is successful.
[0080] That is, d im_computer_day_conf i gi s_compute_date=1
[0081] This time will only be calculated when `dim_computer_time_conf i gi s_compute` is 1; otherwise, it will not be included in the calculation.
[0082] ③ Mark the sequence number: Sort the dates and times obtained in ① in ascending order, mark them with sequence numbers, and name them rn.
[0083] The generated results are stored in the tmp_work_daytime intermediate table, and the data is as follows: Figure 4As shown in the table, the results are as follows:
[0084]
[0085] Step 140: The result set obtained in Step 130 is subjected to self-association mapping, with the next record associated with the previous record to obtain the time period for which time is calculated. The result is stored in the intermediate table tmp_tdm_work_daytime_info, and the data is as follows: Figure 5 As shown, the table structure is as follows:
[0086]
[0087]
[0088] Step 150: Map the business data requiring timeliness calculation to the table above. First, the business data must include business time attribute 1 and business time attribute 2, which require timeliness calculation. The effective time within this business time interval, obtained in Step 2, is used as the effective elapsed time for the two time intervals. There are two cases:
[0089] ① If two time attributes span different time periods, it is necessary to find the date and time periods that fall within this time range based on [Business Attribute Time 1, Business Attribute Time 2] of each record in the business data.
[0090] Business attribute time 1 <= natura l_t ime_end AND natura l_t ime_end <= business attribute time 2
[0091] or
[0092] Business attribute time 1 <= natura l_t ime_start AND natura l_t ime_start <= business attribute time 2
[0093] ② If the two time attributes do not span the segmented time period, that is, if business time attribute 1 and business time attribute 2 are within the smallest unit of the segmented time period, the method of obtaining them is as follows: natural l_time_start <= business attribute time 1 AND business attribute time 2 <= natural l_time_end
[0094] The union of the above two cases serves as the main basis for timeliness analysis.
[0095] Step 160: Based on the data from Step 150, label the beginning and end of the line corresponding to the smallest unit of time to be analyzed in the business data. This serves two purposes: first, to distinguish whether the time period of the business attribute to be analyzed is within or outside the range of a single segmented time period; second, to distinguish whether it is the beginning node or the end node, because the calculation methods for the time validity of the beginning node and the end node are different.
[0096] The implementation is as follows: For each smallest unit to be analyzed, sort it in ascending order by the `natural_time_start` column, label it `rn_start`, and assign it the sequence number (1, 2, 3...). Then sort it in descending order by the `natural_time_end` column, label it `rn_end`, and assign it the sequence number (1, 2, 3...). Calculate the effective time consumed for each row of the smallest unit according to the following 5 cases and label it as `time_consum_final`.
[0097] ① The business attribute time to be analyzed is within the segmented time period. The time interval between two business attribute times is the effective time spent. When the beginning and end labels of the line are on the same line and the date and time period to be included in the calculation, i.e., rn_start = rn_end = 1 and is_compute_final = 1, the effective time spent in that line is equal to the time interval between business attribute time 1 and business attribute time 2.
[0098] ② After excluding case 1, if it is the beginning of the row containing the smallest unit and the date and time period to be included in the calculation, i.e. rn_start=1 and is_compute_final=1, the effective time to be calculated for that row is equal to the time interval between the end of the time period in which the row is located and the business attribute time 1.
[0099] ③ After excluding case 1, if it is the end of the row where the smallest unit is located and the date and time period is to be included in the calculation, i.e. rn_end = 1 and is_compute_final = 1, the effective time consumption to be calculated for that row is equal to the time interval between the start time of the time period in which the row is located and the business attribute time 2.
[0100] ④ After excluding the above situations, if the date time period corresponding to the row containing the smallest unit is to be included in the calculation, i.e., is_compute_final = 1, then the effective consumption time corresponding to that row is directly taken as the consumption time, i.e., the time_consum field (unit: hours).
[0101] ⑤ Set the rest to 0.
[0102] Finally, group the data according to the smallest unit to be analyzed, and sum the effective time spent to obtain the time efficiency of each unit.
[0103] For example: The following is an example of calculating the delivery time of the company's shipment business. Business attribute time 1: => Flow to logistics time _ Outbound order creation time, business attribute time 2: => Pickup time.
[0104] Based on the above embodiments, this application realizes the automatic determination of timeliness based on working days and specified time periods, and solves the problem of time consumption in order processing, delivery and other processes involving whether it is a working day and working hours, i.e. delivery time, whether delivery is overdue, and whether logistics delivery to customers is overdue.
[0105] like Figure 6 As shown, an apparatus for calculating timeliness based on a specified date and time period is provided, the apparatus comprising:
[0106] The first configuration module is used to configure a specified date configuration file, which includes date fields and date field calculation tags.
[0107] The second configuration module is used to configure a configuration file for a specified time period. The configuration file for the specified time period includes the start time of the specified time period, the end time of the specified time period, the duration of the specified time period, and the calculation flag for the specified time period.
[0108] The first processing module is used to perform a Cartesian union on the specified date configuration file and the specified time period configuration file to obtain a first intermediate result set, and store the first intermediate result set in a first intermediate table.
[0109] The second processing module is used to perform self-associative mapping on the first intermediate result set to obtain a second intermediate result set, and store the second intermediate result set into a second intermediate table.
[0110] The third processing module is used to associate and map the time-sensitive business data to be calculated with the second intermediate table to obtain the intermediate table of time-sensitive business data to be calculated.
[0111] The fourth processing module is used to process the intermediate table of time-sensitive business to be calculated, and obtain the time-sensitive information of the time-sensitive business table.
[0112] Based on the above embodiments, the first processing module is specifically used to perform a Cartesian combination of the date field in the specified date configuration file and the start time of the specified time period in the specified time period configuration file to generate the first intermediate result set. The first intermediate result set includes a start date and time field, a date field calculation flag, a specified time period calculation flag, the duration, a date and time period calculation flag, and a sorting number.
[0113] The value of the date time period calculation flag is determined based on the date calculation flag and the specified time period calculation flag.
[0114] Based on the start date and time field, the first intermediate result set is sorted to determine the sorting number of each intermediate result in the first intermediate result set.
[0115] Based on the above embodiments, the second processing module is further configured to calculate a marker based on the date field, and associate the next intermediate result in the first intermediate result set with the previous intermediate result to obtain the second intermediate result set. The second intermediate result set includes the start date and time, the end date and time, the date field calculation marker, the specified time period calculation marker, the duration, and the date time period calculation marker.
[0116] This application provides a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the steps of any of the methods described in the above technical solutions.
[0117] This application provides an electronic device, including: a memory storing a computer program thereon; and a processor for executing the computer program in the memory to implement the steps of any of the methods described in the above technical solutions.
[0118] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0119] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0120] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0121] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0122] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0123] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0124] Based on this understanding, the present invention can implement all or part of the processes in the methods of the above embodiments, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0125] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
[0126] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for calculating timeliness based on a specified date and time period, characterized in that, The method includes: The timeliness configuration program configures a specified date configuration file, which includes date fields and date field calculation tags; The time-efficiency configuration program configures a configuration file for a specified time period, which includes the start time of the specified time period, the end time of the specified time period, the duration of the specified time period, and a calculation flag for the specified time period. The time-sensitive configuration program performs a Cartesian union on the specified date configuration file and the specified time period configuration file to obtain a first intermediate result set, and stores the first intermediate result set in a first intermediate table; The timeliness configuration program performs a self-associative mapping on the first intermediate result set to obtain a second intermediate result set, and stores the second intermediate result set in a second intermediate table; The timeliness configuration program associates and maps the timeliness business data to be calculated with the second intermediate table to obtain the intermediate table of timeliness business data to be calculated. The timeliness configuration program processes the intermediate table of the business to be calculated to obtain the timeliness information of the business to be calculated.
2. The method of computing time limits based on specified date and time period as claimed in claim 1 wherein, The time-sensitivity configuration program performs a Cartesian union on the specified date configuration file and the specified time period configuration file to obtain a first intermediate result set, and stores the first intermediate result set in a first intermediate table, specifically including: The time-efficiency configuration program performs a Cartesian combination of the date field in the specified date configuration file and the start time of the specified time period in the specified time period configuration file to generate the first intermediate result set. The first intermediate result set includes the start date and time field, the date field calculation flag, the specified time period calculation flag, the duration, the date and time period calculation flag, and the sorting number. The timeliness configuration program calculates a marker based on the date field and a marker for a specified time period, and determines the value of the marker for the date and time period. The timeliness configuration program sorts the first intermediate result set according to the start date and time field to determine the sorting number of each intermediate result in the first intermediate result set.
3. The method of calculating time limits based on specified dates and time periods according to claim 2, characterized in that, The timeliness configuration program performs a self-associative mapping on the first intermediate result set to obtain a second intermediate result set, and stores the second intermediate result set in a second intermediate table, specifically including: The timeliness configuration program calculates a marker based on the date field. The second intermediate result set is obtained by associating the next intermediate result in the first intermediate result set with the previous intermediate result. The second intermediate result set includes the start date and time, the end date and time, the date field calculation marker, the specified time period calculation marker, the duration, and the date and time period calculation marker.
4. The method of calculating time limits based on specified dates and time periods according to claim 3, wherein, The timeliness configuration program associates and maps the timeliness-to-be-calculated business data with the second intermediate table to obtain the intermediate table for the business timeliness-to-be-calculated, specifically including: The timeliness configuration program determines whether the time period between the first time attribute and the second time attribute of each business data record in the timeliness business data to be calculated is cut into the smallest unit; If so, then based on the first time attribute and the second time attribute in the business data record, determine the multiple intermediate result records in the corresponding second intermediate table; Otherwise, based on the first time attribute and the second time attribute in the business data record, determine the intermediate result record in the corresponding second intermediate table; The timeliness configuration program extracts the intermediate result records from the second intermediate table corresponding to all the business data records to obtain the intermediate table of the business timeliness to be calculated.
5. The method of calculating time limits based on specified dates and time periods according to claim 4, characterized in that, The timeliness configuration program processes the intermediate table of the business to be timed to obtain the timeliness information of the business table, specifically including: The timeliness configuration program sorts the intermediate table of timeliness to be calculated based on the start date and time in the intermediate table of timeliness to be calculated, and obtains the first sort number in the intermediate table of timeliness to be calculated. The timeliness configuration program sorts the intermediate table of timeliness to be calculated based on the end date and time in the intermediate table of timeliness to be calculated, and obtains the second sort number in the intermediate table of timeliness to be calculated. When the time period configuration program is in the business data record of the business data to be calculated, the time period between the first time attribute and the second time attribute belongs to the time period between the start date and end date of the intermediate record of the business data in the intermediate table of the business data to be calculated, that is, the first sort number and the second sort number corresponding to the intermediate record of the business data in the intermediate table of the business data to be calculated are both first preset values, and the date time period calculation mark of the intermediate record of the business data is a second preset value, the effective time spent by the intermediate record of the business data is the time interval between the first time attribute and the second time attribute; Otherwise, when the first time attribute of the business data record in the business data to be calculated is the start date and time of the intermediate record of the business time in the intermediate table of the business time to be calculated, and the value of the date time period calculation mark of the intermediate record of the business time is the second preset value, that is, the first sort number corresponding to the intermediate record of the business time in the intermediate table of the business time to be calculated is the first preset value, and the date time period calculation mark of the intermediate record of the business time is the second preset value, the effective consumption time of the intermediate record of the business time is the time interval between the end date and time of the intermediate record of the business time and the first time attribute; Otherwise, when the second time attribute of the business data record in the business data to be calculated is the end date and time of the intermediate record of the business in the intermediate table of the business to be calculated, and the value of the date time period calculation mark of the intermediate record of the business is the second preset value, that is, the second sort number corresponding to the intermediate record of the business in the intermediate table of the business to be calculated is the first preset value, and the date time period calculation mark of the intermediate record of the business is the second preset value, the effective consumption time of the intermediate record of the business is the time interval between the start date and time of the intermediate record of the business and the second time attribute; Otherwise, when the date time period of the intermediate record of the time-sensitive service is calculated and marked as the second preset value, the effective consumption time of the intermediate record of the time-sensitive service is the consumption duration of the intermediate record of the time-sensitive service; Based on the effective consumption time in the intermediate table of the time-sensitive business to be calculated, the time-sensitive information of the time-sensitive business table is obtained.
6. An apparatus for calculating a time limit based on a specified date and time period, comprising: The device includes: The first configuration module is used to configure a specified date configuration file, which includes date fields and date field calculation tags. The second configuration module is used to configure a specified time period configuration file, which includes the start time of the specified time period, the end time of the specified time period, the duration of the specified time period, and the calculation flag of the specified time period. The first processing module is used to perform a Cartesian union on the specified date configuration file and the specified time period configuration file to obtain a first intermediate result set, and store the first intermediate result set in a first intermediate table; The second processing module is used to perform self-associative mapping on the first intermediate result set to obtain a second intermediate result set, and store the second intermediate result set into a second intermediate table; The third processing module is used to associate and map the time-sensitive business data to be calculated with the second intermediate table to obtain the intermediate table of time-sensitive business data to be calculated. The fourth processing module is used to process the intermediate table of time-sensitive business to be calculated, and obtain the time-sensitive information of the time-sensitive business table.
7. The device for calculating time limits based on specified dates and time periods according to claim 6, characterized in that, The first processing module is specifically used to perform a Cartesian combination of the date field in the specified date configuration file and the start time of the specified time period in the specified time period configuration file to generate the first intermediate result set. The first intermediate result set includes a start date and time field, a date field calculation flag, a specified time period calculation flag, the duration, a date and time period calculation flag, and a sorting number. The value of the date time period calculation flag is determined based on the date field calculation flag and the specified time period calculation flag; Based on the start date and time field, the first intermediate result set is sorted to determine the sorting number of each intermediate result in the first intermediate result set.
8. The device for calculating time limits based on specified dates and time periods according to claim 7, characterized in that, The second processing module is specifically used to calculate a marker based on the date field, and to associate the next intermediate result in the first intermediate result set with the previous intermediate result to obtain the second intermediate result set. The second intermediate result set includes the start date and time, the end date and time, the date field calculation marker, the specified time period calculation marker, the duration, and the date time period calculation marker.
9. A computer-readable storage medium having stored thereon computer program instructions, wherein, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 1 to 5.
10. An electronic device, comprising: include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Workday number determination method and device
CN113469651A
System and method of managing computing resources for detection of malicious files based on machine learning model
EP3474175A1