CN112527543A - Client starting exception handling method and device, electronic equipment and storage medium - Google Patents

Client starting exception handling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112527543A
CN112527543A CN202011165151.4A CN202011165151A CN112527543A CN 112527543 A CN112527543 A CN 112527543A CN 202011165151 A CN202011165151 A CN 202011165151A CN 112527543 A CN112527543 A CN 112527543A
Authority
CN
China
Prior art keywords
detection
client
detection point
preset
exception handling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011165151.4A
Other languages
Chinese (zh)
Inventor
曾柯兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bigo Technology Singapore Pte Ltd
Original Assignee
Bigo Technology Singapore Pte Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bigo Technology Singapore Pte Ltd filed Critical Bigo Technology Singapore Pte Ltd
Priority to CN202011165151.4A priority Critical patent/CN112527543A/en
Publication of CN112527543A publication Critical patent/CN112527543A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0709Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems

Abstract

The embodiment of the invention discloses a method and a device for processing client starting abnormity, electronic equipment and a storage medium, wherein the method for processing the client starting abnormity comprises the following steps: when a client is started, detecting detection points in a starting process according to a preset directed graph to obtain a detection result of the detection points, wherein the preset directed graph is a directed graph indicating the client to perform parallel detection on a plurality of detection points; when the detection point is determined to be abnormal according to the detection result, acquiring the type of the detection point; and processing the abnormal detection point according to the type. According to the embodiment of the invention, the detection points in the starting process of the client are detected according to the preset directed graph, and the parallel detection of a plurality of detection points can be realized by setting the directed graph, so that the detection efficiency of the detection points is improved, the detection time consumption of the detection points is reduced, the starting time of the client is shortened, and the client can be quickly started.

Description

