Method and system for calculating delayed refund time of ordering system in business time

By constructing a circular queue to identify business status and distance values, the problem of refund time not taking into account merchant business status in the ordering system was solved, enabling accurate calculation of refund time during business hours and avoiding economic risks outside of business hours.

CN120875890AActive Publication Date: 2025-10-31LICHU BUSINESS
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202511376116.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-10-31
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

The existing ordering system does not take into account the merchant's business status when calculating the automatic refund time, which may cause the refund time to fall outside the merchant's business hours, resulting in economic risks.

Method used

Construct a circular queue to identify the business status at each moment and assign a distance value to each business node. By searching and accumulating the distance values ​​in the circular queue, the automatic refund time within the business hours can be quickly calculated.

Benefits of technology

This ensures that refunds are processed within the merchant's business hours, avoiding economic risks outside of business hours, and enabling fast and accurate calculation of refund timing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120875890A_ABST
    Figure CN120875890A_ABST
Patent Text Reader

Abstract

The invention provides a calculation method and system for a delayed refund moment of an ordering system in a business time, and the method comprises the steps: constructing a circular queue which comprises a plurality of nodes, each node represents a moment, marking the business state of each node, endowing each business node with a distance value, and carrying out the calculation of the delayed refund moment of the ordering system in the business time; the distance value represents the duration from the business node to the next business node; searching a first business node after the refund application time of the user in the circular queue, and converting the automatic refund delay duration into m time intervals; and in the circular queue, starting to traverse m business nodes backwards from the first business node, obtaining and accumulating the distance value of each traversal business node, and calculating the automatic refund time of the ordering system according to the distance accumulated value at the refund application time of the user. By constructing the circular queue to identify the business state of each moment and the distance to the next business node, the moment of automatic refund in the business time can be quickly calculated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the catering industry, and more specifically, to a method and system for calculating the delayed refund time during business hours in an ordering system. Background Technology

[0002] For the ordering system, if a user requests a refund and the merchant doesn't process it, the system will automatically issue a refund. Specifically, the system sets a delay period for automatic refunds. After this set delay, the system will automatically refund the user. For example, if a user requests a refund at 7:00 AM, and the system's refund delay period is set to 5 hours, the system will automatically refund the user at 12:00 PM.

[0003] This refund method does not take into account the merchant's business status. For example, if a user requests a refund at 7:00 AM, but the merchant's opening time is 8:00 AM, the calculated 5-hour delay for automatic refunds includes the merchant's off-hours. Similarly, if the refund time calculated based on the 5-hour delay is 12:30 PM, this is outside the merchant's business hours. Therefore, when the system deducts the refund from the merchant's account, the merchant may not be able to check in time because they are not operating, potentially leading to financial risks. Summary of the Invention

[0004] This invention addresses the technical problems existing in the prior art by providing a method and system for calculating the delayed refund time during business hours in an ordering system, which can quickly calculate the automatic refund time during business hours.

[0005] According to a first aspect of the present invention, a method for calculating the delayed refund time of an ordering system during business hours is provided, comprising: Step 1: Construct a circular queue. The circular queue records the business hours within a business cycle. The circular queue includes multiple nodes, each node representing a moment in time. The time interval between any two nodes is the same. Each node is identified: a 0 indicates that the merchant is in a closed state at that moment, and a 1 indicates that the merchant is in a business state at that moment. Nodes identified as 1 are designated as business nodes, and nodes identified as 0 are designated as non-business nodes. Each business node is assigned a distance value, which represents the time from the business node to the next business node. Step 2: Receive the user's refund request and obtain the time of the user's refund request; Step 3: Locate the first business node in the circular queue after the user's refund request time; Step 4: Convert the automatic refund delay time of the ordering system into m time intervals, where m is a positive integer; Step 5: In the circular queue, starting from the starting business node, traverse m business nodes backward and obtain the distance value of each business node traversed. Step 6: Sum the distance values ​​of all traversed business nodes to obtain the cumulative distance value; Step 7: Calculate the automatic refund time of the ordering system based on the user's refund request time and the accumulated distance value.

