Set-top box application monitoring method, system, terminal and storage medium

Through the MQTT protocol and data capture scripts, the problems of low data transmission efficiency and complex application management of set-top boxes are solved, improving application management efficiency and system stability, and ensuring the continuous improvement of user experience.

CN118413716BActive Publication Date: 2024-08-30INSPUR INTELLIGENT IOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410875111.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-08-30
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Existing set-top boxes suffer from low data transmission efficiency, difficulty in detecting application crashes, poor data integrity, and a lack of application update mechanisms, which results in unsatisfied real-time data transmission requirements, inability to handle application problems in a timely manner, and reduced system stability.

Method used

The MQTT protocol is used for data transmission, and the application data in the set-top box system log is captured through the pre-compiled data capture script, the number and causes of application crashes are counted, the application stability score is generated, and the crash assessment data is obtained through cluster analysis to implement the application Management and data transfer improvements.

Benefits of technology

It improves the efficiency of set-top box application management and the reliability of data transmission, ensures the improvement of system stability and user experience, and solves the problems of data integrity and application updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118413716B
    Figure CN118413716B
Patent Text Reader

Abstract

The present invention relates to the technical field of set-top boxes, and specifically provides a set-top box application monitoring method, system, terminal and storage medium, including: deploying a pre-compiled data capture script to a set-top box, the data capture script is used to capture application data in a set-top box system log; receiving application data through the MQTT protocol, and saving the application data to a corresponding list in a relational database according to the application category to which it belongs; based on the application data in the relational database, counting the number of application crashes and the corresponding crash reasons of each set-top box, and generating an application stability score based on the number of application crashes; using the basic information, stability score and crash reason of the application as the characteristic data of the application, clustering analysis is performed on the characteristic data of all applications in the relational database; counting the common information of each type of application, and obtaining the crash evaluation data of the application. The present invention realizes the monitoring and management of set-top box applications by introducing the MQTT protocol for data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of set-top boxes, and in particular relates to a set-top box application monitoring method, system, terminal and storage medium. Background Art

[0002] A digital video conversion box (Set Top Box), also known as a set-top box or set-top box, is a device that connects a TV set to an external signal source. It can convert compressed digital signals into TV content and display it on the TV set. The signal can come from cable, satellite antenna, broadband network and terrestrial broadcasting. In addition to the images and sounds that analog TV can provide, the set-top box can also receive digital content, including electronic program guides, Internet pages, etc. It enables users to watch digital TV programs on existing TV sets and conduct interactive digital entertainment, education and commercial activities through the Internet.

[0003] With the rapid development of smart home and Internet of Things technologies, set-top boxes, as an important part of smart home, carry the task of running multiple applications. However, in the existing technology, set-top boxes face the following major problems when managing these applications:

[0004] Low data transmission efficiency: The traditional HTTP protocol data transmission method has problems such as high latency and large data transmission volume, which makes it difficult to meet the needs of real-time data transmission.

[0005] Difficulty in detecting application crashes: Existing set-top box application management systems are insufficient in detecting and counting application crashes, resulting in application problems not being discovered and handled in a timely manner.

[0006] Poor data integrity: When a large amount of data is transmitted at one time, it is difficult for subscribers to obtain complete data, resulting in data loss or incompleteness.

[0007] Lack of application update mechanism: The existing technology lacks an effective application update and cleaning mechanism, which easily leads to application obsolescence and system lag.

[0008] Complex data management: A large amount of application data lacks effective management methods, making it difficult to quickly retrieve and statistically analyze data. Summary of the invention

[0009] In view of the above-mentioned deficiencies in the prior art, the present invention provides a set-top box application monitoring method, system, terminal and storage medium to solve the above-mentioned technical problems.

[0010] In a first aspect, the present invention provides a set-top box application monitoring method, comprising:

[0011] Deploy a pre-compiled data capture script to the set-top box, wherein the data capture script is used to capture application data in the set-top box system log;

[0012] Receive the application data through the MQTT protocol, and save the application data into a corresponding list in a relational database according to the application name, application version number and application package name to which it belongs;

