Method and device for detecting failure of push link, electronic equipment and storage medium
By automating the detection and push of message paths to link nodes, the problem of low fault detection efficiency in existing technologies is solved, achieving efficient and accurate fault node location and reducing cost and time impact.
Patent Information
- Application Number
- CN202110261430.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-10
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-03-10
AI Technical Summary
In existing technologies, message push link fault detection is inefficient and costly, and cannot quickly and accurately locate faulty nodes, affecting user experience.
By using an automated method, the message paths corresponding to the nodes in the push link are detected sequentially. The detection results of the message paths are used to gradually identify faulty nodes, including sending messages and detecting the receiving status, to determine the faulty path.
It improves the accuracy and efficiency of fault detection, reduces testing costs, shortens the time faulty nodes exist, and enhances the user experience.
Smart Images

Figure CN115080834B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the Internet technology, and particularly to a push link fault detection method and device, electronic equipment and computer readable storage medium. BACKGROUND
[0002] As one of the most important operation means of the application (APP, Application) installed in the terminal, the message push (Push) function is valued by more and more application developers. In the Internet era of information flooding, the message push function is the most optimal channel for operation, and can help product operation personnel to achieve the operation goal more efficiently if used properly.
[0003] The principle of message push is to push the message to be sent and the target terminal to be sent by the server corresponding to the APP installed on the terminal to the Push service deployed in another server, and the Push service finds the target terminal in the terminal list installed with the APP to issue the message, which can realize simultaneous message issuing to one or more terminals of different platforms.
[0004] As known from the above, there are many nodes in the push link for realizing message push, and when the push link fails to cause the terminal to fail to receive the pushed message, the related technology usually detects the fault node in the push link by manual troubleshooting, which will result in low detection efficiency and accuracy, and there is no effective solution for this in the related technology. SUMMARY
[0005] The embodiments of the present application provide a push link fault detection method, device, electronic equipment and computer readable storage medium, which can accurately and efficiently detect the fault node of the push link in an automatic manner.
[0006] The technical scheme of the embodiments of the present application is as follows:
[0007] The embodiments of the present application provide a push link fault detection method, device, electronic equipment and computer readable storage medium, which can accurately and efficiently detect the fault node of the push link in an automatic manner.
[0008] The first message is sent to the first terminal through the push link, and the push link includes a plurality of nodes;
[0009] In response to the first message not arriving at the first terminal within a timeout period, a plurality of message paths corresponding to the plurality of nodes in the push link are determined;
[0010] Each message path is used to detect whether the corresponding node is a fault node.
[0011] According to the order of the plurality of nodes in the push link, at least part of the message paths corresponding to the plurality of nodes are detected in sequence to determine the fault node in the push link.
[0012] In the above scheme, according to the order of the plurality of nodes in the push link, at least part of the message paths corresponding to the plurality of nodes are detected in sequence, including:
[0013] When it is detected according to the second order that the nodes in the push link located before the third-party push server are not fault nodes, the following processing is performed to detect the message path corresponding to the third-party push server:
[0014] The second terminal is controlled to send an eighth message to the third-party push server through the application server;
[0015] When the third-party push server receives the eighth message, it is determined that the message path corresponding to the third-party push server is not a fault path;
[0016] When the third-party push server does not receive the eighth message, it is determined that the message path corresponding to the third-party push server is a fault path.
[0017] In the above scheme, according to the order of the plurality of nodes in the push link, at least part of the message paths corresponding to the plurality of nodes are detected in sequence, including:
[0018] When it is detected according to the second order that the nodes in the push link located before the native push server are not fault nodes, the following processing is performed to detect the message path corresponding to the native push server:
[0019] The second terminal is controlled to send a ninth message and a push token corresponding to the first terminal to the third-party push server through the application server, so that
[0020] The third-party push server finds a device token that has a mapping relationship with the push token, and sends the device token and the ninth message to the native push server;
[0021] When the native push server receives the ninth message and the device token, it is determined that the message path corresponding to the native push server is not a fault path;
[0022] When the native push server does not receive the ninth message and the device token, it is determined that the message path corresponding to the native push server is a fault path.
[0023] In the foregoing solution, the at least part of the message paths in the message paths corresponding to the plurality of nodes are detected in sequence according to the order of the plurality of nodes in the push link, comprising:
[0024] When it is detected according to the second order that all the nodes in the push link located before the first terminal are not fault nodes, the following processing is performed to detect the message path corresponding to the first terminal:
[0025] The second terminal is controlled to send, through the application server, an eleventh message and a push token corresponding to the first terminal to the third-party push server, so that
[0026] The third-party push server finds a device token having a mapping relationship with the push token, and sends the device token and the eleventh message to the native push server, so that
[0027] The native push server sends the eleventh message to the first terminal based on the device token;
[0028] When the first terminal receives the eleventh message, it is determined that the message path corresponding to the first terminal is not a fault path.
[0029] When the first terminal does not receive the eleventh message, it is determined that the message path corresponding to the first terminal is a fault path.
[0030] In the foregoing solution, the at least part of the message paths in the message paths corresponding to the plurality of nodes are detected in sequence according to the order of the plurality of nodes in the push link, comprising:
[0031] When it is detected according to the second order that all the nodes in the push link located before the first terminal are not fault nodes, the following processing is performed to detect the message path corresponding to the first terminal:
[0032] The second terminal is controlled to send, through the application server, an eleventh message and a push token corresponding to the first terminal to the third-party push server, so that
[0033] The third-party push server sends the eleventh message to the first terminal based on the push token;
[0034] When the first terminal receives the eleventh message, it is determined that the message path corresponding to the first terminal is not a fault path.
[0035] When the first terminal does not receive the eleventh message, it is determined that the message path corresponding to the first terminal is a fault path.
[0036] Embodiments of the present application provide a push link fault detection device, comprising:
[0037] The sending module is configured to send a first message to a first terminal through a push link, the push link comprising a plurality of nodes;
[0038] The determining module is configured to determine, in response to the first message not reaching the first terminal before a timeout, a plurality of message paths in the push link, each message path corresponding to a respective node of the plurality of nodes;
[0039] Each message path is configured to detect whether the corresponding node is a faulty node.
[0040] The detecting module is configured to detect, according to an order of the plurality of nodes in the push link, at least part of the message paths corresponding to the plurality of nodes in sequence, to determine a faulty node in the push link.
[0041] In the above scheme, the determining module is further configured to determine, when the first terminal supports a third-party push server accessing through a native push server, message paths corresponding to the following nodes included in the push link: a second terminal, an application server, the third-party push server, the native push server, and the first terminal; and determine, when the first terminal supports the third-party push server directly accessing, message paths corresponding to the following nodes included in the push link: the second terminal, the application server, the third-party push server, and the first terminal.
[0042] In the above scheme, the detecting module is further configured to detect, in a first order, message paths corresponding to nodes in the push link, wherein the first order is an inverse order of an order of nodes passed through when transmitting the first message to the first terminal through the push link, and the message path corresponding to a node comprises the node and nodes in the push link located before the node in the first order; when the message path corresponding to a previously detected node has no fault, continue to detect a message path corresponding to a next node until a faulty message path is detected, and determine a node corresponding to the faulty message path as a faulty node.
[0043] In the above scheme, the detecting module is further configured to detect, in a second order, message paths corresponding to nodes in the push link, wherein the second order is an order of nodes passed through when transmitting the first message to the first terminal through the push link, and the message path corresponding to a node comprises the node and nodes in the push link located before the node in the second order; when the message path corresponding to a previously detected node has no fault, continue to detect a message path corresponding to a next node until a faulty message path is detected, and determine a node corresponding to the faulty message path as a faulty node.
[0044] In the above scheme, the detection module is further configured to, when it is detected according to the first order that none of the nodes in the push link before the first terminal is a faulty node, or when it is detected according to the second order that none of the nodes in the push link before the first terminal is a faulty node, perform the following processing to detect the message path corresponding to the first terminal: control the first terminal to acquire and install an installation package of a client used to receive the first message, and after the installation is completed, query a device token corresponding to the first terminal through a setting page of the client; determine a notification state of the client through a notification page of the client; when the notification state is an open state and it is queried that the device token corresponding to the first terminal has been generated, determine that the message path corresponding to the first terminal is not a faulty path; when the notification state is a closed state or it is not queried that the device token corresponding to the first terminal has been generated, determine that the message path corresponding to the first terminal is a faulty path.
[0045] In the above scheme, the detection module is further configured to, when it is detected according to the first order that none of the nodes in the push link before the first terminal is a faulty node, or when it is detected according to the second order that none of the nodes in the push link before the first terminal is a faulty node, perform the following processing to detect the message path corresponding to the first terminal: control the first terminal to acquire and install an installation package of a client used to receive the first message, and after the installation is completed, query a device token corresponding to the first terminal through a setting page of the client; determine a notification state of the client through a notification page of the client; when the notification state is an open state and it is queried that the device token corresponding to the first terminal has been generated, determine that the message path corresponding to the first terminal is not a faulty path; when the notification state is a closed state or it is not queried that the device token corresponding to the first terminal has been generated, determine that the message path corresponding to the first terminal is a faulty path.
[0046] In the above scheme, the detection module is further configured to, when it is detected according to the first order that none of the nodes in the push link before the first terminal is a faulty node, or when it is detected according to the second order that none of the nodes in the push link before the first terminal is a faulty node, perform the following processing to detect the message path corresponding to the first terminal: control the first terminal to acquire and install an installation package of a client used to receive the first message, and after the installation is completed, query a device token corresponding to the first terminal through a setting page of the client; determine a notification state of the client through a notification page of the client; when the notification state is an open state and it is queried that the device token corresponding to the first terminal has been generated, determine that the message path corresponding to the first terminal is not a faulty path; when the notification state is a closed state or it is not queried that the device token corresponding to the first terminal has been generated, determine that the message path corresponding to the first terminal is a faulty path.
[0047] In the above scheme, the detection module is further configured to, when detecting that all nodes in the push link located before the third-party push server are not faulty nodes in the first order, perform the following processing to detect the message path corresponding to the third-party push server: control the third-party push server to obtain a user identifier corresponding to a client running in the first terminal, and find a device token having a mapping relationship with the user identifier; control the third-party push server to send the device token and a fourth message to the native push server, so that the native push server sends the fourth message to the first terminal according to the device token; when the first terminal receives the fourth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the first terminal does not receive the fourth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0048] In the above scheme, the detection module is further configured to, when detecting that all nodes in the push link located before the third-party push server are not faulty nodes in the first order, perform the following processing to detect the message path corresponding to the third-party push server: control the third-party push server to obtain a user identifier corresponding to a client running in the first terminal, and find a device token having a mapping relationship with the user identifier; control the third-party push server to send the device token and a fourth message to the native push server, so that the native push server sends the fourth message to the first terminal according to the device token; when the first terminal receives the fourth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the first terminal does not receive the fourth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0049] In the above scheme, the detection module is further configured to, when detecting that all nodes in the push link located before the third-party push server are not faulty nodes in the first order, perform the following processing to detect the message path corresponding to the third-party push server: control the third-party push server to obtain a user identifier corresponding to a client running in the first terminal, and find a device token having a mapping relationship with the user identifier; control the third-party push server to send the device token and a fourth message to the native push server, so that the native push server sends the fourth message to the first terminal according to the device token; when the first terminal receives the fourth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the first terminal does not receive the fourth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0050] In the above scheme, the detection module is further configured to, when it is detected according to the second order that all the nodes located before the application server in the push link are not faulty nodes, perform the following processing to detect the message path corresponding to the application server: control the second terminal to send an eighth message to the third-party push server through the application server; when the third-party push server receives the eighth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the third-party push server does not receive the eighth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0051] In the above scheme, the detection module is further configured to, when it is detected according to the second order that all the nodes located before the application server in the push link are not faulty nodes, perform the following processing to detect the message path corresponding to the application server: control the second terminal to send an eighth message to the third-party push server through the application server; when the third-party push server receives the eighth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the third-party push server does not receive the eighth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0052] In the above scheme, the detection module is further configured to, when it is detected according to the second order that all the nodes located before the application server in the push link are not faulty nodes, perform the following processing to detect the message path corresponding to the application server: control the second terminal to send an eighth message to the third-party push server through the application server; when the third-party push server receives the eighth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the third-party push server does not receive the eighth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0053] In the above scheme, the detection module is further configured to, when it is detected according to the second order that all the nodes located before the application server in the push link are not faulty nodes, perform the following processing to detect the message path corresponding to the application server: control the second terminal to send an eighth message to the third-party push server through the application server; when the third-party push server receives the eighth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the third-party push server does not receive the eighth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0054] In the above solution, the detection module is further configured to, when detecting that all nodes before the first terminal in the push link in the second order are not faulty nodes, perform the following processing to detect the message path corresponding to the first terminal: control the second terminal to send, to a third-party push server via an application server, an eleventh message and a push token corresponding to the first terminal, so that the third-party push server sends the eleventh message to the first terminal based on the push token; when the first terminal receives the eleventh message, determine that the message path corresponding to the first terminal is not a faulty path; and when the first terminal does not receive the eleventh message, determine that the message path corresponding to the first terminal is a faulty path.
[0055] In the above solution, the detection module is further configured to, when detecting that all nodes before the first terminal in the push link in the second order are not faulty nodes, perform the following processing to detect the message path corresponding to the first terminal: control the second terminal to send, to a third-party push server via an application server, an eleventh message and a push token corresponding to the first terminal, so that the third-party push server sends the eleventh message to the first terminal based on the push token; when the first terminal receives the eleventh message, determine that the message path corresponding to the first terminal is not a faulty path; and when the first terminal does not receive the eleventh message, determine that the message path corresponding to the first terminal is a faulty path.
[0056] An electronic device is provided in an embodiment of the present application, and the electronic device comprises:
[0057] A memory is configured to store computer executable instructions.
[0058] A processor is configured to execute the computer executable instructions stored in the memory, so as to implement the push link fault detection method provided in the embodiments of the present application.
[0059] A computer readable storage medium is provided in an embodiment of the present application, and the computer readable storage medium stores computer executable instructions, so as to implement the push link fault detection method provided in the embodiments of the present application when the processor executes the computer executable instructions.
[0060] The embodiments of the present application have the following beneficial effects:
[0061] According to the order of the nodes in the push link, the message path corresponding to the nodes is automatically detected, so that the faulty node is gradually checked according to the detection result of the message path. Compared with the manual checking mode, the accuracy and detection efficiency of fault detection can be improved, and the test cost can be saved. BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1A and Figure 1B is a principle schematic diagram of message pushing provided by an embodiment of the present application;
[0063] Figure 2 is an application scenario schematic diagram of a fault detection method of a push link provided by the related art;
[0064] Figure 3 is an architecture schematic diagram of a fault detection system of a push link provided by an embodiment of the present application;
[0065] Figure 4 is a structure schematic diagram of a test server 500 provided by an embodiment of the present application;
[0066] Figure 5 is a flow schematic diagram of a fault detection method of a push link provided by an embodiment of the present application;
[0067] Figure 6A and Figure 6B is a structure schematic diagram of a push link provided by an embodiment of the present application;
[0068] Figure 7 is a flow schematic diagram of a fault detection method of a push link provided by an embodiment of the present application;
[0069] Figure 8 is a flow schematic diagram of a fault detection method of a push link provided by an embodiment of the present application;
[0070] Figure 9 is a display interface schematic diagram of a push message provided by an embodiment of the present application;
[0071] Figure 10 is a structure schematic diagram of a push link provided by an embodiment of the present application;
[0072] Figure 11A , Figure 11B , Figure 11C , Figure 11D and Figure 11E is a principle schematic diagram of a fault detection method of a push link provided by an embodiment of the present application;
[0073] Figure 12A , Figure 12B , Figure 12C , Figure 12D , Figure 12E and Figure 12Fis a schematic diagram of the principle of the method for detecting failure of a push link provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be described in further detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without making any creative labor fall within the scope of protection of the present application.
[0075] In the following description, reference is made to "some embodiments", which describes a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0076] In the following description, the term "first\second" is only to distinguish similar objects, and does not represent a specific order of the objects. It can be understood that "first\second" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0077] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0078] The related data collection and processing in the embodiments of the present application should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and within the scope of authorization of laws and regulations and the personal information subject, carry out subsequent data use and processing.
[0079] Before the embodiments of the present application are described in further detail, the terms and terms involved in the embodiments of the present application are explained, which are applicable to the following explanations.
[0080] 1) Push: usually divided into offline Push and online Push, offline Push refers to that the APP receives a push message when running in the terminal background or when the APP is not started; online Push refers to that the APP receives a push message when running in the terminal background. Offline Push can be realized by a native push server and a third-party push server; online Push can be realized by long connection.
[0081] 2) Application Server: the server of an application (e.g., a native application or a third-party application) in a terminal, which is used to expose business logic to the corresponding application in the terminal through various protocols, that is, the application server provides a way to access the business logic for use by the application.
[0082] 3) Third-Party Push Server: the server of a message push service provided by a third-party system (e.g., an operating system other than the terminal), which is generally deployed by the developer of the third-party system, such as the Qing'ge push server of Tencent.
[0083] For example, referring to Figure 1A , Figure 1A is a principle diagram of message push provided by an embodiment of the present application. When a message is pushed to a terminal, the application server needs to send the message to the third-party push server, the third-party push server receives the message and then sends the corresponding message to the terminal, and when the terminal receives the pushed message, the operating system will deliver the message to the APP of the terminal and display it. The third-party push server sends the message to the corresponding terminal based on a push token.
[0084] 4) Native Push Server: the server of a message push service native to the operating system of the terminal, which is generally deployed by the developer of the operating system of the terminal, such as the server of the Apple Push Notification Service (APNs, Apple Push Notification Service) used in the iOS system of Apple and the server of the Google Mobile Service (GMS, Google Mobile Service) used in the Android operating system of Google.
[0085] For example, taking the native push server as the APNs, referring to Figure 1B , Figure 1B is a principle diagram of message push provided by an embodiment of the present application. When a message is pushed to a terminal, the application server needs to send the message to the third-party push server, the third-party push server receives the message and then sends the message to the APNs, the APNs sends the corresponding message to the terminal, and when the terminal receives the pushed message, the APNs service module in the operating system will deliver the message to the APP of the terminal and display it. The APNs sends the message to the corresponding terminal based on a device token.
[0086] 5) Automation Detection: without human intervention, a script or a specific program is used to control the machine to perform the required task, and then the script or the specific program is used to detect whether the running result meets the expectation. For example, the implementation code can be implanted in the entity (e.g., the third-party push server, the application server or the second terminal, etc.) involved in the following description to implement the fault detection method of the push link, so that the entity involved in the following description can be controlled to perform the corresponding detection task.
[0087] 6) message path: refers to a transmission path of a message. The message path corresponding to a node to be detected in a push link is used to detect whether the corresponding node is a fault node, wherein the message path includes at least one node.
[0088] When a push link used to implement message pushing fails, causing a terminal to be unable to receive a pushed message, the related art usually detects a fault node in the push link by means of manual detection. Referring to Figure 2 , Figure 2 is an application scenario diagram of a fault detection method of a push link provided by the related art. Figure 2 In the related art, because a large number of nodes are involved in the push link, a developer responsible for each node needs to be contacted through a communication tool to detect the node responsible for by the developer, so as to detect a fault node in the push link.
[0089] The applicant found in the implementation process that the related art has the following disadvantages: (1) because the nodes responsible for by each developer are different and independent of each other, when the push link fails, the approximate direction of a fault node cannot be known, resulting in blindness in troubleshooting the fault node, and thus the detection efficiency of the fault node is low; (2) a user of Push is large, and when the push link fails, the fault node must be found as soon as possible and repaired, however, the detection efficiency of the fault node in the related art is low and time-consuming, thus the fault node exists for a long time, affecting the use of the Push function by the user; (3) each developer needs to manually detect whether the node responsible for by the developer is a fault node, resulting in a large testing cost.
[0090] To solve the above technical problems, the embodiment of the present application provides a fault detection method of a push link, which can accurately and efficiently detect a fault node of the push link in an automatic manner. The following describes an exemplary application of the fault detection method of the push link provided by the embodiment of the present application. The fault detection method of the push link provided by the embodiment of the present application can be implemented by various electronic devices, for example, can be implemented by a server alone or by a terminal and a server cooperatively.
[0091] Next, the embodiment of the present application is described by taking the cooperative implementation by a server and a terminal as an example, referring to Figure 3 , Figure 3 is an architecture diagram of a fault detection system of a push link provided by the embodiment of the present application. The fault detection system of the push link includes a first terminal 100, a native push server 200, an application server 300, a third-party push server 400, and a test server 500, which will be described respectively.
[0092] In some embodiments, Figure 3 In some embodiments, the push link includes the following nodes: the first terminal 100, the native push server 200, the application server 300, and the third-party push server 400. When there is no faulty node in the push link, the application server 300 sends a message to the third-party push server 400, the third-party push server 400 sends a message to the native push server 200, the native push server 200 sends a message to the first terminal 100, and when the first terminal 100 receives the message, the operating system of the first terminal 100 delivers the message to the client 110 in the first terminal 100 and displays it.
[0093] As an example, when the pushed message does not arrive at the first terminal 100 within a timeout period, it indicates that there may be a faulty node in the push link. Therefore, the test server 500 can be used to detect the faulty node in the push link. The detection process can include determining a plurality of message paths in the push link, each message path being used to detect whether a corresponding node is a faulty node; and detecting at least part of the message paths in the push link according to the order of the nodes in the push link to determine the faulty node in the push link.
[0094] As an example, the test server 500 can send a test message to the first terminal 100, the application server 300, the third-party push server 400, and the native push server 200 in sequence, and monitor whether the test message arrives at the first terminal 100, the application server 300, the third-party push server 400, and the native push server 200 in sequence. Figure 3 In some embodiments, the test server 500 can send a test message to the first terminal 100, the application server 300, the third-party push server 400, and the native push server 200 in sequence, and monitor whether the test message arrives at the first terminal 100, the application server 300, the third-party push server 400, and the native push server 200 in sequence.
[0095] The embodiments of the present application can be implemented by means of cloud technology. Cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software, and network to realize data calculation, storage, processing, and sharing in a wide area network or a local area network.
[0096] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology applied based on cloud computing business model, and can form a resource pool for on-demand use. Cloud computing technology will become an important support. The background service of a technical network system requires a large amount of computing and storage resources.
[0097] As an example, the test server 500 can be a standalone physical server, a server cluster composed of multiple physical servers, or a distributed system, and can also be a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform. The first terminal 100 can be various types of user terminals such as smart phones, tablet computers, vehicle-mounted terminals, smart wearable devices, notebook computers, and desktop computers.
[0098] Next, the structure of the test server 500 in Figure 3 will be described. Referring to Figure 4 , Figure 4 is a structural schematic diagram of the test server 500 provided by the embodiments of the present application, Figure 4 The test server 500 shown in the figure includes at least one processor 510, a memory 540, and at least one network interface 520. The various components in the test server 500 are coupled together through a bus system 530. It can be understood that the bus system 530 is used to realize the connection communication between the components. The bus system 530 includes not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 530 in Figure 4 .
[0099] The processor 510 can be an integrated circuit chip with signal processing capability, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0100] The memory 540 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), and the volatile memory can be random access memory (RAM). The memory 540 described in the embodiments of the present application is intended to include any suitable type of memory. The memory 540 can optionally include one or more storage devices that are physically remote from the processor 510.
[0101] In some embodiments, the memory 540 can store data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, which are exemplarily described below.
[0102] The operating system 541 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks;
[0103] The network communication module 542 is configured to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB), and the like;
[0104] In some embodiments, the push link fault detection apparatus provided by the embodiments of the present application can be implemented in a software manner, Figure 4 The push link fault detection apparatus 543 stored in the memory 540 is shown, which can be software in the form of programs and plug-ins, and includes the following software modules: a sending module 5431, a determining module 5432, and a detecting module 5433. These modules are logical functional modules, and thus can be combined or further split according to the implemented functions. The functions of the various modules will be described below.
[0105] Next, the push link fault detection method provided by the embodiments of the present application will be described by way of example of the test server 500 executing the push link fault detection method provided by the embodiments of the present application. Figure 3 Figure 5 , Figure 5 is a flowchart of the push link fault detection method provided by the embodiments of the present application, which will be described in combination with the steps shown in Figure 5 .
[0106] In step S101, a first message is sent to a first terminal through a push link.
[0107] Here, the push link includes multiple nodes.
[0108] In some embodiments, referring to Figure 6A , Figure 6A is a structural diagram of the push link provided by the embodiments of the present application, Figure 6A In some embodiments, when the first terminal supports access of the third-party push server through the native push server, and the first message is issued by the application server (for example, corresponding to a scenario in which the application server actively pushes software update notifications, hot news, and the like), the push link includes the following nodes: the application server, the third-party push server, the native push server, and the first terminal. In some embodiments, the push link can also include a second terminal, in which case the source of the first message is the second terminal (for example, corresponding to a scenario in which a user of the second terminal shares social dynamics to a user of the first terminal).
[0109] Taking the operating system of the first terminal as an iOS system for example, the push link includes the following nodes: the second terminal, an application server of an application in the first terminal (for example, a native application program in the operating system of the first terminal or a third-party application program installed by a user), a third-party push server, an APN of the iOS operating system, and the first terminal.
[0110] For example, Figure 10 In the live broadcast application scenario, the nodes of the push link used by the offline Push message include: a live broadcast assistant terminal (that is, a terminal on which a live broadcast assistant APP is installed, that is, the second terminal described above), a business background (that is, the application server described above), a live broadcast terminal (that is, a terminal on which a live broadcast APP is installed, that is, the first terminal described above), a third-party push background (that is, the third-party push server described above), and an APN (that is, the native push server described above).
[0111] In other embodiments, referring to Figure 6B , Figure 6B is a structural diagram of a push link provided by an embodiment of the present application, Figure 6B In the live broadcast application scenario, the nodes of the push link used by the offline Push message include: a live broadcast assistant terminal (that is, a terminal on which a live broadcast assistant APP is installed, that is, the second terminal described above), a business background (that is, the application server described above), a live broadcast terminal (that is, a terminal on which a live broadcast APP is installed, that is, the first terminal described above), a third-party push background (that is, the third-party push server described above), and an APN (that is, the native push server described above).
[0112] Taking the operating system of the first terminal as an Android system for example, the push link includes the following nodes: the second terminal, an application server of an application in the first terminal (for example, a native application program in the operating system of the first terminal or a third-party application program installed by a user), a third-party push server, and the first terminal.
[0113] In step S102, in response to the first message not reaching the first terminal within a timeout period, multiple message paths corresponding to multiple nodes in the push link are determined.
[0114] Here, each message path is used to detect whether the corresponding node is a faulty node.
[0115] In some embodiments, when the first terminal supports access of the third-party push server through the native push server, multiple message paths corresponding to the following nodes included in the push link are determined: the second terminal, the application server, the third-party push server, the native push server, and the first terminal.
[0116] As an example, the order in which the nodes are detected can be different, and the message path corresponding to a node can be different. When detecting the message path corresponding to a node in the push link in the first order, the message path corresponding to the node includes the node and the nodes in the push link that are located before the node in the first order.
[0117] Here, the first order is the reverse order of the order of the nodes passed through when transmitting the first message to the first terminal through the push link, for example, first terminal -> native push server -> third-party push server -> application server -> second terminal.
[0118] For example, when detecting the message path corresponding to a node in the push link in the first order, the message path including the first terminal is determined as the message path corresponding to the first terminal; the message path including the first terminal and the native push server is determined as the message path corresponding to the native push server; the message path including the first terminal, the native push server, and the third-party push server is determined as the message path corresponding to the third-party push server; the message path including the first terminal, the native push server, the third-party push server, and the application server is determined as the message path corresponding to the application server; and the message path including the first terminal, the native push server, the third-party push server, the application server, and the second terminal is determined as the message path corresponding to the second terminal.
[0119] As an example, the order in which the nodes are detected can be different, and the message path corresponding to a node can be different. When detecting the message path corresponding to a node in the push link in the first order, the message path corresponding to the node includes the node and the nodes in the push link that are located before the node in the first order.
[0120] Here, the first order is the reverse order of the order of the nodes passed through when transmitting the first message to the first terminal through the push link, for example, first terminal -> native push server -> third-party push server -> application server -> second terminal.
[0121] For example, when detecting the message path corresponding to a node in the push link in the first order, the message path including the first terminal is determined as the message path corresponding to the first terminal; the message path including the first terminal and the native push server is determined as the message path corresponding to the native push server; the message path including the first terminal, the native push server, and the third-party push server is determined as the message path corresponding to the third-party push server; the message path including the first terminal, the native push server, the third-party push server, and the application server is determined as the message path corresponding to the application server; and the message path including the first terminal, the native push server, the third-party push server, the application server, and the second terminal is determined as the message path corresponding to the second terminal.
[0122] In some embodiments, the first terminal supports direct access of the third-party push server, and the determining the push link comprises a plurality of message paths respectively corresponding to the following nodes of the push link: the second terminal, the application server, the third-party push server, and the first terminal.
[0123] As an example, the order of detecting the nodes is different, and the message paths corresponding to the nodes can be different. When detecting the message paths corresponding to the nodes in the push link in the first order, the message path corresponding to a node comprises the node, and nodes in the push link located before the node in the first order.
[0124] Here, the first order can be the first terminal -> the third-party push server -> the application server -> the second terminal.
[0125] For example, when detecting the message paths corresponding to the nodes in the push link in the first order, the message path comprising the first terminal is determined as the message path corresponding to the first terminal; the message path comprising the first terminal and the third-party push server is determined as the message path corresponding to the third-party push server; the message path comprising the first terminal, the third-party push server and the application server is determined as the message path corresponding to the application server; and the message path comprising the first terminal, the third-party push server, the application server and the second terminal is determined as the message path corresponding to the second terminal.
[0126] As an example, when detecting the message paths corresponding to the nodes in the push link in the second order, the message path corresponding to a node comprises the node, and nodes in the push link located before the node in the second order.
[0127] Here, the second order can be the second terminal -> the application server -> the third-party push server -> the first terminal.
[0128] For example, when detecting the message paths corresponding to the nodes in the push link in the second order, the message path comprising the second terminal is determined as the message path corresponding to the second terminal; the message path comprising the second terminal and the application server is determined as the message path corresponding to the application server; the message path comprising the second terminal, the application server and the third-party push server is determined as the message path corresponding to the third-party push server; and the message path comprising the second terminal, the application server, the third-party push server and the first terminal is determined as the message path corresponding to the first terminal.
[0129] In step S103, at least part of the message paths corresponding to the plurality of nodes are detected in turn according to the order of the plurality of nodes in the push link, to determine the faulty node in the push link.
[0130] In some embodiments, referring to Figure 7 , Figure 7FIG. 1 is a flowchart of a method for detecting a failure of a push link according to an embodiment of the present application. The method is based on Figure 5 Step S103 can include step S1031 and step S1032.
[0131] In step S1031, a message path corresponding to a node in the push link is detected in a first order.
[0132] Taking an example in which the first terminal supports access of the third-party push server through the native push server, the first order is the first terminal -> the native push server -> the third-party push server -> the application server -> the second terminal, and the order in which the message paths corresponding to the nodes in the push link are detected can be: (1) detecting a message path corresponding to the first terminal (i.e., a message path including the first terminal); (2) detecting a message path corresponding to the native push server (i.e., a message path including the first terminal and the native push server); (3) detecting a message path corresponding to the third-party push server (i.e., a message path including the first terminal, the native push server, and the third-party push server); (4) detecting a message path corresponding to the application server (i.e., a message path including the first terminal, the native push server, the third-party push server, and the application server); and (5) detecting a message path corresponding to the second terminal (i.e., a message path including the first terminal, the native push server, the third-party push server, the application server, and the second terminal).
[0133] Taking an example in which the first terminal supports direct access of the third-party push server, the first order is the first terminal -> the third-party push server -> the application server -> the second terminal, and the order in which the message paths corresponding to the nodes in the push link are detected can be: (1) detecting a message path corresponding to the first terminal (i.e., a message path including the first terminal); (2) detecting a message path corresponding to the third-party push server (i.e., a message path including the first terminal and the third-party push server); (3) detecting a message path corresponding to the application server (i.e., a message path including the first terminal, the third-party push server, and the application server); and (4) detecting a message path corresponding to the second terminal (i.e., a message path including the first terminal, the third-party push server, the application server, and the second terminal).
[0134] In step S1032, when the message path corresponding to the node detected first has no failure, the message path corresponding to the next node is detected, until a failed message path is detected, and the node corresponding to the failed message path is determined as a failed node.
[0135] Taking the first terminal supporting the third-party push server accessing through the native push server as an example, the message path corresponding to the first terminal (i.e., the message path including the first terminal) is detected. When the message path corresponding to the first terminal is a failure path, it is determined that the first terminal is a failure node, and the detection is stopped. When the message path corresponding to the first terminal is not a failure path, the message path corresponding to the native push server (i.e., the message path including the first terminal and the native push server) is detected. When the message path corresponding to the native push server is a failure path, it is determined that the native push server is a failure node, and the detection is stopped. When the message path corresponding to the native push server is not a failure path, the message path corresponding to the third-party push server (i.e., the message path including the first terminal, the native push server and the third-party push server) is detected. When the message path corresponding to the third-party push server is a failure path, it is determined that the third-party push server is a failure node, and the detection is stopped. When the message path corresponding to the third-party push server is not a failure path, the message path corresponding to the application server (i.e., the message path including the first terminal, the native push server, the third-party push server and the application server) is detected. When the message path corresponding to the application server is a failure path, it is determined that the application server is a failure node, and the detection is stopped. When the message path corresponding to the application server is not a failure path, the message path corresponding to the second terminal (i.e., the message path including the first terminal, the native push server, the third-party push server, the application server and the second terminal) is detected. When the message path corresponding to the second terminal is a failure path, it is determined that the second terminal is a failure node, and the detection is stopped. When the message path corresponding to the second terminal is not a failure path, it is determined that there is no failure node in the push link, and the network condition when the first message is pushed can be detected.
[0136] For example, when the first terminal supports the third-party push server directly accessing, the message path corresponding to the first terminal (i.e., the message path including the first terminal) is detected. When the message path corresponding to the first terminal is a failure path, it is determined that the first terminal is a failure node, and the detection is stopped. When the message path corresponding to the first terminal is not a failure path, the message path corresponding to the third-party push server (i.e., the message path including the first terminal and the third-party push server) is detected. When the message path corresponding to the third-party push server is a failure path, it is determined that the third-party push server is a failure node, and the detection is stopped. When the message path corresponding to the third-party push server is not a failure path, the message path corresponding to the application server (i.e., the message path including the first terminal, the third-party push server, and the application server) is detected. When the message path corresponding to the application server is a failure path, it is determined that the application server is a failure node, and the detection is stopped. When the message path corresponding to the application server is not a failure path, the message path corresponding to the second terminal (i.e., the message path including the first terminal, the third-party push server, the application server, and the second terminal) is detected. When the message path corresponding to the second terminal is a failure path, it is determined that the second terminal is a failure node, and the detection is stopped. When the message path corresponding to the second terminal is not a failure path, it is determined that there is no failure node in the push link, and the network condition when the first message is pushed can be detected.
[0137] For example, when the message path corresponding to the first terminal needs to be detected in the first order, the following processing is performed to detect the message path corresponding to the first terminal: the first terminal is controlled to obtain and install the installation package of the client for receiving the first message, and after the installation is completed, the device token corresponding to the first terminal is queried through the setting page (e.g., the "about us" page) of the client, and the notification state of the client is determined through the notification page of the client; when the notification state is an open state, and the device token corresponding to the first terminal is queried to have been generated, it is determined that the message path corresponding to the first terminal is not a failure path; when the notification state is a closed state, or the device token corresponding to the first terminal is not queried to have been generated, it is determined that the message path corresponding to the first terminal is a failure path, and the detection is stopped. An alarm information (information for indicating that the first terminal is a failure node) is generated, and the alarm information is sent to the tester or the developer.
[0138] For example, when the device token is displayed in the setting page 101 in the application 100, it indicates that the device token corresponding to the first terminal can be queried; when the device token is not displayed in the setting page 101 in the application 100, it indicates that the device token corresponding to the first terminal cannot be queried. Figure 11A Figure 12C The notification switch 121 in the notification page is turned on, or when the "banner style" control 122 in the notification page is visible, the notification state is in an open state. Only when the installation package of the client for receiving messages in the first terminal is installed correctly and the notification is allowed, the first terminal can receive the pushed messages. The first terminal is taken as the primary link in the fault detection in the embodiment of the application, which has the advantages of saving communication resources and improving detection efficiency.
[0139] As an example, when it is detected according to the first order that the nodes in the push link before the native push server are not fault nodes, it is determined that the message path corresponding to the native push server needs to be detected, and the following processing is performed to detect the message path corresponding to the native push server: sending a second message through the native push server and to the first terminal via the native push server; when the first terminal receives the second message, it is determined that the message path corresponding to the native push server is not a fault path; when the first terminal does not receive the second message, it is determined that the message path corresponding to the native push server is a fault path, and the detection is stopped, an alarm information (information indicating that the native push server is a fault node) is generated, and the alarm information is sent to the tester or the developer.
[0140] For example, the second message and the device token corresponding to the first terminal are sent to the native push server through a message push tool (for example, Easy APNs Provider), so that the native push server sends the second message to the first terminal according to the device token; when the first terminal receives the second message, it is determined that the message path corresponding to the native push server is not a fault path; when the first terminal does not receive the second message, it is determined that the message path corresponding to the native push server is a fault path.
[0141] In the embodiment of the application, since it is determined that the first terminal is not a fault node before the native push server is detected, if there is a problem in the message path including the native push server and the first terminal, it can be determined that the native push server is a fault node. In this way, the fault node is checked level by level until the fault node is found, and the detection can be stopped, which not only improves the detection efficiency, but also saves the detection resources.
[0142] As an example, when it is detected according to the first order that the nodes before the third-party push server in the push link are not fault nodes, it is determined that the message path corresponding to the third-party push server needs to be detected, and the following processing is performed to detect the message path corresponding to the third-party push server: the third-party push server is controlled to obtain a push token (hereinafter referred to as an XG Token) corresponding to the first terminal, and to find a device token that has a mapping relationship with the push token; the third-party push server is controlled to send the device token and a third message to the native push server, so that the native push server sends the third message to the first terminal according to the device token; when the first terminal receives the third message, it is determined that the message path corresponding to the third-party push server is not a fault path; when the first terminal does not receive the third message, it is determined that the message path corresponding to the third-party push server is a fault path, and the detection is stopped, an alarm information (information for indicating that the third-party push server is a fault node) is generated, and the alarm information is sent to the tester or the developer.
[0143] In the embodiment of the application, the first terminal supports the third-party push server accessing through the native push server, so the message path corresponding to the third-party push server includes the third-party push server, the native push server and the first terminal. Since it has been judged that the native push server and the first terminal are not fault nodes before detecting the third-party push server, if there is a problem in the message path including the third-party push server, the native push server and the first terminal, it can be determined that the third-party push server is a fault node. In this way, the fault nodes are checked level by level until the fault nodes are checked out, and the detection can be stopped. This not only improves the detection efficiency, but also saves detection resources.
[0144] As an example, when it is detected according to the first order that the nodes before the third-party push server in the push link are not fault nodes, it is determined that the message path corresponding to the third-party push server needs to be detected, and the following processing is performed to detect the message path corresponding to the third-party push server: the third-party push server is controlled to obtain a push token (hereinafter referred to as an XG Token) corresponding to the first terminal, and to find a device token that has a mapping relationship with the push token; the third-party push server is controlled to send the device token and a third message to the native push server, so that the native push server sends the third message to the first terminal according to the device token; when the first terminal receives the third message, it is determined that the message path corresponding to the third-party push server is not a fault path; when the first terminal does not receive the third message, it is determined that the message path corresponding to the third-party push server is a fault path, and the detection is stopped, an alarm information (information for indicating that the third-party push server is a fault node) is generated, and the alarm information is sent to the tester or the developer.
[0145] For example, since the third-party push server is controlled to push the message to the first terminal according to the UID corresponding to the client running in the first terminal, when the first terminal does not receive the message, it can be determined that the message path corresponding to the third-party push server is a fault path, and it can also be determined that the service of the third-party push server for maintaining the mapping relationship between the UID and the Device Token is incorrect. Compared with the above embodiment of detecting the message path corresponding to the third-party push server based on the push token, the embodiment of the application can further detect whether the service of the third-party push server for maintaining the mapping relationship between the UID and the Device Token is incorrect, thereby further improving the accuracy of fault detection.
[0146] For example, when it is detected that the nodes before the third-party push server in the push link are not fault nodes in the first order, it is determined that the message path corresponding to the third-party push server needs to be detected, and the following processing is performed to detect the message path corresponding to the third-party push server: the third-party push server is controlled to obtain the push token corresponding to the first terminal, and a fifth message is sent to the first terminal according to the push token; when the first terminal receives the fifth message, it is determined that the message path corresponding to the third-party push server is not a fault path; when the first terminal does not receive the fifth message, it is determined that the message path corresponding to the third-party push server is a fault path, and the detection is stopped, an alarm information (information for indicating that the third-party push server is a fault node) is generated, and the alarm information is sent to the tester or the developer.
[0147] In the embodiment of the application, the first terminal supports direct access of the third-party push server, so that the message path corresponding to the third-party push server only includes the third-party push server and the first terminal, and the third-party push server can directly push the message to the first terminal based on the push token. Since it has been determined that the first terminal is not a fault node before detecting the third-party push server, if there is a problem in the message path including the third-party push server and the first terminal, it can be determined that the third-party push server is a fault node. In this way, the fault nodes are checked step by step until the fault node is found, and the detection can be stopped, which not only improves the detection efficiency, but also saves the detection resources.
[0148] As an example, when it is detected according to the first order that all the nodes located before the application server in the push link are not fault nodes, it is determined that the message path corresponding to the application server needs to be detected, and the following processing is performed to detect the message path corresponding to the application server: the application server is controlled to send a sixth message to the first terminal through the third-party push server, or send the sixth message to the first terminal through the third-party push server and via the native push server; when the first terminal receives the sixth message, it is determined that the message path corresponding to the application server is not a fault path; when the first terminal does not receive the sixth message, the frequency at which the application server sends messages is determined; when the frequency at which the application server sends messages does not exceed a frequency threshold, it is determined that the message path corresponding to the application server is a fault path, and the detection is stopped, alarm information (information indicating that the application server is a fault node) is generated, and the alarm information is sent to a tester or a developer.
[0149] For example, the frequency threshold can be a default value, or a value set by a user, a client, or a server (such as an application server or a third-party push server). When the first terminal supports access of the third-party push server through the native push server, the application server is controlled to send the sixth message to the first terminal through the third-party push server; when the first terminal supports direct access of the third-party push server, the sixth message is sent to the first terminal through the third-party push server and via the native push server.
[0150] In the embodiments of the application, since it is determined that all the nodes located before the application server are not fault nodes before the application server is detected, if there is a problem in the message path corresponding to the application server, it can be determined that the application server is a fault node. In this way, the fault nodes are checked level by level until the fault nodes are found, and the detection can be stopped, which not only improves the detection efficiency, but also saves detection resources.
[0151] As an example, when it is detected according to the first order that all the nodes located before the second terminal in the push link are not fault nodes, it is determined that the message path corresponding to the second terminal needs to be detected, and the following processing is performed to detect the message path corresponding to the second terminal: the interface called by the second terminal when sending a message to the application server is determined, and the configuration information of the interface is detected; when it is detected that the configuration information of the interface has not been tampered with, it is determined that the message path corresponding to the second terminal is not a fault path; when it is detected that the configuration information of the interface has been tampered with, it is determined that the message path corresponding to the second terminal is a fault path, and the detection is stopped, alarm information (information indicating that the application server is a fault node) is generated, and the alarm information is sent to a tester or a developer.
[0152] For example, when it is determined that the message path corresponding to the second terminal is not a failure path, it can be determined that there is no failure node in the push link, and parameters (such as bandwidth or jitter frequency) of the network used to detect the push of the first message can be detected, because the network may fail when the first message is pushed to the first terminal, but the network failure disappears when the push link is detected subsequently. Thus, the reason why the first message does not arrive at the first terminal in time is not that there is a failure node in the push link, but that the network fails.
[0153] The embodiment of the application can accurately analyze the failure node, thereby feeding back the failure node to the corresponding developer, so that the developer can solve the problem faster and more accurately, and the embodiment has universality and is applicable to all services accessing the third-party push server, and can be realized in an automatic manner, thereby saving labor cost and improving detection efficiency.
[0154] In some embodiments, referring to Figure 8 , Figure 8 is a flowchart of a failure detection method of a push link provided by the embodiment of the application, based on Figure 5 , step S103 can include step S1033 and step S1034.
[0155] In step S1033, the message path corresponding to the node in the push link is detected in a second order.
[0156] Taking the case that the first terminal supports access of the third-party push server to the native push server as an example, the second order is second terminal->application server->third-party push server->native push server->first terminal, and the order of detecting the message path corresponding to the node in the push link can be: (1) detecting the message path corresponding to the second terminal (i.e., the message path including the second terminal); (2) detecting the message path corresponding to the application server (i.e., the message path including the second terminal and the application server); (3) detecting the message path corresponding to the third-party push server (i.e., the message path including the second terminal, the application server and the third-party push server); (4) detecting the message path corresponding to the native push server (i.e., the message path including the second terminal, the application server, the third-party push server and the native push server); and (5) detecting the message path corresponding to the first terminal (i.e., the message path including the second terminal, the application server, the third-party push server, the native push server and the first terminal).
[0157] Taking the first terminal supporting the third-party push server directly accessing as an example, the second order is the second terminal -> the application server -> the third-party push server -> the first terminal, and the order of detecting the message path corresponding to at least one node can be: (1) detecting the message path corresponding to the second terminal (i.e., the message path including the second terminal); (2) detecting the message path corresponding to the application server (i.e., the message path including the second terminal and the application server); (3) detecting the message path corresponding to the third-party push server (i.e., the message path including the second terminal, the application server and the third-party push server); (4) detecting the message path corresponding to the first terminal (i.e., the message path including the second terminal, the application server, the third-party push server and the first terminal).
[0158] In step S1034, when the message path corresponding to the node detected first has no fault, the message path corresponding to the next node is continuously detected until the fault message path is detected, and the node corresponding to the fault message path is determined as the fault node.
[0159] Taking the first terminal supporting the third-party push server accessing through the native push server as an example, the message path corresponding to the second terminal (i.e., the message path including the second terminal) is detected, when the message path corresponding to the second terminal is the fault path, the second terminal is determined as the fault node, and the detection is stopped; when the message path corresponding to the second terminal is not the fault path, the message path corresponding to the application server (i.e., the message path including the second terminal and the application server) is detected, when the message path corresponding to the application server is the fault path, the application server is determined as the fault node, and the detection is stopped; when the message path corresponding to the application server is not the fault path, the message path corresponding to the third-party push server (i.e., the message path including the second terminal, the application server and the third-party push server) is detected, when the message path corresponding to the third-party push server is the fault path, the third-party push server is determined as the fault node, and the detection is stopped; when the message path corresponding to the third-party push server is not the fault path, the message path corresponding to the native push server (i.e., the message path including the second terminal, the application server, the third-party push server and the native push server) is detected, when the message path corresponding to the native push server is the fault path, the native push server is determined as the fault node, and the detection is stopped; when the message path corresponding to the native push server is not the fault path, the message path corresponding to the first terminal (i.e., the message path including the second terminal, the application server, the third-party push server, the native push server and the first terminal) is detected, when the message path corresponding to the first terminal is the fault path, the first terminal is determined as the fault node, and the detection is stopped, when the message path corresponding to the first terminal is not the fault path, it is determined that there is no fault node in the push link, and the network condition when the first message is pushed can be detected.
[0160] Taking the first terminal supporting the third-party push server directly accessing as an example, the message path corresponding to the second terminal (i.e., the message path including the second terminal) is detected. When the message path corresponding to the second terminal is a fault path, it is determined that the second terminal is a fault node, and the detection is stopped. When the message path corresponding to the second terminal is not a fault path, the message path corresponding to the application server (i.e., the message path including the second terminal and the application server) is detected. When the message path corresponding to the application server is a fault path, it is determined that the application server is a fault node, and the detection is stopped. When the message path corresponding to the application server is not a fault path, the message path corresponding to the third-party push server (i.e., the message path including the second terminal, the application server and the third-party push server) is detected. When the message path corresponding to the third-party push server is a fault path, it is determined that the third-party push server is a fault node, and the detection is stopped. When the message path corresponding to the third-party push server is not a fault path, the message path corresponding to the first terminal (i.e., the message path including the second terminal, the application server, the third-party push server and the first terminal) is detected. When the message path corresponding to the first terminal is a fault path, it is determined that the first terminal is a fault node, and the detection is stopped. When the message path corresponding to the first terminal is not a fault path, it is determined that there is no fault node in the push link, and the network condition when the first message is pushed can be detected.
[0161] As an example, when the message path corresponding to the second terminal needs to be detected according to the second order, the following processing is performed to detect the message path corresponding to the second terminal: determining the interface called by the second terminal when sending a message to the application server, and detecting the configuration information of the interface; when it is detected that the configuration information of the interface is not tampered, it is determined that the message path corresponding to the second terminal is not a fault path; when it is detected that the configuration information of the interface is tampered, it is determined that the message path corresponding to the second terminal is a fault path, and the detection is stopped. Alarm information (information for indicating that the second terminal is a fault node) is generated and sent to a tester or a developer.
[0162] The reason why the second terminal is the first step of fault detection in the embodiments of the present application is that the second terminal does not need to send a message again for detection when detecting the second terminal, thereby saving communication resources, and on the other hand, the end node of the push link is prioritized to be investigated, thereby improving the detection efficiency.
[0163] As an example, when it is detected according to the second order that all the nodes before the application server in the push link are not fault nodes, it is determined that the message path corresponding to the application server needs to be detected, and the following processing is performed to detect the message path corresponding to the application server: the second terminal is controlled to send a seventh message to the application server; when the seventh message is received by the application server, it is determined that the message path corresponding to the application server is not a fault path; when the seventh message is not received by the application server, it is determined that the message path corresponding to the application server is a fault path, and the detection is stopped, alarm information (information for indicating that the application server is a fault node) is generated, and the alarm information is sent to a tester or a developer.
[0164] In the embodiments of the present application, since it is determined that the second terminal is not a fault node before the application server is detected, if a problem occurs in the message path including the application server and the second terminal, it can be determined that the application server is a fault node. In this way, the fault node is checked level by level until the fault node is found, and then the detection can be stopped. This not only improves the detection efficiency, but also saves detection resources.
[0165] As an example, when it is detected according to the second order that all the nodes before the third-party push server in the push link are not fault nodes, the following processing is performed to detect the message path corresponding to the third-party push server: the second terminal is controlled to send an eighth message to the third-party push server through the application server; when the eighth message is received by the third-party push server, it is determined that the message path corresponding to the third-party push server is not a fault path; when the eighth message is not received by the third-party push server, it is determined that the message path corresponding to the third-party push server is a fault path, and the detection is stopped, alarm information (information for indicating that the third-party push server is a fault node) is generated, and the alarm information is sent to a tester or a developer.
[0166] In the embodiments of the present application, since it is determined that the second terminal and the application server are not fault nodes before the third-party push server is detected, if a problem occurs in the message path including the third-party push server, the application server and the second terminal, it can be determined that the third-party push server is a fault node. In this way, the fault node is checked level by level until the fault node is found, and then the detection can be stopped. This not only improves the detection efficiency, but also saves detection resources.
[0167] As an example, when it is detected according to the second order that the nodes located before the native push server in the push link are not all the fault nodes, it is determined that the message path corresponding to the native push server needs to be detected, and the following processing is performed to detect the message path corresponding to the native push server: the second terminal sends a ninth message and a push token corresponding to the first terminal to the third-party push server through the application server, so that the third-party push server finds a device token having a mapping relationship with the push token, and sends the device token and the ninth message to the native push server; when the native push server receives the ninth message and the device token, it is determined that the message path corresponding to the native push server is not a fault path; when the native push server does not receive the ninth message and the device token, it is determined that the message path corresponding to the native push server is a fault path, and the detection is stopped, an alarm information (information for indicating that the native push server is a fault node) is generated, and the alarm information is sent to the tester or the developer.
[0168] In the embodiment of the application, the first terminal supports the third-party push server accessing through the native push server, so the message path corresponding to the native push server includes the application server, the third-party push server, the native push server and the second terminal. Since it is determined that the nodes before the native push server are not fault nodes before the native push server is detected, if there is a problem in the message path corresponding to the native push server, it can be determined that the native push server is a fault node. In this way, the fault nodes are checked step by step until the fault nodes are found, and the detection can be stopped. This not only improves the detection efficiency, but also saves the detection resources.
[0169] As an example, when it is detected according to the second order that the nodes located before the first terminal in the push link are not all the fault nodes, it is determined that the message path corresponding to the first terminal needs to be detected, and the following processing is performed to detect the message path corresponding to the first terminal: the second terminal sends a tenth message and a push token corresponding to the first terminal to the third-party push server through the application server, so that the third-party push server finds a device token having a mapping relationship with the push token, and sends the device token and the tenth message to the native push server, so that the native push server sends the tenth message to the first terminal based on the device token; when the first terminal receives the tenth message, it is determined that the message path corresponding to the first terminal is not a fault path; when the first terminal does not receive the tenth message, it is determined that the message path corresponding to the first terminal is a fault path, and the detection is stopped, an alarm information (information for indicating that the first terminal is a fault node) is generated, and the alarm information is sent to the tester or the developer.
[0170] In the embodiments of the present application, the first terminal supports the third-party push server accessing through the native push server, and thus the message path corresponding to the first terminal includes the first terminal, the application server, the third-party push server, the native push server and the second terminal. Since it is determined that the nodes before the first terminal are not the faulty nodes before detecting the first terminal, if a problem occurs in the message path corresponding to the first terminal, it can be determined that the first terminal is the faulty node. In this way, the faulty node is checked step by step, and the detection can be stopped until the faulty node is found. This can not only improve the detection efficiency, but also save the detection resources.
[0171] For example, when it is detected according to the second order that the nodes before the first terminal in the push link are not the faulty nodes, it is determined that the message path corresponding to the first terminal needs to be detected, and the following processing is performed to detect the message path corresponding to the first terminal: the second terminal is controlled to send an eleventh message and a push token corresponding to the first terminal to the third-party push server through the application server, so that the third-party push server sends the eleventh message to the first terminal based on the push token; when the first terminal receives the eleventh message, it is determined that the message path corresponding to the first terminal is not the faulty path; when the first terminal does not receive the eleventh message, it is determined that the message path corresponding to the first terminal is the faulty path, and the detection is stopped. Alarm information (information indicating that the first terminal is the faulty node) is generated and sent to the tester or the developer.
[0172] In the embodiments of the present application, the first terminal supports the third-party push server directly accessing, and thus the message path corresponding to the first terminal includes the first terminal, the application server, the third-party push server and the second terminal. Since it is determined that the nodes before the first terminal are not the faulty nodes before detecting the first terminal, if a problem occurs in the message path corresponding to the first terminal, it can be determined that the first terminal is the faulty node. In this way, the faulty node is checked step by step, and the detection can be stopped until the faulty node is found. This can not only improve the detection efficiency, but also save the detection resources.
[0173] As an example, when it is detected according to the second order that the nodes in the push link located before the first terminal are not all fault nodes, it is determined that the message path corresponding to the first terminal needs to be detected, and the following processing is performed to detect the message path corresponding to the first terminal: the first terminal is controlled to acquire and install the installation package of the client used to receive the first message, and after the installation is completed, the device token corresponding to the first terminal is queried through the setting page of the client, and the notification state of the client is determined through the notification page of the client; when the notification state is an open state and the device token corresponding to the first terminal is queried to have been generated, it is determined that the message path corresponding to the first terminal is not a fault path; when the notification state is a closed state or the device token corresponding to the first terminal is not queried to have been generated, it is determined that the message path corresponding to the first terminal is a fault path, and the detection is stopped, an alarm information (information for indicating that the first terminal is a fault node) is generated, and the alarm information is sent to a tester or a developer.
[0174] For example, when it is determined that the message path corresponding to the first terminal is not a fault path, it can be determined that there is no fault node in the push link, and the parameters (such as bandwidth or jitter frequency) of the network used to push the first message can be detected, because the network may fail when the first message is pushed to the first terminal, but the network failure disappears when the push link is detected subsequently. In this way, the reason why the first message does not arrive at the first terminal in timeout is not that there is a fault node in the push link, but that the network fails.
[0175] The embodiment of the application can accurately analyze the fault node, so as to feed back the fault node to the corresponding developer, so that the developer can solve the problem faster and more accurately, and the embodiment has universality and is applicable to all businesses accessing the third-party push server, and can be realized in an automatic manner, thereby saving labor cost and improving detection efficiency.
[0176] Hereinafter, the push link fault detection method provided by the embodiment of the application is described by taking offline Push messages in a live broadcast application scenario as an example.
[0177] Referring to Figure 9 , Figure 9 is a display interface schematic diagram of a push message provided by the embodiment of the application, Figure 9 In the display interface, the push message 901 is a going-on-air reminder. Before starting live broadcast, the anchor pushes the going-on-air reminder through a live broadcast assistant APP, so that offline users and online users who install the live broadcast APP can receive the going-on-air reminder. In this way, the user can enter the corresponding live broadcast room to watch live broadcast through the live broadcast APP by clicking the going-on-air reminder after receiving the going-on-air reminder.
[0178] When a user terminal cannot receive a push message during the process of business testing or development debugging for an offline Push message (e.g., a starting broadcast reminder), the embodiments of the present application provide an automatic way to troubleshoot the faulty node, so as to facilitate subsequent rapid repair of the faulty node. The embodiments of the present application can solve the following problems: (1) During the testing process, if the message cannot be received, the tester can accurately analyze the faulty node, so as to feed back the problem to the corresponding developer, so that the developer can solve the problem faster and more accurately, thereby reducing the influence of the faulty node on the user; (2) It has universality and is applicable to all businesses accessing a third-party push platform (e.g., a pigeon push platform); (3) It can be realized by an automatic way without human intervention, thereby saving labor costs.
[0179] Referring to Figure 10 , Figure 10 is a structural schematic diagram of a push link provided by the embodiments of the present application, Figure 10 In the push link used by the offline Push message in the live broadcast application scenario, the nodes include a live broadcast assistant terminal (i.e., a terminal on which a live broadcast assistant APP is installed, i.e., the second terminal described above), a business background (i.e., the application server described above), a live broadcast terminal (i.e., a terminal on which a live broadcast APP is installed, i.e., the first terminal described above), a third-party push background (i.e., the third-party push server described above), and an APNs (i.e., the native push server described above).
[0180] Referring to Figure 11A , Figure 11B , Figure 11C , Figure 11D and Figure 11E , Figure 11A , Figure 11B , Figure 11C , Figure 11D and Figure 11E are principle schematic diagrams of a fault detection method of a push link provided by the embodiments of the present application, which will be described in combination with Figure 11A , Figure 11B , Figure 11C , Figure 11B and Figure 11C .
[0181] In some embodiments, each time a message is pushed into the live broadcast APP, a message record will be generated. After the device (i.e., the live broadcast terminal) is logged in, the corresponding UID, Device Token, and XG Token will be displayed in the setting page 101 of the live broadcast APP, as shown in Figure 11BIf the third-party push platform can find the binding XG Token according to the UID (i.e., the login account of the live APP is mapped to the identifier of the business background), it means that the UID and the device are successfully bound, and the mapping relationship between the UID, the Device Token and the XG Token is transmitted to the third-party push background. This is the premise of receiving offline Push messages by the live terminal. Then, the third-party push platform can push offline messages to the live APP based on the XG Token through the third-party push management end (i.e., the third-party push platform determines the Device Token corresponding to the live terminal through the XG Token, packs the Device Token and the to-be-pushed message, and sends it to the APNs. Then, the APNs sends it to the live terminal based on the Device Token. The operating system of the live terminal delivers the to-be-pushed message to the live APP). If the live APP can receive the message pushed by the third-party push management end, it means that the live terminal software development kit (SDK) is not a problem (i.e., the third-party push software accessed by the live terminal is not a problem), and the APNs channel is not a problem.
[0182] As an example, the way for the third-party push platform to query the binding XG Token according to the UID can be seen from Figure 11C and Figure 11D , Figure 11D and Figure 11E are user interface diagrams of the third-party push platform, which are used to query the XG Token bound with the UID. When the third-party push platform can find the binding XG Token 112 according to the UID 111, it means that the UID and the device (i.e., the live terminal) are successfully bound, as shown in Figure 11E ; when the third-party push platform cannot find the binding XG Token according to the UID 113, the user interface presents a prompt information 114 that “the account does not belong to this application, please confirm whether the input is correct”, which means that the UID and the device (i.e., the live terminal) are not bound, as shown in Figure 12A .
[0183] As an example, Figure 12B is an effect diagram of message pushing, Figure 12C including the planned sending quantity, the actual sending quantity and the device arrival quantity. When the device arrival quantity is less than the actual sending quantity, it means that the pushed message does not reach the live terminal. Therefore, it can be concluded that there may be a fault node in the push link, and therefore it is necessary to troubleshoot the fault node in the push link so as to realize the normal pushing of messages by repairing the fault node quickly subsequently. Figure 12DIn this way, the monitoring scheme can be set layer by layer based on the series of the push link, starting from the bottom layer of the push link, the fault node in the push link can be quickly found out, so as to facilitate subsequent repair, thereby improving the test efficiency.
[0184] As an example, the test server can send a message to the first entity through the push link, and the first entity can send a message to the second entity through the push link, and the second entity can send a message to the third entity through the push link, and so on. Figure 12E The test server can issue and deploy any form of computer executable instructions such as test programs, plug-ins or software modules to the entities shown in FIG. 1 to endow the other entities with fault detection capabilities for controlling the corresponding entities to perform operations related to detection of the fault node. For the convenience of description, in some examples below, it is described from the perspective of how the test server detects the message path of the other entities to determine the fault node, and in some other examples, it is described from the perspective of how the other entities perform fault node detection after running the computer executable instructions issued by the test server.
[0185] Next, the specific implementation of the fault detection method of the push link provided by the embodiments of the present application will be described in combination with Figure 12F , Figure 12A , Figure 12B , Figure 12C , Figure 12D and Figure 12E Figure 12F , Figure 12A , Figure 12B , Figure 12C , Figure 12C and Figure 12C are schematic diagrams of the principle of the fault detection method of the push link provided by the embodiments of the present application.
[0186] In some embodiments, the inventive concept of the fault detection method of the push link is roughly as follows: (1) determining the accuracy of the installation package of the live APP; (2) determining whether the live terminal allows to receive offline Push messages; (3) determining whether the path of APNs-> live terminal (Device Token) is normal; (4) determining whether the path of third-party push background-> APNs-> live terminal (Device Token) is normal; (5) determining whether the path of third-party push background-> APNs-> live terminal (UID) is normal; (6) determining whether the path of business background-> third-party push background-> APNs-> live terminal is normal; (7) determining whether the path of live assistant terminal-> business background-> third-party push background-> APNs-> live terminal is normal; the verification method of each step will be described in detail.
[0187] (1) Determine the accuracy of the installation package of the live APP.
[0188] In some embodiments, Figure 12D In the middle, regarding the installation package of the live broadcast APP, the business background in the test environment can use the test version of the unsigned Apple program application file (IPA, IPHONE Application) package (or APP inner package, debugging package) (that is, the package obtained by using the check script), so as to obtain the corresponding Device Token, and the live broadcast APP will transmit the UID-Device Token mapping to the third-party push background in the test environment when the live broadcast APP starts, and then the test environment is verified. If verification is required in the formal environment, the corresponding UID can only be added to the whitelist of the third-party push background in the test environment in the business background in the formal environment, so that the pushed message can only be received by the third-party push background in the test environment when the message is pushed by the business background in the formal environment; if the pushed message needs to be received by the third-party push background in the formal environment, a gray package (that is, a gray package) or a formal version of the unsigned IPA package (or APP outer package, audit package) (that is, the package obtained by using the testlight or release script) needs to be used for verification. Therefore, when verifying, it is necessary to first ensure the correctness of the environment, install the installation package of the live broadcast APP through an automatic way, and check whether there is a Device Token after the installation package is installed. If there is a Device Token, it means that the installation package is installed correctly. If there is no Device Token, it means that the installation package is installed incorrectly, and an alarm information is generated to send the corresponding alarm information to the tester.
[0189] As an example, Figure 12E In the middle, the above-mentioned IPA package is divided into two categories, namely the audit package with formal certificate signature and the debugging package with debugging certificate signature. The formal certificate signature and the debugging certificate signature are used to tell the terminal that this is a legal application. The type of the IPA package is different, and the devices that can be installed are also different. For example, the audit package with official signature can be listed in the application store, so that all devices can be installed. The re-signed package or the debugging package can be installed on all devices through a scanning tool (such as Bluecoat), but the client after installation has no Push capability. The debugging package without re-signing can be installed on the debugging device through the scanning tool, and the client after installation has Push capability and can support local debugging.
[0190] (2) Determine whether the live broadcast terminal is allowed to receive offline Push messages.
[0191] In some embodiments, when the installation package in step (1) is installed correctly, the automatic checking process continues to execute, and the state of the notification switch is determined by gradually clicking into the notification page of the live broadcast terminal through the corresponding script, that is, whether the notification permission is turned on in the notification page. For example, Figure 12EAs shown, if notification switch 121 is not turned on, the live streaming terminal will not receive messages; therefore, it is necessary to ensure that notification switch 121 is turned on. Notification switch 121 refers to the notification page in the off state, as shown below. Figure 12F As shown in the left image, when the user sets the notification switch 121 to the on state, a notification page is displayed indicating that the notification switch 121 is on, as shown below. Figure 12F As shown in the right figure.
[0192] As an example, during the automated check, it can be determined whether the "banner style" control 122 exists on the notification page. If the "banner style" control 122 is visible, it indicates that the notification switch 121 is turned on, that is, it is determined that the live streaming terminal is allowed to receive offline notifications; if the "banner style" control 122 is not visible, it indicates that the notification switch 121 is not turned on, that is, it is determined that the live streaming terminal is not allowed to receive offline notifications.
[0193] (3) Determine if the path from APNs to the live streaming terminal (Device Token) is normal.
[0194] In some embodiments, Figure 4 In step (2), when it is determined that the live streaming terminal is allowed to receive offline notifications, the automated check process continues to be executed through an automated testing tool (e.g., qt4mac). The automated testing tool automatically starts a message push tool (e.g., Easy APNs Provider) to send push messages to the live streaming terminal so that the live streaming terminal can display the messages. The tool also verifies whether the push messages have been received in the live streaming terminal through a window tool (e.g., UISpy), for example, whether the live streaming terminal displays the message. Figure 4 If the push message control 123 in the middle is displayed, it indicates that the live terminal has received the message pushed by the message push tool, and then step (4) can be continued; if the control 123 is not displayed, it indicates that the live terminal has not received the message pushed by the message push tool, that is, it is determined that the path of APNs-->live terminal (Device Token) is abnormal, an alarm message will be generated, and the corresponding alarm message will be sent to the developers.
[0195] Taking Easy APNs Provider as an example, which is a push notification tool, Figure 5 In the process of using the push notification tool, the following steps may be taken: First, obtain the Device Token of the live streaming terminal entered in the Token input box 125 and the Push Certificate of the corresponding live streaming APP entered in the Certificate input box 126; then, in response to the trigger operation of the push button 127, push the message to the live streaming terminal so that the control 123 is displayed in the live streaming terminal.
[0196] For APNs, the unique identifier of the live terminal is the Device Token (obtainable in step (1)), and the Device Token of the live terminal can be obtained by clicking the icon (Icon) multiple times in the "About Us" page (i.e., the above-mentioned setting page 101) of the live APP. The Push certificate corresponding to the live APP can be obtained in the QGameAttached repository, and here, the Push certificate is also distinguished between formal and development, corresponding to the release package and the debug package, respectively.
[0197] (4) Determine whether the path of the third-party push background -> APNs -> live terminal (Device Token) is normal.
[0198] In some embodiments, Figure 7 In some embodiments, the third-party push console is automatically controlled to be opened by executing a script, a message is pushed to the live terminal based on the XG Token corresponding to the live terminal, and a confirmation window 124 is presented before the message is pushed. When the user clicks the confirmation button, the message is pushed to the live terminal. If the live terminal receives the pushed message, it indicates that the third-party push background -> APNs -> live terminal (Device Token) path is normal, and step (5) is continued. If the live terminal does not receive the pushed message, it is determined that the third-party push background -> APNs -> live terminal (Device Token) path is not normal, i.e., the third-party push background has a problem, and an alarm information is generated and sent to the developer.
[0199] (5) Determine whether the path of the third-party push background -> APNs -> live terminal (UID) is normal.
[0200] In some embodiments, similar to step (4), the third-party push console is automatically controlled to be opened by executing a script, and a message is pushed to the specified UID. The push interface and Figure 8 If the live terminal receives the pushed message, it indicates that the third-party push background -> APNs -> live terminal (UID) path is normal, i.e., the third-party push software accessed by the live terminal has no problem; if the live terminal does not receive the pushed message, it is determined that the third-party push background -> APNs -> live terminal (UID) path is not normal, an alarm information is generated and sent to the developer.
[0201] (6) Determine whether the path of the business background -> third-party push background -> APNs -> live terminal is normal
[0202] In some embodiments, when steps (1) to (5) are all correct, the application program interface (API) for sending messages is automatically controlled by executing scripts to push messages to the live terminal, and it is determined whether the live terminal has received the pushed messages. If the live terminal has not received the pushed messages, it is determined whether the live broadcast reminding message pushing mechanism of the business background is hit. When the business background determines that the live broadcast reminding message pushing limit of the business background is not hit and the API for sending messages is called, it is determined that the API for sending messages called by the business background has a problem. If the terminal has received the pushed messages, it indicates that the path of the business background—> third-party pushing background—> APNs—> live terminal is normal, i.e., the business background has no problem.
[0203] As an example, the live broadcast reminding message pushing limit of the business background refers to that the live terminal user can set that only N messages are pushed within a fixed time. When the message pushed by the business background to the live terminal is the N+1th message, it is determined that the live broadcast reminding message pushing limit of the business background is hit, i.e., it indicates that the live terminal not receiving the pushed messages is normal, and it is not necessarily that the path of the business background—> third-party pushing background—> APNs—> live terminal is abnormal.
[0204] (7) It is determined whether the path of the live assistant terminal—> business background—> third-party pushing background—> APNs—> live terminal is normal.
[0205] In some embodiments, if the live terminal in step (6) can receive the pushed messages, it indicates that the interface called by the live assistant terminal to the business background may have a problem, and it is necessary to determine whether the logic of the interface itself has a problem. When the logic of the interface itself has a problem, it is necessary to check whether the interface is modified, and the specific problem can be analyzed.
[0206] The entire troubleshooting process described above is from top to bottom. When a node has a problem, an alarm information is sent to the developer responsible for the node to repair it. In this way, not only the problem can be fed back, but also the specific node that has a problem can be accurately analyzed, so that the effect of quickly repairing the fault node is achieved.
[0207] The following will be described in combination with It is illustrated that the software modules stored in the push link fault detection device 543 in the memory 540 can include:
[0208] In some embodiments, as illustrated, the software modules stored in the push link fault detection device 543 in the memory 540 can include:
[0209] The sending module 5431 is configured to send the first message to the first terminal through a push link, the push link comprising a plurality of nodes; the determining module 5432 is configured to, in response to the first message not reaching the first terminal before a timeout, determine a plurality of message paths respectively corresponding to the plurality of nodes in the push link; wherein each message path is used to detect whether the corresponding node is a faulty node; and the detecting module 5433 is configured to, according to an order of the plurality of nodes in the push link, sequentially detect at least part of the message paths respectively corresponding to the plurality of nodes, to determine a faulty node in the push link.
[0210] In the above scheme, the determining module 5432 is further configured to, when the first terminal supports a third-party push server accessing through a native push server, determine message paths respectively corresponding to the following nodes included in the push link: the second terminal, the application server, the third-party push server, the native push server, and the first terminal; and when the first terminal supports the third-party push server directly accessing, determine message paths respectively corresponding to the following nodes included in the push link: the second terminal, the application server, the third-party push server, and the first terminal.
[0211] In the above scheme, the detecting module 5433 is further configured to detect the message paths respectively corresponding to the nodes in the push link in a first order, wherein the first order is an inverse order of an order of the nodes passed through when transmitting the first message to the first terminal through the push link, the message path corresponding to a node comprises the node and nodes in the push link located before the node in the first order; when the message path corresponding to a previously detected node has no fault, continue to detect a message path corresponding to a next node, until a faulty message path is detected, and determine the node corresponding to the faulty message path as the faulty node.
[0212] In the above scheme, the detecting module 5433 is further configured to detect the message paths respectively corresponding to the nodes in the push link in a second order, wherein the second order is an order of the nodes passed through when transmitting the first message to the first terminal through the push link, the message path corresponding to a node comprises the node and nodes in the push link located before the node in the second order; when the message path corresponding to a previously detected node has no fault, continue to detect a message path corresponding to a next node, until a faulty message path is detected, and determine the node corresponding to the faulty message path as the faulty node.
[0213] In the above scheme, the detection module 5433 is further configured to, when it is detected according to the first order that none of the nodes in the push link before the first terminal is a faulty node, or when it is detected according to the second order that none of the nodes in the push link before the first terminal is a faulty node, perform the following processing to detect the message path corresponding to the first terminal: control the first terminal to acquire and install an installation package of a client used to receive the first message, and after the installation is completed, query a device token corresponding to the first terminal through a setting page of the client; determine a notification state of the client through a notification page of the client; when the notification state is an open state and the device token corresponding to the first terminal is queried to have been generated, determine that the message path corresponding to the first terminal is not a faulty path; when the notification state is a closed state or the device token corresponding to the first terminal is not queried to have been generated, determine that the message path corresponding to the first terminal is a faulty path.
[0214] In the above scheme, the detection module 5433 is further configured to, when it is detected according to the first order that none of the nodes in the push link before the native push server is a faulty node, perform the following processing to detect the message path corresponding to the native push server: send, by the native push server, a second message to the first terminal; when the first terminal receives the second message, determine that the message path corresponding to the native push server is not a faulty path; and when the first terminal does not receive the second message, determine that the message path corresponding to the native push server is a faulty path.
[0215] In the above scheme, the detection module 5433 is further configured to, when it is detected according to the first order that none of the nodes in the push link before the third-party push server is a faulty node, perform the following processing to detect the message path corresponding to the third-party push server: control the third-party push server to acquire a push token corresponding to the first terminal, and find a device token that has a mapping relationship with the push token; control the third-party push server to send the device token and a third message to the native push server, so that the native push server sends the third message to the first terminal according to the device token; when the first terminal receives the third message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the first terminal does not receive the third message, determine that the message path corresponding to the third-party push server is a faulty path.
[0216] In the above scheme, the detection module 5433 is further configured to, when it is detected according to the first order that none of the nodes in the push link located before the third-party push server is a faulty node, perform the following processing to detect the message path corresponding to the third-party push server: control the third-party push server to obtain a user identifier corresponding to a client running in the first terminal, and find a device token having a mapping relationship with the user identifier; control the third-party push server to send the device token and a fourth message to the native push server, so that the native push server sends the fourth message to the first terminal according to the device token; when the first terminal receives the fourth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the first terminal does not receive the fourth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0217] In the above scheme, the detection module 5433 is further configured to, when it is detected according to the first order that none of the nodes in the push link located before the third-party push server is a faulty node, perform the following processing to detect the message path corresponding to the third-party push server: control the third-party push server to obtain a push token corresponding to the first terminal, and send a fifth message to the first terminal according to the push token; when the first terminal receives the fifth message, determine that the message path corresponding to the third-party push server is not a faulty path; and when the first terminal does not receive the fifth message, determine that the message path corresponding to the third-party push server is a faulty path.
[0218] In the above scheme, the detection module 5433 is further configured to, when it is detected according to the first order that none of the nodes in the push link located before the application server is a faulty node, perform the following processing to detect the message path corresponding to the application server: control the application server to send a sixth message to the first terminal through the third-party push server, or send the sixth message to the first terminal through the third-party push server and via the native push server; when the first terminal receives the sixth message, determine that the message path corresponding to the application server is not a faulty path; when the first terminal does not receive the sixth message, determine a frequency of sending messages by the application server; and when the frequency of sending messages by the application server does not exceed a frequency threshold, determine that the message path corresponding to the application server is a faulty path.
[0219] In the above solutions, the detection module 5433 is further configured to, when it is detected according to the first order that none of the nodes located before the second terminal in the push link is a faulty node, or when it is needed to detect the message path corresponding to the second terminal according to the second order, perform the following processing to detect the message path corresponding to the second terminal: determining an interface called by the second terminal when sending a message to the application server, and detecting configuration information of the interface; when it is detected that the configuration information of the interface is tampered, determining that the message path corresponding to the second terminal is a faulty path; and when it is detected that the configuration information of the interface is not tampered, determining that the message path corresponding to the second terminal is not a faulty path.
[0220] In the above solutions, the detection module 5433 is further configured to, when it is detected according to the second order that none of the nodes located before the application server in the push link is a faulty node, perform the following processing to detect the message path corresponding to the application server: controlling the second terminal to send a seventh message to the application server; when the seventh message is received by the application server, determining that the message path corresponding to the application server is not a faulty path; and when the seventh message is not received by the application server, determining that the message path corresponding to the application server is a faulty path.
[0221] In the above solutions, the detection module 5433 is further configured to, when it is detected according to the second order that none of the nodes located before the third-party push server in the push link is a faulty node, perform the following processing to detect the message path corresponding to the third-party push server: controlling the second terminal to send an eighth message to the third-party push server through the application server; when the eighth message is received by the third-party push server, determining that the message path corresponding to the third-party push server is not a faulty path; and when the eighth message is not received by the third-party push server, determining that the message path corresponding to the third-party push server is a faulty path.
[0222] In the above solutions, the detection module 5433 is further configured to, when it is detected according to the second order that none of the nodes located before the native push server in the push link is a faulty node, perform the following processing to detect the message path corresponding to the native push server: controlling the second terminal to send a ninth message and a push token corresponding to the first terminal to the third-party push server through the application server, so that the third-party push server finds a device token having a mapping relationship with the push token and sends the device token and the ninth message to the native push server; when the ninth message and the device token are received by the native push server, determining that the message path corresponding to the native push server is not a faulty path; and when the ninth message and the device token are not received by the native push server, determining that the message path corresponding to the native push server is a faulty path.
[0223] In the above scheme, the detection module 5433 is further configured to, when it is detected according to the second sequence that none of the nodes before the first terminal in the push link is a faulty node, perform the following processing to detect the message path corresponding to the first terminal: control the second terminal to send, to the third-party push server through the application server, an eleventh message and a push token corresponding to the first terminal, so that the third-party push server sends the eleventh message to the first terminal based on the push token; when the first terminal receives the eleventh message, determine that the message path corresponding to the first terminal is not a faulty path; and when the first terminal does not receive the eleventh message, determine that the message path corresponding to the first terminal is a faulty path.
[0224] In the above scheme, the detection module 5433 is further configured to, when it is detected according to the second sequence that none of the nodes before the first terminal in the push link is a faulty node, perform the following processing to detect the message path corresponding to the first terminal: control the second terminal to send, to the third-party push server through the application server, an eleventh message and a push token corresponding to the first terminal, so that the third-party push server sends the eleventh message to the first terminal based on the push token; when the first terminal receives the eleventh message, determine that the message path corresponding to the first terminal is not a faulty path; and when the first terminal does not receive the eleventh message, determine that the message path corresponding to the first terminal is a faulty path.
[0225] The embodiment of the present application provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the push link fault detection method provided in the embodiment of the present application.
[0226] The embodiment of the present application provides a computer readable storage medium storing computer executable instructions, wherein the computer executable instructions are stored in the computer readable storage medium. When the computer executable instructions are executed by a processor, the processor executes the push link fault detection method provided in the embodiment of the present application, for example, 、 and The computer comprises various computing devices such as intelligent terminals and servers.
[0227] In some embodiments, the computer readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or various devices comprising one or any combination of the above memories.
[0228] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0229] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hypertext Markup Language document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0230] As an example, computer-executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0231] In summary, the automatic detection of nodes in the push link through the embodiments of this application can reduce testing costs and alleviate the burden on testers; furthermore, by detecting the message paths corresponding to the nodes in the push link in sequence, and thus identifying faulty nodes based on the detection results of the message paths, the accuracy and efficiency of fault detection can be improved.
[0232] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A method for detecting a failure of a push link, the method comprising: The method comprises: sending a first message to a first terminal through a push link, the push link comprising a plurality of nodes; in response to the first message not reaching the first terminal within a timeout period, determining a plurality of message paths corresponding to the plurality of nodes in the push link respectively; wherein each message path is used to detect whether the corresponding node is a faulty node; when a message path corresponding to the first terminal needs to be detected in a first order, or when it is detected that none of the nodes in the push link before the first terminal is a faulty node in a second order, controlling the first terminal to obtain and install an installation package of a client used to receive the first message, and after the installation is completed, querying a device token corresponding to the first terminal through a setting page of the client; wherein the first order is the reverse order of the order of the nodes passed through when transmitting the first message to the first terminal through the push link; and the second order is the order of the nodes passed through when transmitting the first message to the first terminal through the push link; when a banner style control in a notification page of the client is visible, determining that a notification state is an open state; and when the banner style control in the notification page is invisible, determining that the notification state is a closed state; when it is determined that the notification state is the open state and it is queried that a device token corresponding to the first terminal has been generated, determining that the message path corresponding to the first terminal is not a faulty path; and when it is determined that the notification state is the closed state or it is not queried that the device token corresponding to the first terminal has been generated, determining that the message path corresponding to the first terminal is a faulty path.
2. The method of claim 1, wherein, The determination of the plurality of message paths corresponding to the plurality of nodes in the push link comprises: when the first terminal supports a third-party push server accessing through a native push server, determining the message paths corresponding to the following nodes included in the push link respectively: a second terminal, an application server, the third-party push server, the native push server, and the first terminal; when the first terminal supports the third-party push server directly accessing, determining the message paths corresponding to the following nodes included in the push link respectively: a second terminal, an application server, the third-party push server, and the first terminal.
3. The method of claim 1, wherein, The method further comprises: detecting the message paths corresponding to the nodes in the push link in a first order, the message path corresponding to a node comprising the node and the nodes in the push link before the node in the first order; when the message path corresponding to a previously detected node has no fault, continuing to detect the message path corresponding to a next node until a faulty message path is detected, and determining the node corresponding to the faulty message path as a faulty node.
4. The method of claim 1, wherein, The method further comprises: detecting the message paths corresponding to the nodes in the push link in a second order, the message path corresponding to a node comprising the node and the nodes in the push link before the node in the second order; When the message path corresponding to the first detected node does not have a fault, the message path corresponding to the next node is detected until a fault message path is detected, and the node corresponding to the fault message path is determined as a fault node.
5. The method of claim 1, wherein, The method further comprises: When it is detected that none of the nodes in the push link before the native push server in the first order is a fault node, the following processing is performed to detect the message path corresponding to the native push server: sending a second message to the first terminal through the native push server; When the first terminal receives the second message, it is determined that the message path corresponding to the native push server is not a fault path; When the first terminal does not receive the second message, it is determined that the message path corresponding to the native push server is a fault path.
6. The method of claim 1, wherein, The method further comprises: When it is detected that none of the nodes in the push link before the third-party push server in the first order is a fault node, the following processing is performed to detect the message path corresponding to the third-party push server: controlling the third-party push server to obtain a push token corresponding to the first terminal, and find a device token that has a mapping relationship with the push token; controlling the third-party push server to send the device token and a third message to the native push server, so that the native push server sends the third message to the first terminal according to the device token; When the first terminal receives the third message, it is determined that the message path corresponding to the third-party push server is not a fault path; When the first terminal does not receive the third message, it is determined that the message path corresponding to the third-party push server is a fault path.
7. The method of claim 1, wherein, The method further comprises: When it is detected that none of the nodes in the push link before the third-party push server in the first order is a fault node, the following processing is performed to detect the message path corresponding to the third-party push server: controlling the third-party push server to obtain a user identifier corresponding to a client running in the first terminal, and find a device token that has a mapping relationship with the user identifier; controlling the third-party push server to send the device token and a fourth message to the native push server, so that the native push server sends the fourth message to the first terminal according to the device token; When the first terminal receives the fourth message, it is determined that the message path corresponding to the third-party push server is not a fault path; When the first terminal does not receive the fourth message, it is determined that the message path corresponding to the third-party push server is a fault path.
8. The method of claim 1, wherein, The method further comprises: When it is detected that none of the nodes in the push link before the third-party push server in the first order is a fault node, the following processing is performed to detect the message path corresponding to the third-party push server: controlling the third-party push server to obtain a push token corresponding to the first terminal, and send a fifth message to the first terminal according to the push token; controlling the third-party push server to obtain a push token corresponding to the first terminal, and send a fifth message to the first terminal according to the push token; when the first terminal receives the fifth message, determining that the message path corresponding to the third-party push server is not a failure path; when the first terminal does not receive the fifth message, determining that the message path corresponding to the third-party push server is a failure path.
9. The method of claim 1, wherein, The method further comprises: when it is detected that all nodes in the push link before the application server in the first order are not failure nodes, performing the following processing to detect the message path corresponding to the application server: controlling the application server to send a sixth message to the first terminal through the third-party push server, or sending the sixth message to the first terminal through the third-party push server and via the native push server; when the first terminal receives the sixth message, determining that the message path corresponding to the application server is not a failure path; when the first terminal does not receive the sixth message, determining the frequency of message sending of the application server; when the frequency of message sending of the application server does not exceed a frequency threshold, determining that the message path corresponding to the application server is a failure path.
10. The method of claim 1, wherein, The method further comprises: when it is detected that all nodes in the push link before the second terminal in the first order are not failure nodes, or when the message path corresponding to the second terminal needs to be detected in the second order, performing the following processing to detect the message path corresponding to the second terminal: determining an interface called by the second terminal when sending a message to the application server, and detecting configuration information of the interface; when it is detected that the configuration information of the interface is tampered, determining that the message path corresponding to the second terminal is a failure path; when it is detected that the configuration information of the interface is not tampered, determining that the message path corresponding to the second terminal is not a failure path.
11. The method of claim 1, wherein, The method further comprises: when it is detected that all nodes in the push link before the application server in the second order are not failure nodes, performing the following processing to detect the message path corresponding to the application server: controlling the second terminal to send a seventh message to the application server; when the application server receives the seventh message, determining that the message path corresponding to the application server is not a failure path; when the application server does not receive the seventh message, determining that the message path corresponding to the application server is a failure path.
12. A push link fault detection apparatus, characterized by, The apparatus comprises: a sending module configured to send a first message to a first terminal through a push link, the push link comprising a plurality of nodes; a determining module configured to, in response to the first message not reaching the first terminal within a timeout period, determine a plurality of message paths in the push link corresponding to the plurality of nodes respectively; wherein each message path is used to detect whether a corresponding node is a failure node; The detection module is configured to control the first terminal to acquire and install an installation package of a client for receiving the first message when a message path corresponding to the first terminal needs to be detected in a first order, or when it is detected that none of the nodes located before the first terminal in the push link is a faulty node in a second order, and to query a device token corresponding to the first terminal through a setting page of the client after the installation is completed; the first order is an inverse order of a sequence of nodes passed through when the first message is transmitted to the first terminal through the push link; the second order is a sequence of nodes passed through when the first message is transmitted to the first terminal through the push link; when a banner style control in a notification page of the client is visible, it is determined that a notification state is an open state; when the banner style control in the notification page is invisible, it is determined that the notification state is a closed state; when it is determined that the notification state is the open state and the device token corresponding to the first terminal is queried to have been generated, it is determined that the message path corresponding to the first terminal is not a faulty path; when it is determined that the notification state is the closed state or the device token corresponding to the first terminal is not queried to have been generated, it is determined that the message path corresponding to the first terminal is a faulty path.
13. An electronic device, comprising: Comprise: a memory for storing computer executable instructions; a processor for executing the computer executable instructions stored in the memory to implement the push link fault detection method in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The computer executable instructions stored in the memory are configured to be executed to implement the push link fault detection method in any one of claims 1 to 11.
15. A computer program product comprising computer-executable instructions or a computer program, characterized in that, The computer executable instructions or the computer program are configured to be executed by the processor to implement the push link fault detection method in any one of claims 1 to 11.
Citation Information
Patent Citations
Node and information synchronization method
CN112398905A
Method and system for providing push message
KR1020130103161A