Service restart method, device, electronic device and storage medium

By detecting and automatically starting the service using local cache and network retry tables, the problem of unstable service restart in the existing technology is solved, and the reliability and automation of service restart are improved.

CN116095143BActive Publication Date: 2024-12-20SHENZHEN YISHIHUOLALA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310143478.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-12-20
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

The reliability of service restarts in the prior art is poor, especially when the application crashes or the network connection fluctuates, the user needs to manually reoperate to trigger the service restart, resulting in the service restart failure.

Method used

After obtaining the restart request, detect whether the local cache is called, obtain the request information, determine the restart identifier, and start the target service based on the network retry table to avoid restart failure.

Benefits of technology

Improve the reliability of service restart, reduce the user's need for manual operation, and ensure that the service can automatically restart when the application crashes or network fluctuates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116095143B_ABST
    Figure CN116095143B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a service restart method, device, electronic device and storage medium, including: obtaining a restart request; detecting whether the restart request calls a local cache according to an identifier of the restart request; when it is detected that the restart request calls the local cache, obtaining request information of the restart request; determining a restart identifier corresponding to the request information; and starting a target service based on a network retry table corresponding to the restart identifier. This scheme can improve the reliability of service restart.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a service restart method, device, electronic device and storage medium. Background Art

[0002] With the development of technology, terminal devices have become indispensable in people's lives, and various applications are installed in each terminal device. During the use of the application, some users' message notifications or account status need to be reported to the server under certain conditions. At this time, the application will trigger a network request.

[0003] The current network request scheme is to restart the target service within a limited number of times. Moreover, when the application is unexpectedly closed (such as crash) or the network connection fluctuates during use, the user is required to re-operate to trigger the corresponding service restart. It can be seen that in the current service restart scheme, the reliability of service restart is poor. Summary of the invention

[0004] The embodiments of the present application provide a service restart method, device, electronic device, and storage medium, which can improve the reliability of service restart.

[0005] The present application provides a service restart method, including:

[0006] Get restart request;

[0007] Detecting whether the restart request calls a local cache according to an identifier of the restart request;

[0008] When detecting that the restart request calls the local cache, obtaining request information of the restart request;

[0009] Determine a restart identifier corresponding to the request information;

[0010] The target service is started based on the network retry table corresponding to the restart identifier.

[0011] Optionally, in some embodiments, determining a restart identifier corresponding to the request information includes:

[0012] Extracting a request link, a request method, and request parameters corresponding to the restart request from the request information;

[0013] The request link, request method and request parameters are converted into strings respectively, and the converted strings are concatenated;

[0014] The concatenated character string is encrypted to obtain a restart identifier corresponding to the request information.

[0015] Optionally, in some embodiments, starting the target service based on the network retry table corresponding to the restart identifier includes:

[0016] Check whether there is a network retry table locally;

[0017] When it is detected that there is a local network retry table, the local network retry table is obtained, and the target service is started according to the obtained network retry table;

[0018] When it is detected that there is no network retry table locally, a network retry table is constructed according to a preset rule, and the target service is started according to the constructed network retry table.

[0019] Optionally, in some embodiments, starting the target service based on the network retry table corresponding to the restart identifier includes:

[0020] Determine a network retry table corresponding to the restart identifier;

[0021] Add the request link, request method, request parameters and request identifier corresponding to the restart identifier to the database;

[0022] Based on the added database, a network request is output, and a target service is started according to the network request.

[0023] Optionally, in some embodiments, after starting the target service according to the network request, the method further includes:

[0024] When the callback of the network request is successful, deleting the request record corresponding to the network request in the database according to the request identifier of the network request;

[0025] When the callback of the network request fails, wait for the next polling to retry.

[0026] Optionally, in some embodiments, the method further includes:

[0027] Detecting whether the network request is a request in a database;

[0028] When it is detected that the network request is not a request in the database, the current polling retry count is adjusted to the maximum number of retry initiations;

[0029] Start the polling timer and call polling retry within the set time.

[0030] Optionally, in some embodiments, calling polling retry within a set time includes:

[0031] Detect the current number of polling retries;

[0032] When it is detected that the polling retry number is greater than a preset value, all network requests in the network retry table are extracted, and the extracted network requests are initiated;

[0033] When it is detected that the polling retry number is equal to a preset value, the polling timer is stopped.

[0034] Accordingly, the present application also provides a service restart device, including:

[0035] A first acquisition module, used to acquire a restart request;

[0036] A calling module, configured to detect whether the restart request calls a local cache according to an identifier of the restart request;

[0037] A second acquisition module is used to acquire request information of the restart request when it is detected that the restart request calls the local cache;

[0038] A determination module, used to determine a restart identifier corresponding to the request information;

[0039] A startup module is used to start the target service based on the network retry table corresponding to the restart identifier.

[0040] Correspondingly, the present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of any of the above methods when executing the program.

[0041] The present application also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0042] The service restart scheme provided in the embodiment of the present application, after obtaining the restart request, detects whether the restart request calls the local cache according to the identifier of the restart request, and when it is detected that the restart request calls the local cache, obtains the request information of the restart request, and then determines the restart identifier corresponding to the request information, and finally, starts the target service based on the network retry table corresponding to the restart identifier. In the service restart scheme provided in the present application, it can be identified whether the restart request calls the local cache, and when it is identified that the restart request calls the local cache, the target service is started according to the network retry table corresponding to the restart request, so as to avoid the target service still being unable to start after restarting the service several times. At the same time, when the application is accidentally closed (such as flash back) or the network connection fluctuates during use, the user does not need to re-operate to trigger the corresponding service restart, thereby improving the reliability of the service restart. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] 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.

[0044] Figure 1 It is a flowchart of a service restart method provided in an embodiment of the present application;

[0045] Figure 2 It is a structural diagram of a service restart device provided in an embodiment of the present application;

[0046] Figure 3 2 is another structural diagram of the service restart device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] 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.

[0048] Embodiments of the present application provide a service restart method, device, electronic device, and storage medium.

[0049] Among them, the service restart device can be specifically integrated in a terminal, and the terminal can include a mobile phone, a tablet computer or a personal computer (PC). The terminal and the server can be connected via wired or wireless means. The server can include an independently running server or a distributed server, or a server cluster consisting of multiple servers.

[0050] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.

[0051] A service restart method includes: obtaining a restart request; detecting whether the restart request calls a local cache according to an identifier of the restart request; when it is detected that the restart request calls the local cache, obtaining request information of the restart request; determining a restart identifier corresponding to the request information; and starting a target service based on a network retry table corresponding to the restart identifier.

[0052] See also Figure 1 , Figure 1 A flow chart of a service restart method provided in an embodiment of the present application. The specific flow of the service restart method may be as follows:

[0053] 101. Get a restart request.

[0054] Among them, the restart request can be triggered by the application or by the user. For example, the application needs to upload certain user information to the server. However, network jitter occurs during the upload, and a restart request is triggered. For another example, when the user browses certain content through the application, the content needs to be uploaded to the server. During the upload, the application crashes. When the user opens the application again, a restart request is triggered.

[0055] 102. Detect, according to the identifier of the restart request, whether the restart request calls the local cache.

[0056] Among them, it can be detected whether the identifier of the restart request is an identifier saved in the local database. When it is detected that the identifier of the restart request is an identifier saved in the local database, step 103 is executed; when it is detected that the identifier of the restart request is not an identifier saved in the local database, the target service is directly started.

[0057] 103. When it is detected that the restart request calls the local cache, request information of the restart request is obtained.

[0058] Optionally, in some embodiments, the request information may specifically include request data such as request link, request method, request parameters, request identifier, and request time. When a restart request is detected to call the local cache, at least one of the above request data may be obtained to facilitate the subsequent restart of the target service. For example, under the HTTP protocol, the request method may specifically include GET, POST, HEAD, PUT, DELETE, OPTIONS, TRACE, and CONNECT.

[0059] 104. Determine a restart identifier corresponding to the request information.