[0013] Based on the application data in the relational database, the number of application crashes and the corresponding crash reasons of each set-top box are counted, and the application stability score is generated based on the number of application crashes;

[0014] The basic information, stability score and crash cause of the application are used as the feature data of the application, and the feature data of all applications in the relational database are clustered and analyzed;

[0015] Collect common information of each type of application and obtain application crash assessment data.

[0016] In an optional embodiment, the method further comprises:

[0017] The set-top box enables a background monitoring service, which continuously monitors the running status of the application and generates corresponding system logs;

[0018] The set-top box is powered on and runs the data capture script, which uses keyword query technology to regularly capture application crash events from the system log, wherein the application crash events include application name, version number, crash time, crash log, and unresponsive time;

[0019] The data capture script encapsulates the application crash event into a JSON file, and generates a unique identifier for the JSON file based on the application name, version number and application package name;

[0020] The data capture script encapsulates the JSON file into a data packet with a size not exceeding 1KB, and calls the communication module of the set-top box to upload the data packet to the server through the MQTT protocol.

[0021] In an optional implementation, generating a unique identifier for the JSON file based on the application name, version number, and application package name includes:

[0022] Use the SHA-1 algorithm to generate a unique slug with a length of 20 bytes;

[0023] Concatenate the app name, version number, app package name, and slug into an identifier.

[0024] In an optional implementation, based on the application data in the relational database, the number of application crashes and the corresponding crash reasons of each set-top box are counted, and an application stability score is generated based on the number of application crashes, including:

[0025] Based on the application data in the relational database, analyze the unresponsiveness time data of each application and calculate the average unresponsiveness time of each application;

[0026] According to the number of application crashes and the corresponding crash reasons of each set-top box, the total number of crashes and the number of occurrences of the crash reasons of each application in the relational database are counted;

[0027] The stability score of the application is generated based on the average unresponsiveness time and the total number of crashes of the application. The stability score calculation formula includes:

[0028] Stability score = 100 - (total number of crashes * weight 1 + average unresponsive time * weight 2); where weight 1 and weight 2 are both 0.5;

[0029] Sort the crash causes of the application by the number of occurrences from large to small, and select the top three crash causes as the common crash causes of the application.

[0030] In an optional implementation, the basic information, stability score and crash cause of the application are used as feature data of the application, and cluster analysis is performed on the feature data of all applications in the relational database, including:

[0031] Parsing basic information of the application, including the developer and service type;

[0032] Quantify the feature data of the application to obtain a feature array;

[0033] The K-means clustering algorithm is used to perform cluster analysis on the feature array of the application and obtain the clustering results.

[0034] In an optional implementation, common information of each type of application is collected to obtain application crash assessment data, including:

[0035] Extract the central feature array as the cluster center in each category in the clustering results, and reversely convert the central feature array into common feature data;

[0036] The common feature data of each category are sorted according to the stability score, and the sorted data are output as crash assessment data.

[0037] In an optional embodiment, the method further comprises:

[0038] The visualization tool is used to generate analysis charts based on the crash assessment data, and the analysis charts are displayed and output.

[0039] In a second aspect, the present invention provides a set-top box application monitoring system, comprising:

[0040] A script deployment module, used to deploy a pre-compiled data capture script to a set-top box, wherein the data capture script is used to capture application data in a system log of the set-top box;

[0041] A data receiving module is used to receive the application data through the MQTT protocol, and save the application data into a corresponding list of a relational database according to the application name, application version number and application package name to which it belongs;

[0042] A stability evaluation module is used to count the number of application crashes and corresponding crash reasons of each set-top box based on the application data in the relational database, and generate an application stability score based on the number of application crashes;

[0043] The data analysis module is used to use the basic information, stability score and crash cause of the application as the characteristic data of the application, and perform cluster analysis on the characteristic data of all applications in the relational database;

[0044] The common statistics module is used to collect common information of each type of application and obtain the crash assessment data of the application.

[0045] In a third aspect, a terminal is provided, including:

[0046] processor, memory, wherein:

[0047] The memory is used to store computer programs.

[0048] The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.

[0049] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.

