Method for timely sensing zero drop of interface call volume

By using scheduled tasks to collect API call logs and automatically dialing numbers when the call volume reaches zero, the problem of core business API call volume dropping to zero in the ride-hailing system was solved, achieving timely detection and loss reduction.

CN119271304APending Publication Date: 2025-01-07SHOUYUE TECH BEIJING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411445607.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing technologies make it difficult to detect in a timely manner when the call volume of core business interfaces in ride-hailing systems drops to zero, resulting in an inability to passively reduce revenue losses.

Method used

The system uses scheduled tasks to periodically count the number of input parameter logs for core business interfaces within a unit of time, and automatically calls the development personnel when the call volume is found to be zero, thus achieving passive detection and timely handling.

Benefits of technology

This effectively reduced revenue loss caused by a drop in core business interface call volume to zero, and ensured timely intervention by automatically notifying R&D personnel via telephone.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271304A_ABST
    Figure CN119271304A_ABST
Patent Text Reader

Abstract

The invention discloses a method for timely sensing zero drop of interface call volume. The method comprises the following steps: S1, starting to execute a timed task; s2, reading the configuration file, and obtaining a service interface Url needing to be monitored; s3, judging whether the configuration value is empty or not, and if yes, returning; otherwise, continuing; s4, reading the configuration file, obtaining a configured time threshold value, and recording the time threshold value as x; s5, obtaining the time of the current system, recording the time as a, and taking the time as the end time of querying the statistical log; s6, subtracting x from the current time a, recording the value as b, and taking the value as starting time for querying the statistical log; according to the method, the number of the input parameter logs of the core service interface in unit time is counted regularly through the timed task, whether the number of the logs is equal to zero or not is judged, and if yes, a program makes a call to related research and development personnel automatically, so that the research and development personnel passively perceive the zero drop phenomenon; research and development personnel can passively perceive that the calling amount of a core service interface is dropped, intervention processing can be carried out as early as possible, and losses can be reduced as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of online car-hailing, and specifically relates to a method for timely sensing that the amount of interface calls drops to zero. Background Art

[0002] As the online car-hailing business of the company's platform continues to grow, the call volume of the core business interfaces that affect the company's revenue, such as estimation, order placement, and confirmation of driver use, has dropped to zero. The drop in call volume means that the number of calls to the relevant interface per unit time is 0, which means that the core business of the system is in a stopped state per unit time. R&D personnel must be aware of the drop in zero in a timely manner and be notified by phone in a timely manner to intervene in the problem of zero drop, so as to ultimately achieve the goal of minimizing revenue losses. Therefore, how to let R&D personnel passively perceive the drop in zero of the system's core interface services has become a problem that must be solved.

[0003] To this end, the present invention designs a method for timely sensing that the interface call volume drops to zero. Summary of the invention

[0004] The purpose of the present invention is to provide a method for timely sensing the interface call volume dropping to zero, so as to solve the problems raised in the above background technology.

[0005] To achieve the above purpose, the present invention provides the following technical solution: a method for timely sensing that the interface call volume has dropped to zero, and the specific execution steps are as follows:

[0006] S1: The scheduled task starts to execute;

[0007] S2: Read the configuration file and obtain the service interface URL to be monitored;

[0008] S3: Determine whether the configuration value is empty, if it is empty, return; otherwise, continue;

[0009] S4: Read the configuration file and obtain the configured time threshold, denoted as x;

[0010] S5: Get the current system time, recorded as a, as the end time of querying statistical logs;

[0011] S6: Subtract x from the current time a, and the value is recorded as b, which is used as the start time of querying the statistical log;

[0012] S7: Connect the fixed character string "request params", ".*" and the service interface URL together as the log query keyword;

[0013] S8: Using the query statistics log start and end time and log keywords obtained in the above steps as conditions, call the log query service interface to count the number of times each URL is called within a unit time;

[0014] S9: Determine whether the return value of the log query service interface is empty, if it is empty, end, otherwise continue;

[0015] S10: parse the return value of the log query service interface to obtain the number of calls of each service interface URL;

[0016] S11: Determine whether the number of calls to each service interface Url is zero one by one; if it is zero, add telephone alarm information;

[0017] S12: Determine whether the final summarized telephone alarm information is empty; if not, continue; otherwise, end;

[0018] S13: Read the configuration file to obtain a list of mobile phone numbers to be dialed;

[0019] S14: calling the dialing interface service to automatically dial the alarm number to these mobile phone numbers;

[0020] S15: End.

[0021] Preferably, in step S2, the configuration content of the configuration file is as follows:

[0022] needMonitorUrls:

[0023] / touch / partner / getFlightInfoV2; / touch / partner / postInstantOrder;

[0024] needMonitorUrls refers to the names of multiple service interfaces that need to monitor the zero drop alarm.

[0025] Preferably, in step S4, the time threshold in the configuration file can be set manually.

[0026] Preferably, in step S11, the telephone alarm information includes: the estimated interface call volume drops to zero, and the order interface call volume drops to zero.

[0027] Preferably, in step S12, if it is empty, it means that the number of calls of all monitored service interface Urls within the unit time has not dropped to zero; if it is not empty, it means that the number of calls of the service interface Url within the unit time is zero, and an alarm is required.

[0028] Compared with the prior art, the beneficial effects of the present invention are: the present invention uses a scheduled task to regularly count the number of input logs of the core business interface per unit time, and determines whether the number of logs is equal to zero. If it is zero, the program automatically calls the relevant R&D personnel to achieve the purpose of allowing the R&D personnel to passively perceive the zero phenomenon; the R&D personnel can passively perceive that the call volume of the core service interface has dropped to zero, and can intervene as early as possible to minimize the loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] See also Figure 1 The present invention provides a technical solution: a method for timely sensing the interface call volume dropping to zero, which uses a scheduled task to regularly count the number of input parameter logs of the core business interface per unit time, and determines whether the number of logs is equal to zero. If it is zero, the program automatically calls the relevant R&D personnel to achieve the purpose of allowing the R&D personnel to passively perceive the zero drop phenomenon.

[0032] The present invention supports dynamic configuration of the service interface to be queried and counted, and dynamic configuration of the notification telephone list;

[0033] As long as the interface is called, the input parameter log will be printed. The prerequisite of the present invention is that the interface prints the input parameter log. By default, the system prints the input and output parameter logs of all interfaces. The input parameter log is as follows:

[0034] {"timestamp":"2024-02-06 14:29:32,996","logContent":"{"requestparams":"[{"departureTime":"2024-02-06

[0035] 14:29:32","endCityCode":"021","endLat":31.147137,"endLng":121.355068,},null]"},

[0036] "requestPath":" / hellobike / partner / queryEvaluationOfPrice"}

[0037] The specific steps are as follows:

[0038] S1: The scheduled task starts to execute;

[0039] S2: Read the configuration file and obtain the service interface URL to be monitored;

[0040] The configuration content of this configuration file is as follows:

[0041] needMonitorUrls:

[0042] / touch / partner / getFlightInfoV2; / touch / partner / postInstantOrder;

[0043] S3: Determine whether the configuration value is empty, if it is empty, return; otherwise, continue;

[0044] S4: Read the configuration file and obtain the configured time threshold, denoted as x;

[0045] The configuration content of this configuration file is as follows:

[0046] timeThreshold: 15

[0047] S5: Get the current system time, recorded as a, as the end time of querying statistical logs;

[0048] S6: Subtract x from the current time a, and the value is recorded as b, which is used as the start time of querying the statistical log;

[0049] S7: Connect the fixed character string "request params", ".*" and the service interface URL together as the log query keyword;

[0050] The final splicing example is: request params.* / touch / partner / getFlightInfoV2;

[0051] S8: Using the query statistics log start and end time and log keywords obtained in the above steps as conditions, call the log query service interface to count the number of times each URL is called within a unit time;

[0052] S9: Determine whether the return value of the log query service interface is empty, if it is empty, end, otherwise continue;

[0053] S10: parse the return value of the log query service interface to obtain the number of calls of each service interface URL;

[0054] S11: Determine whether the number of calls of each service interface Url is zero one by one; if it is zero, add telephone alarm information;

[0055] The telephone alarm information is as follows: the estimated interface call volume drops to zero, and the order interface call volume drops to zero;

[0056] S12: Determine whether the final summarized telephone alarm information is empty; if not, continue; otherwise, end;

[0057] If it is empty, it means that the number of calls to all monitored service interface URLs within a unit time has not dropped to zero; if it is not empty, it means that the number of calls to the service interface URL within a unit time is zero, and an alarm is required;

[0058] S13: Read the configuration file to obtain a list of mobile phone numbers to be dialed;

[0059] The configuration content of this configuration file is as follows:

[0060] alarmPhones:13401043887,15865772209;

[0061] S14: calling the dialing interface service to automatically dial the alarm number to these mobile phone numbers;

[0062] S15: End.

[0063] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for timely sensing that the interface call volume has dropped to zero, characterized in that: The specific steps are as follows: S1: The scheduled task starts to execute; S2: Read the configuration file and obtain the service interface URL to be monitored; S3: Determine whether the configuration value is empty, if it is empty, return; otherwise, continue; S4: Read the configuration file and obtain the configured time threshold, denoted as x; S5: Get the current system time, recorded as a, as the end time of querying statistical logs; S6: Subtract x from the current time a, and the value is recorded as b, which is used as the start time of querying the statistical log; S7: Connect the fixed string "request params", ".*" and the service interface Url together as the log query keyword; S8: Using the query statistics log start and end time and log keywords obtained in the above steps as conditions, call the log query service interface to count the number of times each URL is called within a unit time; S9: Determine whether the return value of the log query service interface is empty, if it is empty, end, otherwise continue; S10: parse the return value of the log query service interface to obtain the number of calls of each service interface URL; S11: Determine whether the number of calls of each service interface Url is zero one by one; if it is zero, add telephone alarm information; S12: Determine whether the final summarized telephone alarm information is empty; if not, continue; otherwise, end; S13: Read the configuration file to obtain a list of mobile phone numbers to be dialed; S14: calling the dialing interface service to automatically dial the alarm number to these mobile phone numbers; S15: End.

2. The method for timely sensing when the interface call volume drops to zero according to claim 1, characterized in that: In step S2, the configuration content of the configuration file is as follows: needMonitorUrls: / touch / partner / getFlightInfoV2; / touch / partner / postInstantOrder; needMonitorUrls refers to the names of multiple service interfaces that need to monitor the zero drop alarm.

3. The method for timely sensing when the interface call volume drops to zero according to claim 1, characterized in that: In step S4, the time threshold in the configuration file can be set manually.

4. The method for timely sensing when the interface call volume drops to zero according to claim 1, characterized in that: In step S11, the telephone alarm information includes: the estimated interface call volume drops to zero, and the order interface call volume drops to zero.

5. The method for timely sensing the interface call volume falling to zero according to claim 1, characterized in that: In step S12, if it is empty, it means that the number of calls of all monitored service interface Urls within a unit time has not dropped to zero; If it is not empty, it means that the service interface Url has been called zero times per unit time, and an alarm is required.