A method and system for automatically diagnosing CPE based on the MQTT protocol

Through the MQTT protocol-based method, automatic fault diagnosis and monitoring of CPE equipment is realized, solving the problem of inefficient fault handling of CPE equipment in the prior art, and improving the work efficiency of users and managers.

CN115484153BActive Publication Date: 2025-06-03GUANGZHOU XINDE COMMUNICATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210961021.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-11
Publication Date
2025-06-03
Estimated Expiration
2042-08-11

AI Technical Summary

Technical Problem

The prior art is difficult to realize automatic fault diagnosis and monitoring of CPE equipment, making it difficult for users to deal with equipment failures, increasing the workload of operator managers and inefficient.

Method used

Using the MQTT protocol-based method, automatic diagnosis and fault repair are achieved through the connection between the APP terminal and the CPE device and the backend server. The proxy method between the APP and the MQTT server handles topic message publishing and subscription, ensuring that automatic diagnosis of CPE devices can be achieved under different network conditions.

Benefits of technology

It realizes automatic fault diagnosis and monitoring of CPE equipment. Users can record fault information at any time through the APP, which facilitates management personnel to check and repair and improves management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484153B_ABST
    Figure CN115484153B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method and system for automatically diagnosing a CPE based on the MQTT protocol. The method includes the following steps: The APP terminal sends a request to the background server according to a custom instruction to determine whether normal communication can be established between the APP terminal and the background server; if normal communication can be established, after using the APP registration account in the APP terminal to log in, bind the logged-in APP account to the CPE device. Both the APP terminal and the CPE device are connected to the MQTT server, and the MQTT server proxy method is used to process the publication and subscription of topic messages from the APP or the CPE; if normal communication cannot be established, the APP terminal does not need to log in to the background server, and a custom Https API instruction is used to request a self-diagnosis of the CPE device. The present disclosure is beneficial for users to record fault information through CPE automatic diagnosis via the APP at any time, facilitating the troubleshooting and repair of CPE problems by management personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of automatic diagnosis of CPE terminal device failures, and in particular, to a method and system for automatically diagnosing CPE based on the MQTT protocol. Background Art