[0050] The beneficial effect of the present invention is that the set-top box application monitoring method, system, terminal and storage medium provided by the present invention not only solve the problem that the subscriber cannot obtain complete data due to the large amount of single data transmission, but also improve the application management efficiency of the set-top box and the reliability of data transmission by introducing the MQTT protocol for data transmission and application management. Through technical means such as application crash statistics, batch JSON reporting, application cleaning and updating, data association and big data analysis, the stability of the system and the continuous improvement of user experience are ensured.

[0051] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0054] Figure 2 is another schematic flow chart of a method according to an embodiment of the present invention.

[0055] Figure 3 It is a schematic diagram of the data acquisition process of the method according to an embodiment of the present invention.

[0056] Figure 4 It is a schematic diagram of the application crash monitoring process of the method according to an embodiment of the present invention.

[0057] Figure 5 is a schematic block diagram of a system according to an embodiment of the present invention.

[0058] Figure 6 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0061] The key terms appearing in the present invention are explained below.

[0062] ANR (Application Not Responding) is a state of an Android application, indicating that the application performs time-consuming operations on the main thread, causing the system to consider the application unresponsive.

[0063] PackageManager Android application package manager.

[0064] The set-top box application monitoring method provided by the embodiment of the present invention is executed by a computer device, and accordingly, the set-top box application monitoring system runs in the computer device.

[0065] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a set-top box application monitoring system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.

[0066] like Figure 1 As shown, the method includes:

[0067] Step 110, deploying a pre-compiled data capture script to a set-top box, wherein the data capture script is used to capture application data in a system log of the set-top box;

[0068] Step 120, receiving the application data through the MQTT protocol, and saving the application data into a corresponding list of a relational database according to the application name, application version number and application package name to which it belongs;

[0069] Step 130, based on the application data in the relational database, counting the number of application crashes and corresponding crash reasons of each set-top box, and generating an application stability score based on the number of application crashes;

[0070] Step 140, using the basic information, stability score and crash cause of the application as feature data of the application, and performing cluster analysis on the feature data of all applications in the relational database;

[0071] Step 150 , collect statistics on common information of each type of application to obtain application crash assessment data.

[0072] To facilitate understanding of the present invention, the set-top box application monitoring method provided by the present invention is further described below based on the principle of the set-top box application monitoring method of the present invention and in combination with the process of monitoring the set-top box application in the embodiment.

[0073] For details, please refer to Figure 2 , the set-top box application monitoring method includes:

[0074] S1. Application data collection.

[0075] The server can pre-compile the data capture script and send the data capture script in batches to all set-top boxes that have established communication connections for script deployment.

[0076] The set-top box enables a background monitoring service, which continuously monitors the running status of the application and generates a corresponding system log; the set-top box starts up and runs the data capture script, which uses keyword query technology to regularly capture application crash events from the system log, and the application crash events include application name, version number, crash time, crash log, and no response time; the data capture script encapsulates the application crash event into a JSON file, and generates a unique identifier for the JSON file based on the application name, version number and application package name; the data capture script encapsulates the JSON file into a data packet with a size not exceeding 1KB, and calls the communication module of the set-top box to upload the data packet to the server through the MQTT protocol.

[0077] Please refer to Figure 3 Every day when the set-top box is turned on for the first time, the system starts the application collection module and obtains the information of all installed applications through the Android application package manager (PackageManager), including application name, version number, package name, installation time, update time and application size. In addition, the logs and broadcasts of normal installation, uninstallation and upgrade operations of the device are used to obtain the information report of a single application.

[0078] { "app_name": "ExampleApp",

[0079] "version": "1.0.1",

[0080] "package": "com.example.app",

[0081] "install_time": "2024-01-01T00:00:00Z",

[0082] "update_time": "2024-01-15T00:00:00Z",

[0083] "size": "50MB"}

[0084] The set-top box system sets up a background monitoring service to continuously monitor the running status of the application by listening to the box-side logs and corresponding broadcasts. When an application crashes, the monitoring service captures the ANR application crash event, including the cause of the crash, stack information, and occurrence time.

[0085] Create an identifier slug: The system uses the SHA-1 algorithm to generate a unique identifier slug with a length of 20 bytes to identify each crash report. For example: abcd1234efgh5678ijkl.