[0060] In order to distinguish the identifier stored in the local database from the identifier corresponding to the restart request, the present application will reconstruct the restart identifier corresponding to the restart request. Optionally, in some embodiments, the identifier is reconstructed using the request data in the request information, that is, the step of "determining the restart identifier corresponding to the request information" may specifically include:

[0061] (11) extracting the request link, request method, and request parameters corresponding to the restart request from the request information;

[0062] (12) Convert the request link, request method and request parameters into strings respectively, and concatenate the converted strings;

[0063] (13) Encrypt the concatenated character string to obtain a restart identifier corresponding to the request information.

[0064] For example, the request link corresponding to the restart request extracted from the request information is: http: / / 8000 / hello / index.html, the request method is GET / hello / index.htmlHTTP / 1.1 and the request parameters are name=zhangsan&password=998562. Then, the request link, request method and request parameters are converted into strings respectively. For the sake of convenience, the strings converted are set to AAA, BBB and CCC below. After the string is converted, it is spliced ​​to obtain a spliced ​​string such as AAABBBCCC, or BBBAAACCC. The specific splicing method can be set according to actual conditions and is not limited here. Furthermore, after obtaining the spliced ​​string, it is encrypted. The encryption function can use the MD5 message digest algorithm for encryption. The MD5 message digest algorithm (English: MD5Message-DigestAlgorithm), a widely used cryptographic hash function, can generate a 128-bit (16-byte) hash value (hash value) to ensure that the information transmission is complete and consistent. Of course, other functions can also be used to encrypt the encrypted string, which is not limited in this application.

[0065] 105. Start the target service based on the network retry table corresponding to the restart identifier.

[0066] Among them, it can be detected whether there is a network retry table containing a primary key, a request link, a request method, a request parameter, and a request identifier locally. When it is detected that there is the network retry table, the target service is started using the network retry table; when it is not detected that there is no network retry table locally, a network retry table containing the primary key, the request link, the request method, the request parameter, and the request identifier is constructed, and the target service is started based on the constructed network retry table, that is, optionally, in some embodiments, the step of "starting the target service based on the network retry table corresponding to the restart identifier" can specifically include:

[0067] (21) Check whether there is a network retry table locally;

[0068] (22) When it is detected that there is a local network retry table, the local network retry table is obtained, and the target service is started according to the obtained network retry table;

[0069] (23) When it is detected that there is no local network retry table, a network retry table is constructed according to preset rules, and the target service is started according to the constructed network retry table.

[0070] After obtaining the network retry table, the request link, request method, request parameters and request identifier of the restart identifier may be added to the database to trigger the network request. That is, optionally, in some embodiments, the step of “starting the target service based on the network retry table corresponding to the restart identifier” may specifically include:

[0071] (31) Determine the network retry table corresponding to the restart identifier;

[0072] (32) Add the request link, request method, request parameters and request identifier corresponding to the restart identifier to the database;

[0073] (33) Based on the added database, output the network request and start the target service according to the network request.

[0074] After initiating the network request, it is necessary to wait for the network callback result and perform corresponding operations according to different network callback results. That is, optionally, in some embodiments, the service restart method of the present application may further include:

[0075] (41) When the callback of the network request is successful, the request record corresponding to the network request in the database is deleted according to the request identifier of the network request;

[0076] (42) When the callback of the network request fails, wait for the next polling retry.

[0077] In addition, while waiting for the callback result, it is also possible to detect whether the network request is a request in the database, and output a corresponding operation based on the detection result, that is, optionally, in some embodiments, the service restart method provided by the present application may further include:

[0078] (51) Detect whether the network request is a request in the database;

[0079] (52) When it is detected that the network request is not a request in the database, the current polling retry count is adjusted to the maximum number of retry initiations;

[0080] (53) Start the polling timer and call the polling retry within the set time.

[0081] Before starting the polling timer, you can adjust the current polling retry count to the maximum number of retries to initiate, and after starting the polling timer, call the polling retry within the set time.

