CN112261478B - Log debugging method, device and system, terminal device and set top box - Google Patents

Log debugging method, device and system, terminal device and set top box Download PDF

Info

Publication number
CN112261478B
CN112261478B CN202011532941.1A CN202011532941A CN112261478B CN 112261478 B CN112261478 B CN 112261478B CN 202011532941 A CN202011532941 A CN 202011532941A CN 112261478 B CN112261478 B CN 112261478B
Authority
CN
China
Prior art keywords
target
apk
top box
address
log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011532941.1A
Other languages
Chinese (zh)
Other versions
CN112261478A (en
Inventor
秦林
王�锋
李文响
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Xuanjia Network Technology Co ltd
Original Assignee
Nanjing Xuanjia Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Xuanjia Network Technology Co ltd filed Critical Nanjing Xuanjia Network Technology Co ltd
Priority to CN202011532941.1A priority Critical patent/CN112261478B/en
Publication of CN112261478A publication Critical patent/CN112261478A/en
Application granted granted Critical
Publication of CN112261478B publication Critical patent/CN112261478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4425Monitoring of client processing errors or hardware failure

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a log debugging method, a log debugging device, a log debugging system, terminal equipment and a set top box. The log debugging method is applied to terminal equipment and comprises the following steps: the method comprises the steps that an address set of at least one APK is obtained, the APK runs in a set-top box, the set-top box and terminal equipment are in the same local area network, and the address of any APK in the address set is sent to the terminal equipment when the set-top box running by any APK receives a broadcast message sent by the terminal equipment; establishing connection with a target APK corresponding to a target address according to a received connection instruction indicating the target address in the address set; receiving log information of a target APK sent by a target set top box, wherein the target APK runs in the target set top box; and performing log processing on the log information of the target APK, wherein the log processing comprises at least one of classification and presentation. The invention can realize the log debugging of various set top boxes, thereby repairing the fault APK in various set top boxes in time.

Description

Log debugging method, device and system, terminal device and set top box
Technical Field
The embodiment of the invention relates to a log management technology, in particular to a log debugging method, a log debugging device, a log debugging system, terminal equipment and a set top box.
Background
An Android Application Package (APK) runs in the set-top box, and an operator needs to know the running state of the APK running in the set-top box so as to locate and repair a fault in time when the APK fails. The running state of the APK can be obtained through log debugging, and the fault can be quickly positioned when the APK has the fault.
Currently, log information of an APK in a set top box can be checked through an Android Debug Bridge (ADB) function to perform log debugging. However, in the related art, the ADB function in the set-top box cannot be turned on in general.
When the ADB function of the set-top box cannot be turned on, log information of the APK running in the set-top box cannot be acquired, so that log debugging of the set-top box cannot be realized, and further, the repair of a failed APK in the set-top box is affected.
Disclosure of Invention
The invention provides a log debugging method, a log debugging device, a log debugging system, terminal equipment, a set top box and a storage medium, which are used for realizing log debugging of various set top boxes so as to repair fault APKs in various set top boxes in time.
In a first aspect, an embodiment of the present invention provides a log debugging method, applied to a terminal device, including:
the method comprises the steps that an address set of at least one APK is obtained, the APK runs in a set-top box, the set-top box and the terminal equipment are in the same local area network, and the address of any APK in the address set is sent to the terminal equipment when the set-top box running by any APK receives a broadcast message sent by the terminal equipment;
establishing connection with a target APK corresponding to the target address according to a received connection instruction indicating the target address in the address set;
receiving log information of the target APK sent by a target set top box, wherein the target APK runs in the target set top box;
and performing log processing on the log information of the target APK, wherein the log processing comprises at least one of classification and display.
Optionally, the establishing, according to the received connection instruction indicating the target address in the address set, a connection with the target APK corresponding to the target address includes:
and establishing TCP connection with a target APK corresponding to the target address according to the received connection instruction indicating the target address in the address set.
In a second aspect, an embodiment of the present invention provides a log debugging method, applied to a set top box, including:
receiving a broadcast message sent by terminal equipment;
based on the broadcast message, sending a target address of a target APK operated in the set top box to the terminal equipment;
responding to a connection request initiated by the terminal equipment to establish the connection between the target APK and the terminal equipment, wherein the terminal equipment is used for initiating the connection request to the set top box according to the received connection instruction indicating the target address;
acquiring the log information of the target APK;
and sending the log information of the target APK to the terminal equipment, wherein the terminal equipment is used for receiving the log information of the target APK sent by the set top box and performing log processing on the log information of the target APK, and the log processing comprises at least one of classification and display.
Optionally, the sending, to the terminal device that establishes a connection with the target APK, a target address of the target APK running in the set top box to the terminal device based on the broadcast message includes:
receiving a verification instruction of a user, wherein the verification instruction is used for indicating a verification message;
and when the verification of the verification message is successful, sending a target address of a target APK operated in the set top box to the terminal equipment based on the broadcast message.
In a third aspect, an embodiment of the present invention provides a log debugging system, where the log debugging system includes at least one terminal device and at least one set top box in the same local area network;
the terminal device is configured to obtain an address set of at least one APK, where the APK operates in the set-top box, and an address of any APK in the address set is sent to the terminal device when the set-top box operated by the APK receives a broadcast message sent by the terminal device;
the terminal device is further configured to establish a connection with a target APK corresponding to the target address according to a received connection instruction indicating the target address in the address set, where the target APK is operated in a target set top box of the at least one set top box;
the target set top box is used for acquiring the log information of the target APK;
the target set top box is also used for sending the log information of the target APK to the terminal equipment;
the terminal device is further configured to perform log processing on the received log information of the target APK, where the log processing includes at least one of classification and presentation.
Optionally, the establishing, according to the received connection instruction indicating the target address in the address set, a connection with the target APK corresponding to the target address includes:
and establishing TCP connection with a target APK corresponding to the target address according to the received connection instruction indicating the target address in the address set.
Optionally, the target set-top box is configured to receive a broadcast message sent by the terminal device;
and the target set top box is also used for sending the target address of the target APK operated in the set top box to the terminal equipment based on the broadcast message.
Optionally, the sending, to the terminal device, a target address of a target APK running in the set top box based on the broadcast message includes:
receiving a verification instruction of a user, wherein the verification instruction is used for indicating a verification message;
and when the verification of the verification message is successful, sending a target address of a target APK operated in the set top box to the terminal equipment based on the broadcast message.
In a fourth aspect, an embodiment of the present invention provides a log debugging apparatus, which is applied to a terminal device, and includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an address set of at least one android Application Package (APK), the APK runs in a set-top box, the set-top box and the terminal equipment are in the same local area network, and the address of any APK in the address set is sent to the terminal equipment when the set-top box running by any APK receives a broadcast message sent by the terminal equipment;
the connection module is used for establishing connection with a target APK corresponding to the target address according to a received connection instruction indicating the target address in the address set;
the receiving module is used for receiving the log information of the target APK sent by the target set top box, and the target APK runs in the target set top box;
and the processing module is used for performing log processing on the log information of the target APK, wherein the log processing comprises at least one of classification and display.
Optionally, the connection module is configured to:
and establishing TCP connection with a target APK corresponding to the target address according to the received connection instruction indicating the target address in the address set.
In a fifth aspect, an embodiment of the present invention provides a log debugging apparatus, which is applied to a set top box, and includes:
the receiving module is used for receiving the broadcast message sent by the terminal equipment;
a first sending module, configured to send, to the terminal device, a target address of a target APK running in the set top box based on the broadcast message;
a connection module, configured to respond to a connection request initiated by the terminal device to establish a connection between the target APK and the terminal device, where the terminal device is configured to initiate a connection request to the set top box according to a received connection instruction indicating the target address;
the acquisition module is used for acquiring the log information of the target APK;
and the second sending module is used for sending the log information of the target APK to the terminal equipment, and the terminal equipment is used for receiving the log information of the target APK sent by the set top box and carrying out log processing on the log information of the target APK, wherein the log processing comprises at least one of classification and display.
Optionally, the first sending module is configured to:
receiving a verification instruction of a user, wherein the verification instruction is used for indicating a verification message;
and when the verification of the verification message is successful, sending a target address of a target APK operated in the set top box to the terminal equipment based on the broadcast message.
In a sixth aspect, an embodiment of the present invention provides a terminal device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the log debugging method according to any one of the first aspect when executing the program.
In a seventh aspect, an embodiment of the present invention provides a set top box, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the log debugging method according to any one of the second aspects when executing the program.
In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is configured to, when executed by a processor, implement the log debugging method according to any one of the first aspect and the second aspect.
The method and the device for processing the APK log information acquire at least one APK address set by sending the broadcast message through the terminal device, establish connection with the target APK corresponding to the target address when receiving the connection instruction indicating the target address in the acquired address set, then receive the log information of the target APK sent by the target set top box operated by the target APK, and perform log processing on the log information. As for various set top boxes, the terminal equipment can acquire the log information of the APK in the set top box, the problem that the log debugging of the set top box cannot be realized in the related technology so as to influence the repair of the fault APK in the set top box is solved, and the log debugging and the fault APK repair are realized in time according to the log information acquired by the terminal equipment.
Drawings
Fig. 1 is a schematic structural diagram of a log debugging system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a log debugging method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another log debugging method provided by an embodiment of the present invention;
FIG. 4 is a flowchart of a further log debugging method according to an embodiment of the present invention;
fig. 5 is a block diagram of a log debugging apparatus according to an embodiment of the present invention;
FIG. 6 is a block diagram of another log debugging apparatus provided in the embodiments of the present invention;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a log debugging system according to an embodiment of the present invention. The log debugging system 10 includes a gateway device 101, at least one terminal device (6 are shown in fig. 1), and at least one set-top box (1 is shown in fig. 1). The at least one terminal device includes terminal device a1 through terminal device a 6. The at least one set top box includes set top box b 1. The terminal device and the set-top box each establish a communication connection with the gateway device 101 through a communication link to transmit data, such as log information, through the gateway device 101. The terminal device and the set-top box are connected to the same gateway device 101 and thus are in the same local area network. The gateway device 101 is connected to the Internet (Internet) and is used to provide a network environment in which the terminal device and the set-top box in the log debugging system operate.
Alternatively, the gateway apparatus 101 may include a router, and the terminal apparatus may include a mobile phone, a Personal Computer (PC), and the like. The set-Top box may comprise an android set-Top box, and may comprise, for example, an Internet Protocol Television (IPTV) set-Top box and an Internet Television (Over The Top Television) OTT TV set-Top box. The android set top box can run APK. Fig. 1 illustrates an example in which the gateway device 101 is a router, the terminal devices a1 to a3 are mobile phones, and the terminal devices a4 to a6 are PCs.
Optionally, the log debugging system 10 may further include: at least one switching means (1 is shown in fig. 1) connected to the gateway apparatus 101, the at least one switching means comprising switching means c 1. The terminal device and the set-top box are both in communication connection with the switching device through a communication link, and at the moment, data, such as log information, is transmitted between the terminal device and the set-top box through the switching device. Optionally, the switching device may include: a hub, a switch, a wireless access point, a wireless base station, a mobile communication network core network device, and the like.
As shown in fig. 1, the log debugging system 10 may further include a firewall 102 located between the Internet and the switching device c1, where the firewall 102 is used to prevent the entry of illegal users and maintain the security of the log debugging system.
It should be noted that the terminal device, the set-top box, the gateway device, and the switching device in the log debugging system shown in fig. 1 are only exemplary illustrations, and the embodiment of the present invention does not limit this.
An embodiment of the present invention provides a log debugging method, and when the log debugging method is applied to a terminal device, please refer to fig. 2, where fig. 2 is a flowchart of the log debugging method provided in the embodiment of the present invention, and the method may include the following steps:
step 210, an address set of at least one APK is obtained, the APK operates in a set-top box, the set-top box and a terminal device are in the same local area network, and an address of any APK in the address set is sent to the terminal device when the set-top box operated by any APK receives a broadcast message sent by the terminal device.
The addresses of the APKs in the at least one APK are different from each other. Optionally, the address of any APK in at least one APK may include an Internet Protocol (IP) address of a set-top box on which the APK operates and a port number of the APK in the set-top box on which the APK operates. For example, the address of any APK may be: 10.29.192.4x +1026, wherein "10.29.192.4 x" represents the IP address of the set-top box on which the any APK operates, and "1026" represents the port number of the any APK in the set-top box on which it operates.
The set-top box and the terminal device can refer to any set-top box and any terminal device shown in the aforementioned fig. 1 respectively. When the set top box and the terminal equipment are in the same local area network, the terminal equipment can obtain the address set of at least one APK, and the set top box and the terminal equipment can be connected with the same gateway equipment so as to ensure that the set top box and the terminal equipment are in the same local area network.
Each APK in the at least one APK may operate in the same set top box or may operate in different set top boxes, which is not limited in the embodiment of the present invention.
Step 220, according to the received connection instruction indicating the target address in the address set, establishing connection with the target APK corresponding to the target address.
The connection instruction is used for indicating an address, and the target APK can be found according to the address indicated by the connection instruction so as to establish connection with the target APK. Optionally, the connection may comprise a communication connection.
Optionally, the terminal device may send a connection request to a set-top box operated by the target APK, and after receiving a request response of the set-top box, establish connection with the target APK and transmit data.
And step 230, receiving the log information of the target APK sent by the target set top box, wherein the target APK runs in the target set top box.
The log information can indicate the operating status of the target APK.
And 240, performing log processing on the log information of the target APK, wherein the log processing comprises at least one of classification and display.
The terminal equipment can classify the log information and display the log information to an operator, and the operator can debug the log based on the log information.
In summary, in the log debugging method provided in the embodiment of the present invention, the terminal device may obtain the address set of at least one APK by sending the broadcast message, so that when receiving the connection instruction indicating the target address in the obtained address set, the terminal device establishes connection with the target APK corresponding to the target address, and then receives log information of the target APK sent by the target set top box where the target APK operates, and performs log processing on the log information. For various set top boxes, the terminal equipment can acquire the log information of the APK in the set top box, and an operator can timely debug the log according to the log information acquired by the terminal equipment, so that the fault APK can be timely repaired.
An embodiment of the present invention provides a log debugging method, and when the log debugging method is applied to a set top box, please refer to fig. 3, where fig. 3 is a flowchart of another log debugging method provided in an embodiment of the present invention, where the method may include the following steps:
and step 310, receiving the broadcast message sent by the terminal equipment.
Optionally, the broadcast message may include an address of the terminal device, and the address may include an IP address of the terminal device and a port number of a process in the terminal device for executing the log debugging method.
And step 320, sending the target address of the target APK operated in the set-top box to the terminal equipment based on the broadcast message.
The set-top box can find the terminal equipment according to the IP address and the port number included in the broadcast message, and further send the target address of the target APK to the terminal equipment.
And step 330, responding to a connection request initiated by the terminal device to establish a connection between the target APK and the terminal device, wherein the terminal device is configured to initiate the connection request to the set-top box according to the received connection instruction indicating the target address.
And after receiving the connection request, the set top box sends a request response to the terminal equipment.
And step 340, acquiring the log information of the target APK.
The log information of the target APK may be stored under a directory file of the target APK of the set-top box.
Step 350, sending the log information of the target APK to a terminal device, wherein the terminal device is used for receiving the log information of the target APK sent by the set-top box and performing log processing on the log information of the target APK, and the log processing comprises at least one of classification and display.
In summary, according to the log debugging method provided in the embodiment of the present invention, after receiving a broadcast message sent by a terminal device, a set top box can send a target address of a target APK to the terminal device, and then send the obtained log information of the target APK to the terminal device connected to the target APK, so that the terminal device receives the log information of the target APK sent by the set top box and performs log processing on the log information.
Referring to fig. 4, fig. 4 is a flowchart of another log debugging method according to an embodiment of the present invention, where fig. 4 illustrates the method by taking a target terminal device and a target set-top box as examples, and both the target terminal device and the target set-top box may refer to any terminal device and any set-top box shown in fig. 1, respectively, where the method may include the following steps:
step 410, the target terminal device obtains an address set of at least one APK, the APK operates in a set-top box, the set-top box and the target terminal device are in the same local area network, and an address of any APK in the address set is sent to the target terminal device when the set-top box operated by any APK receives a broadcast message sent by the target terminal device.
The target terminal device may send a broadcast message to each set top box in the same local area network, and the set top box operated by each APK in the at least one APK receives the broadcast message sent by the terminal device and sends an address of the APK to the target terminal device based on the broadcast message. And the target terminal equipment receives the addresses sent by the APKs so as to obtain the address set.
Optionally, the broadcast message includes an address of the target terminal device, where the address may include an IP address of the target terminal device and a port number of the target terminal device for executing a process of the log debugging method. When receiving the broadcast message, the target APK finds the target terminal equipment according to the IP address and the port number in the broadcast message, and sends a response message including the target address of the target APK to the target terminal equipment through the target set top box.
The broadcast message may further include appointment information, the target APK receives the broadcast message, and after identifying the appointment information in the broadcast message, sends a response message including a target address to the target terminal device through the target set-top box. The appointment message may include a character string, a ciphertext, and the like, which is not limited in the embodiment of the present invention.
Optionally, the response message sent by any APK may also include the appointment information. After the target terminal equipment identifies the appointment information, the address in the response message sent by any APK is added into the address set.
Illustratively, each of the at least one APK may have a Software Development Kit (SDK) integrated therein, and the target APK may receive a broadcast message transmitted by the target terminal device through the integrated SDK and transmit a response message including the target address to the target terminal device through the target set-top box. In one implementation, the broadcast message includes an address of the target terminal device, and the APK integrated with the SDK can receive the broadcast message; in another implementation, the broadcast message includes the address and provisioning information of the target terminal device, which the APK integrated with the SDK can recognize.
It should be noted that, in the set-top box in the same local area network as the target terminal device, another APK other than the at least one APK is also running, and the other APK is not integrated with the SDK. Corresponding to the first implementation mode, other APKs cannot receive the broadcast message; corresponding to the second implementation manner, after receiving the broadcast message, the other APKs cannot identify the promissory information, and at this time, the other APKs may not send a response to the target terminal device, or send a false response to the target terminal device, where the false response does not include the promissory information, and the target terminal device cannot identify the false response sent by the other APKs, and thus cannot process the false response.
Optionally, the SDK in the target APK may be in an on or off state, and when the target APK needs to be log debugged, the SDK in the target APK may be turned on, and at this time, the target APK may receive a broadcast message sent by the target terminal device, or may identify appointment information in the broadcast message; when the target APK does not need to be log debugged, the SDK in the target APK can be closed, and at this time, the target APK cannot receive the broadcast message sent by the target terminal equipment or cannot identify the appointed information in the broadcast message. This can reduce the power consumed by the operation of the target APK and reduce the operation memory of the target APK.
For example, the SDK in the target APK may be turned on by the validate instruction and turned off by the stop instruction. The opening process comprises: and receiving a verification instruction of a user, wherein the verification instruction is used for indicating a verification message, starting the SDK of the target APK when the verification message is verified successfully, and further sending a target address of the target APK to the target terminal equipment based on the broadcast message. The shutdown process includes: and receiving a stop instruction of the user, wherein the stop instruction is used for indicating a stop message, and when the stop message is verified successfully, closing the SDK of the target APK.
For example, the authentication message or stop message may be a string of passwords, e.g., the authentication message is "55555" and the stop message is "66666". When the target set-top box verifies that the password is correct, the target set-top box indicates that the password is successfully verified, and at the moment, the target set-top box can open or close the SDK of the target APK. Wherein, the operator can input the verification instruction or the stop instruction through the remote control equipment.
It should be noted that before the step 410 is executed, the set top box operated by each APK in the at least one APK is already in the on state, and each APK is in the operating state in the corresponding set top box.
Step 420, the target terminal device initiates a connection request to a target set-top box operated by a target APK corresponding to the target address according to the received connection instruction of the target address in the indication address set.
Optionally, the address of any APK in at least one APK includes an IP address of a set-top box on which the APK operates and a port number of the APK in the set-top box on which the APK operates. The target terminal device may determine the target set-top box according to the IP address in the address indicated by the connection instruction, determine the target APK running in the target set-top box according to the port number in the address indicated by the connection instruction, and further initiate a connection request to the target set-top box. For example, assume that the address indicated by the connect instruction is: 10.29.192.4x +1026, the set-top box with the IP address of "10.29.192.4 x" can be determined as the target set-top box, and then the APK with the port number of "1026" in the target set-top box is determined as the target APK.
After the target terminal device obtains the address set of at least one APK, each address set can be displayed, and an operator can perform gesture operation on the address of the APK needing to obtain the log information so as to send a connection instruction. The gesture operation may include: click, touch, slide, etc., which are not limited in this embodiment of the present invention.
Step 430, the target set-top box sends a request response to the target terminal device to establish the connection between the target APK and the target terminal device.
Optionally, the target terminal device and the target APK may establish a communication connection, where the communication connection may include: a hypertext transfer Protocol (HTTP) connection, a Transmission Control Protocol (TCP) connection, a User Datagram Protocol (UDP) connection, and the like, which are not limited in the embodiments of the present invention.
And step 440, the target set top box acquires the log information of the target APK.
Optionally, the target set top box may obtain the log information of the target APK in a directory file of the target APK.
And step 450, the target set top box sends the log information of the target APK to the target terminal equipment.
Step 460, the target terminal device performs log processing on the received log information of the target APK, where the log processing includes at least one of classification and presentation.
Alternatively, the target terminal device may classify the log information into: a verbose class, a debug class, an info class, a warning class and an error class, and displaying the classified log information. The operator may choose to filter different types of log information or to further filter various types of log information.
In summary, in the log debugging method provided in the embodiment of the present invention, the target terminal device may obtain the address set of at least one APK by sending a broadcast message, so that when a connection instruction indicating a target address in the obtained address set is received, a connection is established with the target APK corresponding to the target address, a target set-top box operated by the target APK obtains log information of the target APK, and then sends the log information of the target APK to the target terminal device, and the target terminal device receives the log information of the target APK sent by the target set-top box and performs log processing on the log information. For various set top boxes, the target terminal device can acquire log information of the APK running in the set top box, an operator can visually acquire the running state of the APK according to the log information and can timely perform log debugging according to the log information acquired by the target terminal device, timely find faults which may occur or occur in the APK, quickly locate fault sources and thoroughly solve the faults, so that the normal running of the APK is better guaranteed, and the service quality is improved.
It should be noted that the set-top box generally includes two categories, an IPTV set-top box and an OTT TV set-top box. The IPTV set-top box cannot turn on the ADB function, and thus cannot acquire log information of the APK running in the IPTV set-top box. The operating personnel cannot know the running state of the APK running in the IPTV set-top box, and usually, the state of the APK is known only when the APK cannot run or is broken down, so that the fault APK cannot be repaired in time. In addition, when the APK cannot operate or crashes, the difficulty of repairing the fault is high.
According to the log debugging method provided by the embodiment of the invention, the terminal equipment can acquire the address set of at least one APK by sending the broadcast message so as to establish connection with the APK, and further acquire the log information of the APK in time, and an operator can acquire the running state of the APK in time according to the log information acquired by the terminal equipment and perform log debugging in time according to the log information of the APK, so that the fault APK is repaired in time.
The OTT TV set-top box can turn on the ADB function, but needs a professional technician to operate, resulting in a higher operation threshold. In the embodiment of the invention, the terminal device already acquires the log information of the APK, and a non-professional technician (such as a common operator) can also directly check the log information in the terminal to debug the log, so that the operation threshold is low.
In the related art, the set top box can upload all the log information of the running APK to the server side, and the server side stores the received log information. However, the set-top box can only upload the log information of the APK running in the external network environment to the server, and in practice, a large number of APKs run in the internal network environment, so that the set-top box cannot upload the log information of the APK running in the internal network environment to the server; in addition, the server side can receive a large amount of log information uploaded by the set top box, so that the storage and bandwidth overhead of the server side is increased, and the log information uploaded by any set top box cannot be obtained in time; the process of acquiring the log information is influenced by the network environment, and when a network fault occurs, the log information uploaded by any set top box cannot be acquired in time.
According to the log debugging method provided by the embodiment of the invention, the terminal equipment and the set-top box are in the same local area network, the set-top box can send the log information of each APK to the terminal equipment, and the process of transmitting the log information is not influenced by the network environment; the set top box does not need to upload log information to the server side, so that the storage and bandwidth overhead of the server side is reduced; in addition, the terminal equipment can acquire at least one address set of the APK by sending the broadcast message, so that connection is established between the APK and the APK needing to acquire the log information according to the connection instruction, the log information of the APK is directly acquired, the log information of the APK needing to be acquired does not need to be searched in a large amount of log information, and the efficiency of acquiring the log information is improved.
An embodiment of the present invention provides a log debugging apparatus, which is applied to a terminal device, please refer to fig. 5, where fig. 5 is a block diagram of the log debugging apparatus provided in the embodiment of the present invention, and the log debugging apparatus 50 includes:
an obtaining module 501, configured to obtain an address set of at least one APK, where the APK runs in a set-top box, the set-top box and a terminal device are in the same local area network, and an address of any APK in the address set is sent to the terminal device when the set-top box running the APK receives a broadcast message sent by the terminal device.
The connection module 502 is configured to establish a connection with a target APK corresponding to a target address according to a received connection instruction indicating the target address in the address set.
The receiving module 503 is configured to receive log information of a target APK sent by a target set top box, where the target APK runs in the target set top box.
The processing module 504 is configured to perform log processing on the log information of the target APK, where the log processing includes at least one of classification and presentation.
Optionally, the connection module 502 is configured to:
and establishing TCP connection with a target APK corresponding to the target address according to the received connection instruction indicating the target address in the address set.
In summary, in the log debugging apparatus provided in the embodiment of the present invention, the terminal device can obtain the address set of at least one APK by sending a broadcast message through the obtaining module, so that when a connection instruction indicating a target address in the obtained address set is received through the connection module, a connection is established with the target APK corresponding to the target address, then, the receiving module receives log information of the target APK sent by the target set top box where the target APK operates, and the processing module performs log processing on the log information. For various set top boxes, the terminal equipment can acquire the log information of the APK in the set top box, and an operator can timely debug the log according to the log information acquired by the terminal equipment, so that the fault APK can be timely repaired.
The log debugging device provided by the embodiment of the invention can execute the process of the log debugging method provided by any embodiment of the invention, and has the corresponding functional module and beneficial effect of the execution method.
An embodiment of the present invention provides a log debugging apparatus, which is applied to a set top box, and please refer to fig. 6, where fig. 6 is a block diagram of another log debugging apparatus provided in an embodiment of the present invention, where the log debugging apparatus 60 includes:
the receiving module 601 is configured to receive a broadcast message sent by a terminal device.
A first sending module 602, configured to send, to the terminal device, a target address of the target APK running in the set-top box based on the broadcast message.
The connection module 603 is configured to respond to a connection request initiated by the terminal device to establish a connection between the target APK and the terminal device, where the terminal device is configured to initiate the connection request to the set top box according to the received connection instruction indicating the target address.
An obtaining module 604, configured to obtain log information of the target APK.
A second sending module 605, configured to send log information of the target APK to the terminal device, where the terminal device is configured to receive the log information of the target APK sent by the set-top box, and perform log processing on the log information of the target APK, where the log processing includes at least one of classification and display.
Optionally, the first sending module 602 is configured to:
and receiving an authentication instruction of the user, wherein the authentication instruction is used for indicating an authentication message.
And when the verification of the verification message is successful, sending the target address of the target APK operated in the set-top box to the terminal equipment based on the broadcast message.
In summary, in the log debugging apparatus provided in the embodiment of the present invention, after the set-top box receives the broadcast message sent by the terminal device through the receiving module, the set-top box can send the target address of the target APK to the terminal device through the first sending module, and then send the log information of the target APK obtained through the obtaining module to the terminal device connected to the target APK through the second sending module, so that the terminal device receives the log information of the target APK sent by the target set-top box and performs log processing on the log information.
The log debugging device provided by the embodiment of the invention can execute the process executed by the set-top box in the log debugging method provided by any embodiment of the invention, and has the corresponding functional module and beneficial effect of the execution method.
An embodiment of the present invention provides a terminal device, including: the log debugging method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize any log debugging method provided by the embodiment of the invention.
An embodiment of the present invention provides a set top box, including: the log debugging method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize any log debugging method provided by the embodiment of the invention.
Fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, and the structure of the terminal device is described with reference to fig. 7, where the structure of the set-top box may refer to fig. 7, and details of the embodiment of the present invention are not repeated herein. As shown in fig. 7, the terminal device includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of the processors 70 in the terminal device may be one or more, and one processor 70 is taken as an example in fig. 7; the processor 70, the memory 71, the input device 72 and the output device 73 in the terminal equipment may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 7.
The memory 71 is used as a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the log debugging method in the embodiment of the present invention (for example, the obtaining module 501, the connecting module 502, the receiving module 503, and the processing module 504 in the log debugging apparatus). The processor 70 executes various functional applications of the terminal device and log debugging by running software programs, instructions and modules stored in the memory 71, that is, the log debugging method flow described above is realized.
The memory 71 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 71 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 71 may further include memory located remotely from the processor 70, which may be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 72 may be used to receive input numeric or character information (e.g., log information) and generate key signal inputs (e.g., connection instructions) related to user settings and function control of the terminal device. The output device 73 may include a display device such as a display screen.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the computer program realizes any log debugging method provided by the embodiment of the invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
In the present invention, "at least one" means one or more, "a plurality" means two or more, unless explicitly defined otherwise.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A log debugging method is characterized by being applied to terminal equipment and comprising the following steps:
the method comprises the steps that an address set of at least one android Application Package (APK) is obtained, the APK runs in a set top box, the set top box and the terminal equipment are in the same local area network, and the address of any APK in the address set is sent to the terminal equipment when the set top box running by any APK receives a broadcast message sent by the terminal equipment;
establishing connection with a target APK corresponding to the target address according to a received connection instruction indicating the target address in the address set;
receiving log information of the target APK sent by a target set top box, wherein the target APK runs in the target set top box;
and performing log processing on the log information of the target APK, wherein the log processing comprises at least one of classification and display.
2. The log debugging method according to claim 1, wherein the establishing a connection with a target APK corresponding to a target address in the address set according to a received connection instruction indicating the target address comprises:
and establishing a Transmission Control Protocol (TCP) connection with a target APK corresponding to the target address according to the received connection instruction indicating the target address in the address set.
3. A log debugging method is applied to a set top box and comprises the following steps:
receiving a broadcast message sent by terminal equipment;
based on the broadcast message, sending a target address of a target APK operated in the set top box to the terminal equipment;
responding to a connection request initiated by the terminal equipment to establish the connection between the target APK and the terminal equipment, wherein the terminal equipment is used for initiating the connection request to the set top box according to the received connection instruction indicating the target address;
acquiring the log information of the target APK;
and sending the log information of the target APK to the terminal equipment, wherein the terminal equipment is used for receiving the log information of the target APK sent by the set top box and performing log processing on the log information of the target APK, and the log processing comprises at least one of classification and display.
4. The log debugging method of claim 3, wherein the sending a target address of a target APK running in the set top box to the terminal device based on the broadcast message comprises:
receiving a verification instruction of a user, wherein the verification instruction is used for indicating a verification message;
and when the verification of the verification message is successful, sending a target address of a target APK operated in the set top box to the terminal equipment based on the broadcast message.
5. The log debugging system is characterized by comprising at least one terminal device and at least one set top box which are positioned in the same local area network;
the terminal device is configured to obtain an address set of at least one APK, where the APK operates in the set-top box, and an address of any APK in the address set is sent to the terminal device when the set-top box operated by the APK receives a broadcast message sent by the terminal device;
the terminal device is further configured to establish a connection with a target APK corresponding to the target address according to a received connection instruction indicating the target address in the address set, where the target APK is operated in a target set top box of the at least one set top box;
the target set top box is used for acquiring the log information of the target APK;
the target set top box is also used for sending the log information of the target APK to the terminal equipment;
the terminal device is further configured to perform log processing on the received log information of the target APK, where the log processing includes at least one of classification and presentation.
6. The log debugging device is characterized by being applied to terminal equipment and comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an address set of at least one android Application Package (APK), the APK runs in a set-top box, the set-top box and the terminal equipment are in the same local area network, and the address of any APK in the address set is sent to the terminal equipment when the set-top box running by any APK receives a broadcast message sent by the terminal equipment;
the connection module is used for establishing connection with a target APK corresponding to the target address according to a received connection instruction indicating the target address in the address set;
the receiving module is used for receiving the log information of the target APK sent by the target set top box, and the target APK runs in the target set top box;
and the processing module is used for performing log processing on the log information of the target APK, wherein the log processing comprises at least one of classification and display.
7. A log debugging device is applied to a set top box and comprises:
the receiving module is used for receiving the broadcast message sent by the terminal equipment;
a first sending module, configured to send, to the terminal device, a target address of a target APK running in the set top box based on the broadcast message;
a connection module, configured to respond to a connection request initiated by the terminal device to establish a connection between the target APK and the terminal device, where the terminal device is configured to initiate a connection request to the set top box according to a received connection instruction indicating the target address;
the acquisition module is used for acquiring the log information of the target APK;
and the second sending module is used for sending the log information of the target APK to the terminal equipment, and the terminal equipment is used for receiving the log information of the target APK sent by the set top box and carrying out log processing on the log information of the target APK, wherein the log processing comprises at least one of classification and display.
8. A terminal device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the log debugging method according to claim 1 or 2 when executing the program.
9. A set top box comprising a memory, a processor and a computer program stored on said memory and executable on said processor, wherein said processor implements the log debugging method of claim 3 or 4 when executing said program.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the log debugging method according to any one of claims 1-4.
CN202011532941.1A 2020-12-23 2020-12-23 Log debugging method, device and system, terminal device and set top box Active CN112261478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011532941.1A CN112261478B (en) 2020-12-23 2020-12-23 Log debugging method, device and system, terminal device and set top box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011532941.1A CN112261478B (en) 2020-12-23 2020-12-23 Log debugging method, device and system, terminal device and set top box

Publications (2)

Publication Number Publication Date
CN112261478A CN112261478A (en) 2021-01-22
CN112261478B true CN112261478B (en) 2021-03-05

Family

ID=74225371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011532941.1A Active CN112261478B (en) 2020-12-23 2020-12-23 Log debugging method, device and system, terminal device and set top box

Country Status (1)

Country Link
CN (1) CN112261478B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244889A (en) * 2021-12-17 2022-03-25 深圳Tcl新技术有限公司 Log obtaining method, device, terminal, intelligent device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338110A (en) * 2015-11-23 2016-02-17 小米科技有限责任公司 Remote debugging method, platform and server
CN109254782A (en) * 2018-09-12 2019-01-22 郑州云海信息技术有限公司 Installation method of operating system and device
CN109388562A (en) * 2018-09-21 2019-02-26 北京辰森世纪科技股份有限公司 Debug method and device, the system, storage medium, electronic device of pos machine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8274973B2 (en) * 2010-03-24 2012-09-25 Cisco Technology, Inc. Virtual service domains

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338110A (en) * 2015-11-23 2016-02-17 小米科技有限责任公司 Remote debugging method, platform and server
CN109254782A (en) * 2018-09-12 2019-01-22 郑州云海信息技术有限公司 Installation method of operating system and device
CN109388562A (en) * 2018-09-21 2019-02-26 北京辰森世纪科技股份有限公司 Debug method and device, the system, storage medium, electronic device of pos machine

Also Published As

Publication number Publication date
CN112261478A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
EP3013086B1 (en) Method, apparatus and electronic device for connection management
EP3048759B1 (en) Fault diagnosis method, device and system
CN107026764B (en) Remote debugging method, device, server and system
CN108664395B (en) Application program testing method, device, equipment and storage medium
EP3382942A1 (en) Network service configuration method and network management device
CN107800663B (en) Method and device for detecting flow offline file
CN111355708B (en) Equipment password resetting method and device
CN106330483B (en) Information acquisition method, client device and server device
CN111711533B (en) Fault diagnosis method, fault diagnosis device, electronic device and storage medium
WO2020259551A1 (en) Method and apparatus for handling network connection fault
CN110119350A (en) Software Development Kit test method, device and equipment and computer storage medium
JP2021536144A (en) Automatic connection method between smart devices and routers, routers and smart devices
CN112261478B (en) Log debugging method, device and system, terminal device and set top box
CN112615858A (en) Internet of things equipment monitoring method, device and system
CN105117344B (en) A kind of Interface integration method of testing and system based on PB
WO2022257927A1 (en) Key burning method and apparatus, electronic device board card, and storage medium
CN105827462A (en) Method and tool for detecting network device
CN112580016B (en) Login authority configuration method and device for industrial control firewall
CN112671814B (en) Cross-platform equipment development method, device and system
CN107171824B (en) Wifi disconnection processing method of terminal, terminal and storage device
CN112769845A (en) Vulnerability testing method and device, electronic device and computer equipment
CN111464333A (en) Remote debugging method, computer equipment, storage device and remote debugging system
CN111858433A (en) SSH (secure Shell) serial port redirection-based method, system, equipment and medium
CN105049217A (en) Method and system for controlling debugging interface of intelligent network equipment
US12001319B2 (en) Device debugging connection control and maintenance

Legal Events

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