[0086] Encapsulate application information in JSON format, set identifiers, and upload data to the MQTT server in batches. The size of each uploaded data does not exceed 1KB to ensure the reliability and integrity of data transmission. Use QoS 2 MQTT message delivery quality to ensure message transmission and confirmation.

[0087] The MQTT server receives data from the set-top box and stores the data in the data processing and storage module. Provides a low-cost and reliable data transmission method. Specifically, the server parses the data reported by MQTT, and assembles and parses its installation slug into the original data, using the application name, application version number, and application package name as distinguishing information. After receiving the data, the server compares it with the existing data, and automatically synchronizes and updates it when differences are found to ensure data consistency. The application name, application version number, and application package name are spliced ​​together as identifiers. Use a relational database (such as MySQL) to maintain an application information table, indexing and storing data by fields such as application name, version number, and package name. Clean and optimize the application information table regularly (such as monthly) to remove application data that is no longer used or duplicated.

[0088] S2. Data analysis.

[0089] Please refer to Figure 4 , the server transmits the crash data to the big data analysis platform for data statistics and analysis. According to the application name, application version number, and application package name spliced ​​together as an identifier, the number of device installations of the corresponding application is counted; according to the received crash report, the number of crashes of each application is counted and recorded in the database. Generate an application stability report, analyze common crash causes, and evaluate the application stability score. Using the collected ANR data, calculate the application stability score based on indicators such as application crash frequency and average unresponsive time. The score ranges from 0 to 100, and the higher the value, the more stable the application.

[0090] Specifically, 1) Application crash monitoring: The set-top box system sets up a background monitoring service to continuously monitor the running status of the application. When an application crashes, the monitoring service captures the crash event, including the cause of the crash, stack information, and the time of occurrence. By monitoring the Android system log and printing the log of the corresponding application error. The log format is, for example: 09-09 14:42:40.168 4880 5004 E ActivityManager: ANR in com.inspur.httpupgrade.dongledvb7583.

[0091] 2) Generate a crash report: Generate a crash report by querying the detailed information of the crashed application through the Android application package manager (PackageManager) according to the package name in the error log. The crash report contains detailed information such as application name, version number, crash time, crash log, and unresponsive time. Generate a crash report in JSON format, for example:

[0092] {"app_name": "ExampleApp",

[0093] "package": "com.example.app",

[0094] "version": "1.0.1",

[0095] "size": "50MB",

[0096] "no_response_time": "13s",

[0097] "crash_time": "2024-06-07T10:30:00Z",

[0098] "crash_log": "Exception: NullPointerException"}

[0099] 3) Data encapsulation and reporting: Encapsulate the crash report into JSON format, add identifiers such as device name and slug, and upload the data to the MQTT server.

[0100] 4) Data transmission and storage: The MQTT server receives, stores and processes data. The application is distinguished by application name, application version number, and application package name, and the crash report is saved to the database and associated with the corresponding application.

[0101] 5) Data analysis and report generation: After receiving the data, the server transmits the crash data to the big data analysis platform for data statistics and analysis. Generate an application stability report, analyze common crash causes, and evaluate the application's stability score. The scoring calculation rules are as follows:

[0102] Using the collected ANR data, the application stability score is calculated based on indicators such as application crash frequency and average unresponsiveness time. The score ranges from 0 to 100, and the higher the value, the more stable the application.

[0103] Stability score calculation formula: Stability score = 100 - (total number of crashes * weight 1 + average unresponsive time * weight 2). Among them, weight 1 and weight 2 are both 0.5.

[0104] At the same time, the number of occurrences of the crash causes of each application is counted, and the crash causes of the application are sorted from large to small according to the number of occurrences, and the top three crash causes are selected as the common crash causes of the application.

[0105] In one embodiment, a crash data analysis method is provided: parsing basic information of an application, the basic information of the application including the developer and the service type; quantifying the feature data of the application to obtain a feature array; clustering the feature array of the application using a K-means clustering algorithm to obtain a clustering result. Extracting the central feature array as the cluster center in each category of the clustering result, and reversely converting the central feature array into common feature data; sorting the common feature data of each category according to the stability score, and outputting the sorted data as crash assessment data.

