EPG recommendation bit data acquisition method and system, terminal and storage medium
By using Kafka and Logstash to process EPG recommendation data, the problem of data collection lag in traditional EPG systems has been solved, enabling real-time and accurate recommendation data updates and automated processing, thus improving the stability and flexibility of the system.
Patent Information
- Application Number
- CN202410665939.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-03
AI Technical Summary
Traditional EPG systems rely on outdated data collection methods, making it impossible to achieve real-time and accurate updates of recommendation position data.
Kafka message queue technology and Logstash instances are used to process EPG recommendation data. Data is transmitted between the client and server via MQTT long-connection protocol, and Elasticsearch storage and indexing system is used for data processing and analysis. The recommendation ranking is updated based on user behavior.
This improves the real-time performance and accuracy of EPG recommendation data, reduces manual intervention, increases automation, enhances system scalability and troubleshooting capabilities, and ensures timely updates and accuracy of recommendation data.
Smart Images

Figure CN118585683A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to an EPG recommendation position data collection method, system, terminal and storage medium. Background Art
[0002] Electronic program guide (EPG) is the abbreviation of Electronic Program Guide, which means electronic program menu. The indexing and navigation of various services provided by IPTV are completed through the electronic program guide system. IPTV EPG is actually a portal system of IPTV. The interface of the EPG system is similar to that of a web page. The EPG interface generally provides various menus, buttons, links and other components that users can click directly when selecting programs; the EPG interface can also contain various dynamic or static multimedia content for users to browse.
[0003] In traditional EPG systems, data collection is usually carried out through timed polling or event triggering, etc. This data collection method is relatively backward. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides an EPG recommendation position data collection method, system, terminal and storage medium to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides an EPG recommendation position data collection method, comprising: Scan the original data of the recommended position of EPG in the terminal; The original data is sent to the server through the MQTT long link protocol and the Kafka message queue technology; Using the pre-configured Logstash instance on the server to process and transform the received raw data to obtain recommended position data, and importing the recommended position data into the Elasticsearch data storage and indexing system; User behavior analysis is performed based on the recommendation position data, and the recommendation position ranking of the EPG is updated based on the analysis result.
[0006] In an optional implementation, scanning the original data of the recommendation position of the EPG in the terminal includes: The terminal has a built-in integrated soft probe, which uses key simulation to scan the interface data of the EPG to obtain the original data of the recommended position; the scanning algorithm uses a breadth-first traversal algorithm or a depth-first traversal algorithm.
[0007] In an optional implementation, the original data is sent to the server through the MQTT long link protocol and the Kafka message queue technology, including: Use Kafka Producer to partition the original data according to predefined topics and send them to the Kafka cluster; In the Kafka cluster, the Kafka Consumer reads data from the specified topic and performs data parsing, data cleaning, and data conversion on the data.
[0008] In an optional implementation, a preconfigured Logstash instance on the server is used to process and transform the received raw data to obtain recommended position data, and the recommended position data is imported into an Elasticsearch data storage and indexing system, including: Pre-configure one or more Logstash instances on the server as the middle layer for data forwarding and processing; The Logstash instance receives data from Kafka through the input plugin and processes and transforms the data using the filter plugin; The Elasticsearch output plug-in writes the processed data in the Logstash instance to the Elasticsearch data storage and indexing system, and configures the index mapping and field definition.
[0009] In an optional embodiment, the method further comprises: Connect to third-party systems through the Kafka interface, including operation platforms and operation and maintenance platforms.
[0010] In a second aspect, the present invention provides an EPG recommendation position data collection system, comprising: A data acquisition module, used for scanning the original data of the recommended position of the EPG in the terminal; The data transmission module is used to send the original data to the server through the MQTT long link protocol and the Kafka message queue technology; A data processing module, used to process and transform the received raw data using a pre-configured Logstash instance on the server side to obtain recommended position data, and import the recommended position data into an Elasticsearch data storage and indexing system; The data analysis module is used to perform user behavior analysis based on the recommendation position data and update the recommendation position ranking of the EPG based on the analysis results.
[0011] In an optional embodiment, the data acquisition module includes: The data acquisition unit is used for the built-in integrated soft probe of the terminal, and uses the key simulation method to scan the interface data of the EPG to obtain the original data of the recommended position; the scanning algorithm adopts the breadth-first traversal algorithm or the depth-first traversal algorithm.
[0012] In an optional implementation, the data transmission module includes: A data sending unit, used to partition the original data according to a predefined topic and send the partitioned data to a Kafka cluster using a Kafka Producer; The data receiving unit is used to read data from a specified topic through a Kafka Consumer in a Kafka cluster, and perform data analysis, data cleaning, and data conversion on the data.
[0013] In a third aspect, a terminal is provided, including: processor, memory, wherein: The memory is used to store computer programs. The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0014] 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.
[0015] The EPG recommendation position data collection method, system, terminal and storage medium provided by the present invention have the following beneficial effects: 1. Improved real-time performance and accuracy: Using Kafka as a message queue can achieve real-time data transmission and processing, thereby improving the real-time and accuracy of EPG recommendation data. The test system can receive notifications of data changes in real time and perform corresponding tests and verifications to ensure timely update and correctness of recommendation data.
[0016] 2. Improved automation: The automated testing method can significantly reduce manual intervention. By writing test scripts and automated tools, the automatic collection, verification and analysis of EPG recommended position data can be realized. This can save labor costs and improve test efficiency and consistency.
[0017] 3. Enhanced scalability and flexibility: As a high-performance, distributed message queue system, Kafka has good scalability and flexibility, and can easily cope with data collection needs of different scales and complexities. Therefore, the test method based on the Kafka interface can better adapt to the continuous changes and expansion of EPG recommendation position data. In addition, the automatic map scanning module is issued in the form of configuration strategies, which can cope with the demand scenarios of operators frequently changing EPG recommendation positions and better enrich the data collection dimensions.
[0018] 4. Enhanced troubleshooting and monitoring capabilities: Kafka provides a wealth of monitoring and management functions, which can monitor the status and performance indicators of message queues in real time, helping to discover and solve problems in a timely manner. Through the integrated monitoring system, the EPG recommendation position data collection process can be fully monitored and troubleshooted to ensure stable system operation.
[0019] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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.
[0021] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0022] Figure 2 is another schematic flow chart of a method according to an embodiment of the present invention.
[0023] Figure 3 is a schematic block diagram of a system according to an embodiment of the present invention.
[0024] Figure 4 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] 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.
[0026] 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.
[0027] The EPG recommendation position data collection method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the EPG recommendation position data collection system runs in the computer device.
[0028] 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 an EPG recommendation position data acquisition system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0029] like Figure 1 As shown, the method includes: Step 110, scanning the original data of the recommended position of the EPG at the terminal; Step 120, using the MQTT long link protocol and the Kafka message queue technology, the original data is sent to the server; Step 130, using the pre-configured Logstash instance on the server to process and transform the received raw data to obtain recommended position data, and importing the recommended position data into the Elasticsearch data storage and indexing system; Step 140: Perform user behavior analysis based on the recommendation position data, and update the recommendation position ranking of the EPG based on the analysis result.
[0030] To facilitate understanding of the present invention, the EPG recommendation position data collection method provided by the present invention is further described below based on the principle of the EPG recommendation position data collection method of the present invention and in combination with the process of collecting EPG recommendation position data in the embodiment.
[0031] For details, please refer to Figure 2 , EPG recommended bit data collection method includes: S1. Scan the original data of the recommended position of the EPG in the terminal.
[0032] The terminal has a built-in integrated soft probe, which uses key simulation to scan the interface data of the EPG to obtain the original data of the recommended position; the scanning algorithm uses a breadth-first traversal algorithm or a depth-first traversal algorithm.
[0033] A map scanning algorithm is a technology for identifying specific areas or targets in a map. Prior art may include map analysis methods based on image processing, map recognition algorithms based on machine learning, etc. The present invention may use a map scanning algorithm to analyze and process EPG homepage information to achieve more accurate data collection of recommended locations.
[0034] S2. Send the original data to the server through the MQTT long link protocol and the Kafka message queue technology.
[0035] The original data is partitioned according to the predefined topic by using Kafka Producer and sent to the Kafka cluster; in the Kafka cluster, the data is read from the specified topic by the Kafka Consumer, and the data is parsed, cleaned, and converted.
[0036] The client is Kafka Producer and the server is Kafka Consumer.
[0037] S3. Use the pre-configured Logstash instance on the server to process and transform the received raw data to obtain recommended position data, and import the recommended position data into the Elasticsearch data storage and indexing system.
[0038] Pre-configure one or more Logstash instances on the server as the middle layer for data forwarding and processing; the Logstash instance receives data from Kafka through the input plug-in and uses the filter plug-in to process and transform the data; write the processed data in the Logstash instance to the Elasticsearch data storage and indexing system through the Elasticsearch output plug-in, and configure the index mapping and field definition.
[0039] Specifically, configure one or more Logstash instances as the middle layer for data forwarding and processing. Logstash can receive data from Kafka through input plugins and use filter plugins to process and transform the data; in Logstash, use the Elasticsearch output plugin to write the processed data to the Elasticsearch data storage and indexing system. Configure appropriate index mappings and field definitions to ensure that data is indexed and queried as needed.
[0040] S4. Perform user behavior analysis based on the recommended position data, and update the recommended position ranking of the EPG based on the analysis result.
[0041] Specifically, the user behavior report is summarized according to the user's playback time, playback duration, playback program type, and number of clicks on the recommendation position, and then the recommendation position is reasonably updated according to the TOP ranking.
[0042] S5. Connect to a third-party system through the Kafka interface, where the third-party system includes an operation platform and an operation and maintenance platform.
[0043] All data information can be connected to third-party systems through the Kafka interface, connecting various operation platforms and operation and maintenance platforms to achieve real-time data interaction.
[0044] In some embodiments, the EPG recommendation position data collection system may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the EPG recommendation position data collection system may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) EPG recommendation bit data collection function.
[0045] In this embodiment, the EPG recommendation position data collection system can be divided into multiple functional modules according to the functions it performs, such as Figure 3 As shown. The functional modules of the system 300 may include: a data acquisition module 310, a data transmission module 320, a data processing module 330 and a data analysis module 340. 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.
[0046] A data acquisition module, used for scanning the original data of the recommended position of the EPG in the terminal; The data transmission module is used to send the original data to the server through the MQTT long link protocol and the Kafka message queue technology; A data processing module, used to process and transform the received raw data using a pre-configured Logstash instance on the server side to obtain recommended position data, and import the recommended position data into an Elasticsearch data storage and indexing system; The data analysis module is used to perform user behavior analysis based on the recommendation position data and update the recommendation position ranking of the EPG based on the analysis results.
[0047] Optionally, as an embodiment of the present invention, the data acquisition module includes: The data acquisition unit is used for the built-in integrated soft probe of the terminal, and uses the key simulation method to scan the interface data of the EPG to obtain the original data of the recommended position; the scanning algorithm adopts the breadth-first traversal algorithm or the depth-first traversal algorithm.
[0048] Optionally, as an embodiment of the present invention, the data transmission module includes: A data sending unit, used to partition the original data according to a predefined topic and send the partitioned data to a Kafka cluster using a Kafka Producer; The data receiving unit is used to read data from a specified topic through a Kafka Consumer in a Kafka cluster, and perform data analysis, data cleaning, and data conversion on the data.
[0049] Figure 4 The present invention provides a schematic diagram of the structure of a terminal 400 provided in an embodiment of the present invention. The terminal 400 can be used to execute the EPG recommendation position data collection method provided in an embodiment of the present invention.
[0050] The terminal 400 may include: a processor 410, a memory 420 and a communication unit 430. 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.
[0051] The memory 420 can be used to store the execution instructions of the processor 410, and the memory 420 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 420 are executed by the processor 410, the terminal 400 can perform some or all of the steps in the following method embodiments.
[0052] The processor 410 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 420, 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 410 can include only a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0053] The communication unit 430 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.
[0054] 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).
[0055] Therefore, the present invention uses Kafka as a message queue to achieve real-time transmission and processing of data, thereby improving the real-time and accuracy of EPG recommendation data. The test system can receive notifications of data changes in real time, and perform corresponding tests and verifications to ensure timely updating and correctness of the recommendation data. The technical effects that can be achieved by this embodiment can be found in the description above, and will not be repeated here.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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 method for collecting EPG recommendation position data, characterized in that: include: Scan the original data of the recommended position of EPG in the terminal; The original data is sent to the server through the MQTT long link protocol and the Kafka message queue technology; Using the pre-configured Logstash instance on the server to process and transform the received raw data to obtain recommended position data, and importing the recommended position data into the Elasticsearch data storage and indexing system; User behavior analysis is performed based on the recommendation position data, and the recommendation position ranking of the EPG is updated based on the analysis result.
2. The method according to claim 1, characterized in that The terminal traverses and scans the original data of the recommended position of the EPG, including: The terminal has a built-in integrated soft probe, which uses key simulation to scan the interface data of the EPG to obtain the original data of the recommended position; the scanning algorithm uses a breadth-first traversal algorithm or a depth-first traversal algorithm.
3. The method according to claim 1, characterized in that Through the MQTT long link protocol, the original data is sent to the server using the Kafka message queue technology, including: Use Kafka Producer to partition the original data according to predefined topics and send them to the Kafka cluster; In the Kafka cluster, the Kafka Consumer reads data from the specified topic and performs data parsing, data cleaning, and data conversion on the data.
4. The method according to claim 1, characterized in that: The server-side preconfigured Logstash instance is used to process and transform the received raw data to obtain the recommended position data, and the recommended position data is imported into the Elasticsearch data storage and indexing system, including: Pre-configure one or more Logstash instances on the server as the middle layer for data forwarding and processing; The Logstash instance receives data from Kafka through the input plugin and processes and transforms the data using the filter plugin; The Elasticsearch output plug-in writes the processed data in the Logstash instance to the Elasticsearch data storage and indexing system, and configures the index mapping and field definition.
5. The method according to claim 1, characterized in that The method further comprises: Connect to third-party systems through the Kafka interface, and the third-party systems include operation platforms and operation and maintenance platforms.
6. An EPG recommendation position data collection system, characterized in that: include: A data acquisition module, used for scanning the original data of the recommended position of the EPG in the terminal; The data transmission module is used to send the original data to the server through the MQTT long link protocol and the Kafka message queue technology; A data processing module, used to process and transform the received raw data using a pre-configured Logstash instance on the server side to obtain recommended position data, and import the recommended position data into an Elasticsearch data storage and indexing system; The data analysis module is used to perform user behavior analysis based on the recommendation position data and update the recommendation position ranking of the EPG based on the analysis results.
7. The system according to claim 6, characterized in that The data acquisition module comprises: The data acquisition unit is used for the built-in integrated soft probe of the terminal, and uses the key simulation method to scan the interface data of the EPG to obtain the original data of the recommended position; the scanning algorithm adopts the breadth-first traversal algorithm or the depth-first traversal algorithm.
8. The system according to claim 6, characterized in that The data transmission module comprises: A data sending unit, used to partition the original data according to a predefined topic and send the partitioned data to a Kafka cluster using a Kafka Producer; The data receiving unit is used to read data from a specified topic through a Kafka Consumer in a Kafka cluster, and perform data analysis, data cleaning, and data conversion on the data.
9. A terminal, characterized in that: include: A memory, used for storing an EPG recommendation position data collection program; A processor is used to implement the steps of the EPG recommendation position data collection method as described in any one of claims 1 to 5 when executing the EPG recommendation position data collection program.
10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores an EPG recommendation position data collection program, and when the EPG recommendation position data collection program is executed by the processor, the steps of the EPG recommendation position data collection method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Display position determination method and device of recommended contents
CN108762880A
Competitiveness analysis method and device for application program
CN110536158A
Recommendation system and method based on IPTV EPG running logs
CN112672189A
EPG automatic test and analysis terminal
CN117221522A
Mail alarm monitoring method and device based on set top box end and medium
CN117240818A