[0082] Optionally, in some embodiments, when it is detected that the current number of retries is greater than a preset value, the polling retry continues, otherwise, the polling timer is stopped; during the polling retry, all network requests in the network retry table can be taken out, and the extracted network requests can be initiated, and the current number of retries is -1, that is, the step of "calling polling retry within the set time" can specifically include:

[0083] (61) Check the current polling retry count;

[0084] (62) when it is detected that the number of polling retries is greater than a preset value, extract all network requests from the network retry table and initiate the extracted network requests;

[0085] (63) When it is detected that the number of polling retries is equal to a preset value, the polling timer is stopped.

[0086] For example, the preset value is set to 0. When it is detected that the number of polling retries is greater than 0, all network requests in the network retry table are extracted and the extracted network requests are initiated. It should be noted that when the network retry table is greater than 0, these network requests are re-initiated and the current number of retries is -1.

[0087] After obtaining the restart request, the embodiment of the present application detects whether the restart request calls the local cache according to the identifier of the restart request. When it is detected that the restart request calls the local cache, the request information of the restart request is obtained, and then the restart identifier corresponding to the request information is determined. Finally, the target service is started based on the network retry table corresponding to the restart identifier. In the service restart scheme provided by the present application, it is possible to identify whether the restart request calls the local cache. When it is identified that the restart request calls the local cache, the target service is started according to the network retry table corresponding to the restart request, so as to avoid the inability to start the target service after restarting the service several times. At the same time, when the application is accidentally closed (such as flash back) or the network connection fluctuates during use, the user does not need to re-operate to trigger the corresponding service restart, thereby improving the reliability of the service restart.

[0088] In order to better implement the service restart method of the embodiment of the present application, the embodiment of the present application also provides a service restart device based on the above (referred to as the restart device). The meaning of the term is the same as in the above service restart method, and the specific implementation details can refer to the description in the method embodiment.

[0089] See also Figure 2 , Figure 2 A schematic diagram of the structure of a service restart device provided in an embodiment of the present application, wherein the training device may include a first acquisition module 201, a calling module 202, a second acquisition module 203, a determination module 204 and a startup module 205, which may be specifically as follows:

[0090] The first acquisition module 201 is used to acquire a restart request.

[0091] Among them, the restart request can be triggered by the application or by the user. For example, the application needs to upload certain user information to the server. However, network jitter occurs during the upload, and a restart request is triggered. For another example, when the user browses certain content through the application, the content needs to be uploaded to the server. During the upload, the application crashes. When the user opens the application again, a restart request is triggered.

[0092] The calling module 202 is used to detect whether the restart request calls the local cache according to the identifier of the restart request.

[0093] Among them, it can be detected whether the identifier of the restart request is an identifier saved in the local database. When it is detected that the identifier of the restart request is an identifier saved in the local database, the second acquisition module 203 executes the corresponding steps; when it is detected that the identifier of the restart request is not an identifier saved in the local database, the target service is directly started.

[0094] The second acquisition module 203 is configured to acquire request information of the restart request when it is detected that the restart request calls the local cache.

[0095] Optionally, in some embodiments, the request information may specifically include: request data such as request link, request method, request parameters, request identifier, and request time. When it is detected that a restart request calls the local cache, the second acquisition module 203 can obtain at least one of the above request data to facilitate the subsequent restart of the target service.

[0096] The determination module 204 is used to determine the restart identifier corresponding to the request information.

[0097] In order to distinguish the identifier stored in the local database from the identifier corresponding to the restart request, the present application will reconstruct the restart identifier corresponding to the restart request, that is, optionally, in some embodiments, the determination module 204 can be specifically used to: extract the request link, request method and request parameters corresponding to the restart request from the request information; convert the request link, request method and request parameters into strings respectively, and splice the converted strings; encrypt the spliced ​​strings to obtain the restart identifier corresponding to the request information.

[0098] The startup module 205 is used to start the target service based on the network retry table corresponding to the restart identifier.