[0106] (1) Analyze the basic information of the application

[0107] Step Description:

[0108] Developer information: Get the developer name, developer background (such as company size, development experience, etc.), and developer reputation (such as user reviews, historical application performance, etc.) of the application.

[0109] Service type: Specify the type of service provided by the app, such as games, social media, tool apps, etc., as well as the main functions of the service.

[0110] Other basic information: including application version, release time, supported operating systems, etc.

[0111] Implementation:

[0112] Parse this information from the app store, developer website, or internal app metadata.

[0113] Use crawler technology or API interface to obtain relevant data.

[0114] (2) Quantify the feature data of the application to obtain the feature array

[0115] Step Description:

[0116] Feature data selection: Select feature data related to application performance, user behavior, system interaction, etc.

[0117] Data cleaning: Remove duplicate, invalid or missing data to ensure data quality.

[0118] Data quantification: Convert non-numeric data (such as user reviews, text descriptions, etc.) into numerical data for subsequent processing.

[0119] Implementation:

[0120] Use data analysis tools (such as Excel and Python's Pandas library) to process data.

[0121] Apply text mining, natural language processing and other technologies to quantify text data.

[0122] (3) Use the K-means clustering algorithm to perform cluster analysis on the application's feature array and obtain the clustering results

[0123] Step Description:

[0124] Select K value: Select an appropriate K value (number of clusters) based on application characteristics and requirements.

[0125] Initialize cluster centers: Randomly select K data points as initial cluster centers.

[0126] Iterative optimization: Assign data points to the nearest cluster center, and then recalculate the center of each cluster until the cluster center no longer changes or the maximum number of iterations is reached.

[0127] Implementation:

[0128] Use the K-means clustering algorithm implementation from a machine learning library such as scikit-learn.

[0129] The optimal K value can be determined by evaluating the clustering effect (such as silhouette coefficient, Calinski-Harabasz index, etc.).

[0130] (4) Extract the central feature array as the cluster center in each category of the clustering results, and reversely convert the central feature array into common feature data

[0131] Step Description:

[0132] Extract center feature array: Extract the feature array as the cluster center from each cluster.

[0133] Reverse conversion: Convert the numerical data in the central feature array into interpretable common feature data (such as user behavior patterns, system resource usage, etc.).

[0134] Implementation:

[0135] The reverse conversion is performed according to the conversion rules during the quantization process, that is, the quantized feature values ​​are reversely converted into text data.

[0136] (5) Sort the common feature data of each category according to the stability score, and output the sorted data as crash assessment data

[0137] Step Description:

[0138] Stability score: The stability score of each cluster is calculated based on the common feature data. The higher the score, the more stable the applications in the cluster.

[0139] Sorting: Sort the clustering results by stability score.

[0140] Output crash assessment data: Output the sorted data as a crash assessment report or data table for subsequent analysis and processing.

[0141] Through the above steps, we can conduct in-depth crash assessment and analysis of the application, thereby discovering potential problems and taking corresponding optimization measures.

[0142] In addition, user interests can be mined based on application data, including:

[0143] When the application reports, it is imported into Elasticsearch (search data analysis engine) in chronological order. By performing multi-dimensional analysis on the aggregated data, potential problems and trends in the data can be deeply explored.

[0144] Usage trend analysis: Through time series analysis, we can understand the usage trends of each application and identify user preferences and usage habits.

[0145] Regression analysis: Use regression models to predict changing trends in app usage and determine which apps are likely to see significant growth in the future.

[0146] S3. Visualization processing.

[0147] Use visualization tools (such as Kibana) to present data analysis results in the form of charts, dashboards, etc. to facilitate decision makers' understanding and analysis.

[0148] App usage chart: Use bar charts, line charts, etc. to display information such as the usage frequency, usage duration, and number of installations of each app.

[0149] Crash analysis chart: Use pie charts, bar charts, etc. to show the number of app crashes, the distribution of crash causes, and the distribution of crash time.

[0150] Trend prediction chart: displays the results of regression analysis and cluster analysis, and predicts the usage trend and possible risks of the application.

[0151] Dashboard: Create comprehensive dashboards that integrate key data indicators and analysis results on one page, provide real-time monitoring and historical data review functions, and facilitate decision makers to conduct comprehensive application management and optimization.

[0152] In some embodiments, the set-top box application monitoring system may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the set-top box application monitoring system may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Set-top box application monitoring function.

[0153] In this embodiment, the set-top box application monitoring system can be divided into multiple functional modules according to the functions it performs, such as Figure 5 As shown. The functional modules of the system 500 may include: a script deployment module 510, a data receiving module 520, a stability assessment module 530, a data analysis module 540 and a commonality statistics module 550. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0154] A script deployment module, used to deploy a pre-compiled data capture script to a set-top box, wherein the data capture script is used to capture application data in a system log of the set-top box;