[0002] More and more users are using CPE devices (CPE device, an acronym for Customer Premise(s) Equipment, referring to any connected device used to access the Internet or generally access services on a provider's network). In the past, the management and monitoring of CPE devices were limited to WEB, and it was not possible to manage and monitor the operation status of the devices better and more conveniently. On the one hand, when the device fails and causes abnormal Internet access or unstable bandwidth rate, ordinary users do not know how to handle the fault content of the device. For example: DHCP server failure, DNS status failure, PON status connection failure, etc. On the other hand, facing the direct feedback of problems from more and more CPE users, it greatly increases the workload of operators or OLT (optical line terminal device) managers, which brings great inconvenience and low management efficiency to OLT managers. Summary of the Invention

[0003] The present disclosure provides a method and system for automatically diagnosing CPE based on the MQTT protocol. Users can realize the automatic diagnosis and repair of abnormal problems of CPE devices through the MQTT (Message Queuing Telemetry Transport Protocol) protocol on the APP program, and can report the diagnosis information to the background management server. The present disclosure provides the following technical solutions to solve any of the technical problems recorded in the background art or to achieve the above object:

[0004] As an aspect of an embodiment of the present disclosure, a method for automatically diagnosing CPE based on the MQTT protocol is provided, including the following steps:

[0005] Step S1: The APP side sends a request to the background server according to a custom instruction to determine whether normal communication can be established between the APP side and the background server;

[0006] Step S2: If normal communication can be established, after registering and logging in with the APP account in the APP side, bind the logged-in APP account to the CPE device. Both the APP side and the CPE device are connected to the MQTT server, and the topic message publishing and subscribing from the APP or CPE are processed through the MQTT server proxy method;

[0007] Step S3: If normal communication cannot be established, the APP side does not need to log in to the background server, and uses a custom Https API instruction to request a self-diagnosis of the CPE device.

[0008] Optionally, step S2 specifically includes the following steps:

[0009] Step S201: The APP side uses the MAC of the CPE device as the unique identifier, assembles the diagnostic topic information content according to the custom MQTT protocol, and publishes it to the MQTT server;

[0010] Step S202: The CPE side subscribes to the topic message published by the APP, parses the message content, obtains the diagnostic information requested by the APP side, uses the MAC of the CPE device as the unique identifier, encapsulates the information content requested by the APP side into a topic message in JSON format, and publishes it to the MQTT server;

[0011] Step S203: The APP side subscribes to the topic message published by the CPE in the MQTT server by listening to the custom self-diagnostic topic message, the APP side obtains the diagnostic information data replied by the CPE device, parses the content according to the custom protocol structure and presents the data in the APP.

[0012] Optionally, step S3 specifically includes the following steps:

[0013] Step S301: The APP side obtains the CPE-related information by scanning the QR code of the CPE device. After connecting to the WIFI according to the obtained CPE information content, it logs in to the CPE side of the CPE device;

[0014] Step S302: The APP side sends a self-diagnosis API instruction to the CPE side according to the custom protocol;

[0015] Step S303: The CPE device receives the APP self-diagnosis request instruction, and the CPE device side will start to execute the self-diagnosis function, and encapsulate the diagnosis result into a data packet in JSON format to respond to the APP side request;

[0016] Step S304: The APP side requests the diagnostic data of the CPE device, parses the content according to the custom protocol structure and presents the data in the APP.

[0017] Optionally, after using the custom Https API instruction to request the self-diagnosis CPE device in step S3, the following steps are further included:

[0018] Step S4: Report the message content diagnosed by the self-diagnosis CPE device to the background server for recording.

[0019] As another aspect of the embodiments of the present disclosure, a system for automatically diagnosing CPE based on the MQTT protocol is provided, including an APP side, a CPE device, and an MQTT server. Both the APP side and the CPE device are connected to the MQTT server. The APP side sends a request to the background server according to a custom instruction to determine whether normal communication can be established between the APP side and the background server. If normal communication can be established, after registering and logging in with the APP registered account in the APP side, the logged-in APP account is bound to the CPE device. The MQTT server processes the publication and subscription of topic messages from the APP or CPE through a proxy method. If normal communication cannot be established, the APP side does not need to log in to the background server and uses a custom Https API instruction to request self-diagnosis of the CPE device.

[0020] Optionally, the APP side uses the MAC of the CPE device as the unique identifier, assembles the diagnostic topic information content according to the custom MQTT protocol, and publishes it to the MQTT server. The CPE side subscribes to the topic message published by the APP, parses the message content, obtains the diagnostic information requested by the APP side, uses the MAC of the CPE device as the unique identifier, encapsulates the information content requested by the APP side into a topic message in JSON format, and publishes it to the MQTT server. The APP side subscribes to the topic message published by the CPE in the MQTT server by listening to the custom self-diagnosis topic message, obtains the diagnostic information data replied by the CPE device, and parses the content according to the custom protocol structure and presents the data in the APP.

[0021] Optionally, the APP side obtains CPE-related information by scanning the QR code of the CPE device. After connecting to the WIFI according to the obtained CPE information content, it logs in to the CPE side of the CPE device. The APP side sends a self-diagnosis API instruction to the CPE side according to a custom protocol. After receiving the APP self-diagnosis request instruction, the CPE device will start to execute the self-diagnosis function and encapsulate the diagnostic result into a data packet in JSON format to respond to the APP side request.

[0022] Optionally, the APP side requests the diagnostic data of the CPE device, parses the content according to the custom protocol structure, and presents the data in the APP.

[0023] Optionally, the APP side reports the message content diagnosed by the self-diagnosis CPE device to the background server for recording.

[0024] The beneficial effects of the present disclosure at least include: 1. The present disclosure realizes the management of the APP side for the CPE automatic diagnosis and monitoring method, which is an extension of the limitations of the existing WEB automatic diagnosis management technology. It is beneficial for users to record fault information through the APP for CPE automatic diagnosis at any time, which is convenient for managers to troubleshoot and repair CPE problems;

[0025] 2. The present disclosure realizes automatic fault diagnosis of the CPE through different protocols (MQTT and HTTPS) and different network conditions, so as to solve the problem that the APP can also perform automatic diagnostic processing on the CPE and monitor the running status of the CPE when the APP is in a network - free state or the CPE is not around. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flowchart showing two ways to realize automatic diagnosis of the CPE in the embodiments of the present disclosure;

[0027] Figure 2 It is a schematic diagram showing the realization of automatic diagnosis of the CPE in the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] To make the above - mentioned objects, features, and advantages of the present disclosure more obvious and understandable, the technical solutions of the present disclosure will be described in detail below in conjunction with the drawings and specific embodiments. It should be noted that the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts belong to the scope of protection of the present disclosure.