Client starting exception handling method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method and a device for processing client starting abnormity, electronic equipment and a storage medium.
Background
In recent years, with the development of intelligent terminal devices and mobile communication network technologies, the intelligent terminal devices can be installed with various clients as a personal computer, so that applications of the intelligent terminal devices are enriched through the various clients, and wireless network access can be realized through a mobile communication network.
In the prior art, in order to avoid the crash flash back of the client during the starting process, a plurality of detection points are usually set at the client, a next detection point is detected after detecting that one detection point is not abnormal, whether each function module of the client is normal or not is judged by detecting the detection points, and a corresponding processing flow is entered when detecting that a certain detection point is abnormal to avoid the crash flash back of the client.
However, in the prior art, the method for avoiding the crash flash back during the client startup takes a long time to detect the detection point, and has low efficiency, resulting in long startup time of the client.
Disclosure of Invention
The embodiment of the invention provides a method and a device for processing client startup abnormity, electronic equipment and a storage medium, and aims to solve the problems that in the prior art, a method for avoiding crash flash back during client startup consumes long time for detection of a detection point, is low in efficiency, and causes long startup time of a client.
In a first aspect, an embodiment of the present invention provides a method for handling a client startup exception, where the method includes:
when a client is started, detecting detection points in the starting process according to a preset directed graph to obtain detection results of the detection points;
when the detection point is determined to be abnormal according to the detection result, acquiring the type of the detection point;
and processing the abnormal detection point according to the type.
In a second aspect, an embodiment of the present invention provides a client start exception handling apparatus, including:
the detection module is used for detecting detection points in the starting process according to a preset digraph to obtain detection results of the detection points when the client is started;
the type acquisition module is used for acquiring the type of the detection point when the detection point is determined to be abnormal according to the detection result;
and the exception handling module is used for handling the detection point of the exception according to the type.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the client-initiated exception handling method according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a client-initiated exception handling method according to any embodiment of the present invention.
The client start abnormity processing method provided by the embodiment of the invention detects the detection points in the starting process according to the preset directed graph when the client starts to obtain the detection results of the detection points, obtains the types of the detection points when the detection points are determined to be abnormal according to the detection results, and processes the abnormal detection points according to the types, wherein the preset directed graph is a directed graph which indicates the client to perform parallel detection on a plurality of detection points, and the parallel detection on the plurality of detection points can be realized by arranging the directed graph, so that the efficiency of detecting the detection points is improved, the detection time consumption of the detection points is reduced, the time for starting the client is shortened, and the client can be started quickly.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for handling an exception initiated by a client according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a method for handling an exception initiated by a client according to a second embodiment of the present invention;
FIG. 3 is a diagram illustrating an example of a pre-set directed graph in an embodiment of the present invention;
fig. 4 is a block diagram of a client-initiated exception handling apparatus according to a third embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of steps of a method for processing a client startup exception according to an embodiment of the present invention, where the method is applicable to a situation where a client is prevented from flashing back during a startup process, and the method may be executed by a client startup exception processing apparatus implemented by the present invention, where the client startup exception processing apparatus may be implemented by hardware or software and integrated in a client provided by an embodiment of the present invention, and specifically, as shown in fig. 1, the method for processing a client startup exception according to an embodiment of the present invention may include the following steps:
s101, when a client is started, detecting detection points in a starting process according to a preset directed graph to obtain a detection result of the detection points, wherein the preset directed graph is a directed graph indicating the client to perform parallel detection on a plurality of detection points.
In the embodiment of the present invention, the client may be an application installed and running on various terminal devices, the terminal devices may be electronic devices such as a personal PC, a server, and a mobile terminal, the terminal devices may be installed with operating systems such as Windows, UNIX, linux, Android, and IOS, and for one client, versions of the client on each terminal device may be the same or different.
The detection points can be all function modules of the client, the client initializes all function modules when starting, the detection of the detection points can be to detect whether all function modules of the client are normal, and for one client, which detection points (function modules) need to be detected can be preset to avoid the crash flash back of the client when starting.
The preset directed graph may be a directed graph indicating that the client performs parallel detection on multiple detection points, and optionally, the preset directed graph may include a directed graph of at least two parallel detection paths, each detection path includes multiple ordered detection points, and each detection path may further include two or more branch paths. In the embodiment of the present invention, a person skilled in the art may set different preset directed graphs according to different clients, and the setting of the preset directed graphs is not limited in the embodiment of the present invention.
In the starting process of the client, each detection point in the starting process can be detected according to the detection path in the preset directed graph configured by the client to obtain a detection result, and if the preset directed graph is set to include at least two parallel detection paths, each detection point can be detected according to the two parallel detection paths at the same time, so that the detection efficiency is improved, the detection time is shortened, and the starting of the client is accelerated.
S102, when the detection point is determined to be abnormal according to the detection result, the type of the detection point is obtained.
Specifically, the detection result may be a parameter obtained after initialization of each detection point, after the detection result of each detection point is obtained, the detection result may be compared with a parameter when the detection point is normal to determine whether one detection point is abnormal, and when one detection point is abnormal, the type to which the detection point belongs may be obtained. In an optional embodiment of the present invention, the types of the detection points may include an overall impact type and a local impact type, the overall impact may refer to that the detection point is abnormal, which may cause the client to start crash and flash back, and the local impact may refer to that the detection point is abnormal, which may not affect normal operation of other detection points of the client. For a client, the types of the detection points can be preset and stored in the designated position under the installation path of the client, and when the detection points are abnormal, the types of the abnormal detection points can be directly read from the designated position.
And S103, processing the abnormal detection point according to the type.
In the embodiment of the present invention, a configuration file may be generated in advance, where the configuration file configures an exception handling policy that is used when different types of detection points are abnormal, and for example, when an overall impact type of detection point is abnormal, because the detection point is abnormal, a client may crash and flash back, the exception handling policy may be configured as follows: and an upgrade prompt interface is generated and displayed to prompt a user to upgrade the client, so that the problem of poor user experience caused by crash and flash back of the client when the detection point of the overall influence type is abnormal is avoided. For another example, when a detection point of the local influence type is abnormal, since the abnormality of the detection point does not influence the normal operation of other detection points, the abnormality processing policy may be configured as follows: and the detection point is shielded, so that the next detection point is continuously detected after the detection point is shielded in the starting process of the client, and the client also cannot crash and flash back.
After the type of the abnormal detection point is determined, an abnormal processing strategy associated with the type can be obtained from a configuration file of the client to process the abnormal detection point, so that crash flash back caused by the abnormal detection point in the starting process of the client is avoided.
The client start abnormity processing method provided by the embodiment of the invention detects the detection points in the starting process according to the preset directed graph when the client starts to obtain the detection results of the detection points, obtains the types of the detection points when the detection points are determined to be abnormal according to the detection results, and processes the abnormal detection points according to the types, wherein the preset directed graph is a directed graph which indicates the client to perform parallel detection on a plurality of detection points, and the parallel detection on the plurality of detection points can be realized by arranging the directed graph, so that the efficiency of detecting the detection points is improved, the detection time consumption of the detection points is reduced, the time for starting the client is shortened, and the client can be started quickly.
Example two
Fig. 2 is a flowchart of steps of a method for handling client startup exception according to a second embodiment of the present invention, where the embodiment of the present invention is optimized based on the first embodiment, specifically, as shown in fig. 2, the method for handling client startup exception according to the embodiment of the present invention may include the following steps:
s201, when a preset trigger event is detected in the starting process of the client, determining a target detection path associated with the trigger event in the preset directed graph.
In the embodiment of the invention, a preset directed graph can be set for the client, and the preset directed graph indicates that the client detects a plurality of detection points in the starting process in parallel. In an optional embodiment of the present invention, the preset directed graph includes at least two parallel detection paths, each detection path includes a plurality of detection points, and each detection path is provided with a preset event, and when a preset event is detected, the detection points can be detected according to the detection path associated with the preset event.
In an optional embodiment of the present invention, the preset directed graph includes a main thread detection path and a high-priority task detection path, and the preset event of the main thread detection path and the high-priority task detection path may be a first preset event, for example, the first preset event is a client start, that is, upon the client start, the client is triggered to use the main thread detection path and the high-priority task detection path as a target detection path, and detect the detection point according to the main thread detection path and the high-priority task detection path.
In another optional embodiment, the preset directed graph further includes a low-priority task detection path, where a trigger event of the low-priority task detection path is a second preset event, and the second preset event may be one of a preset low-priority task start initialization, a preset client start time reaching a preset time, and a designated detection point on the main thread detection path and the high-priority task detection path being detected.
Fig. 3 is a diagram illustrating an example of a preset directed graph according to an embodiment of the present invention, in fig. 3, the preset directed graph includes a main thread detection path, a high priority task detection path, and a low priority task detection path, and each detection path may include multiple detection points. In fig. 3, the detection points on the main thread detection path are a plurality of function modules on the main thread of the client during the client startup process, the detection points on the high-priority task detection path are a plurality of function modules with the previous priority level on the client during the client startup process, and the detection points on the low-priority task detection path are a plurality of function modules with the next priority level on the client during the client startup process, wherein a person skilled in the art can set the priority levels of the function modules according to different clients.
In the implementation of the present invention, the preset event of the main thread detection path and the high-priority task detection path is client startup, and the preset event of the low-priority task detection path may be low-priority task startup initialization (for example, low-priority task T31 initialization), or the startup duration of the client reaches a preset duration, or a specified detection point on the main thread detection path and the high-priority task detection path has been detected (for example, detection point T2 or T52 is detected).
In the embodiment of the present invention, in addition to setting the preset directed graph including the detection path capable of detecting a plurality of detection points in parallel according to the execution thread and the priority, a person skilled in the art may also set the preset directed graph including the detection path capable of detecting a plurality of detection points in parallel according to the dependency relationship between the detection points, the size of resources occupied by the detection points, and the like.
S202, detecting a detection point in the starting process according to the target detection path to obtain a detection result of the detection point.
Specifically, in an optional embodiment of the present invention, the preset directed graph includes a main thread detection path and a high-priority task detection path, and when the client is started, a detection point in the starting process may be detected according to the main thread detection path and the high-priority task detection path to obtain a detection result of the detection point. As shown in fig. 3, in an example, the main thread detection path includes detection points T1-T7, the high-priority task detection path includes detection points T51-T58, and the client is triggered to perform parallel detection on multiple detection points in the starting process according to the main thread detection path and the high-priority task detection path at the starting time of the client, so that the problem that detection time consumption is long due to the fact that detection is performed on the detection points one by one in sequence, which results in slow starting of the client is avoided, time consumption of the detection points is reduced, and the client can be started quickly.
In another optional embodiment, the preset directed graph further includes a low-priority task detection path, and when a trigger event of the low-priority task detection path is detected, a detection point in the starting process is detected according to the low-priority task detection path in the preset directed graph, so as to obtain a detection result of the detection point. As shown in fig. 3, in an example, after the start time of the client is longer than a preset time, or when the initialization is started at the detection point T31 where the low-priority task is detected, or after the detection point T2 or T52 is detected, the detection points in the start process are detected according to the low-priority task detection path, such as the detection points T31-T38.
The digraph preset by the embodiment of the invention comprises the low-priority task detection path, the detection can be performed on the plurality of detection points in the starting process according to the main thread detection path and the high-priority task detection path, and then the detection can be performed on the plurality of detection points in the starting process according to the low-priority task detection path, so that the problem that the main thread task and the high-priority task are insufficient due to resource occupation in the detection of the low-priority task detection points can be avoided, the reasonable distribution of resources is realized, the utilization rate of the resources is improved, the probability of errors of the detection points caused by insufficient resources is reduced, the passing rate of the detection points is improved, and the probability of abnormity of the client is reduced.
In the preferred embodiment of the present invention, in the process of detecting each detection point in the starting process according to the target detection path, for example, in the process of detecting the detection point according to the main thread detection path, the high priority task detection path, and the low priority task detection path, historical behavior data of a user using the client may also be acquired, when the detection point on the target detection path is a non-blocking detection point, it is determined whether to detect the non-blocking detection point according to the historical behavior data, and if not, the non-blocking detection point is skipped, and the non-blocking detection point is not detected.
As shown in fig. 3, the detection point T55 in the high-priority task detection path and the detection point T37 in the low-priority task detection path are blocking detection points, and the detection points other than the blocking detection points are non-blocking detection points. For each user, the initialization times and the use times of the function module corresponding to the non-blocking detection point when the user uses the client are received from the server, the ratio of the use times to the initial times is calculated, when the ratio is smaller than a preset threshold value, the non-blocking detection point is determined not to be detected, and when the ratio is larger than the preset threshold value, the non-blocking detection point is determined to be detected.
Exemplarily, taking the detection point as the video recording function module as an example, the server may count the number of times that the video recording function is initialized (for example, the number of times that the user starts the client and then uses the video recording function), and then calculate a ratio between the number of times that the user uses the video recording function and the number of times that the video recording function is initialized, if the ratio is smaller than a preset threshold, it is indicated that the user rarely uses the video recording function, the client may not initialize and detect the video recording function module when starting, and directly skip the detection of the video recording function module, and if the ratio is larger than the preset threshold, it is indicated that the user has a higher probability of using the video recording function, and the video recording function module needs to be detected.
The embodiment of the invention determines whether to detect the non-blocking detection points on the target detection path or not through the historical behavior data of the user, and when the non-blocking detection points are determined not to be detected, the number of the detection points needing to be detected is reduced, so that the passing rate of the detection points of the client can be improved, the probability of crash flash back during the starting of the client is reduced, the detection time consumption of the detection points is shortened, and the starting speed of the client is accelerated.
S203, acquiring the type of the detection point when the detection point is determined to be abnormal according to the detection result.
Specifically, the detection result may be a parameter obtained after initialization of each detection point, after the detection result of each detection point is obtained, the detection result may be compared with a parameter when the detection point is normal to determine whether one detection point is abnormal, and when one detection point is abnormal, the preset type of the detection point may be obtained. In an alternative embodiment of the present invention, the types of the detection points may include an overall influence type and a local influence type, for one client, the types of the respective detection points may be preset and stored in a designated position under an installation path of the client, and when a detection point is abnormal, the type of the abnormal detection point may be directly read from the designated position.
And S204, acquiring an exception handling strategy of the exception detection point according to the type.
Specifically, the types of the detection points and the exception handling policy when the different types of detection points are abnormal can be preconfigured, and the exception handling policy can avoid crash and flash back when the client starts the exception. In one example, the types of the detection points may include a global influence type and a local influence type, and when a detection point of which the type is the global influence type is abnormal, the exception handling policy of the detection point is configured as an upgrade client, for example, an upgrade prompt interface is generated and displayed to prompt a user to upgrade the client, and the exception handling policy is stored in association with the detection point, so that the exception handling policy of the detection point can be read from the memory when the detection point is abnormal. In another example, when the type of the detection point is the local influence type, the exception handling policy of the detection point is configured to shield the function module corresponding to the detection point, and the exception handling policy is also stored in association with the detection point. When a detection point is abnormal and the type of the detection point is determined, the stored abnormal processing strategy can be obtained according to the type.
S205, executing the exception handling strategy to handle the detection point of the exception.
Specifically, when the detection points of the overall influence type are abnormal, an upgrade prompt interface is generated and displayed to prompt a user to upgrade the client so as to avoid the client breakdown and flash back, and when the detection points of the local influence type are abnormal, the function modules corresponding to the abnormal detection points are shielded so as to avoid the client breakdown and flash back.
According to the embodiment of the invention, when the detection point is abnormal, the corresponding abnormal processing strategy is obtained according to the type of the detection point to process the abnormal detection point, so that the problem that the client terminal is crashed and flashed off to cause unfriendly interface and reduce user experience when the detection point is abnormal can be avoided, and when the client terminal is crashed due to the abnormal detection point of the client terminal, a friendly interface can be provided to avoid the client terminal being flashed off, so that the user experience is improved.
S206, obtaining the abnormal information of the abnormal detection point.
In the embodiment of the present invention, the abnormal information may be version information of the client, operating environment information of the client, a geographic location where the client is located when the client is used, description information of the abnormal event, and the like, where the operating environment information may be an operating system of a terminal device in which the client is installed, hardware resource information, a use condition of the hardware resource, a model of the hardware resource, and the like, and the description information of the abnormal event may be description of the abnormal event, for example, a memory shortage, a stack overflow, a call function return error, and the like.
In practical application, the client can obtain the abnormal information of the detection point through a capture function, the capture function can be a function for detecting the abnormal occurrence of the detection point of the client, the capture function can be injected into the client in advance, and when the client calls the capture function, the capture function can be hooked through a hook function, so that the abnormal information of the abnormal detection point can be obtained through the capture function. Taking the Android system as an example, in the Android system, the capture function may be an Uncaudexeccenter function, where the Uncaudexeccenter function is a function for acquiring exception information when an exception occurs in a detection point of a client, and information such as an exception cause of the exception detection point, a client version, and a model of an electronic device may be acquired by the Uncaudexeccenter function.
And S207, sending the abnormal information to a server, wherein the server is used for generating an abnormal analysis result according to the abnormal information.
In an alternative embodiment of the invention, exception information may be sent to the server. Specifically, the exception information may be a log, and the log may be packaged and then sent to the server. Optionally, the log may be packaged and then sent to the server through a hypertext transfer protocol (HTTP) POST, so as to reduce the data volume of the abnormal information.
After the server receives the abnormal information, the server may analyze the abnormal information to generate an analysis result, for example, after the server receives the abnormal information, the server may perform cluster analysis on the abnormal information, for example, perform clustering according to dimensions such as a model of the terminal device, a version of the client, and a geographical location used by the client, and display the clustered data to the background staff, so that the background staff can quickly analyze the problem and upload a repair package or an upgrade package, and a user may download a detection point or an upgrade client where the repair package is abnormally repaired. Certainly, the server may also perform early warning after receiving the abnormal information analysis result generated by the abnormal information analysis, for example, perform early warning when the number of abnormal users at a certain detection point is greater than a certain number, so as to prompt the background staff to quickly propose a solution strategy.
The client starting abnormity processing method comprises the steps of determining a target detection path associated with a trigger event in a preset digraph when the preset trigger event is detected in the starting process of the client, detecting detection points in the starting process according to the target detection path to obtain detection results of the detection points, obtaining the types of the abnormal detection points when the detection points are determined to be abnormal according to a detection structure, obtaining an abnormity processing strategy according to the types to process the abnormal detection points, obtaining abnormity information of the abnormal detection points, and sending the abnormity information to a server to analyze and generate analysis results. The graph is arranged, so that parallel detection of a plurality of detection points can be realized according to at least two target detection paths, the detection efficiency of the detection points is improved, the detection time consumption of the detection points is reduced, the starting time of the client is shortened, and the client can be quickly started.
Furthermore, the preset directed graph comprises a main thread detection path, a high-priority task detection path and a low-priority task detection path, detection points are detected according to the main thread detection path and the high-priority task detection path, and then the detection points are detected according to the low-priority task detection path, so that reasonable allocation of resources is realized, the utilization rate of the resources is improved, meanwhile, the probability of errors of the detection points caused by insufficient resources is reduced, the passing rate of the detection points is improved, and the probability of abnormity of a client is reduced.
Furthermore, non-blocking detection points which do not need to be detected are determined through historical behavior data of the user, the number of the detection points is reduced, the passing rate of the detection points of the client can be improved, the probability of crash flash back during starting of the client is reduced, the detection time consumption of the detection points is shortened, and the starting speed of the client is accelerated.
EXAMPLE III
Fig. 4 is a block diagram of a structure of a client startup exception handling apparatus according to a third embodiment of the present invention, and as shown in fig. 4, the client startup exception handling apparatus according to the third embodiment of the present invention may specifically include the following modules:
the detection module 401 is configured to, when the client is started, detect a detection point in a starting process according to a preset directed graph to obtain a detection result of the detection point;
a type obtaining module 402, configured to obtain the type of the detection point when it is determined that the detection point is abnormal according to the detection result;
an exception handling module 403, configured to handle a detection point of the exception according to the type.
The client start exception handling device provided by the embodiment of the invention can execute the client start exception handling method provided by the first embodiment and the second embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Referring to fig. 5, a schematic structural diagram of an electronic device in one example of the invention is shown. As shown in fig. 5, the electronic device may specifically include: a processor 500, a memory 501, a display 502 with touch functionality, an input device 503, an output device 504, and a communication device 505. The number of the processors 500 in the device may be one or more, and one processor 500 is taken as an example in fig. 5. The processor 500, the memory 501, the display 502, the input device 503, the output device 504 and the communication device 505 of the apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in the diagram 500.
An embodiment of the present invention further provides a computer-readable storage medium, where instructions in the storage medium, when executed by a processor of a device, enable the device to perform the method for processing client-initiated exception handling according to the foregoing method embodiment.
It should be noted that, as for the embodiments of the apparatus, the electronic device, and the storage medium, since they are basically similar to the embodiments of the method, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (16)