[0155] A data receiving module is used to receive the application data through the MQTT protocol, and save the application data into a corresponding list of a relational database according to the application name, application version number and application package name to which it belongs;

[0156] A stability evaluation module is used to count the number of application crashes and corresponding crash reasons of each set-top box based on the application data in the relational database, and generate an application stability score based on the number of application crashes;

[0157] The data analysis module is used to use the basic information, stability score and crash cause of the application as the characteristic data of the application, and perform cluster analysis on the characteristic data of all applications in the relational database;

[0158] The common statistics module is used to collect common information of each type of application and obtain the crash assessment data of the application.

[0159] Figure 6 The present invention provides a schematic diagram of the structure of a terminal 600 provided in an embodiment of the present invention. The terminal 600 can be used to execute the set-top box application monitoring method provided in an embodiment of the present invention.

[0160] The terminal 600 may include: a processor 610, a memory 620 and a communication unit 630. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0161] The memory 620 can be used to store the execution instructions of the processor 610. The memory 620 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 620 are executed by the processor 610, the terminal 600 can execute some or all of the steps in the following method embodiments.

[0162] The processor 610 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 620, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 610 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0163] The communication unit 630 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0164] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0165] Therefore, the present invention not only solves the problem that subscribers cannot obtain complete data due to large single data transmission volume, but also improves the application management efficiency of the set-top box and the reliability of data transmission by introducing the MQTT protocol for data transmission and application management. Through application crash statistics, batch JSON reporting, application cleaning and updating, data association and big data analysis and other technical means, the stability of the system and the continuous improvement of user experience are ensured. The technical effects that can be achieved by this embodiment can be found in the description above, which will not be repeated here.

[0166] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.

[0167] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0168] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.

[0169] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0170] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0171] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A set-top box application monitoring method, characterized in that: include: Deploy a pre-compiled data capture script to the set-top box, wherein the data capture script is used to capture application data in the set-top box system log; Receive the application data through the MQTT protocol, and save the application data into a corresponding list in a relational database according to the application name, application version number and application package name to which it belongs; Based on the application data in the relational database, the number of application crashes and the corresponding crash reasons of each set-top box are counted, and the application stability score is generated based on the number of application crashes; The basic information, stability score and crash cause of the application are used as the feature data of the application, and the feature data of all applications in the relational database are clustered and analyzed; Collect common information of each type of application and obtain application crash assessment data; Based on the application data in the relational database, the number of application crashes and the corresponding crash reasons of each set-top box are counted, and the application stability score is generated based on the number of application crashes, including: Based on the application data in the relational database, analyze the unresponsiveness time data of each application and calculate the average unresponsiveness time of each application; According to the number of application crashes and the corresponding crash reasons of each set-top box, the total number of crashes and the number of occurrences of the crash reasons of each application in the relational database are counted; The stability score of the application is generated based on the average unresponsiveness time and the total number of crashes of the application. The stability score calculation formula includes: Stability score = 100 - (total number of crashes * weight 1 + average unresponsive time * weight 2); where weight 1 and weight 2 are both 0.5; Sort the app's crash causes by the number of occurrences from highest to lowest, and select the top three crash causes as the app's common crash causes; The basic information, stability score and crash cause of the application are used as the feature data of the application, and the feature data of all applications in the relational database are clustered and analyzed, including: Parsing basic information of the application, including the developer and service type; Quantify the feature data of the application to obtain a feature array; Use K-means clustering algorithm to perform cluster analysis on the application's feature array and obtain clustering results; Collect common information of each type of application to obtain application crash assessment data, including: Extract the central feature array as the cluster center in each category in the clustering results, and reversely convert the central feature array into common feature data; The common characteristic data of each category are sorted according to the stability score, and the sorted data are output as crash assessment data; The method further comprises: The visualization tool is used to generate analysis charts based on the crash assessment data, and the analysis charts are displayed and output.

