Method and system for quickly querying channel rankings within a time period

By pulling channel playback data from kafka and storing it to the history and update data table, adding field indexes, the problem of low channel ranking query efficiency in the existing technology is solved, and the channel ranking within the time period is quickly realized, which significantly improves the background system Query efficiency.

CN113343023BActive Publication Date: 2025-02-14GUANGZHOU HUANWANG TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110608193.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-01
Publication Date
2025-02-14
Estimated Expiration
2041-06-01

AI Technical Summary

Technical Problem

The prior art is less efficient when ranking channels during query periods, especially in the case of large data volumes, which leads to slow interface response and affects data display.

Method used

Pull channel playback data from kafka through preset methods, store it in the historical data table and the update data table, add field index to the update data table, and directly return the preset time of the corresponding channel to all channel ranking data.

Benefits of technology

By setting up historical data tables and updating data tables, we ensure the speed of data query, which effectively improves the efficiency of querying ratings and rankings in the background system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113343023B_ABST
    Figure CN113343023B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for quickly querying channel rankings within a time period. The method comprises the following steps: pulling channel playback data from Kafka in a preset manner; storing all channel playback data in a history data table; reading channel ranking data at a preset time in the history data table, and storing the channel ranking data at the preset time in an update data table; adding a field index to the update data table so that the update data table directly returns all channel ranking data at the preset time of the corresponding channel. By setting up two tables, the history data table and the update data table, to store data, the speed of data query can be guaranteed, and the efficiency of querying ratings and rankings of the background system is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of television channel rankings, and in particular relates to a method and system for quickly querying channel rankings within a time period. Background Art

[0002] Television ratings refer to the percentage of the number of people watching a certain television channel in a certain period of time to the total number of television viewers. As an important quantitative indicator in the era of "attention economy", it is the scientific basis for in-depth analysis of the television viewing market, an important reference for program production, arrangement and adjustment, the main indicator for program evaluation, and a powerful tool for formulating and evaluating media plans and improving the effectiveness of advertising. Usually, in the background system for statistical viewing, the amount of data is generally very large and real-time viewing, ranking information, etc. will be observed. Due to the excessive amount of data, the interface will react too slowly when querying database data, thus affecting data display. At present, the method of adding indexes to the table is often used to speed up data query.

[0003] However, the method of adding indexes to the table is relatively inefficient for backend systems to query ratings and rankings. Summary of the invention

[0004] In order to at least solve the above problems existing in the prior art, the present invention provides a method and system for quickly querying channel rankings within a time period, so as to improve the efficiency of the backend system in querying channel rankings and ratings.

[0005] The technical solution provided by the present invention is as follows:

[0006] On the one hand, a method for quickly querying channel rankings within a time period includes:

[0007] Pull channel playback data from Kafka in a preset way;

[0008] Storing all the channel playback data in a historical data table;

[0009] Reading the channel ranking data of the preset time in the historical data table, and storing the channel ranking data of the preset time in the update data table;

[0010] Add a field index to the update data table so that the update data table directly returns all channel ranking data of the corresponding channel at the preset time.

[0011] Optionally, after adding the field index to the update data table, the method further includes:

[0012] All channel ranking data of the preset time are stored in the browser so as to read the channel ranking data through the browser.

[0013] Optionally, before reading the channel ranking data through the browser, the method further includes:

[0014] receiving a data query instruction, wherein the data query instruction includes a mouse cursor instruction;

[0015] According to the mouse cursor instruction, channel ranking data of the target time in the browser is determined.

[0016] Optionally, the browser reading the channel ranking data includes:

[0017] The channel ranking data within the target time is displayed on a display interface according to a mouse cursor instruction.

[0018] On the other hand, a system for quickly querying channel rankings within a time period includes:

[0019] The pull module is used to pull channel playback data from Kafka in a preset way;

[0020] A storage module, used for storing all the channel play data in a historical data table;

[0021] A reading module, used for reading the channel ranking data of the preset time in the historical data table, and storing the channel ranking data of the preset time in the update data table;

[0022] The query module is used to add a field index to the update data table so that the update data table directly returns all channel ranking data of the preset time of the corresponding channel.

[0023] Optionally, the system for quickly querying channel rankings within a time period described above further includes a ranking module, which is specifically used to:

[0024] All channel ranking data of the preset time are stored in the browser so as to read the channel ranking data through the browser.

[0025] Optionally, the ranking module is further used for:

[0026] receiving a data query instruction, wherein the data query instruction includes a mouse cursor instruction;

[0027] According to the mouse cursor instruction, channel ranking data of the target time in the browser is determined.

[0028] Optionally, the ranking module is further used for:

[0029] The channel ranking data within the target time is displayed on a display interface according to a mouse cursor instruction.

[0030] The beneficial effects of the present invention are:

[0031] The present invention provides a method and system for quickly querying channel rankings within a time period. The method includes pulling channel playback data from Kafka in a preset manner; storing all channel playback data in a historical data table; reading channel ranking data at a preset time in the historical data table, and storing the channel ranking data at the preset time in an update data table; adding a field index to the update data table so that the update data table directly returns all channel ranking data of the corresponding channel at the preset time. By setting up two tables, the historical data table and the update data table, to store data, the speed of data query can be guaranteed, and the efficiency of the backend system in querying ratings and rankings can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 It is a flow chart of a method for quickly querying channel rankings within a time period provided by an embodiment of the present invention;

[0034] Figure 2 It is a structural diagram of a system for quickly querying channel rankings within a time period provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0035] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0036] Figure 1 The present invention provides a flowchart of a method for quickly querying channel rankings within a time period.

[0037] like Figure 1 As shown, this embodiment provides a method for quickly querying channel rankings within a time period, including the following steps:

[0038] S11. Pull channel playback data from Kafka in a preset way.

[0039] Kafka is an open source stream processing platform and a high-throughput distributed publish-subscribe messaging system that can process all action stream data of consumers on the website. The preset method can be to continuously pull channel playback data from Kafka, for example, to pull data once every certain period of time, or other pulling methods, which are not clearly limited in this embodiment.

[0040] S12. Store all channel play data in a historical data table.

[0041] The historical data table is used to store all data, including all data collected by the big data platform.

[0042] S13, reading the channel ranking data of the preset time in the historical data table, and storing the channel ranking data of the preset time in the update data table.

[0043] For example, the data in the historical data table can be updated every one minute to ensure that the data in the historical data table is the latest and most complete. Then you can choose to read the channel ranking data of the preset time, which can be the ranking data within 24 hours, and then store the channel ranking data within 24 hours in the update data table. In other words, the historical data table is used to store all the original data, and the update data table is used to store the data of the most recent 24 hours. At the same time, the data in the update data table is updated every minute to ensure that the data in the update data table is the latest.

[0044] S14. Add a field index to the update data table, so that the update data table directly returns all channel ranking data corresponding to the preset time of the channel.

[0045] An index is a structure that sorts the values ​​of one or more columns in a database table. An index can be used to quickly access specific information in a database table. If you want to find a specific employee by his or her last name, an index will help you get the information faster than searching all the rows in the table. One of the main purposes of an index is to speed up the retrieval of data in a table, that is, to assist information seekers in finding an auxiliary data structure of record IDs that meet the restrictions as quickly as possible. By using field indexes, all data within 24 hours for the corresponding channel can be directly returned from the update data table, and information such as channel rankings and ratings can be quickly queried. This embodiment is explained using channel rankings, and ratings are also described in the same way, so no specific explanation is given and they can be understood by reference to each other.

[0046] The present embodiment provides a method for quickly querying channel rankings within a time period, including pulling channel playback data from Kafka in a preset manner; storing all channel playback data in a historical data table; reading channel ranking data at a preset time in the historical data table, and storing the channel ranking data at the preset time in an update data table; adding a field index to the update data table so that the update data table directly returns all channel ranking data of the corresponding channel at the preset time. By setting up two tables, the historical data table and the update data table, to store data, the speed of data query can be guaranteed, and the efficiency of the background system in querying ratings and rankings can be effectively improved.

[0047] Furthermore, in this embodiment, after adding the field index to the update data table, it also includes: storing all channel ranking data of the preset time in the browser so as to read the channel ranking data through the browser. Moreover, before reading the channel ranking data through the browser, it also includes: receiving a data query instruction, the data query instruction includes a mouse cursor instruction; according to the mouse cursor instruction, determining the channel ranking data of the target time in the browser, and specifically the browser reading the channel ranking data includes: displaying the channel ranking data within the target time to the display interface according to the mouse cursor instruction. By storing the data in the browser, when the mouse is shaken, the channel ranking information of the corresponding time can be directly found in the browser according to the time, and the ranking information can be displayed, which greatly improves the efficiency of querying the channel ranking data, thereby improving the user experience.