1. A client-side starting exception handling method is characterized by comprising the following steps:
when a client is started, detecting detection points in a starting process according to a preset directed graph to obtain a detection result of the detection points, wherein the preset directed graph is a directed graph indicating the client to perform parallel detection on a plurality of detection points;
when the detection point is determined to be abnormal according to the detection result, acquiring the type of the detection point;
and processing the abnormal detection point according to the type.
2. The method for processing client startup exception according to claim 1, wherein a detection path in the preset directed graph is provided with a trigger event, and the detecting a detection point in the startup process according to the preset directed graph to obtain a detection result of the detection point includes:
when a preset trigger event is detected in the starting process of a client, determining a target detection path associated with the trigger event in the preset directed graph;
and detecting a detection point in the starting process according to the target detection path to obtain a detection result of the detection point.
3. The client startup exception handling method according to claim 2, wherein the preset directed graph includes a main thread detection path and a high-priority task detection path, and when a preset trigger event is detected in a client startup process, determining a target detection path associated with the trigger event in the preset directed graph includes:
and when a first preset event is detected, determining a main thread detection path and a high-priority task detection path in the preset directed graph as target detection paths, wherein the first preset event is the start of the client.
4. The method for processing client startup exception according to claim 3, wherein the detecting a detection point in the startup process according to the target detection path to obtain a detection result of the detection point includes:
and detecting a detection point in the starting process according to the main thread detection path and the high-priority task detection path to obtain a detection result of the detection point.
5. The client startup exception handling method according to claim 3, wherein the preset directed graph further includes a low priority task detection path, and when a preset trigger event is detected in a client startup process, determining a target detection path associated with the trigger event in the preset directed graph includes:
when a second preset event is detected, determining that a low-priority task detection path in the preset directed graph is a target detection path, wherein the second preset event is one of the following events:
initializing a preset low-priority task, enabling the starting time to reach the preset time, and detecting designated detection points on the main thread detection path and the high-priority task detection path.
6. The client startup exception handling method according to claim 5, wherein the detecting a detection point in the startup process according to the target detection path includes:
and detecting detection points in the starting process according to the low-priority task detection path in the preset directed graph to obtain the detection results of the detection points.
7. The client startup exception handling method according to any one of claims 2 to 6, wherein the detecting a detection point in a startup process according to the target detection path to obtain a detection result of the detection point includes:
acquiring historical behavior data of a user using the client;
when a detection point on the target detection path is a non-blocking detection point, judging whether the non-blocking detection point is detected or not according to the historical behavior data;
if not, skipping the non-blocking detection point and not detecting the non-blocking detection point.
8. The method of claim 7, wherein the obtaining historical behavior data of a user using the client comprises:
and receiving the initialization times and the use times of the function modules corresponding to the detection points when the user uses the client from the server.
9. The method for client startup exception handling according to claim 8, wherein when the detection point on the target detection path is a non-blocking detection point, determining whether to detect the non-blocking detection point according to the historical behavior data includes:
calculating the ratio of the number of uses to the initial number of times;
when the ratio is smaller than a preset threshold value, determining not to detect the non-blocking detection point;
and when the ratio is larger than a preset threshold value, determining to detect the non-blocking detection point.
10. The client-initiated exception handling method according to any of claims 1 to 6, wherein said processing the detection point of the exception according to the type comprises:
acquiring an exception handling strategy of the exception detection point according to the type;
executing the exception handling policy to handle a detection point of the exception.
11. The client-initiated exception handling method according to claim 10, wherein the type includes an overall impact type, and the obtaining the exception handling policy of the detection point of the exception according to the type includes:
when the type is the integral influence type, determining an exception handling strategy for displaying an upgrade prompting interface as the abnormal detection point;
the executing the exception handling policy to handle a detection point of the exception includes:
and generating and displaying an upgrade prompt interface to prompt a user to upgrade the client.
12. The client-initiated exception handling method according to claim 10, wherein the type includes a local impact type, and wherein the obtaining the exception handling policy of the detection point of the exception according to the type includes:
when the type is a local influence type, determining a function module corresponding to the detection point for shielding the abnormity as an abnormity processing strategy of the abnormal detection point;
the executing the exception handling policy to handle a detection point of the exception includes:
and shielding the functional module corresponding to the abnormal detection point.
13. The client-initiated exception handling method according to any one of claims 1 to 6, further comprising, after processing the detection point of the exception according to the exception handling policy:
acquiring abnormal information of the abnormal detection point;
and sending the abnormal information to a server, wherein the server is used for generating an abnormal analysis result according to the abnormal information.
14. A client-initiated exception handling apparatus, comprising:
the detection module is used for detecting detection points in the starting process according to a preset digraph to obtain detection results of the detection points when the client is started;
the type acquisition module is used for acquiring the type of the detection point when the detection point is determined to be abnormal according to the detection result;
and the exception handling module is used for handling the detection point of the exception according to the type.
15. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the client-initiated exception handling method of any one of claims 1-13.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a client initiated exception handling method according to any one of claims 1 to 13.
CN202011165151.4A 2020-10-27 2020-10-27 Client starting exception handling method and device, electronic equipment and storage medium Pending CN112527543A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011165151.4A CN112527543A (en) 2020-10-27 2020-10-27 Client starting exception handling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011165151.4A CN112527543A (en) 2020-10-27 2020-10-27 Client starting exception handling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112527543A true CN112527543A (en) 2021-03-19