2. The method according to claim 1, characterized in that The method further comprises: The set-top box enables a background monitoring service, which continuously monitors the running status of the application and generates corresponding system logs; The set-top box is powered on and runs the data capture script, which uses keyword query technology to regularly capture application crash events from the system log, wherein the application crash events include application name, version number, crash time, crash log, and unresponsive time; The data capture script encapsulates the application crash event into a JSON file, and generates a unique identifier for the JSON file based on the application name, version number and application package name; The data capture script encapsulates the JSON file into a data packet with a size not exceeding 1KB, and calls the communication module of the set-top box to upload the data packet to the server through the MQTT protocol.

3. The method according to claim 2, characterized in that Generate a unique identifier for the JSON file based on the application name, version number, and application package name, including: Use the SHA-1 algorithm to generate a unique slug with a length of 20 bytes; Concatenate the app name, version number, app package name, and slug into an identifier.

4. A set-top box application monitoring system, characterized in that: include: A script deployment module, used to deploy a pre-compiled data capture script to a set-top box, wherein the data capture script is used to capture application data in a system log of the set-top box; A data receiving module is used to receive the application data through the MQTT protocol, and save the application data into a corresponding list of a relational database according to the application name, application version number and application package name to which it belongs; A stability evaluation module is used to count the number of application crashes and corresponding crash reasons of each set-top box based on the application data in the relational database, and generate an application stability score based on the number of application crashes; The data analysis module is used to use the basic information, stability score and crash cause of the application as the characteristic data of the application, and perform cluster analysis on the characteristic data of all applications in the relational database; The common statistics module is used to collect common information of each type of application and obtain the crash assessment data of the application; Based on the application data in the relational database, the number of application crashes and the corresponding crash reasons of each set-top box are counted, and the application stability score is generated based on the number of application crashes, including: Based on the application data in the relational database, analyze the unresponsiveness time data of each application and calculate the average unresponsiveness time of each application; According to the number of application crashes and the corresponding crash reasons of each set-top box, the total number of crashes and the number of occurrences of the crash reasons of each application in the relational database are counted; The stability score of the application is generated based on the average unresponsiveness time and the total number of crashes of the application. The stability score calculation formula includes: Stability score = 100 - (total number of crashes * weight 1 + average unresponsive time * weight 2); where weight 1 and weight 2 are both 0.5; Sort the app's crash causes by the number of occurrences from highest to lowest, and select the top three crash causes as the app's common crash causes; The basic information, stability score and crash cause of the application are used as the feature data of the application, and the feature data of all applications in the relational database are clustered and analyzed, including: Parsing basic information of the application, including the developer and service type; Quantify the feature data of the application to obtain a feature array; Use K-means clustering algorithm to perform cluster analysis on the application's feature array and obtain clustering results; Collect common information of each type of application to obtain application crash assessment data, including: Extract the central feature array as the cluster center in each category in the clustering results, and reversely convert the central feature array into common feature data; The common characteristic data of each category are sorted according to the stability score, and the sorted data are output as crash assessment data; The method further comprises: The visualization tool is used to generate analysis charts based on the crash assessment data, and the analysis charts are displayed and output.

5. A terminal, characterized in that: include: A memory, used for storing a set-top box application monitoring program; A processor, configured to implement the steps of the set-top box application monitoring method according to any one of claims 1 to 3 when executing the set-top box application monitoring program.

6. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a set-top box application monitoring program, which, when executed by a processor, implements the steps of the set-top box application monitoring method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Application program compatibility monitoring method, device, intelligent terminal and storage medium

    CN109522182A

  • Crash rate calculation method and device, computer device and storage medium

    CN110569182A