[0029] Embodiment 1

[0030] This embodiment provides a method for realizing automatic diagnosis of the CPE based on the MQTT protocol, which is applied to the management of the automatic diagnosis method of the CPE device failure on the APP platform. As Figure 1-2 shown, the specific steps are as follows:

[0031] Step S1: After registering an account and logging in using the APP, bind the logged - in APP account to the CPE device. Both the APP and the CPE device are connected to the MQTT (Message Queuing Telemetry Transport Protocol) server, and the topic message publishing and subscribing from the APP or the CPE are processed through the MQTT server proxy method;

[0032] Step S2: The APP side uses the MAC of the CPE as the unique identifier, assembles the diagnostic topic information content according to the custom MQTT protocol, and publishes it to the MQTT server. The format of the topic message published by the APP is as follows, indicating a request for network diagnostic topic message:

[0033]

[0034] mqtt: Represents the property name for connecting to the MQTT server;

[0035] doPublish: Represents publishing the MQTT topic;

[0036] topic: Represents the content of the MQTT custom variable header published. The content of the header information is coordinated between the publisher and the subscriber to set or obtain data information.

[0037] cpe_mac: Uses the CPE MAC address as the unique identifier;

[0038] internet_diag: Represents a request for network diagnosis;

[0039] request: Represents the requested data;

[0040] qos: Represents ensuring message arrival and sending at least once;

[0041] payload: Represents the message content, referring to the parameters carried by the subscriber to the CPE;

[0042] Step S3: The CPE subscribes to the topic message published by the APP, encapsulates the diag_name (diagnostic module name) requested by the APP side into the topic message in JSON format (key / value pair), and then publishes the topic to the MQTT server as follows; The format of the CPE publishing the response network diagnosis topic message:

[0043]

[0044] response: Represents the response to the APP side request;

[0045] message: Represents the content of the response diagnostic data information;

[0046] Step S4: The APP side subscribes to the topic message published by the CPE in the MQTT server by listening to the custom self-diagnosis topic message, obtains the diagnostic information data replied by the CPE device. The format of listening / turning off the subscription to the CPE topic message in the APP is as follows:

[0047] uni.$on(“cpe_mac / internet_diag / response”,(res) => {

[0048] let content = res.message

[0049] );

[0050] uni.$off(“{cpe_mac} / internet_diag / response”);

[0051] uni.$on: Represents listening to the MQTT topic message published by the subscribed CPE;

[0052] uni.$off: It means to close the MQTT topic message subscription;

[0053] res: It means getting the diagnostic message published by the CPE.

[0054] Obtain the result set of the CPE diagnostic message res.message, and analyze the data format:

[0055] {

[0056] status: Diagnosing / Diagnosis completed / Error,

[0057] status_describe: WAN port exception,

[0058] type: Network diagnosis,

[0059] sub_type: WAN connection failed,

[0060] result_code: 200,

[0061] result_desc: Processing successful / Processing failed

[0062] }

[0063] status: It represents the CPE diagnosis process. When the result value is in the unfinished state, it means the CPE is still diagnosing. Continue to subscribe to MQTT messages until the completed state or diagnostic failure, and then the message subscription can be closed;

[0064] status_describe: It represents the diagnosis status description, that is, the result description of diagnosing the corresponding function of the CPE;

[0065] type: It represents the diagnosis type, supporting WIFI and network diagnosis;

[0066] sub_type: It represents the subtype - the specific diagnosis to be executed;

[0067] result_code, result_desc: The CPE responds with the diagnostic processing code and the processing result description;

[0068] Present the content of the res.message result set in the APP. Through the diagnosed message content, users can intuitively understand the CPE fault problem. Users can solve the corresponding fault problem and report the fault to the background server for recording.

[0069] Embodiment 2

[0070] Implement the CPE automatic diagnosis processing method flow through HTTPS, which specifically includes the following steps:

[0071] Step S1: The APP scans the QR code of the CPE device to obtain CPE-related information. After connecting to the WIFI based on the obtained CPE information content, it logs in to the CPE side;

[0072] Step S2: After logging in to the CPE side, the APP sends a self-diagnosis API instruction to the CPE side according to a custom protocol. The network self-diagnosis API instruction requested by the APP is as follows:

[0073] https: / / 192.168.1.1:69 / set / internet_diag

[0074] Step S3: After the CPE device receives the APP self-diagnosis request instruction, the CPE device side will start to execute the self-diagnosis function, encapsulate the diagnosis result into a data packet in JSON format to respond to the APP side request. The format processing of the CPE encapsulating the diagnosis result information is as follows:

[0075] {

[0076] status: Diagnosing / Diagnosis completed / Error,

[0077] status_describe: WAN port exception,

[0078] type: Network diagnosis,

[0079] sub_type: WAN connection failed,

[0080] result_code: 200,

[0081] result_desc: Processing successful / Processing failed

[0082] }

[0083] status: Represents the CPE diagnosis process. When the result value is in the unfinished state, it means the CPE is still diagnosing. Continue to obtain the diagnostic information content in step S2 above until the diagnosis is completed or a diagnostic failure occurs, then stop;

[0084] status_describe: Represents the description of the diagnosis status, that is, the description of the result of diagnosing the corresponding function of the CPE;

[0085] type: Represents the diagnosis type, supporting WIFI and network diagnosis;

[0086] sub_type: Represents the subtype - the specific diagnosis to be executed;

[0087] result_code, result_desc: The CPE responds with the diagnostic processing code and the description of the processing result;

[0088] Present the content of the res.message result set in the APP.

[0089] Step S4: The APP requests the diagnostic data of the CPE device (request example: as in Step S2, get operation), parses the content according to the custom protocol structure, and presents the data in the APP. Through the diagnosed message content, the user can intuitively understand the CPE fault problem, solve the corresponding fault problem, and report the fault to the background server for recording.

[0090] Embodiment 3

[0091] This embodiment provides a system for automatically diagnosing CPE based on the MQTT protocol, which is applied to the management of the automatic diagnosis method of CPE device faults on the APP platform, such as Figure 1-2 shown. Specifically, it includes an APP side, a CPE device, and an MQTT server. Both the APP side and the CPE device are connected to the MQTT server.

[0092] The APP side sends a request to the background server according to a custom instruction to determine whether normal communication can be established between the APP side and the background server.

[0093] If normal communication can be established, after registering and logging in with the APP account in the APP side, bind the logged-in APP account to the CPE device; the MQTT server processes the publication and subscription of topic messages from the APP or CPE through a proxy method.

[0094] If normal communication cannot be established, the APP side does not need to log in to the background server and uses a custom Https API instruction to request a self-diagnosis of the CPE device.

[0095] In some embodiments, the APP side uses the MAC of the CPE device as the unique identifier, assembles the diagnostic topic information content according to the custom MQTT protocol, and publishes it to the MQTT server; the CPE side subscribes to the topic message published by the APP, parses the message content, obtains the diagnostic information requested by the APP side, uses the MAC of the CPE device as the unique identifier, encapsulates the information content requested by the APP side into a topic message in JSON format, and publishes it to the MQTT server; the APP side subscribes to the topic message published by the CPE in the MQTT server by listening to the custom self-diagnosis topic message, and the APP side obtains the diagnostic information data replied by the CPE device, parses the content according to the custom protocol structure, and presents the data in the APP.

[0096] In some embodiments, the APP terminal obtains CPE-related information by scanning the QR code of the CPE device. After connecting to the WIFI according to the obtained CPE information content, it logs in to the CPE terminal of the CPE device; the APP terminal sends a self-diagnosis API instruction to the CPE terminal according to a custom protocol; upon receiving the APP self-diagnosis request instruction, the CPE device will start to execute the self-diagnosis function and encapsulate the diagnosis result into a data packet in JSON format to respond to the APP terminal request.

[0097] In some embodiments, the APP terminal requests the diagnostic data of the CPE device, parses the content according to the custom protocol structure, and presents the data in the APP.

[0098] In some embodiments, the APP terminal reports the message content diagnosed by the self-diagnosis CPE device to the background server for recording.

[0099] The present disclosure uses MQTT and HTTPS to implement the management of the APP terminal for the CPE automatic diagnosis and monitoring method, which is an extension of the limitations of the existing WEB automatic diagnosis management. It is beneficial for users to record fault information through the APP for CPE automatic diagnosis at any time, and is convenient for managers to troubleshoot and repair CPE problems.

[0100] Although the embodiments of the present disclosure have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims and their equivalents.

Claims

1. A method for automatically diagnosing CPE based on the MQTT protocol, characterized in that, it includes the following steps: Step S1: The APP side sends a request to the background server according to a custom instruction to determine whether normal communication can be established between the APP side and the background server; Step S2: If normal communication can be established, after registering and logging in with the APP account in the APP side, bind the logged-in APP account to the CPE device. Both the APP side and the CPE device are connected to the MQTT server, and the MQTT server proxy method is used to handle the publication and subscription of topic messages from the APP or CPE; The specific steps of Step S2 include the following steps: Step S201: The APP side uses the MAC of the CPE device as the unique identifier, assembles the diagnostic topic message content according to the custom MQTT protocol, and publishes it to the MQTT server; Step S202: The CPE side subscribes to the diagnostic topic message published by the APP, parses the content of the diagnostic topic message, obtains the diagnostic information requested by the APP side, uses the MAC of the CPE device as the unique identifier, and encapsulates the information content requested by the APP side into an MQTT topic message in JSON format and publishes it to the MQTT server; Step S203: The APP side subscribes to the MQTT topic message published by the CPE in the MQTT server by listening to the custom diagnostic topic message, the APP side obtains the diagnostic information replied by the CPE device, parses the content according to the custom protocol structure and presents the data in the APP; Step S3: If normal communication cannot be established, the APP side does not need to log in to the background server and uses a custom Https API instruction to request self-diagnosis of the CPE device; The specific steps of Step S3 include the following steps: Step S301: The APP side obtains CPE-related information by scanning the QR code of the CPE device, connects to the WIFI according to the obtained CPE information content, and logs in to the CPE side of the CPE device; Step S302: The APP side sends a self-diagnosis API instruction to the CPE side according to a custom protocol; Step S303: The CPE device receives the APP self-diagnosis request instruction, and the CPE device side will start to execute the self-diagnosis function, and encapsulate the diagnostic result into a data packet in JSON format to respond to the APP side request; Step S304: The APP side requests the diagnostic data of the CPE device, parses the content according to the custom protocol structure and presents the data in the APP.

2. The method for automatically diagnosing CPE based on the MQTT protocol according to claim 1, characterized in that, after using the custom Https API instruction to request self-diagnosis of the CPE device in Step S3, the following steps are further included: Step S4: Report the message content diagnosed by the self-diagnosis CPE device to the background server for recording.

3. A system for automatically diagnosing CPE based on the MQTT protocol, characterized in that, It includes an APP terminal, a CPE device, and an MQTT server. Both the APP terminal and the CPE device are connected to the MQTT server. The APP terminal sends a request to the background server according to a custom instruction to determine whether normal communication can be established between the APP terminal and the background server. If normal communication can be established, after registering and logging in with the APP account in the APP terminal, the logged-in APP account is bound to the CPE device. The MQTT server processes the publication and subscription of topic messages from the APP or CPE through a proxy method. If normal communication cannot be established, the APP terminal does not need to log in to the background server and uses a custom Https API instruction to request self-diagnosis of the CPE device. The APP terminal uses the MAC of the CPE device as the unique identifier, assembles the content of the diagnostic topic message according to a custom MQTT protocol, and publishes it to the MQTT server. The CPE terminal subscribes to the diagnostic topic message published by the APP, parses the content of the diagnostic topic message, obtains the diagnostic information requested by the APP terminal, uses the MAC of the CPE device as the unique identifier, and encapsulates the information content requested by the APP terminal into an MQTT topic message in JSON format and publishes it to the MQTT server. The APP terminal subscribes to the MQTT topic message published by the CPE in the MQTT server by listening to the custom diagnostic topic message, obtains the diagnostic information replied by the CPE device, parses the content according to the custom protocol structure, and presents the data in the APP. The APP terminal obtains CPE-related information by scanning the QR code of the CPE device. After connecting to the WIFI according to the obtained CPE information content, it logs in to the CPE terminal of the CPE device. The APP terminal sends a self-diagnosis API instruction to the CPE terminal according to a custom protocol. When the CPE device receives the APP self-diagnosis request instruction, the CPE device terminal will start to execute the self-diagnosis function and encapsulate the diagnostic result into a data packet in JSON format to respond to the APP terminal request. The APP terminal requests the diagnostic data of the CPE device, parses the content according to the custom protocol structure, and presents the data in the APP.

4. The system for automatically diagnosing a CPE based on the MQTT protocol as described in claim 3, characterized in that the APP terminal reports the message content diagnosed by the self-diagnosis of the CPE device to the background server for recording.