Family

ID=74979003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011165151.4A Pending CN112527543A (en) 2020-10-27 2020-10-27 Client starting exception handling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112527543A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872823A (en) * 2021-08-06 2021-12-31 中标慧安信息技术股份有限公司 Internet of things terminal abnormal starting monitoring method and system
CN114327673A (en) * 2021-12-16 2022-04-12 北京达佳互联信息技术有限公司 Task starting method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872823A (en) * 2021-08-06 2021-12-31 中标慧安信息技术股份有限公司 Internet of things terminal abnormal starting monitoring method and system
CN114327673A (en) * 2021-12-16 2022-04-12 北京达佳互联信息技术有限公司 Task starting method and device, electronic equipment and storage medium
CN114327673B (en) * 2021-12-16 2024-03-12 北京达佳互联信息技术有限公司 Task starting method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106547578B (en) Loading method and device of terminal application APP
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
CN108763089B (en) Test method, device and system
CN108600034B (en) Service pressure management method, device, equipment, system and storage medium
CN107506240B (en) Background application program control method and device, storage medium and electronic equipment
CN112527543A (en) Client starting exception handling method and device, electronic equipment and storage medium
CN108809683B (en) Method and device for deploying cloud application system
WO2020232871A1 (en) Method and device for microservice dependency analysis
CN110765394A (en) So file loading method and device, storage medium and terminal equipment
CN110704131B (en) Method and device for calling native application by HTML5 application
CN105337783A (en) Method of monitoring abnormal flow consumption of communication equipment and apparatus
CN109800085B (en) Resource configuration detection method and device, storage medium and electronic equipment
CN107301125B (en) Method and device for searching root error and electronic equipment
CN109446034B (en) Method and device for reporting crash event, computer equipment and storage medium
CN110912949B (en) Method and device for submitting sites
CN111416857A (en) Client crash processing method, device, system, equipment and storage medium
CN114138499B (en) GPU resource utilization rate monitoring method and device, computer equipment and medium
CN112989323B (en) Process detection method, device, terminal and storage medium
CN110688206A (en) Timing task scheduling method and device, computer equipment and storage medium
CN107783825B (en) Multi-background process starting method and device for mobile terminal and mobile terminal
CN108347456B (en) Application program downloading method and device
CN114385457A (en) Application program data acquisition method, device, equipment and storage medium
CN113259449A (en) Distributed storage method, device, equipment and storage medium
CN111338926A (en) Patch testing method and device and electronic equipment
CN114253825A (en) Memory leak detection method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination