Business processing method and device, electronic equipment and storage medium
By setting the service detection cycle and converting the server time zone time, the execution time deviation problem in cross-time zone business processing is solved, and batch processing of service requests in different time zones is realized, accuracy and efficiency are improved, and costs are reduced.
Patent Information
- Application Number
- CN202410890634.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-12-17
AI Technical Summary
Business processing across time zones causes execution time deviations due to time zone differences, and the accurate processing of services cannot be guaranteed. Existing solutions require the deployment of a large number of business execution services, resulting in resource tightness and performance degradation.
By setting the service detection cycle, the server time zone time is automatically converted into the time zone time corresponding to each service request, determining whether to execute the service request, and realizing batch processing of different time zones.
Improve the accuracy and efficiency of business processing, reduce costs, and avoid missed processing of business requests and resource shortage.
Smart Images

Figure CN119154980A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and specifically to a business processing method, device, electronic device and storage medium. Background Art
[0002] With the development of communication technology and global economic integration, the demand for cross-national and cross-time zone services is increasing. However, for cross-time zone services, when executing the services, the time zone of the device that sends the service request is different from the time zone of the device that processes the service request, which may cause a deviation between the actual execution time of the service and the original execution time of the service, making it impossible to ensure accurate processing of the service. Summary of the invention
[0003] The embodiments of the present application provide a business processing method, device, electronic device and storage medium, which can improve the accuracy of business processing.
[0004] In a first aspect, an embodiment of the present application provides a service processing method, including:
[0005] Obtain a first time zone corresponding to each of the multiple service requests, where the first time zone is a time zone where a device sending the service request is located, and the service request carries a service execution time corresponding to the first time zone of the service request;
[0006] Determining a service detection period according to the service execution time corresponding to each of the service requests;
[0007] Based on the service detection cycle, obtaining a first current time in a second time zone, where the second time zone is a time zone where a server for executing the multiple service requests is located;
[0008] Determine a time comparison result corresponding to each of the service requests; for each of the service requests, determine the time comparison result, including: based on the first time zone and the second time zone, determine that the first current time corresponds to a second current time in the first time zone; compare the second current time with the service execution time to obtain the time comparison result;
[0009] The service request is executed according to the time comparison result.
[0010] In a second aspect, an embodiment of the present application further provides a service processing device, including:
[0011] A first acquisition unit is used to acquire a first time zone corresponding to each of the multiple service requests, where the first time zone is the time zone where the device sending the service request is located, and the service request carries a service execution time corresponding to the first time zone of the service request;
[0012] A determination unit, configured to determine a service detection period according to a service execution time corresponding to each of the service requests;
[0013] A second acquisition unit, configured to acquire a first current time in a second time zone based on the service detection cycle, where the second time zone is a time zone where a server for executing the multiple service requests is located;
[0014] A comparison unit, configured to determine a time comparison result corresponding to each of the service requests; for each of the service requests, determining the time comparison result, including: determining, based on the first time zone and the second time zone, that the first current time corresponds to a second current time in the first time zone; and comparing the second current time with the service execution time to obtain the time comparison result;
[0015] A service execution unit is used to execute the service request according to the time comparison result.
[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; the processor loads instructions from the memory to execute steps in any one of the business processing methods provided in the embodiment of the present application.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the steps in any one of the business processing methods provided in the embodiment of the present application.
[0018] In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes computer instructions, and when the computer instructions are executed by a processor, the steps in any business processing method provided in the embodiment of the present application are implemented.
[0019] It can be seen that in the embodiment of the present application, every time the duration of a service detection cycle passes, the first current time of the second time zone is obtained, and the first current time is converted from the second time zone to the first time zone corresponding to each service request to obtain the second current time, so as to detect whether each service request has reached the corresponding execution time according to the second current time, and then determine whether to execute the service request, thereby realizing batch processing of service requests sent from different time zones at the same time, avoiding the tediousness of processing each service request separately immediately upon receiving the service request, and improving service processing efficiency. In addition, since the service detection cycle is determined according to the service execution time of each service request, the multiple service detection moments obtained according to the service detection cycle can cover the service execution time of all service requests, avoiding the omission of service requests and improving the accuracy of service processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1a It is a scenario diagram of the business processing method provided in the embodiment of the present application;
[0022] Figure 1b It is a flowchart of a business processing method provided by an embodiment of the present application;
[0023] Figure 2a The business processing method provided in the embodiment of the present application is applied in Figure 1a A schematic diagram of the process flow in the scenario shown;
[0024] Figure 2b It is an implementation flow chart of the service processing method provided in the embodiment of the present application applied to the timed refresh data service;
[0025] Figure 3 is a structural diagram of a service processing device provided in an embodiment of the present application;
[0026] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0028] In order to better illustrate the solution of the present application, the professional terms involved in this embodiment are first explained:
[0029] Time zone: It is an area on the surface of the earth divided according to longitude. Each time zone has its own standard time, so that all places in the same time zone use the same time. For example, the world is usually divided into 24 major time zones, each time zone differs by 15° longitude. As the longitude moves east or west, the time will increase or decrease accordingly. This division is to simplify the management and coordination of global time so that people can easily understand the time when crossing different regions.
[0030] It is understandable that different time zone division methods can result in different time zones. For example, the common legal time zone refers to the standard time area divided by a country or region according to longitude, also known as the standard time zone. Each country or region has its own legal time zone, which is used to unify the time within the country or region. These time zones are usually based on the standard time of the major cities or capitals of the country or region.
[0031] Embodiments of the present application provide a service processing method, device, electronic device, and storage medium.
[0032] The service processing device may be integrated in an electronic device, which may be a terminal, a server, or other equipment. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC); the server may be a single server or a server cluster consisting of multiple servers.
[0033] In some embodiments, the business processing device may also be integrated into multiple electronic devices. For example, the business processing device may be integrated into multiple servers, and the business processing method of the present application may be implemented by multiple servers.
[0034] In some embodiments, the server may also be implemented in the form of a terminal.
[0035] For example, refer to Figure 1a , Figure 1a A schematic diagram of an application scenario of the business processing method provided in an embodiment of the present application is shown.
[0036] like Figure 1a As shown, the application scenario may include a server 110 and multiple clients 120, wherein the server 110 may be connected to the multiple clients 120 through a network. The multiple clients 120 may be in different time zones. For example, please refer to Figure 1a ,exist Figure 1a The four different clients may be in time zone A, time zone B, time zone C, and time zone D, respectively, and the server 110 may be in a target time zone (hereinafter also referred to as a second time zone).
[0037] In actual applications, the server 110 can be used to receive service requests sent by the client 120 in each time zone, and execute the service request to complete the corresponding service. Optionally, the service may include but is not limited to: data refresh service, transaction service, conference service, etc.
[0038] However, for cross-time zone services, when executing the service request of the service, the actual execution time of the service may deviate from the original execution time of the service because the time zone of the client sending the service request is different from the time zone of the server processing the service request, thus failing to ensure accurate processing of the service. For example, a scheduled service needs to be executed at 6 o'clock every day in the time zone where the client is located. At this time, if the program is simply used to trigger the execution at 6 o'clock every day, it will cause service execution errors because there is a difference between the time zone where the server is located and the time zone where the client is located. For example, if the server time zone is the target time zone and the client time zone is time zone A, if the target time zone differs from time zone A by 1 hour, then when the server executes at 6 o'clock, time zone A is already 7 o'clock. At this time, the relevant data after the service execution that was originally required to be displayed to the client in time zone A at 6 o'clock is a full hour late.
[0039] In this regard, in the related technology, usually the server deploys related business execution services separately for clients in different time zones. Through the business execution service, the client's time zone and the server's time zone can be synchronized, and then the business initiated by the client is executed according to the synchronized time.
[0040] However, this approach requires the deployment of a large number of business execution services on the server, which not only requires a lot of time and manpower costs for deployment, but also requires separate processing of business requests initiated by clients in different time zones when the server runs a large number of business execution services, which may lead to server resource shortages and increased loads, and even lead to server performance degradation, prolonged response time, and even service crashes, thereby reducing business processing efficiency.
[0041] In view of this, the present embodiment proposes a business processing method, which sets a business detection cycle and automatically converts the time in the server time zone into the time in the time zone corresponding to each business request after each business detection cycle, and detects whether the converted time matches the business execution time corresponding to the corresponding business request to determine whether to execute the business request. In this way, only one set of services needs to be deployed on the server to batch process business requests initiated by clients in different time zones, which not only improves the accuracy of business processing, but also reduces the cost of business processing and improves business processing efficiency.
[0042] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0043] It can be understood that in the specific implementation of this application, data related to business requests, time zones, etc. are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0044] In this embodiment, a service processing method is provided, which can be applied to Figure 1b Servers in Figure 1b As shown, the specific process of the business processing method can be as follows:
[0045] 101. Obtain a first time zone corresponding to each service request among multiple service requests, where the first time zone is the time zone where a device sending the service request is located, and the service request carries a service execution time corresponding to the first time zone of the service request.
[0046] Among them, the business request refers to a request for instructing the server to complete the corresponding business. Therefore, the business request contains the information required by the server to complete the corresponding business. For example, in addition to carrying the business execution time corresponding to the first time zone corresponding to the business request, the business request may also carry the business operation type, business operation instruction, business data, request sending time, initiator information, etc. Among them, the operation type can be used to instruct the server to perform a specific operation, such as query, update, delete, etc. Business data is the data involved in the business operation. For example, for an update operation, the business data may be the data that needs to be updated; for a delete operation, the business data may be the data that needs to be deleted, etc. Among them, the initiator information may include the initiator address information, the initiator's identity authentication information, etc. Optionally, the identity authentication information may include a user name, a password, a token, etc.
[0047] The first time zone corresponding to the service request may be the device sending the service request (such as Figure 1a For example, please refer to the time zone of the client in the Figure 1a If the client sending the service request is a client in time zone A, then the first time zone corresponding to the service request is time zone A.
[0048] The service execution time in the service request is the time when the service request is executed, which is used to indicate when the service request starts to be executed. For example, for service request 1, the corresponding service execution time is 10:00 a.m., which means that service request 1 needs to be executed at 10:00 a.m. The service execution time corresponding to the service request refers to the time in the first time zone corresponding to the service request. For example, if the first time zone corresponding to the service request is time zone A, then the service execution time refers to the time in time zone A.
[0049] Optionally, a service request may also carry multiple service execution times. For example, service request 2 carries multiple service execution times (such as 10:00, 20:00, 22:00), indicating that the service request needs to instruct the server to execute the service request when the above multiple service execution times are reached.
[0050] In some implementations, in step 101, a specific implementation of obtaining the first time zone corresponding to each service request in the multiple service requests may include:
[0051] For each service request, the initiator address information can be extracted from the service request, and then the geographical area on the earth where the initiator of the service request is located can be determined based on the initiator address information, and then the time zone corresponding to the geographical area can be queried, and the time zone corresponding to the geographical area can be used as the first time zone corresponding to the service request.
[0052] In other implementations, a specific implementation of obtaining the first time zone corresponding to each service request in the multiple service requests may include:
[0053] The first location information (such as longitude, latitude, etc.) of the server used to process the business request and the second time zone of the server are obtained in advance. Then, for each business request, the second location information (such as longitude, latitude) of the device sending the business request can be extracted from the business request. Then, based on the first location information and the second geographic location information, the time difference between the location of the device sending the business request and the location of the server is calculated. Then, based on the second time zone and the above time difference, the first time zone corresponding to the business request is determined.
[0054] In some implementations, the multiple service requests may be service requests received by the server in a recent specified time period, for example, multiple service requests received by the server in the last 10 minutes.
[0055] In some implementations, in step 101, before executing the step of obtaining the first time zone corresponding to each of the multiple service requests, the method may further include:
[0056] Determine the service type corresponding to the service request.
[0057] If the service type is a specified service type, the step of obtaining a first time zone corresponding to each service request in the multiple service requests is performed.
[0058] Exemplarily, for example, the service type may include instant services and scheduled services, wherein the instant services refer to services that need to be processed and responded to immediately, for example, instant services may include message transmission services, video conferencing services, real-time data update services, etc. Among them, scheduled services refer to services that need to be executed at predetermined time intervals or specific time points, and such services usually involve regular tasks, automated processes or planned operations, for example, scheduled data backup, scheduled report generation, scheduled email notification sending, etc. are all scheduled services.
[0059] When the service type is a scheduled service, it can be determined that the service type is a designated service type, and then the step of obtaining a service time zone corresponding to the service request can be performed.
[0060] When the service type is an instant service, it can be determined that the service type is not a designated service type, and the service request can be directly executed without executing the step of obtaining the service time zone corresponding to the service request.
[0061] Taking into account that instant services require the server to respond immediately, there is no need for the server to determine the actual service execution time to execute it. In this embodiment, by determining the service type corresponding to the service request, when the service type is the specified service type, the step of obtaining the service time zone corresponding to the service request is executed, thereby avoiding analyzing service requests that do not need to be executed according to the specified time, thereby improving service processing efficiency.
[0062] In other implementations, the business request must meet preset conditions; the preset conditions include one of the following: there is one business execution time corresponding to the business request; there are multiple business execution times corresponding to the business request, and the time intervals between any two adjacent business execution times in the multiple business execution times are different.
[0063] Exemplarily, if the business execution time corresponding to the business request is one, it is determined that the business execution time meets the preset conditions; if the business request corresponds to multiple business execution times, and the number of the multiple business execution times is three or more, the multiple business execution times are sorted in order from small to large or from large to small to obtain the sorted business execution times; the difference between every two adjacent business execution times in the sorted business execution times is calculated to obtain multiple time differences; if the multiple time differences are different, it is determined that the business request meets the preset conditions; if the multiple time differences are the same, it is determined that the business request does not meet the preset conditions.
[0064] As a more specific example, for example, a service request includes multiple service execution times (such as 9:00, 9:05, 9:10, 9:15, ...), and the time interval between any two adjacent service execution times is 5 minutes, indicating that the service request is required to be executed every 5 minutes, then it can be determined that the service execution time corresponding to the service request is generated based on the specified cycle (once every 5 minutes). Since it is executed every 5 minutes, the server only needs to directly execute the service request according to this rule to ensure the accurate execution of the service request, without converting the time zone and then executing the service request. Therefore, it can be determined that the service request does not meet the preset conditions.
[0065] For another example, a service request corresponds to multiple service execution times of 9:00, 10:00, and 15:00, that is, the service request is required to be executed at 9:00, 10:00, and 15:00 in the first time zone corresponding to it, wherein the time intervals between any two adjacent service executions at 9:00, 10:00, and 15:00 are different, and there is no regularity to follow, and they will not be executed based on a specified cycle, which can usually be user-defined. Therefore, the server needs to convert the time between the first time zone and the second time zone before executing the service request to ensure the accuracy of the service request. Thus, it can be determined that the service request meets the preset conditions.
[0066] In some embodiments, if the business request does not meet the preset conditions, the business request is determined as a target business request; and the target business request is filtered from multiple business requests to obtain filtered business requests; then, based on the filtered business requests, the step of obtaining the first time zone corresponding to each business request is executed.
[0067] Considering that some service requests are required to be executed according to a specified cycle rather than based on the exact service execution time, the impact of the time zone does not need to be considered for such service requests. In this embodiment, by setting the service request to meet the preset conditions; and the preset conditions include one of the following: there is one service execution time corresponding to the service request; there are multiple service execution times corresponding to the service request, and the time intervals of any two adjacent service execution times in the multiple service execution times are different. Therefore, service requests that do not consider the impact of the time zone can be filtered out during service detection, thereby improving the processing efficiency of the service.
[0068] 102. Determine a service detection cycle according to the service execution time corresponding to each service request.
[0069] Among them, the service detection cycle refers to the cycle of the server performing service detection, wherein the service detection refers to detecting whether each service request among multiple service requests needs to be executed at the current detection time. For example, if the service detection cycle is once per hour, then the server will detect whether each service request needs to be executed at the current detection time once every hour (such as 9:00, 10:00, 11:00...). Among them, the current detection time refers to the time when the server performs service detection. Optionally, the server can start the detection from the hour when performing the first service detection, for example, the first service detection time can be 0:00.
[0070] In some implementations, in step 102, according to the service execution time corresponding to each service request, a specific implementation method of determining the service detection period may include:
[0071] A1. Detect whether the service execution time corresponding to each service request is the hourly time, and obtain the detection result.
[0072] The hourly time refers to the exact time of the hour, that is, the minute and second parts of the time are both 0. For example, 10:00, 11:00, 12:00, etc. are all hourly times.
[0073] In some implementations, for each service execution time, it can be detected whether its minute part and second part are both zero. If so, it is determined that the service execution time is the hourly time. If not, it is determined that the service execution time is not the hourly time.
[0074] A2. Determine the service inspection cycle based on the inspection results.
[0075] In some implementations, in step A2, according to the detection result, a specific implementation of determining the service detection period may include:
[0076] If the detection result indicates that the service execution time corresponding to each service request is the hourly time, then the service detection cycle is determined to be the first cycle;
[0077] If the detection result indicates that there is a service execution time that is not an hourly time among the service execution times corresponding to the multiple service requests, the service detection period is determined to be the second period, and the duration of the first period is greater than the duration of the second period.
[0078] Optionally, the duration of the first cycle may be 1 hour, and the duration of the second cycle may be 1 minute.
[0079] For example, the detection result shows that the service execution times corresponding to the multiple service requests include 01:00, 02:00, 04:00, 05:00, and 17:00. It can be seen that the service execution times are all hourly, so the service detection cycle can be determined to be the first cycle, that is, executed once every hour.
[0080] For example, the detection result shows that the service execution times corresponding to the multiple service requests include 01:10, 02:00, 04:23, 05:45, and 17:00, wherein 01:10, 04:23, and 05:45 are not hourly times, and therefore, the service detection cycle can be determined to be the second cycle, that is, once per minute.
[0081] Optionally, if the interval between any two adjacent business execution times among the business execution times corresponding to multiple business requests is a fixed duration, and the fixed duration is less than 1 hour, then the business detection period can be determined to be the second period, and the duration of the second period is the above-mentioned fixed duration. For example, the detection result is that the business execution times corresponding to multiple business requests include 00:30, 01:00, 01:30, and 02:00. It can be seen that the interval between any two adjacent business execution times among the above-mentioned multiple business execution times is a fixed duration of 30 minutes, then the business detection period is determined to be the second period, and the duration of the second period is 30 minutes.
[0082] In this embodiment, when the detection results indicate that the service execution time corresponding to each service request is an hourly time, the service detection period is determined to be the first period; when the detection results indicate that there is a service execution time that is not an hourly time among the service execution times corresponding to multiple service requests, the service detection period is determined to be the second period, and the duration of the first period is greater than that of the second period, so as to ensure that the service detection time obtained according to the service detection period can cover all service execution times, thereby improving the accuracy of service processing.
[0083] In some other implementations, in step A2, according to the detection result, the specific implementation of determining the service detection period may include:
[0084] If the detection result indicates that there is a service execution time that is not an hourly time among the service execution times corresponding to the multiple service requests, a service detection period is determined according to the first number and the second number.
[0085] The first number is the number of service execution times corresponding to the multiple service requests that are hourly times, and the second number is the number of service execution times corresponding to the multiple service requests that are not hourly times.
[0086] As an implementation manner, a specific implementation manner of determining a service detection period according to the first quantity and the second quantity may include:
[0087] A ratio value between the first quantity and the second quantity is calculated.
[0088] If the ratio between the first number and the second number is greater than or equal to the first threshold, the service detection period is determined to be the third period.
[0089] If the ratio value is less than or equal to the second threshold, the service detection period is determined to be the third period; wherein the first threshold is greater than the second threshold, and the duration of the third period is greater than the duration of the fourth period.
[0090] The first threshold is used to determine whether the first number is much greater than the second number.
[0091] The second threshold is used to determine whether the first number is much smaller than the second number.
[0092] Among them, the service execution time corresponding to multiple service requests that is an hourly time can be determined as the first service execution time, and the service execution time corresponding to multiple service requests that is not an hourly time can be determined as the second service execution time.
[0093] Optionally, the duration of the third cycle may be 1 hour, and the duration of the fourth cycle may be 1 minute.
[0094] Exemplarily, for example, the first threshold is 50:1. When the ratio between the first number and the second number is greater than 50:1, it indicates that the first number of the first business execution time is much greater than the second number of the second business execution time. At this time, the business detection cycle is set to once per hour, and the impact on the second business execution time with a smaller number can also be ignored. Therefore, there is no need to set a separate business detection cycle for the second business execution time with a smaller number, thereby improving business processing efficiency.
[0095] For another example, the second ratio is 1:50. When the ratio between the first number and the second number is less than 1:50, it indicates that the first number of the first business execution time is much smaller than the second number of the second business execution time. At this time, setting the business detection cycle to once per minute can have negligible impact on the first business execution time with a smaller number. Therefore, there is no need to set a separate business detection cycle for the first business execution time with a smaller number, thereby improving business processing efficiency.
[0096] As another implementation manner, a specific implementation manner of determining the service detection period according to the first quantity and the second quantity may include:
[0097] The first number and the second number may be compared. If the first number is greater than the second number, the service detection period may be determined to be the fifth period, so as to be more suitable for the first service execution times with a larger number among the service execution times corresponding to the multiple service requests. If the first number is less than the second number, the service detection period may be determined to be the sixth period, so as to be more suitable for the second service execution times with a larger number among the service execution times corresponding to the multiple service requests. Optionally, the duration of the fifth period may be 1 hour, and the duration of the sixth period may be 1 minute.
[0098] Exemplarily, the service execution time corresponding to the multiple service requests that is an hourly time is determined as the first service execution time, and the service execution time corresponding to the multiple service requests that is not an hourly time is determined as the second service execution time. For example, the service execution times corresponding to the multiple service requests include 01:00, 02:00, 04:23, 05:00, and 17:00, wherein 01:00, 02:00, 05:00, and 17:00 are hourly times, so 01:00, 02:00, 05:00, and 17:00 can be determined as the first service execution time. Among them, 04:23 is not an hourly time, so 04:23 can be determined as the second service execution time. Among them, according to the first service execution time (01:00, 02:00, 05:00, and 17:00), the first number can be determined to be 4. According to the first service execution time (04:23), the second number can be determined to be 1. Therefore, the first number is greater than the second number, so it can be determined that the service detection cycle is the fifth cycle, that is, once every hour.
[0099] In some further implementations, the specific implementation of determining the service detection period according to the first quantity and the second quantity may further include:
[0100] The first quantity and the second quantity are compared to obtain a comparison result, wherein the comparison result indicates whether a difference between the first quantity and the second quantity is within a specified range.
[0101] When the comparison result indicates that the difference between the first number and the second number is within a specified range, the service detection period corresponding to the first service execution time may be set to the seventh period, where the seventh period is once per hour, and the service detection period corresponding to the second service execution time may be set to the eighth period, where the eighth period is once per minute. In this way, service detection may be performed based on the seventh period for service requests corresponding to the first service execution time, and based on the eighth period for service requests corresponding to the second service execution time.
[0102] As an implementation manner, a specific implementation manner of comparing the first quantity and the second quantity may include:
[0103] The absolute value of the difference between the first quantity and the second quantity is calculated, and if the absolute value of the difference between the first quantity and the second quantity is less than or equal to a preset quantity, it is determined that the comparison result indicates that the difference between the first quantity and the second quantity is within a specified range.
[0104] As another implementation, the specific implementation of comparing the first quantity and the second quantity may include:
[0105] Calculate the ratio between the first quantity and the second quantity. If the ratio is within a specified ratio range, determine that the comparison result represents that the difference between the first quantity and the second quantity is within the specified range. For example, the specified ratio range is 0.5 to 1.5. When the ratio between the first quantity and the second quantity is 1, it can be determined that the comparison result represents that the difference between the first quantity and the second quantity is within the specified range.
[0106] Exemplarily, as shown in Table 1, Table 1 shows a corresponding relationship between multiple service requests and multiple service execution times.
[0107] Table 1
[0108] Business Request Business execution time Business Request 1 01:00 Business Request 2 02:00 Business Request 3 03:00 Business Request 4 12:12 Business Request 5 14:25 Business Request 6 15:30
[0109] According to Table 1, multiple business requests include business request 1, business request 2, business request 3, business request 4, business request 5, and business request 6, wherein the business execution times corresponding to business request 1, business request 2, business request 3, business request 4, business request 5, and business request 6 are 01:00, 02:00, 03:00, 12:12, 14:25, and 15:30, respectively. Then business request 1, business request 2, and business request 3 are business requests corresponding to the first business execution time, and business request 4, business request 5, and business request 6 are business requests corresponding to the second business execution time. Among them, the first number and the second number are both 3, and it can be determined that the comparison result of the first number and the second number indicates that the difference between the first number and the second number is within the specified range. Therefore, a first service detection cycle can be set for service request 1, service request 2, and service request 3, and a second service detection cycle can be set for service request 4, service request 5, and service request 6. When performing subsequent service detection, service detection can be performed on service request 1, service request 2, and service request 3 through the seventh cycle; and service detection can be performed on service request 4, business request 5, and business request 6 through the eighth cycle.
[0110] Considering that the number of the first business execution time and the second business execution time is not much different, if only the business detection cycle suitable for one of the business requests corresponding to the first business execution time and the business request corresponding to the second business execution time is used, the business detection of the other business request will be inaccurate, and thus the accuracy of business processing cannot be guaranteed as a whole. In this embodiment, when the comparison result of the first number and the second number indicates whether the difference between the first number and the second number is within the specified range, the first business detection cycle is set for the business request corresponding to the first business execution time, wherein the seventh cycle is once per hour, and the second business detection cycle is set for the business request corresponding to the second business execution time, wherein the eighth cycle is once per minute. So that subsequently, the first current time of the second time zone can be obtained based on the first business detection cycle for the business request corresponding to the first business execution time. Based on the second business detection cycle, the first current time of the second time zone is obtained for the business request corresponding to the second business execution time, thereby improving the accuracy of business detection as a whole, and thus improving the accuracy of business processing.
[0111] In other implementations, in step 102, according to the service execution time corresponding to each service request, a specific implementation method for determining the service detection period may include:
[0112] For each service request, at least one service execution time corresponding to the service request is detected on the hour.
[0113] If the hourly detection result corresponding to the service request indicates that at least one service execution time corresponding to the service request is an hourly time, the service request is determined as the first service request.
[0114] If the hourly detection result corresponding to the service request indicates that at least one service execution time corresponding to the service request includes a service execution time that is not an hourly time, the service request is determined as a second service request.
[0115] It is determined that the service detection period corresponding to the first service is the ninth period, wherein the ninth period is once per hour.
[0116] It is determined that the service detection period corresponding to the second service is the tenth period, wherein the tenth period is once per minute.
[0117] Exemplarily, please refer to Table 2, which shows another relationship between multiple service requests and multiple service execution times.
[0118] Table 2
[0119]
[0120] According to Table 2, the service execution time corresponding to service request a includes 01:00 and 02:00, the service execution time corresponding to service request b includes 03:00 and 12:12, and the service execution time corresponding to service request c includes 14:25 and 15:30. Among them, the service execution time corresponding to service request a is all hourly time, so service request a can be determined as the first service request; the service execution time corresponding to service request b includes the time 12:12 which is not the hourly time, so service request b can be determined as the second service request, and the service execution time corresponding to service request c includes the time 14:25 and 15:30 which are not the hourly time, so service request c can be determined as the second service request. Therefore, it can be determined that the service detection cycle corresponding to service request a is the ninth cycle, and the service detection cycles corresponding to service request b and service request c are determined to be the tenth cycle.
[0121] In this embodiment, for each business request, when the business request corresponds to multiple business execution times, the business request is divided into a first business request or a second business request according to the multiple business execution times, and then appropriate business detection cycles are used for these two different types of business requests respectively, thereby improving both business processing efficiency and accuracy.
[0122] 103. Based on the service detection cycle, obtain a first current time in a second time zone, where the second time zone is a time zone where a server for executing multiple service requests is located.
[0123] Exemplarily, for example, the service detection cycle is once every hour, and assuming that the first service detection time is 0:00 in the second time zone, then after 1 hour from 0:00, the first current time in the second time zone can be obtained as 1:00.
[0124] For another example, the service detection cycle is once per minute. Assuming that the first service detection time is 0:00 in the second time zone, then one minute after 0:00, the first current time in the second time zone can be obtained as 00:01.
[0125] 104. Determine a time comparison result corresponding to each business request; for each business request, determine the time comparison result, including: based on the first time zone and the second time zone, determine that the first current time corresponds to the second current time in the first time zone; compare the second current time with the business execution time to obtain a time comparison result.
[0126] The time comparison result may indicate whether the second current time is consistent with the service execution time.
[0127] Exemplarily, for example, the service execution time corresponding to the service request includes 1:00, 2:00, and 5:00 in the first time zone (such as time zone A). Assuming that the first current time is 4:00, and the second time zone differs from time zone A by one hour, and time zone A is one hour later than the second time zone, then when the first current time in the second time zone is converted to the second current time in time zone A, the second current time can be obtained as 5:00 in time zone A. Then, 5:00 in time zone A is compared with 1:00, 2:00, and 5:00 in time zone A, respectively. Specifically, the second current time in time zone A can be compared with 1:00, 2:00, and 5:00 in time zone A, respectively, for consistency.
[0128] Among them, the conversion relationship between different first time zones and second time zones can be pre-recorded and stored in the database of the server. When the time of the second time zone needs to be converted to the time of a certain business time zone, the time of the second time zone can be converted according to the conversion relationship to the time of the business time zone.
[0129] 105. Execute the business request based on the time comparison result.
[0130] In some implementations, in step 105, according to the time comparison result, the specific implementation of executing the service request may include:
[0131] According to the time comparison result, it is determined whether the second current time is consistent with at least one service execution time of the service execution time corresponding to the service request.
[0132] If the second current time is consistent with at least one of the service execution times corresponding to the service request, the service request with the consistent service execution time is executed.
[0133] Continuing with the above example, it can be found that the comparison result is 1:00, 2:00, 5:00 in time zone A, which is consistent with the second current time, 5:00, which indicates that the service request has reached its corresponding service execution time at the current moment. Therefore, the server can execute the service request at this time. In actual applications, for example, when the service request is a data update request, the server can send a data packet for data update to the client corresponding to the service request at this time. For another example, when the service request is an automatic renewal request, the server can automatically deduct the account corresponding to the service request at this time to complete the automatic renewal, and send the automatic renewal result to the client corresponding to the service request, wherein the automatic renewal result can carry the deduction completion time, which can be obtained by the server converting the time for completing the deduction in the second time zone into the time in time zone A.
[0134] It can be seen that in this implementation, every time the duration of a business detection cycle passes, the first current time of the second time zone is obtained, and the first current time is converted from the second time zone to the first time zone corresponding to each business request to obtain the second current time, so as to detect whether each business request has reached the corresponding execution time according to the second current time, and then determine whether to execute the business request, thereby realizing batch processing of business requests sent from different time zones at the same time, avoiding the tediousness of processing each business request individually immediately upon receiving the business request, and improving business processing efficiency. In addition, since the business detection cycle is determined according to the business execution time of each business request, the multiple business detection moments obtained according to the business detection cycle can cover the business execution time of all business requests, avoiding the omission of business requests and improving the accuracy of business processing.
[0135] The method described in the above embodiment will be further described in detail below.
[0136] In this embodiment, the service processing method is applied to Figure 1a Taking the application scenario shown as an example, the method of the embodiment of the present application is described in detail.
[0137] like Figure 2a As shown, a specific process of a business processing method is as follows:
[0138] 201. The client sends a service request to the server.
[0139] 202. The server determines whether the received multiple service requests meet a preset condition, wherein the preset condition includes one of the following: the service request corresponds to one service execution time; the service request corresponds to multiple service execution times, and any two adjacent service execution time intervals among the multiple service execution times are different.
[0140] In some embodiments, the business request satisfies a preset condition; the preset condition includes one of the following: there is one business execution time corresponding to the business request; there are multiple business execution times corresponding to the business request, and the time intervals between any two adjacent business execution times in the multiple business execution times are different.
[0141] 203. When determining that the multiple service requests meet the preset conditions, the server obtains the first time zone corresponding to each service request in the multiple service requests, where the first time zone is the time zone where the device sending the service request is located, and the service request carries the service execution time corresponding to the first time zone of the service request.
[0142] 204. The server determines a service detection cycle according to the service execution time corresponding to each service request.
[0143] In step 204, the specific implementation of determining the service detection period according to the service execution time corresponding to each service request may include:
[0144] Check whether the service execution time corresponding to each service request is the hourly time and obtain the test result;
[0145] Determine the service detection cycle based on the detection results.
[0146] In some implementations, the specific implementation of the step of “determining the service detection period according to the detection result” may include:
[0147] If the detection result indicates that the service execution time corresponding to each service request is the hourly time, then the service detection cycle is determined to be the first cycle;
[0148] If the detection result indicates that there is a service execution time that is not an hourly time among the service execution times corresponding to the multiple service requests, the service detection period is determined to be the second period, and the duration of the first period is greater than the duration of the second period.
[0149] In other implementations, the specific implementation of the step of "determining the service detection period according to the detection result" may include:
[0150] If the detection result indicates that there is a service execution time that is not an hourly time among the service execution times corresponding to the multiple service requests, determining a service detection period according to the first number and the second number;
[0151] The first number is the number of service execution times corresponding to the multiple service requests that are hourly times, and the second number is the number of service execution times corresponding to the multiple service requests that are not hourly times.
[0152] In some implementations, a specific implementation of the step of “determining a service detection period according to the first quantity and the second quantity” may include:
[0153] calculating a ratio between the first quantity and the second quantity;
[0154] If the ratio between the first number and the second number is greater than or equal to the first threshold, determining that the service detection period is the third period;
[0155] If the ratio value is less than or equal to the second threshold, the service detection period is determined to be the third period; wherein the first threshold is greater than the second threshold, and the duration of the third period is greater than the duration of the fourth period.
[0156] 205. The server obtains a first current time in a second time zone based on a service detection cycle, where the second time zone is a time zone where the server for executing multiple service requests is located.
[0157] 206. The server determines a time comparison result corresponding to each business request; for each business request, the time comparison result is determined, including: based on the first time zone and the second time zone, determining that the first current time corresponds to the second current time in the first time zone; comparing the second current time with the business execution time to obtain a time comparison result.
[0158] 207. The server executes the service request according to the time comparison result.
[0159] 208. The server returns the execution result of the business request to the client.
[0160] For example, the business scenario corresponding to the business request is a scenario of regularly refreshing data business. In the example, the specific implementation process of step 201 to step 208 can be as follows: Figure 2b As shown:
[0161] First, the region or country where each client is located can be converted into a concept of a "tenant", where each tenant can include one or more clients. At the same time, the time zone where the server is located is used as the system time zone (i.e., the second time zone in the above embodiment). After the tenants are deployed, the tenant time zone of each tenant can be configured in the server database.
[0162] Then, the server can receive one or more business requests and pass the data carried by the business request to the background of the server. Optionally, the server can receive the business request through a browser (such as a web) or an application programming interface (API interface). Thereafter, the interceptor in the server parses the data carried by all business requests to determine whether the business request contains field data of the time type. If it contains field data of the time type, the field data of the time type can be converted to the time under the system time zone according to the corresponding tenant time zone and stored in the server database (for example, if the data in the business request is "2024-01-01 08:00:00", the converted system time is "2024-01-01 07:00:00", and the converted data replaces the original value of the field, and the converted business request is stored in the server database). If it does not contain field data of the time type, the data carried by the business request can be directly stored in the server database.
[0163] Then, the server may perform service detection on service requests whose service execution time is on the hour according to a rule of once per hour, or the server may perform service detection on service requests whose service execution time is not on the hour according to a rule of once per minute.
[0164] When the server performs a service check once every hour, it can traverse all tenants, convert the first current time in the system time zone into the second current time of each subtenant corresponding to its tenant time zone (i.e., the first time zone in the above embodiment), and then determine whether the second current time matches the service execution time of each tenant in its tenant time zone. The service execution time can be obtained from the service request carrying information stored in the server database. The tenant time zone information used to convert the first current time in the system time zone into the second current time of each subtenant corresponding to its tenant time zone can be called from the server database. If the second current time matches the service execution time of each tenant in its tenant time zone, the service request (i.e., Figure 2b In the business data processing), if the second current time does not match the business execution time of each tenant in its tenant time zone, it returns to the server to perform business detection once every hour.
[0165] Among them, when the server performs a business detection once a minute, it can traverse all tenants, convert the first current time in the system time zone into the second current time of each subtenant corresponding to its tenant time zone, and then calculate the difference between the second current time and the business execution time in the corresponding tenant time zone. Then determine whether the difference is less than 60 seconds. If it is less than 60 seconds, create a business thread for executing the business request, and put the business thread into a dormant state. When the length of time that the business thread enters the dormant state is equal to the above difference, the business request is executed through the business thread. If the difference is not less than 60 seconds, return to perform a business detection once a minute. Optionally, the business thread can obtain a data unique identifier (Key) based on the tenant time zone and the information carried in the business request, and then obtain a distributed unique lock in redis (a memory database) based on the data unique identifier to ensure mutual exclusive control of access to shared resources in a distributed environment to prevent multiple clients from modifying the same resource at the same time.
[0166] Finally, the server can store the data for refreshing tasks obtained after executing the business request in the server database. When responding to the business request of the client or actively pushing data to the client, the server converts the time in the system time zone in the data for refreshing tasks into the time in the tenant time zone corresponding to the client, and publishes the converted data for refreshing tasks to the client.
[0167] In order to better implement the above method, the embodiment of the present application also provides a business processing device, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.
[0168] For example, in this embodiment, the method of the embodiment of the present application is described in detail by taking the specific integration of the service processing device in the server as an example.
[0169] For example, Figure 3 As shown, the service processing device may include a first acquisition unit 301, a determination unit 302, a second acquisition unit 303, a comparison unit 304, and a service execution unit 305, as follows:
[0170] A first acquisition unit is used to acquire a first time zone corresponding to each service request in multiple service requests, where the first time zone is the time zone where the device sending the service request is located, and the service request carries a service execution time corresponding to the first time zone of the service request;
[0171] A determination unit, configured to determine a service detection period according to a service execution time corresponding to each service request;
[0172] A second acquisition unit, configured to acquire a first current time in a second time zone based on a service detection cycle, where the second time zone is a time zone where a server for executing multiple service requests is located;
[0173] A comparison unit, used to determine a time comparison result corresponding to each service request; for each service request, determining the time comparison result includes: determining, based on the first time zone and the second time zone, that the first current time corresponds to the second current time in the first time zone; comparing the second current time with the service execution time to obtain a time comparison result;
[0174] The service execution unit is used to execute the service request according to the time comparison result.
[0175] In some implementations, the determining unit 302 is specifically configured to:
[0176] Check whether the service execution time corresponding to each service request is the hourly time and obtain the test result;
[0177] Determine the service detection cycle based on the detection results.
[0178] In some implementations, the determining unit 302 is further configured to:
[0179] If the detection result indicates that the service execution time corresponding to each service request is the hourly time, then the service detection cycle is determined to be the first cycle;
[0180] If the detection result indicates that there is a service execution time that is not an hourly time among the service execution times corresponding to the multiple service requests, the service detection period is determined to be the second period, and the duration of the first period is greater than the duration of the second period.
[0181] In some implementations, the determining unit 302 is further configured to:
[0182] If the detection result indicates that there is a service execution time that is not an hourly time among the service execution times corresponding to the multiple service requests, determining a service detection period according to the first number and the second number;
[0183] The first number is the number of service execution times corresponding to the multiple service requests that are hourly times, and the second number is the number of service execution times corresponding to the multiple service requests that are not hourly times.
[0184] In some implementations, the determining unit 302 is further configured to: calculate a ratio between the first quantity and the second quantity;
[0185] If the ratio between the first number and the second number is greater than or equal to the first threshold, determining that the service detection period is the third period;
[0186] If the ratio value is less than or equal to the second threshold, the service detection period is determined to be the third period; wherein the first threshold is greater than the second threshold, and the duration of the third period is greater than the duration of the fourth period.
[0187] In some embodiments, the business request satisfies a preset condition; the preset condition includes one of the following: there is one business execution time corresponding to the business request; there are multiple business execution times corresponding to the business request, and the time intervals between any two adjacent business execution times in the multiple business execution times are different.
[0188] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0189] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.
[0190] In some embodiments, the business processing device may also be integrated into multiple electronic devices. For example, the business processing device may be integrated into multiple servers, and the business processing method of the present application may be implemented by multiple servers.
[0191] In this embodiment, the electronic device of this embodiment will be taken as an example for detailed description. Figure 4 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0192] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0193] The processor 401 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0194] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, a data processing function, etc.); the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0195] The electronic device also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0196] The electronic device may further include an input module 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0197] The electronic device may further include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The electronic device may perform short-range wireless transmission through the wireless module of the communication module 405, thereby providing the user with wireless broadband Internet access. For example, the communication module 405 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0198] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402 to implement various functions.
[0199] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0200] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0201] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions can be loaded by a processor to execute the steps in any business processing method provided in the embodiment of the present application.
[0202] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0203] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in the above embodiment.
[0204] Since the instructions stored in the storage medium can execute the steps in any business processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any business processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0205] The above is a detailed introduction to a business processing method, device, electronic device and computer-readable storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A business processing method, characterized in that: include: Obtain a first time zone corresponding to each of the multiple service requests, where the first time zone is a time zone where a device sending the service request is located, and the service request carries a service execution time corresponding to the first time zone of the service request; Determine a service detection period according to the service execution time corresponding to each of the service requests; Based on the service detection cycle, obtaining a first current time in a second time zone, where the second time zone is a time zone where a server for executing the multiple service requests is located; Determine a time comparison result corresponding to each of the service requests; For each of the service requests, determining the time comparison result includes: determining, based on the first time zone and the second time zone, that the first current time corresponds to a second current time in the first time zone; and comparing the second current time with the service execution time to obtain the time comparison result; The service request is executed according to the time comparison result.
2. The service processing method according to claim 1, characterized in that: The determining of the service detection period according to the service execution time corresponding to each service request includes: Detect whether the service execution time corresponding to each service request is the hourly time, and obtain a detection result; A service detection period is determined according to the detection result.
3. The service processing method according to claim 2, characterized in that: The determining of the service detection period according to the detection result includes: If the detection result indicates that the service execution time corresponding to each service request is the hour, determining that the service detection period is the first period; If the detection result indicates that there is a service execution time that is not an hourly time among the service execution times corresponding to the multiple service requests, the service detection period is determined to be a second period, and the duration of the first period is greater than the duration of the second period.
4. The service processing method according to claim 2, characterized in that: The determining of the service detection period according to the detection result includes: If the detection result indicates that there is a service execution time that is not an hourly time among the service execution times corresponding to the multiple service requests, determining the service detection period according to the first number and the second number; The first number is the number of service execution times that are hourly times among the service execution times corresponding to the multiple service requests, and the second number is the number of service execution times that are not hourly times among the service execution times corresponding to the multiple service requests.
5. The service processing method according to claim 4, characterized in that: The determining the service detection period according to the first quantity and the second quantity includes: calculating a ratio between the first quantity and the second quantity; If the ratio between the first number and the second number is greater than or equal to a first threshold, determining that the service detection period is a third period; If the ratio value is less than or equal to the second threshold, the service detection period is determined to be a third period; wherein the first threshold is greater than the second threshold, and the duration of the third period is greater than the duration of the fourth period.
6. The service processing method according to claim 1, characterized in that: The business request satisfies a preset condition; the preset condition includes one of the following: there is one business execution time corresponding to the business request; there are multiple business execution times corresponding to the business request, and the time intervals of any two adjacent business execution times among the multiple business execution times are different.
7. A service processing device, characterized in that: include: A first acquisition unit is used to acquire a first time zone corresponding to each of the multiple service requests, where the first time zone is the time zone where the device sending the service request is located, and the service request carries a service execution time corresponding to the first time zone of the service request; A determination unit, configured to determine a service detection period according to a service execution time corresponding to each of the service requests; A second acquisition unit, configured to acquire a first current time in a second time zone based on the service detection cycle, where the second time zone is a time zone where a server for executing the multiple service requests is located; A comparison unit, used to determine a time comparison result corresponding to each of the service requests; For each of the service requests, determining the time comparison result includes: determining, based on the first time zone and the second time zone, that the first current time corresponds to a second current time in the first time zone; and comparing the second current time with the service execution time to obtain the time comparison result; A service execution unit is used to execute the service request according to the time comparison result.
8. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the business processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the business processing method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the data processing method according to any one of claims 1 to 6.
