Application debugging method and device based on EPG page, medium and set top box
By deploying EPGCONSOLE files and setting agency modules in EPG applications, the difficulty of EPG application debugging in existing technology has been solved, and the debugging information is clearly displayed on the EPG page, which improves the work efficiency of developers. It is suitable for various types Complex scene.
Patent Information
- Application Number
- CN202411511941.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-21
AI Technical Summary
In the prior art, EPG application debugging is difficult and the lack of effective debugging tools has led to inefficiency in troubleshooting problems, especially when set-top box permissions are limited or APK interference, it is impossible to effectively crawl logs and network packets.
Deploy EPGCONSOLE files in EPG applications, initialize the EPG application interface and EPGCONSOLE files, set the proxy EPGNetwork network module, agent log module, agent ERROR module, and create EPG debugging interface, including data display interface and function switch panels. Request, logs and error data, and display and operate in the debug interface.
The LOG logs, network network requests and error reporting data are clearly displayed on the EPG page, and the efficiency of developers will provide effective debugging information when developing the efficiency of complex business logic when debugging complex business logic. support.
Smart Images

Figure CN119342302A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of IPTV technology, and in particular to an application debugging method, device, medium and set-top box based on EPG pages. Background Art
[0002] EPG is the portal system that interacts with users most frequently in the IPTV industry. The EPG page generally provides various menus, modules, buttons and other components that interact with users. Users can use the TV remote control to complete various interactive scenarios such as live TV, program on demand, life payment, online shopping, etc. With the growth of business needs, the complexity and debugging difficulty of EPG are gradually increasing. Since the WebView component that carries EPG does not provide a debugging panel, the following methods are usually used for debugging and troubleshooting.
[0003] (1) ADB command, the full name of which is Android Debug Bridge, is a debugging bridge. It can also be said to be a program (a tool) that connects a client (here refers to the computer used for operation) to a server (here refers to the Android device). ADB can perform operations such as operation management, file transfer, uninstallation and installation on an Android real machine or mobile phone simulator. The ADB command can be used to capture software logs, network packets and other operations for troubleshooting.
[0004] (2) Use the debugging panel provided by the computer browser. Usually, the debugging tool panel provided by the Chrome browser, which has the same core as Android WebView, is used for software debugging. By observing the console output, the running status of the program can be observed.
[0005] At present, the main debugging method in the EPG development process is ADB command, which is used to capture log network packets to observe the operation of the EPG project. When troubleshooting complex problems, it is usually accompanied by cumbersome operations and network requests. The size of the captured log network packets will gradually increase, and developers will waste a lot of time in the process of finding useful information. The WebView component itself does not have any visual debugging panel and cannot support the focus function (understood as the focus of the options on the EPG application interface when the remote control is operated. Loss of focus means that an element no longer has focus at present. Loss of focus is understood as the process of transferring from one element to another. For example, when the remote control is moved down, the original element loses focus and the focus is transferred to the next element, that is, the focus is lost to the next element). In addition, in the actual development process, some set-top boxes have limited permissions, or in the case of apk interference and inability to capture logs and network packets, network packets cannot capture https requests, which will bring great inconvenience in the actual development process.
[0006] Therefore, how to provide a more convenient and effective EPG application debugging solution is a problem that needs to be solved in this field. Summary of the invention
[0007] The purpose of the embodiments of the present application is to provide an application debugging method, device, medium and set-top box based on an EPG page, so as to realize debugging of an EPG application within the EPG page, and also to realize debugging work through the operation of a set-top box remote control, thereby improving the work efficiency of developers.
[0008] In order to achieve the above purpose, the embodiments of the present application are implemented in the following manner:
[0009] In the first aspect, an embodiment of the present application provides an application debugging method based on an EPG page, wherein an epgConsole file is deployed in the EPG application, and the method is applied to the EPG, including: initializing the EPG application interface and the epgConsole file; initializing the proxy epgNetWork network module, the proxy Log module, the proxy Error module and the EPG debugging interface, wherein the EPG debugging interface includes a data display interface and a function switching panel; collecting the return data of the network request interface, the log content and the error behavior data content in the EPG project through the proxy epgNetWork network module, the proxy Log module and the proxy Error module, mapping them into corresponding containers, and rendering them for display in the data display interface of the EPG debugging interface; controlling the switching of the data display interface through the function switching panel of the EPG debugging interface to display the corresponding data content.
[0010] In combination with the first aspect, in a first possible implementation method of the first aspect, the EPG application interface and the epgConsole file are initialized, including: loading and initializing the EPG application interface through WebView, loading the Css style sheet, Bridge and the main entry file; parsing the main entry JavaScript script file in the EPG application interface, loading the epgConsole file; initializing the epgConsole file, and instantiating the epgConsole object.
[0011] In combination with the first aspect, in a second possible implementation method of the first aspect, the agent epgNetWork network module, the agent Log module, the agent Error module and the EPG debugging interface are initialized, including: initializing the agent epgNetWork network module for collecting return data of the network request interface; initializing the agent Log module for collecting log content in the EPG project; initializing the agent Error module for collecting error behavior data content in the EPG project; initializing the main button module of the function switching panel for switching the EPG application interface and the EPG debugging interface; initializing the Tab button module of the function switching panel for switching different data display interfaces, wherein the data display interface includes the NetWork display interface corresponding to the agent epgNetWork network module, the Log display interface corresponding to the agent Log module, and the Error display interface corresponding to the agent Error module; initializing the button interception logic and the focus operation logic for implementing button operations in the EPG debugging interface.
[0012] In combination with the second possible implementation method of the first aspect, in the third possible implementation method of the first aspect, after initializing the proxy epgNetWork network module, the method of collecting the return data of the network request interface through the proxy epgNetWork network module is: proxy NetWork network request, listen to the XMLHttpRequest object built into WebiVew, listen to the network requests in WebiVew, and collect the return data of the interface.
[0013] In combination with the second possible implementation method of the first aspect, in a fourth possible implementation method of the first aspect, after initializing the proxy Log module, the method for collecting the log content in the EPG project through the proxy Log module is: rewriting the built-in Console.log method in WebView, intercepting the log printing in the EPG project, and collecting the log content in the output EPG project.
[0014] In combination with the second possible implementation method of the first aspect, in the fifth possible implementation method of the first aspect, after initializing the proxy Error module, the method for collecting the error behavior data content in the EPG project through the proxy Error module is: listening to the Error event in the WebView, and collecting the error behavior data content in the EPG project.
[0015] In combination with the second possible implementation method of the first aspect, in a sixth possible implementation method of the first aspect, the key interception logic and the focus operation logic are initialized, including: initializing the key interception logic; entering preset instructions, registering the Enter, UP, Down, Left, Right, Focus, Blur, and Backspace events of a single module, and completing focus initialization, wherein Enter represents a confirmation operation, UP represents an up operation, Down represents a down operation, Left represents a left operation, Right represents a right operation, Focus represents focus, Blur represents loss of focus, and Backspace represents a return operation.
[0016] In the second aspect, an embodiment of the present application provides an application debugging device based on an EPG page, in which an epgConsole file is deployed in the EPG application. The device is applied to the EPG and includes: an application initialization unit, which is used to initialize the EPG application interface and the epgConsole file; a module initialization unit, which is used to initialize the proxy epgNetWork network module, the proxy Log module, the proxy Error module and the EPG debugging interface, wherein the EPG debugging interface includes a data display interface and a function switching panel; a data collection unit, which is used to collect the return data of the network request interface, the log content and the error behavior data content in the EPG project through the proxy epgNetWork network module, the proxy Log module and the proxy Error module, map them into the corresponding container, and render them for display in the data display interface of the EPG debugging interface; an interface control unit, which is used to control the switching of the data display interface through the function switching panel of the EPG debugging interface to display the corresponding data content.
[0017] In a third aspect, an embodiment of the present application provides a storage medium, which is arranged in a set-top box and includes a stored program, wherein when the program is running, the set-top box where the storage medium is located is controlled to execute the EPG page-based application debugging method described in the first aspect or any one of the possible implementation methods of the first aspect.
[0018] In a fourth aspect, an embodiment of the present application provides a set-top box, comprising a memory and a processor, the memory being used to store information including program instructions, the processor being used to control the execution of the program instructions, and the program instructions, when loaded and executed by the processor, implementing the steps of the EPG page-based application debugging method described in the first aspect or any one of the possible implementation methods of the first aspect.
[0019] Beneficial effects:
[0020] 1. This solution deploys the epgConsole file in the EPG application, initializes the EPG application interface and the epgConsole file, initializes the proxy epgNetWork network module, proxy Log module, proxy Error module and EPG debugging interface (including data display interface and function switch panel), collects the return data of the network request interface, the log content and error behavior data content in the EPG project through the proxy epgNetWork network module, proxy Log module and proxy Error module, maps them into the corresponding container, and renders them to be displayed in the data display interface of the EPG debugging interface, and switches the data display interface through the function switch panel of the EPG debugging interface to display the corresponding data content. Based on this, this solution can display clear information such as Log log printing, NetWork network request, and error behavior data content on the EPG page, and provide clear and concise information support when developers are developing complex business logic, thereby improving the work efficiency of developers. In the case where the set-top box permissions are limited or the apk interference cannot capture logs and network packets, it can also provide effective debugging information as a reference in the process of software development and daily project maintenance.
[0021] 2. Load and initialize the EPG application interface through WebView, load the Css style sheet, Bridge and main entry file, parse the main entry JavaScript script file in the EPG application interface, load the epgConsole file, initialize the epgConsole file, instantiate the epgConsole object, and start the epgConsole file. By initializing the proxy epgNetWork network module (proxy NetWork network request, listen to the XMLHttpRequest object built in WebiVew, listen to the network request in WebiVew, and collect the return data of the interface), the return data of the network request interface can be collected. By initializing the proxy Log module (overriding the built-in Console.log method in WebView, intercepting the log printing in the EPG project, and collecting the log content in the output EPG project), the log content in the EPG project can be collected; by initializing the proxy Error module (listening to the Error event in WebView and collecting the error behavior data content in the EPG project), the error behavior data content in the EPG project can be collected. By initializing the main button module of the function switching panel, it is used to switch the EPG application interface and the EPG debugging interface; initializing the Tab button module of the function switching panel, it is used to switch different data display interfaces (including the NetWork display interface corresponding to the proxy epgNetWork network module, the Log display interface corresponding to the proxy Log module, and the Error display interface corresponding to the proxy Error module); initializing the button interception logic and the focus operation logic (initializing the button interception logic; entering the preset instructions, registering the Enter, UP, Down, Left, Right, Focus, Blur, and Backspace events of a single module, and completing the focus initialization, where Enter represents the confirmation operation, UP represents the up operation, Down represents the down operation, Left represents the left operation, Right represents the right operation, Focus represents the focus, Blur represents the loss of focus, and Backspace represents the return operation), which is used to implement the button operation in the EPG debugging interface. In this way, it is possible to collect various types of information (such as return data of network requests, log content in EPG projects, and error behavior data content in EPG projects), and operate various interfaces in the EPG debugging interface (such as viewing, switching, etc.). By initializing the key interception logic and focus operation logic, operations without peripherals (mouse, keyboard, etc.) can be achieved through the set-top box remote control, which greatly improves operability and applicability to various harsh scenarios (such as set-top box permissions are limited or logs and network packets cannot be captured due to apk interference).
[0022] 3. This solution uses JavaScript programming (write epgConsole files and deploy them in EPG applications) to implement a set of debugging tools with focus capabilities that can run on WebView. It can be used in any EPG project without affecting the original functions of the project. You can debug Log printing, NetWork network requests, etc. on the EPG page, making the logic of complex page development clearer and thereby improving the work efficiency of developers.
[0023] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A flowchart of an EPG page-based application debugging method provided in an embodiment of the present application.
[0026] Figure 2 A schematic diagram showing the main button module in the EPG application interface.
[0027] Figure 3 This is a schematic diagram after switching from the EPG application interface to the EPG debugging interface.
[0028] Figure 4 The figure is a schematic diagram of the NetWork display interface in the EPG debugging interface.
[0029] Figure 5 This is a schematic diagram of the corresponding Log display interface in the EPG debugging interface.
[0030] Figure 6 This is a schematic diagram of the Error display interface in the EPG debugging interface.
[0031] Figure 7 A structural block diagram of an EPG page-based application debugging device provided in an embodiment of the present application.
[0032] Icons: 10-EPG page-based application debugging device; 11-application initialization unit; 12-module initialization unit; 13-data acquisition unit; 14-interface control unit. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0034] The application debugging method based on the EPG page provided in this embodiment is applied to the EPG application of the set-top box. The epgConsole file (epgConsole.js file) is written through JavaScript language programming and deployed in the EPG application to implement a set of debugging tools with focus capabilities that can be run on WebView. It can be used in any EPG project without affecting the original functions of the project. The following will introduce the application debugging method based on the EPG page.
[0035] See also Figure 1 , Figure 1 Flow chart of the application debugging method based on EPG page. In this embodiment, the application debugging method based on EPG page may include step S10, step S20, step S30 and step S40.
[0036] When debugging of the EPG is required, step S10 may be executed.
[0037] Step S10: Initialize the EPG application interface and epgConsole file.
[0038] In this embodiment, the EPG application interface can be initialized first: the EPG application interface is initialized by loading the WebView, loading the Css style sheet, Bridge and main entry file. Then the main entry JavaScript script file is parsed in the EPG application interface, the epgConsole file is loaded, the epgConsole file is initialized, and the epgConsole object is instantiated.
[0039] Afterwards, step S20 may be executed.
[0040] Step S20: Initialize the proxy epgNetWork network module, the proxy Log module, the proxy Error module and the EPG debugging interface, wherein the EPG debugging interface includes a data display interface and a function switching panel.
[0041] In this embodiment, the proxy epgNetWork network module can be initialized to collect the return data of the network request interface. The method of collecting the return data of the network request interface by proxying the epgNetWork network module is: proxy NetWork network request, listen to the XMLHttpRequest object built into WebiVew, thereby listening to the network request in WebiVew, and collecting the return data of the interface. Then, the UI can be updated according to the difference in the comparison results by comparing the unique values of the network requests one by one. For example, each network request will generate a unique timestamp ID. When the request status changes and the UI needs to be updated, the unique timestamp ID will be used to traverse and retrieve the content in which container needs to be updated, thereby reducing the number of updated UI containers to reduce performance consumption.
[0042] After completing the initialization of the proxy epgNetWork network module, you can further initialize the proxy Log module to collect the log content in the EPG project. The way to collect the log content in the EPG project through the proxy Log module is to rewrite the built-in Console.log method in WebView, intercept the log printing in the EPG project, and collect the log content in the output EPG project.
[0043] When the Console.log method is executed in WebView, epgConsole will save the log information in the form of an ordered queue inside the proxy Log module. When it needs to be displayed, you can traverse the collected information queue, create corresponding containers in sequence, and render them in order to the corresponding data display interface.
[0044] Initialize the proxy Error module to collect the error behavior data content in the EPG project. The method of collecting the error behavior data content in the EPG project through the proxy Error module is: monitor the Error event in the WebView and collect the error behavior data content in the EPG project.
[0045] Specifically, when epgConsole is initialized, it will automatically execute the addEventListener method on the built-in Window object in WebView, and listen to the Error event in the Epg project by passing in the callback. When the EPG code reports an error, it will collect the error stack, error line number and other information in the error message. And save it in the form of an ordered queue inside the proxy Log module. When it needs to be displayed, it will traverse the collected information queue, create corresponding containers in sequence, and render them to the main interface in sequence.
[0046] In addition to the initialization of the above modules (proxy epgNetWork network module, proxy Log module, proxy Error module), the EPG debugging interface (the function switching panel) also needs to be initialized, and the EPG debugging interface is generated by instantiating the epgConsole object above.
[0047] Specifically, the main button module of the function switching panel needs to be initialized to switch between the EPG application interface and the EPG debugging interface. Specifically, the main button module (i.e. SwitchButton) is initialized. When the button is initialized, a button event will be bound to it, and a variable for describing the main and sub-interfaces (for example, the main interface is the EPG debugging interface, and the sub-interface is the EPG application interface) will be initialized. The internal logic of the event determines the switching action between the main and sub-interfaces based on this variable. When the main interface (EPG debugging interface) needs to be displayed, the most recently opened module (such as the agent epgNetWork network module), the main button module (SwitchButton) and the Tab button module (NetWork button, Log button and Error button) will be rendered to render the main interface (when the main interface has not been opened, the specified module such as the agent Log module can be rendered); when the sub-interface (EPG application interface) needs to be displayed, the modules and Tab button modules displayed in the main interface will be folded, and the main button module (SwitchButton) will be retained.
[0048] like Figure 2 As shown (to comply with the review standards, the rest of the parts are covered with a semi-transparent layer to cover sensitive information such as the face), the main button module is Figure 2 The SwitchBotton in the lower right corner can switch between the EPG application interface and the EPG debugging interface. By clicking the SwitchBotton, you can switch from the EPG application interface to the EPG debugging interface. Figure 3 shown.
[0049] And, you need to initialize the Tab button module of the function switching panel ( Figure 3 The NetWork, Log, and Error buttons on the right side of the screen are used to switch between different data display interfaces, including the NetWork display interface corresponding to the epgNetWork network module, the Log display interface corresponding to the Log module, and the Error display interface corresponding to the Error module.
[0050] After that, it is also necessary to initialize the key interception logic and focus operation logic to implement key operations in the EPG debugging interface. Of course, the initialization of the key interception logic and focus operation logic here is also the key to realizing the operation of the EPG debugging interface by the set-top box remote control.
[0051] Exemplarily, it is necessary to initialize the key interception logic here, and then register the Enter, UP, Down, Left, Right, Focus, Blur, and Backspace events of a single module by entering preset instructions to complete the focus initialization and the initialization of the key interception logic.
[0052] Specifically, since Epg and epgConsole share a set of focus-related events, in order to initialize the key interception logic, a command can be entered, such as "UP, Down, Left, Right", to transfer the key from the EPG application to the epgConsole. When EpgConsole is initialized, it automatically executes the addEventListener method on the built-in Window object in WebView to monitor key events globally. When there is a key response, the key code of the key will be pushed into the instruction stack, and the instructions in the instruction stack will be checked to see if they meet the requirements. If they meet the requirements, the key code in the instruction stack will be retained, otherwise the key code in the instruction stack will be cleared. Until the key code in the instruction stack meets the requirements, the focus will be placed on the switchButton. Then register the Enter, UP, Down, Left, Right, Focus, Blur, and Backspace events of a single module. Enter indicates a confirmation operation, UP indicates an upward movement operation, Down indicates a downward movement operation, Left indicates a leftward movement operation, Right indicates a rightward movement operation, Focus indicates a focus drop, Blur indicates a loss of focus, and Backspace indicates a return operation. Here, by writing the focus logic of each module in advance, users can use the debugging tool normally in the EPG environment.
[0053] After completing the above initialization, the debugging tool can enter the normal use state, and step S30 can be executed at this time.
[0054] Step S30: Collect the return data of the network request interface, the log content and the error behavior data content in the EPG project through the proxy epgNetWork network module, the proxy Log module and the proxy Error module, map them into the corresponding container, and render them to display them in the data display interface of the EPG debugging interface.
[0055] In this embodiment, the return data of the network request interface can be collected by proxying the epgNetWork network module and mapped to the corresponding container. The log content in the EPG project can be collected by proxying the Log module and mapped to the corresponding container. The error behavior data content in the EPG project can be collected by proxying the Error module and mapped to the corresponding container.
[0056] The returned data of the network request interface, the log content and the error behavior data content in the EPG project collected and cached can be used for UI page rendering, and thus displayed in the data display interface of the EPG debugging interface. The returned data of the network request interface is displayed through the NetWork display interface (it can also be updated according to the difference in the comparison results by comparing the unique values of the network request one by one), the log content in the EPG project is displayed through the Log display interface, and the error behavior data content in the EPG project is displayed through the Error display interface.
[0057] Afterwards, step S40 may also be executed.
[0058] Step S40: The data display interface is switched through the function switching panel of the EPG debugging interface to display corresponding data content.
[0059] In this embodiment, the Tab key module ( Figure 3 The NetWork, Log, and Error buttons on the right side of the screen) switch the data display interface. For example, select the NetWork button to enter the NetWork display interface (such as Figure 4 ); Select the Log button to enter the Log display interface (such as Figure 5 ); Select the Error button to enter the Error display interface (such as Figure 6 ). Thus, the corresponding data content can be displayed in the EPG debugging interface. Of course, you can also manipulate the main button module of the function switching panel ( Figure 3-6 SwitchBotton in the lower right corner of the screen to switch from the EPG debugging interface to the EPG application interface.
[0060] Accordingly, this embodiment can display clear information such as log printing, NetWork network request, error behavior data content, etc. on the EPG page, providing developers with clear information support when developing complex business logic, thereby improving the work efficiency of developers. In situations where the set-top box permissions are limited or logs and network packets cannot be captured due to apk interference, effective debugging information can also be provided as a reference in the process of software development and daily project maintenance.
[0061] In addition, it is possible to collect various types of information (such as return data of network requests, log content in EPG projects and error behavior data content in EPG projects), operate various interfaces in the EPG debugging interface (such as viewing, switching, etc.), and by initializing the key interception logic and focus operation logic, it is possible to use the set-top box remote control to achieve operations without peripherals (mouse, keyboard, etc.), greatly improving operability and applicability to various harsh scenarios (such as limited set-top box permissions or inability to capture logs and network packets due to apk interference).
[0062] By programming in JavaScript (writing epgConsole files and deploying them in EPG applications), a set of debugging tools with focus capabilities that can run on WebView is implemented. It can be used in any EPG project without affecting the original functions of the project. Log printing, NetWork network requests, etc. can be debugged on the EPG page, making the logic of complex page development clearer and thus improving the work efficiency of developers.
[0063] Based on the idea of this embodiment, although a set of debugging tools with similar functions can also be written inside the Android APK, there are still several shortcomings: (1) The development and upgrade of the APK is relatively cumbersome, and it is not suitable for embedding for development tools that may need to be changed frequently, and the overall flexibility is not good; (2) Since EPG relies on WebView to execute HTML files, APK cannot intercept the focus behavior of WebView on other layers and cannot implement the focus behavior.
[0064] Therefore, this embodiment uses JavaScript language programming to write the epgConsole file (epgConsole.js file) and deploy it in the EPG application to design a set of debugging tools with focus capabilities that can run on WebView. It can be used in any EPG project, and this solution is only used in the development environment, does not involve the production environment, and does not affect the original functions of the project.
[0065] See also Figure 7 Based on the same inventive concept, this embodiment further provides an EPG page-based application debugging device 10, in which an epgConsole file is deployed in the EPG application. The EPG page-based application debugging device 10 is applied to the EPG, and includes:
[0066] The application initialization unit 11 is used to initialize the EPG application interface and the epgConsole file.
[0067] The module initialization unit 12 is used to initialize the proxy epgNetWork network module, the proxy Log module, the proxy Error module and the EPG debugging interface, wherein the EPG debugging interface includes a data display interface and a function switching panel.
[0068] The data collection unit 13 is used to collect the return data of the network request interface, the log content and the error behavior data content in the EPG project through the agent epgNetWork network module, the agent Log module, and the agent Error module, map them into the corresponding container, and render them for display in the data display interface of the EPG debugging interface.
[0069] The interface control unit 14 is used to control the switching of the data display interface through the function switching panel of the EPG debugging interface to display the corresponding data content.
[0070] In this embodiment, the application initialization unit 11 is specifically used to: load and initialize the EPG application interface through WebView, load the Css style sheet, Bridge and main entry file; parse the main entry JavaScript script file in the EPG application interface, load the epgConsole file; initialize the epgConsole file and instantiate the epgConsole object.
[0071] In this embodiment, the module initialization unit 12 is specifically used to: initialize the proxy epgNetWork network module for collecting return data from the network request interface; initialize the proxy Log module for collecting log content in the EPG project; initialize the proxy Error module for collecting error behavior data content in the EPG project; initialize the main button module of the function switching panel for switching between the EPG application interface and the EPG debugging interface; initialize the Tab button module of the function switching panel for switching between different data display interfaces, wherein the data display interface includes the NetWork display interface corresponding to the proxy epgNetWork network module, the Log display interface corresponding to the proxy Log module, and the Error display interface corresponding to the proxy Error module; initialize the button interception logic and the focus operation logic for implementing button operations in the EPG debugging interface.
[0072] In this embodiment, after the module initialization unit 12 initializes the proxy epgNetWork network module, the data collection unit 13 is used to: proxy NetWork network requests, monitor the XMLHttpRequest object built into WebiVew, monitor the network requests in WebiVew, and collect the return data of the interface.
[0073] In this embodiment, after the module initialization unit 12 initializes the proxy Log module, the data collection unit 13 is used to rewrite the built-in Console.log method in WebView, intercept the log printing in the EPG project, and collect the log content in the output EPG project.
[0074] In this embodiment, after the module initialization unit 12 initializes the proxy Error module, the data collection unit 13 is used to monitor the Error event in the WebView and collect the error behavior data content in the EPG project.
[0075] In this embodiment, the module initialization unit 12 is specifically used to: initialize the key interception logic; enter the preset instructions, register the Enter, UP, Down, Left, Right, Focus, Blur, and Backspace events of a single module, and complete the focus initialization, wherein Enter represents a confirmation operation, UP represents an up operation, Down represents a down operation, Left represents a left operation, Right represents a right operation, Focus represents a focus loss, Blur represents a loss of focus, and Backspace represents a return operation.
[0076] This embodiment further provides a storage medium, which is disposed in a set-top box and includes a stored program. When the program is running, the set-top box where the storage medium is located is controlled to execute the EPG page-based application debugging method of this embodiment.
[0077] In addition, an embodiment of the present application further provides a set-top box, including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, the steps of the EPG page-based application debugging method of this embodiment are implemented.
[0078] In summary, the embodiment of the present application provides an application debugging method, device, medium and set-top box based on the EPG page, by deploying the epgConsole file in the EPG application, initializing the EPG application interface and the epgConsole file, initializing the proxy epgNetWork network module, the proxy Log module, the proxy Error module and the EPG debugging interface (including the data display interface and the function switching panel), and collecting the return data of the network request interface, the log content and the error behavior data content in the EPG project through the proxy epgNetWork network module, the proxy Log module and the proxy Error module, mapping them into the corresponding container, and rendering them to display them in the data display interface of the EPG debugging interface, and switching the data display interface through the function switching panel of the EPG debugging interface to display the corresponding data content. Accordingly, this solution can display clear information such as Log log printing, NetWork network request, and error behavior data content on the EPG page, and provide clear and concise information support when developers are developing complex business logic, thereby improving the work efficiency of developers. In situations where the set-top box permissions are limited or the apk interferes and logs and network packets cannot be captured, effective debugging information can also be provided as a reference in the process of software development and daily project maintenance. Through JavaScript language programming (writing epgConsole files and deploying them in the EPG application), a set of debugging tools with focus capabilities that can run on WebView is implemented. It can be used in any EPG project without affecting the original functions of the project. Log printing, NetWork network requests, etc. can be debugged on the EPG page, making the logic of complex page development clearer and thereby improving the work efficiency of developers.
[0079] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0080] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An application debugging method based on EPG page, characterized in that: The epgConsole file is deployed in the EPG application. The method is applied to the EPG, including: Initialize the EPG application interface and epgConsole file; Initialize the agent epgNetWork network module, agent Log module, agent Error module and EPG debugging interface, where the EPG debugging interface includes a data display interface and a function switching panel; Collect the return data of the network request interface, the log content and the error behavior data content in the EPG project through the agent epgNetWork network module, agent Log module and agent Error module, map them into the corresponding container, and render them to be displayed in the data display interface of the EPG debugging interface; The data display interface is switched through the function switch panel of the EPG debugging interface to display the corresponding data content.
2. The EPG page-based application debugging method according to claim 1, characterized in that: Initialize the EPG application interface and epgConsole file, including: Initialize the EPG application interface through WebView, load the Css style sheet, Bridge and main entry file; Parse the main entry JavaScript script file in the EPG application interface and load the epgConsole file; Initialize the epgConsole file and instantiate the epgConsole object.
3. The application debugging method based on EPG page according to claim 1, characterized in that: Initialize the agent epgNetWork network module, agent Log module, agent Error module and EPG debugging interface, including: Initialize the proxy epgNetWork network module to collect the return data of the network request interface; Initialize the proxy Log module to collect log content in the EPG project; Initialize the proxy Error module to collect the error behavior data content in the EPG project; Initialize the main button module of the function switching panel to switch between the EPG application interface and the EPG debugging interface; Initialize the Tab button module of the function switching panel to switch different data display interfaces, where the data display interfaces include the NetWork display interface corresponding to the proxy epgNetWork network module, the Log display interface corresponding to the proxy Log module, and the Error display interface corresponding to the proxy Error module; Initialize the key interception logic and focus operation logic to implement key operations in the EPG debugging interface.
4. The EPG page-based application debugging method according to claim 3, characterized in that: After initializing the proxy epgNetWork network module, the method of collecting the return data of the network request interface through the proxy epgNetWork network module is as follows: Agent NetWork network request, monitor WebiVew built-in XMLHttpRequest object, monitor the network request in WebiVew, and collect the return data of the interface.
5. The EPG page-based application debugging method according to claim 3, characterized in that: After initializing the proxy Log module, the method of collecting log content in the EPG project through the proxy Log module is as follows: Rewrite the built-in Console.log method in WebView, intercept the log printing in the EPG project, and collect the log content in the output EPG project.
6. The EPG page-based application debugging method according to claim 3, characterized in that: After initializing the proxy Error module, the method of collecting the error behavior data content in the EPG project through the proxy Error module is as follows: Listen to the Error event in WebView and collect the error behavior data content in the EPG project.
7. The EPG page-based application debugging method according to claim 3, characterized in that: Initialize the key interception logic and focus operation logic, including: Initialize key interception logic; Enter the preset instructions and register the Enter, UP, Down, Left, Right, Focus, Blur, and Backspace events of a single module to complete the focus initialization. Among them, Enter represents the confirmation operation, UP represents the up operation, Down represents the down operation, Left represents the left operation, Right represents the right operation, Focus represents the focus, Blur represents the loss of focus, and Backspace represents the return operation.
8. An application debugging device based on EPG page, characterized in that: The epgConsole file is deployed in the EPG application. The device is applied to the EPG and includes: Application initialization unit, used to initialize the EPG application interface and epgConsole file; The module initialization unit is used to initialize the agent epgNetWork network module, the agent Log module, the agent Error module and the EPG debugging interface, wherein the EPG debugging interface includes a data display interface and a function switching panel; The data collection unit is used to collect the return data of the network request interface, the log content and the error behavior data content in the EPG project through the agent epgNetWork network module, the agent Log module and the agent Error module, map them into the corresponding container, and render them so as to be displayed in the data display interface of the EPG debugging interface; The interface control unit is used to control the switching of the data display interface through the function switching panel of the EPG debugging interface to display the corresponding data content.
9. A storage medium, characterized in that: The storage medium is arranged in a set-top box, and includes a stored program, wherein when the program is running, the set-top box where the storage medium is located is controlled to execute the EPG page-based application debugging method according to any one of claims 1 to 7.
10. A set-top box, comprising a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, characterized in that: When the program instructions are loaded and executed by the processor, the steps of the EPG page-based application debugging method described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method capable of directly integrating debugging function in IPTV EPG page
CN120281976A