[0099] Among them, it can be detected whether there is a network retry table containing a primary key, a request link, a request method, request parameters and a request identifier locally. When it is detected that there is such a network retry table, the target service is started using the network retry table; when it is not detected that there is no network retry table locally, a network retry table containing the primary key, the request link, the request method, request parameters and the request identifier is constructed, and the target service is started based on the constructed network retry table. That is, optionally, in some embodiments, the startup module 205 can be specifically used to: detect whether there is a network retry table locally; when it is detected that there is a network retry table locally, obtain the local network retry table, and start the target service according to the obtained network retry table; when it is detected that there is no network retry table locally, construct a network retry table according to preset rules, and start the target service according to the constructed network retry table.

[0100] Optionally, in some embodiments, the startup module 205 of the present application can also be used to: determine the network retry table corresponding to the restart identifier; add the request link, request method, request parameters and request identifier corresponding to the restart identifier to the database; based on the added database, output the network request, and start the target service according to the network request.

[0101] Optionally, in some embodiments, the service restart device provided by the present application may further include a callback module, which may be specifically used to: when the callback of the network request is successful, delete the request record corresponding to the network request in the database according to the request identifier of the network request; when the callback of the network request fails, wait for the next polling retry.

[0102] Optionally, in some embodiments, the service restart device provided by the present application may further include a detection module, which may be specifically used to: detect whether the network request is a request in the database; when it is detected that the network request is not a request in the database, adjust the current number of polling retries to the maximum number of retries initiated; start the polling timer, and call the polling retry within the set time.

[0103] Optionally, in some embodiments, the detection module can also be used to: detect the current number of polling retries; when it is detected that the number of polling retries is greater than a preset value, extract all network requests from the network retry table and initiate the extracted network requests; when it is detected that the number of polling retries is equal to the preset value, stop the polling timer.

[0104] After obtaining the restart request, the embodiment of the present application detects whether the restart request calls the local cache according to the identifier of the restart request. When it is detected that the restart request calls the local cache, the request information of the restart request is obtained, and then the restart identifier corresponding to the request information is determined. Finally, the target service is started based on the network retry table corresponding to the restart identifier. In the service restart scheme provided by the present application, it is possible to identify whether the restart request calls the local cache. When it is identified that the restart request calls the local cache, the target service is started according to the network retry table corresponding to the restart request, so as to avoid the inability to start the target service after restarting the service several times. At the same time, when the application is accidentally closed (such as flash back) or the network connection fluctuates during use, the user does not need to re-operate to trigger the corresponding service restart, thereby improving the reliability of the service restart.

[0105] In addition, the present application also provides an electronic device, such as Figure 3 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0106] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that Figure 3 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.

[0107] The processor 301 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 302, and calling data stored in the memory 302, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 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 301.

[0108] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and service restarts by running the software programs and modules stored in the memory 302. The memory 302 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, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 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 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0109] The electronic device also includes a power supply 303 for supplying power to each component. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 303 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0110] The electronic device may further include an input unit 304, 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.

[0111] 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 301 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application programs stored in the memory 302, thereby realizing various functions, as follows:

[0112] Obtain a restart request; detect whether the restart request calls the local cache based on the restart request identifier; when it is detected that the restart request calls the local cache, obtain the request information of the restart request; determine the restart identifier corresponding to the request information; and start the target service based on the network retry table corresponding to the restart identifier.

[0113] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0114] After obtaining the restart request, the embodiment of the present application detects whether the restart request calls the local cache according to the identifier of the restart request. When it is detected that the restart request calls the local cache, the request information of the restart request is obtained, and then the restart identifier corresponding to the request information is determined. Finally, the target service is started based on the network retry table corresponding to the restart identifier. In the service restart scheme provided by the present application, it is possible to identify whether the restart request calls the local cache. When it is identified that the restart request calls the local cache, the target service is started according to the network retry table corresponding to the restart request, so as to avoid the inability to start the target service after restarting the service several times. At the same time, when the application is accidentally closed (such as flash back) or the network connection fluctuates during use, the user does not need to re-operate to trigger the corresponding service restart, thereby improving the reliability of the service restart.