[0006] According to a second aspect of the present invention, a calculation system for delaying refund times during business hours in an ordering system is provided, comprising: The module is used to construct a circular queue, which records the business hours within a business cycle. The circular queue includes multiple nodes, each node representing a moment in time. The time interval between any two nodes is the same. Each node is identified: a 0 indicates that the merchant is in a closed state at that moment, and a 1 indicates that the merchant is in a business state at that moment. Nodes identified as 1 are designated as business nodes, and nodes identified as 0 are designated as non-business nodes. Each business node is assigned a distance value, which represents the time from the business node to the next business node. The receiving module is used to receive users' refund requests and obtain the time of the user's refund request. The lookup module is used to find the first business node after the time of the user's refund application in the circular queue; The conversion module is used to convert the automatic refund delay time of the ordering system into m time intervals, where m is a positive integer; The traversal module is used to traverse m business nodes backward from the starting business node in the circular queue and obtain the distance value of each business node traversed. The accumulation module is used to sum the distance values ​​of all traversed business nodes to obtain the cumulative distance value; The calculation module is used to calculate the automatic refund time of the ordering system based on the user's refund application time and the accumulated distance value.

[0007] This invention provides a method and system for calculating the delayed refund time during business hours in a food ordering system. It constructs a circular queue to identify the business status at each moment and assigns a distance value to each business node, representing the time from that node to the next. Based on the user's refund request time, it only needs to find the distance value of the business node after the user's refund request time in the circular queue, and accumulate these distance values ​​to quickly calculate the time for automatic refund during business hours. This invention, by constructing a circular queue and identifying the business status and distance value to the next business node at each moment, ensures that the refund delay time is the same as the delay time of the merchant's business hours, excluding non-business hours, thus quickly calculating the time for automatic refund to the user during business hours. Attached Figure Description

[0008] Figure 1 A flowchart illustrating a method for calculating delayed refund times during business hours in an ordering system, as provided in one embodiment of the present invention; Figure 2 This is a flowchart illustrating the construction of a circular queue based on merchant business configuration data according to one embodiment of the present invention; Figure 3 This is a structural block diagram of a system for calculating delayed refund times during business hours in an ordering system, as provided in one embodiment of the present invention. Detailed Implementation

[0009] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined with each other to form feasible technical solutions. Such combinations are not constrained by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0010] Figure 1 A flowchart illustrating a method for calculating delayed refund times during business hours in an ordering system, as provided in one embodiment of the present invention, is shown below. Figure 1 As shown, the method includes the following steps: Step 1: Construct a circular queue. The circular queue records the business hours within a business cycle. The circular queue includes multiple nodes, each node representing a moment in time. The time interval between any two nodes is the same. Each node is identified: a 0 indicates that the merchant is in a closed state at that moment, a 1 indicates that the merchant is in a business state at that moment, and a 2 indicates that the moment is the expected refund time. Nodes identified as 1 are designated as business nodes, nodes identified as 0 are designated as non-business nodes, and nodes identified as 2 are designated as refund nodes. Each business node is assigned a distance value, which represents the time from that business node to the next business node.

[0011] Understandably, a circular queue is first constructed to model the business hours of merchants within a period. In this embodiment, a period is one week. The week is divided into many nodes, with each node representing a moment in time; in this embodiment, one node represents one minute. Therefore, a week has 7 × 24 × 60 = 10080 minutes, corresponding to 10080 nodes in the circular queue.

[0012] The merchant's business status is identified for each node in the circular queue. A node with a flag of 0 indicates that the merchant is closed, a node with a flag of 1 indicates that the merchant is open, and a flag of 2 indicates that the expected refund time is approaching. Nodes marked with 2 are called refund nodes, nodes marked with 1 are called open nodes, and nodes marked with 0 are called non-open nodes. For each open node, a distance value is assigned, representing the time interval between the current open node and the next open node.

[0013] In one embodiment of the present invention, step 1, constructing a circular queue, includes: Step 11: Obtain the merchant's business configuration data from the ordering system. The business configuration data includes the merchant's business days and business hours within a business cycle. A business cycle is one week. The business days refer to Monday to Sunday, and the business hours refer to the merchant's business hours within each day.

[0014] Understandably, step 1 constructs the data structure of the circular queue. This step is based on the merchant business configuration data configured on the ordering system. The business configuration data mainly includes the merchant's business dates and business hours within a business cycle.

[0015] Business day configuration: Monday is represented by 1, Tuesday by 2, and so on, with each date joined together by a comma. For example: 1,3,4,5,6,7 means that the business is open from Monday to Sunday, and closed on Tuesday.