[0048] Based on the same general inventive concept, the present application also protects a system for quickly querying channel rankings within a time period.

[0049] Figure 2 It is a structural diagram of a system for quickly querying channel rankings within a time period provided by an embodiment of the present invention.

[0050] like Figure 2 As shown, this embodiment provides a system for quickly querying channel rankings within a time period, including:

[0051] The pulling module 10 is used to pull the channel playback data from Kafka in a preset way;

[0052] The storage module 20 is used to store all channel broadcast data in a historical data table;

[0053] The reading module 30 is used to read the channel ranking data of the preset time in the historical data table, and store the channel ranking data of the preset time in the update data table;

[0054] The query module 40 is used to add a field index to the update data table so that the update data table directly returns all channel ranking data corresponding to the preset time of the channel.

[0055] The present embodiment provides a system for quickly querying channel rankings within a time period, including pulling channel playback data from Kafka in a preset manner; storing all channel playback data in a historical data table; reading channel ranking data at a preset time in the historical data table, and storing the channel ranking data at the preset time in an update data table; adding a field index to the update data table so that the update data table directly returns all channel ranking data for the corresponding channel at the preset time. By setting up two tables, the historical data table and the update data table, to store data, the speed of data query can be guaranteed, effectively improving the efficiency of the background system in querying ratings and rankings.

[0056] Furthermore, the system for quickly querying channel rankings within a time period of this embodiment further includes a ranking module, which is specifically used to:

[0057] All channel ranking data of a preset time are stored in a browser so as to read the channel ranking data through the browser.

[0058] Furthermore, the ranking module in this embodiment is also specifically used for:

[0059] receiving a data query instruction, the data query instruction including a mouse cursor instruction;

[0060] According to the mouse cursor instruction, the channel ranking data of the target time in the browser is determined.

[0061] Furthermore, the ranking module in this embodiment is also specifically used for:

[0062] The channel ranking data within the target time is displayed on the display interface according to the mouse cursor command.

[0063] The embodiments of the device part have been introduced and explained in detail in the corresponding method embodiments. Therefore, no specific explanation will be given in the corresponding device part, and they can be understood by reference to each other.

[0064] An embodiment of the present application provides a storage medium storing a computer program. When the computer program is executed by a processor, each step of the control method of the new multifunctional express cabinet as described in any of the above embodiments is implemented.

[0065] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0066] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0067] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0068] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0069] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0070] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0071] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0072] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0073] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0074] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for quickly querying channel rankings within a time period, characterized in that: include: Pull channel playback data from Kafka in a preset way; Storing all the channel playback data in a historical data table; Reading the channel ranking data of the preset time in the historical data table, and storing the channel ranking data of the preset time in the update data table; Adding a field index to the update data table so that the update data table directly returns all channel ranking data corresponding to the preset time of the channel; The preset time is a preset time period before the current time; The field index is stored in the update data table; After adding the field index to the update data table, the method further includes: storing all channel ranking data of the preset time in a browser so as to read the channel ranking data through the browser; Before reading the channel ranking data through the browser, the method further includes: receiving a data query instruction, wherein the data query instruction includes a mouse cursor instruction; Determining channel ranking data for a target time in the browser according to the mouse cursor instruction; The browser reads the channel ranking data, including: The channel ranking data within the target time is displayed on a display interface according to a mouse cursor instruction.

2. A system for quickly querying channel rankings within a time period, characterized in that: include: The pull module is used to pull channel playback data from Kafka in a preset way; A storage module, used for storing all the channel play data in a historical data table; A reading module, used for reading the channel ranking data of the preset time in the historical data table, and storing the channel ranking data of the preset time in the update data table; A query module, used for adding a field index to the update data table, so that the update data table directly returns all channel ranking data corresponding to the preset time of the channel; The preset time is a preset time period before the current time; The field index is stored in the update data table; It also includes ranking modules, specifically for: storing all channel ranking data of the preset time in a browser so as to read the channel ranking data through the browser; The ranking module is also specifically used for: receiving a data query instruction, wherein the data query instruction includes a mouse cursor instruction; Determining channel ranking data for a target time in the browser according to the mouse cursor instruction; The ranking module is also specifically used for: The channel ranking data within the target time is displayed on a display interface according to a mouse cursor instruction.

Citation Information

Patent Citations

  • Method and device for dynamically displaying table data based on database

    CN111597238A

  • Data query method and device, electronic device and storage medium

    CN112231317A