[0115] 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.

[0116] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any service restart method provided in the embodiment of the present application. For example, the instructions can execute the following steps:

[0117] Obtain a restart request; detect whether the restart request calls the local cache based on the restart request identifier; when it is detected that the restart request calls the local cache, obtain the request information of the restart request; determine the restart identifier corresponding to the request information; and start the target service based on the network retry table corresponding to the restart identifier.

[0118] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0119] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0120] Since the instructions stored in the storage medium can execute the steps in any service restart method provided in the embodiments of the present application, the beneficial effects that can be achieved by any service restart 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.

[0121] The above is a detailed introduction to a service restart method, device, electronic device and 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 service restart method, characterized in that: include: Get restart request; Detecting whether the restart request calls a local cache according to an identifier of the restart request; When detecting that the restart request calls the local cache, obtaining request information of the restart request; Determine a restart identifier corresponding to the request information; Starting the target service based on the network retry table corresponding to the restart identifier; The determining a restart identifier corresponding to the request information includes: Extracting a request link, a request method, and request parameters corresponding to the restart request from the request information; The request link, request method and request parameters are converted into strings respectively, and the converted strings are concatenated; Encrypt the concatenated character string to obtain a restart identifier corresponding to the request information; The starting the target service based on the network retry table corresponding to the restart identifier includes: Check whether there is a network retry table locally; When it is detected that there is a local network retry table, the local network retry table is obtained, and the target service is started according to the obtained network retry table; When it is detected that there is no network retry table locally, a network retry table is constructed according to a preset rule, and a target service is started according to the constructed network retry table; After the network retry table is obtained, starting the target service according to the obtained network retry table includes: Determine a network retry table corresponding to the restart identifier; Add the request link, request method, request parameters and request identifier corresponding to the restart identifier to the database; Based on the added database, a network request is output, and a target service is started according to the network request.

2. The method according to claim 1, characterized in that After starting the target service according to the network request, the method further includes: When the callback of the network request is successful, deleting the request record corresponding to the network request in the database according to the request identifier of the network request; When the callback of the network request fails, wait for the next polling to retry.

3. The method according to claim 1, characterized in that: Also includes: Detecting whether the network request is a request in a database; When it is detected that the network request is not a request in the database, the current polling retry count is adjusted to the maximum number of retry initiations; Start the polling timer and call polling retry within the set time.

4. The method according to claim 3, characterized in that The calling of polling retry within the set time includes: Detect the current number of polling retries; When it is detected that the polling retry number is greater than a preset value, all network requests in the network retry table are extracted, and the extracted network requests are initiated; When it is detected that the polling retry number is equal to a preset value, the polling timer is stopped.

5. A service restart device, characterized in that: Also includes: A first acquisition module, used to acquire a restart request; A calling module, configured to detect whether the restart request calls a local cache according to an identifier of the restart request; A second acquisition module is used to acquire request information of the restart request when it is detected that the restart request calls the local cache; A determination module is used to determine the restart identifier corresponding to the request information, specifically comprising: extracting a request link, a request method, and a request parameter corresponding to the restart request from the request information; converting the request link, the request method, and the request parameter into strings respectively, and concatenating the converted strings; encrypting the concatenated strings to obtain the restart identifier corresponding to the request information; A startup module, used for starting a target service based on a network retry table corresponding to the restart identifier, specifically comprising: detecting whether a local network retry table is present; when it is detected that a local network retry table is present, obtaining the local network retry table, and starting the target service according to the obtained network retry table; when it is detected that no local network retry table is present, constructing a network retry table according to preset rules, and starting the target service according to the constructed network retry table; after obtaining the network retry table, starting the target service according to the obtained network retry table specifically comprises: determining the network retry table corresponding to the restart identifier; adding a request link, a request method, a request parameter, and a request identifier corresponding to the restart identifier to a database; based on the added database, outputting a network request, and starting the target service according to the network request.

6. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the service restart method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the steps of the service restart method according to any one of claims 1 to 4 are implemented.