[0016] Business hours configuration: Time uses mm:ss format. Two times constitute a time period, connected by a "-" character. The system supports configuring multiple time periods, which are concatenated with ",". For example: 06:00-09:30, 11:30-14:00, 16:40-20:30, 22:00-01:30.

[0017] Step 12: Decompose the business date and business time period according to the time interval to obtain the business status of the merchant at each moment.

[0018] Understandably, the business status of a merchant at any given moment is obtained by breaking down the pre-configured business dates and time periods. The configured business time periods represent the time during which a merchant should be in an operational state. Each business time period is then broken down into minutes, and the business status of the merchant is assigned as 1 for each minute.

[0019] Step 13: Based on the business status of the merchants at each time point obtained from the decomposition, mark the business status of each node in the circular queue to construct the circular queue.

[0020] In one embodiment of the present invention, step 13, which involves identifying the business status of each node in the circular queue based on the decomposed business status of the merchant at each moment to construct the circular queue, includes: Step 131: Initialize the identifier of each node in the circular queue to 0, and read the merchant business configuration data.

[0021] Understandably, when initializing the circular queue, the identifier of each node in the circular queue is initialized to 0, and then the merchant's business configuration data is read.

[0022] Step 132: Perform loop processing on the business date and business time period configured in the merchant business configuration data, and calculate the offset of each moment in the loop queue.

[0023] In one embodiment of the present invention, step 132 specifically includes: Initialize the business date and business time of the first node in the circular queue; Based on the stated business hours, obtain each business hour; Calculate the date offset between the business date of each business hour and the business date of the first node, and within the business date, calculate the intraday offset between each business hour and the business hour of the first node; The date offset and the intraday offset are added together to obtain the offset of each business hour in the circular queue.

[0024] Among them, see Figure 2 First, initialize the business date and business time of the first node in the circular queue. By default, the business date of the first node in the circular queue is Monday and the business time is 0:00.

[0025] For each business hour within the business hours, calculate the date offset between the business date of each business hour and the business date of the first node, and calculate the intraday offset between each business hour and the business hour of the first node within the business date. Add the date offset and the intraday offset to obtain the offset between each business hour and the business hour of the first node.

[0026] For example, the offset is calculated in minutes, calculating the date offset between the business date of each business hour and the business date of the first node, including: offset1= ({week_num1} - 1) × 24 × 60; Here, offset1 is the date offset, and week_num1 is the business day for each business hour.

[0027] The calculation of the intraday offset between each business hour and the business hour of the first node within the business day includes: offset2={current_hour1} × 60 + {current_minute1}; Here, offset2 is the intraday offset, current_hour1 is the hour of each business hour, and current_minute1 is the minute of each business hour.

[0028] The first node in the circular queue is set to Monday 0:00; The step of adding the date offset and the intraday offset to obtain the offset of each business hour in the circular queue includes: offset = offset1 + offset2; Here, offset is the offset of each business hour in the circular queue.

[0029] Step 133: Locate the corresponding node in the circular queue based on the offset, associate the node with the time it represents, and set the node's identifier to 1.

[0030] Understandably, the offset between each business time and the business time of the first node is calculated, and the corresponding node is found in the circular queue based on the offset. For example, if the offset between the current business time and the time of the first node is 1000, then the node corresponding to the current business time in the circular queue is the 1001st node. The identifier of the 1001st node is set to 1, indicating that the node is a business node.

[0031] Step 134: Process all time points sequentially, mark all business nodes in the circular queue as 1, and mark the other nodes in the circular queue as 0.

[0032] Understandably, each business hour within the configured merchant business hours is processed accordingly, thus identifying the business status of all business nodes in the circular queue. Specifically, each business hour within a merchant's business hours is identified as 1, while other nodes are identified as 0.

[0033] Step 2: Receive the user's refund request and obtain the time of the user's refund request.

[0034] Step 3: Find the first business node after the user's refund request time in the circular queue.

[0035] In one embodiment of the present invention, after obtaining the time when the user requests a refund, the offset between the time when the user requests a refund and the first node in the circular queue is calculated: offset '= ({week_num2} - 1) × 24 × 60 + ({current_hour2} × 60 +{current_minute2}); Here, week_num2 is the business day when the user applies for a refund, current_hour2 is the hour when the user applies for a refund, current_minute2 is the minute when the user applies for a refund, and the first node in the circular queue is set to Monday 0:00.

[0036] Based on the offset between the user's refund request time and the first node in the circular queue, find the node corresponding to the user's refund request time in the circular queue, and then find the first business node after that node.

[0037] Among them, the time when the user submitted the refund request in the ordering system is obtained, that is, the time when the user submitted the refund request in the ordering system, i.e., the day of the week, the hour and minute.

[0038] Based on the time the user requests a refund, find the first business node in the circular queue after the user's refund request time.

[0039] It should be noted that the time a user requests a refund may not be within the merchant's business hours. In this embodiment of the invention, it is necessary to find the first business node after the user's refund request time in the circular queue. Specifically, if the node corresponding to the user's refund request time is a business node, then that business node is taken as the first business node; if the node corresponding to the user's refund request time is not a business node, then the first business node after that node is searched.

[0040] Step 4: Convert the automatic refund delay time of the ordering system into m time intervals, where m is a positive integer.

[0041] The automatic refund delay time of the ordering system is determined by a combination of the automatic refund delay time preset in the ordering system and the user refund delay time adjustment amount.

[0042] The automatic refund delay time preset in the ordering system is a fixed value n, while the user refund delay time adjustment amount c is determined according to the refund amount U and the user type R, which includes member users and ordinary users.

[0043] The calculation method for the user refund delay time adjustment amount c is as follows: ; ; ; in The expression indicates rounding down to the nearest integer. f(U) represents the user refund delay time adjustment amount corresponding to the refund amount U, and g(R) represents the user refund delay time adjustment amount corresponding to the user type R.

[0044] As can be seen from the formula above, membership type and refund amount affect the amount of time required to adjust the refund time. The higher the amount, the longer the refund time. Regular users take longer to get refunds than members. Overall, the maximum adjustment time does not exceed 7 hours.

[0045] Understandably, the ordering system sets a delay time n for automatic refunds after a user requests a refund, for example, 4 hours. This delay is then combined with the current correction amount c to obtain the total refund delay time, which is then converted into m time intervals. As shown above, the time interval between each two nodes is 1 minute. Therefore, the total refund delay time is converted into m minutes. Specifically: m = (n + c) × 60; Where n is the pre-set automatic refund delay time of the ordering system, in hours; c is the correction amount, in hours.

[0046] Step 5: In the circular queue, starting from the starting business node, traverse m business nodes backward and obtain the distance value of each business node traversed.

[0047] Understandably, the above steps find the first business node after the user applies for a refund and the m time intervals corresponding to the total refund delay time. Starting from the first business node, the system traverses m business nodes backward in the circular queue, skipping non-business nodes, and obtains the distance value of each business node traversed.

[0048] Step 6: Sum the distance values ​​of all the business nodes traversed to obtain the cumulative distance value.

[0049] Step 7: Calculate the automatic refund time of the ordering system based on the user's refund request time and the accumulated distance value.

[0050] The process involves summing the distance values ​​of each business node obtained through iteration to obtain a cumulative distance value, which represents the business duration corresponding to the refund delay. Finally, the time when the user requests a refund is added to the cumulative distance value to obtain the automatic refund time from the ordering system.

[0051] It should be noted that, in one embodiment of the present invention, the business node corresponding to the automatic refund time is modified and marked as the refund node, and the distance value of the previous business node of the current refund node is modified to the original distance value plus the distance value of the current refund node.

[0052] In this method, the business node corresponding to the calculated automatic refund time is marked as the refund node. Since multiple users may submit refund requests within the same minute, this method can temporarily change the business node to a refund node. When the next user submits a refund request, this refund node can be skipped, avoiding the problem of having to process multiple refund requests within the same minute.

[0053] Once a refund is completed, the refund node is automatically changed to a business node, and the distance value of the previous business node is updated and restored so that a refund can be processed the next time a user applies for a refund.

[0054] See Figure 3 The present invention also provides a calculation system for the delayed refund time of an ordering system during business hours, the system comprising: The construction module 301 is used to construct a circular queue, which records the business hours within a business cycle. The circular queue includes multiple nodes, each node representing a moment in time. The time interval between any two nodes is the same. Each node is identified: an identifier of 0 indicates that the merchant is in a closed state at that moment, and an identifier of 1 indicates that the merchant is in a business state at that moment. Nodes with an identifier of 1 are designated as business nodes, and nodes with an identifier of 0 are designated as non-business nodes. Each business node is assigned a distance value, which represents the time from the business node to the next business node. The receiving module 302 is used to receive the user's refund request and obtain the time of the user's refund request; The lookup module 303 is used to find the first business node after the time of the user's refund application in the circular queue; The conversion module 304 is used to convert the automatic refund delay time of the ordering system into m time intervals, where m is a positive integer. The traversal module 305 is used to traverse m business nodes backward from the starting business node in the circular queue and obtain the distance value of each business node traversed. The accumulation module 306 is used to accumulate the distance values ​​of all traversed business nodes to obtain the accumulated distance value; The calculation module 307 is used to calculate the automatic refund time of the ordering system based on the user's refund application time and the accumulated distance value.

[0055] It is understood that the calculation system for delayed refund time during business hours provided by the present invention corresponds to the calculation method for delayed refund time during business hours provided by the aforementioned embodiments. The relevant technical features of the calculation system for delayed refund time during business hours can be referred to the relevant technical features of the calculation method for delayed refund time during business hours, and will not be repeated here.

[0056] This invention provides a method and system for calculating the delayed refund time during business hours in a food ordering system. By constructing a circular queue to identify the business status at each moment and assigning a distance value to each business node to represent the time from that node to the next, the system quickly calculates the automatic refund time during business hours by searching for the distance values ​​of business nodes after the user's refund request time in the circular queue and accumulating these distance values. This invention, by constructing a circular queue, ensures that the refund delay time is equal to the delay time of the merchant's business hours, excluding non-business hours, thus quickly calculating the automatic refund time for the user during business hours.

[0057] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0058] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0059] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0060] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0061] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0062] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0063] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for calculating the delayed refund time during business hours in a food ordering system, characterized in that, include: Step 1: Construct a circular queue. The circular queue records the business hours within a business cycle. The circular queue includes multiple nodes, each node representing a moment in time. The time interval between any two nodes is the same. Each node is identified: a 0 indicates that the merchant is in a closed state at that moment, and a 1 indicates that the merchant is in a business state at that moment. Nodes identified as 1 are designated as business nodes, and nodes identified as 0 are designated as non-business nodes. Each business node is assigned a distance value, which represents the time from the business node to the next business node. Step 2: Receive the user's refund request and obtain the time of the user's refund request; Step 3: Locate the first business node in the circular queue after the user's refund request time; Step 4: Convert the automatic refund delay time of the ordering system into m time intervals, where m is a positive integer; Step 5: In the circular queue, starting from the first business node, traverse m business nodes backward and obtain the distance value of each business node traversed. Step 6: Sum the distance values ​​of all traversed business nodes to obtain the cumulative distance value; Step 7: Calculate the automatic refund time of the ordering system based on the user's refund request time and the accumulated distance value.

2. The method for calculating the delayed refund time during business hours in the ordering system according to claim 1, characterized in that, Step 1, constructing a circular queue, includes: Obtain merchant business configuration data from the ordering system. The merchant business configuration data includes the merchant's business days and business hours within a business cycle. A business cycle is one week. The business days refer to Monday to Sunday, and the business hours refer to the merchant's business hours within each day. Based on the business date and business time period, the business status of the merchant at each moment is obtained by decomposing the data according to time intervals. Based on the business status of the merchants at each time point obtained from the decomposition, the business status of each node in the circular queue is identified to construct the circular queue.

3. The method for calculating the delayed refund time during business hours in the ordering system according to claim 2, characterized in that, The step of identifying the business status of each node in the circular queue based on the business status of the merchant at each time point obtained from the decomposition, in order to construct the circular queue, includes: Initialize the identifier of each node in the circular queue to 0, and read the merchant's business configuration data; The system iterates through the business dates and time periods configured in the merchant's business configuration data, calculating the offset of each moment in the loop queue. Locate the corresponding node in the circular queue based on the offset, associate the node with the time it represents, and set the node's identifier to 1; Process all time points sequentially, marking all business nodes in the circular queue as 1 and marking the other nodes in the circular queue as 0.

4. The method for calculating the delayed refund time during business hours in the ordering system according to claim 3, characterized in that, The process of iteratively processing the business dates and business time periods configured in the merchant's business configuration data, and calculating the offset of each moment in the circular queue, includes: Initialize the business date and business time of the first node in the circular queue; Based on the stated business hours, obtain each business hour; Calculate the date offset between the business date of each business hour and the business date of the first node, and within the business date, calculate the intraday offset between each business hour and the business hour of the first node; The date offset and the intraday offset are added together to obtain the offset of each business hour in the circular queue.

5. The method for calculating the delayed refund time during business hours in the ordering system according to claim 4, characterized in that, The time interval is 1 minute, and each node in the circular queue represents one minute.

6. The method for calculating the delayed refund time during business hours in the ordering system according to claim 5, characterized in that, The calculation of the date offset between the business date of each business hour and the business date of the first node includes: offset1= ({week_num1} - 1) × 24 × 60; Where offset1 is the date offset, and week_num1 is the business day for each business hour; The calculation of the intraday offset between each business hour and the business hour of the first node within the business day includes: offset2={current_hour1} × 60 + {current_minute1}; Where offset2 is the intraday offset, current_hour1 is the hour of each business hour, and current_minute1 is the minute of each business hour; The first node in the circular queue is set to Monday 0:00; The step of adding the date offset and the intraday offset to obtain the offset of each business hour in the circular queue includes: offset = offset1 + offset2; Here, offset is the offset of each business hour in the circular queue.

7. The method for calculating the delayed refund time during business hours in the ordering system according to claim 5, characterized in that, Step 3, which involves searching the circular queue for the first business node after the user's refund request time, includes: Calculate the offset between the moment a user requests a refund and the first node in the circular queue: offset '= ({week_num2} - 1) × 24 × 60 + ({current_hour2} × 60 +{current_minute2}); Where week_num2 is the business day when the user applies for a refund, current_hour2 is the hour when the user applies for a refund, current_minute2 is the minute when the user applies for a refund, and the first node in the circular queue is set to Monday 0:

00. Based on the offset between the time a user applies for a refund and the first node in the circular queue, find the corresponding node in the circular queue, and then find the first business node after that node. Step 4 involves converting the automatic refund delay time of the ordering system into m time intervals, including: m = (n + c) × 60; Where n is the automatic refund delay time preset by the ordering system, and c is the user refund delay time adjustment amount, in hours; Specifically, the user refund delay correction amount c is calculated based on the refund amount U requested by the user and the user type R: ; ; ; in The expression indicates rounding down to the nearest integer. f(U) represents the user refund delay time adjustment amount corresponding to the refund amount U, and g(R) represents the user refund delay time adjustment amount corresponding to the user type R.

8. A system for calculating the delayed refund time during business hours in a food ordering system, characterized in that, include: The module is used to construct a circular queue, which records the business hours within a business cycle. The circular queue includes multiple nodes, each node representing a moment in time. The time interval between any two nodes is the same. Each node is identified: a 0 indicates that the merchant is in a closed state at that moment, and a 1 indicates that the merchant is in a business state at that moment. Nodes identified as 1 are designated as business nodes, and nodes identified as 0 are designated as non-business nodes. Each business node is assigned a distance value, which represents the time from the business node to the next business node. The receiving module is used to receive users' refund requests and obtain the time of the user's refund request. The lookup module is used to find the first business node after the time of the user's refund application in the circular queue; The conversion module is used to convert the automatic refund delay time of the ordering system into m time intervals, where m is a positive integer; The traversal module is used to traverse m business nodes from the first business node in the circular queue and obtain the distance value of each business node traversed. The accumulation module is used to sum the distance values ​​of all traversed business nodes to obtain the cumulative distance value; The calculation module is used to calculate the automatic refund time of the ordering system based on the user's refund application time and the accumulated distance value.

Citation Information

Patent Citations

  • Flexible and extensible user-defined working calendar based work flow scheduling framework

    CN102184483A

  • Store operation state judgment method and apparatus, and store search method and apparatus

    CN107092641A

  • Mobile terminal intelligent ordering system based on smart kitchen

    CN108447005A

  • Business starting and ending time detection method based on standard template and storage medium

    CN111583063A

  • Settlement message service data processing system and method

    CN112037067A