A data query method, apparatus, computer equipment, and storage medium

CN117009392BActive Publication Date: 2026-08-14BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

在这个过程中,由于广告主下的投放计划往往数量较多,查询到的广告数据的数据量也比较大,因此在这个查询过程中参数传输较多,查询速度较慢

Benefits of technology

[0033]本公开实施例提供的数据查询方法、装置、计算机设备及存储介质中,存储有用户标识和投放计划标识对应关系的第一数据表,以及存储有查询参数和投放计划标识的对应关系的第二数据表都存储在第一数据库中,由此在进行数据查询时,无需进行跨模块参数传递,性能消耗较低;另外,在从第一数据表中查询到与用户标识对应的目标投放计划标识之后,可以基于所述目标投放计划标识,连接第二数据表生成临时数据表,再从临时数据表中获取目标查询数据进行反馈,相比较逐表查询,基于通过连接数据表的方式来获取数据,数据获取速度更快。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009392B_ABST
    Figure CN117009392B_ABST
Patent Text Reader

Abstract

This disclosure provides a data query method, apparatus, computer device, and storage medium, comprising: receiving a query request carrying a user identifier and query parameters; based on the user identifier, searching for a target delivery plan identifier for media content corresponding to the user identifier in a first data table stored in a first database of a query server; based on the target delivery plan identifier, connecting at least one second data table in the first database corresponding to the query parameters to generate a temporary data table; wherein the second data table stores parameter values ​​corresponding to the query parameters, the parameter values ​​being interactive data values ​​generated after media content is delivered according to the delivery plan corresponding to the delivery plan identifier; padding the query parameter values ​​corresponding to the target delivery plan identifier in the temporary data table where the corresponding query parameter values ​​are empty with zeros, and returning the target query data corresponding to the query request based on the zero-padding temporary data table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a data query method, apparatus, computer equipment, and storage medium. Background Technology

[0002] When advertising, advertisers need to create a campaign plan and then run the ads according to that plan. After the ads are launched, advertisers need to review data such as clicks and impressions to adjust the campaign plan.

[0003] In one application scenario, the ad data generated after ad delivery is stored on a distributed full-text search engine (Elasticsearch, ES). When an advertiser queries data, they typically send their advertiser identifier to the backend. The backend then uses this identifier to query the ad campaigns under that advertiser, and then queries ES for ad data based on those campaigns. In this process, because advertisers often have a large number of campaigns, the amount of ad data retrieved is also quite large. Therefore, this query process involves a lot of parameter transmission and is relatively slow. Summary of the Invention

[0004] This disclosure provides at least one data query method, apparatus, computer device, and storage medium.

[0005] In a first aspect, embodiments of this disclosure provide a data query method applied to a query server, comprising:

[0006] Receive query requests carrying user identifiers and query parameters;

[0007] Based on the user identifier, the target delivery plan identifier of the media content corresponding to the user identifier is retrieved from the first data table stored in the first database of the query server.

[0008] Based on the target delivery plan identifier, at least one second data table in the first database corresponding to the query parameter is connected to generate a temporary data table; wherein, the second data table stores parameter values ​​corresponding to the query parameter, and the parameter values ​​are interactive data values ​​generated after media content is delivered according to the delivery plan corresponding to the delivery plan identifier;

[0009] For the target deployment plan identifier in the temporary data table, zero-padding is performed on the corresponding query parameter value that is empty. Based on the zero-padding temporary data table, the target query data corresponding to the query request is returned.

[0010] In one possible implementation, the query server also stores a third data table containing a first query parameter identifier, and a fourth data table containing the parameter value corresponding to the first query parameter is stored in a second database.

[0011] In one possible implementation, the step of connecting to at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier includes:

[0012] Based on the target deployment plan identifier, connect at least one second data table corresponding to each of the other second query parameters in the first database, excluding the first query parameter in the third data table.

[0013] In one possible implementation, if, based on the third data table, it is determined that the query parameters carried in the query request include at least one first query parameter, the method further includes:

[0014] Query the fourth data table containing the first query parameter carried in the query request from the second database, and obtain the first query data corresponding to the target deployment plan identifier;

[0015] Add the first query data to the temporary data table.

[0016] In one possible implementation, the step of generating a temporary data table by connecting at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier includes:

[0017] The data in the second data table corresponding to the target delivery identifier are integrated according to the target delivery identifier and the query parameters to obtain the integrated data.

[0018] The integrated data is added to the temporary data table.

[0019] In one possible implementation, the query request also carries a first query condition corresponding to the query parameter;

[0020] The step of generating a temporary data table by connecting at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier includes:

[0021] Based on the target deployment plan identifier, at least one second data table corresponding to the query parameters is connected, and based on the first query condition, the data in the connected at least one second data table is filtered to generate the temporary data table.

[0022] In one possible implementation, the query request is a paginated query request;

[0023] The temporary data table, after zero-padding, returns the target query data corresponding to the query request, including:

[0024] The temporary data table after zero-padding is sorted according to the target query parameters;

[0025] Determine the target query data in the sorted temporary data table that matches the pagination query request, and return the target query data.

[0026] Secondly, embodiments of this disclosure also provide a data query device, comprising:

[0027] The receiving module is used to receive query requests carrying user identifiers and query parameters;

[0028] The lookup module is used to look up the target delivery plan identifier of the media content corresponding to the user identifier from the first data table stored in the first database of the query server, based on the user identifier.

[0029] The connection module is used to connect to at least one second data table in the first database corresponding to the query parameter based on the target delivery plan identifier, and generate a temporary data table; wherein, the second data table stores parameter values ​​corresponding to the query parameter, and the parameter values ​​are interactive data values ​​generated after media content is delivered according to the delivery plan corresponding to the delivery plan identifier;

[0030] The zero-padding module is used to pad the query parameter values ​​of target deployment plan identifiers with empty query parameter values ​​in the temporary data table with zeros, and return the target query data corresponding to the query request based on the zero-padding temporary data table.

[0031] Thirdly, embodiments of this disclosure also provide a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.

[0032] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.

[0033] In the data query method, apparatus, computer equipment, and storage medium provided in this disclosure, a first data table storing the correspondence between user identifiers and delivery plan identifiers, and a second data table storing the correspondence between query parameters and delivery plan identifiers, are both stored in a first database. Therefore, when performing data queries, there is no need for cross-module parameter passing, resulting in lower performance consumption. Furthermore, after retrieving the target delivery plan identifier corresponding to the user identifier from the first data table, a temporary data table can be generated by connecting the second data table based on the target delivery plan identifier. Then, the target query data can be retrieved from the temporary data table for feedback. Compared to table-by-table queries, data retrieval is faster by retrieving data through table connections.

[0034] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0035] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0036] Figure 1 A schematic diagram of a data query method provided in the related art according to an embodiment of this disclosure is shown;

[0037] Figure 2 A flowchart of a data query method provided by an embodiment of this disclosure is shown;

[0038] Figure 3 This diagram illustrates an overall schematic of a data query method provided by an embodiment of the present disclosure.

[0039] Figure 4 This diagram illustrates the architecture of a data query device provided in an embodiment of the present disclosure.

[0040] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0042] In one scenario, the advertising data generated after an ad is placed is stored on a distributed full-text search engine (Elasticsearch, ES). When an advertiser queries data, they typically send an advertiser identifier to the backend, which then queries the campaigns under that advertiser based on the advertiser identifier, and then queries the advertising data in ES based on the campaigns.

[0043] Specifically, such as Figure 1 As shown, the user client can send the user ID (i.e., advertiser identifier) ​​to the backend. The backend can then retrieve the full campaign data corresponding to the user ID from the backend database (here, it refers to the list of campaign identifiers defined by the user) based on the user ID. The backend will then send the parameters corresponding to the full campaign data to the query platform, which will then query the corresponding user data in Elasticsearch.

[0044] When multiple users query simultaneously, the amount of full plan data transferred between the backend and the query platform is large, resulting in significant performance overhead.

[0045] In addition, since Elasticsearch (ES) only contains corresponding advertising data after advertising data is generated according to the advertising campaign plan, if no advertising data is generated after the advertising campaign is launched according to the advertising campaign plan, there will be no advertising data in ES corresponding to that advertising campaign plan. However, when users perform queries, they need to display all advertising campaign plans. Therefore, it is necessary to fill zeros in the advertising campaign data that does not contain advertising data.

[0046] When performing zero-filling, since different advertising data exist in different data tables, it is necessary to compare each data table with the full plan data to determine which advertising campaigns need zero-filling. This method is also relatively resource-intensive.

[0047] For example, if the advertising data includes clicks and impressions, the data table corresponding to clicks is Data Table 1, and the data table corresponding to impressions is Data Table 2. The stored content of Data Table 1 is shown in Table 1 below, and the stored content of Data Table 2 is shown in Table 2 below:

[0048] Table 1

[0049] 1 1 2 3 3 5

[0050] Table 2

[0051]

[0052]

[0053] In the table above, ad_id represents the campaign ID, click represents a click, and Show represents a display. If the total campaign data includes "1, 2, 3, 4", meaning the campaign IDs in the total campaign data are "1, 2, 3, 4", then by comparing with the data in Table 1, the data that needs to be padded with zeros is "ad_id, 4, click, 0"; by comparing with the data in Table 2, the data that needs to be padded with zeros is "ad_id, 1, Show, 0".

[0054] Therefore, when there are many campaign identifiers in the full campaign data, or when the amount of advertising data is large, performing zero-padding in this way before obtaining the data will result in significant performance overhead.

[0055] Based on the above research, this disclosure provides a data query method, apparatus, computer device, and storage medium. A first data table storing the correspondence between user identifiers and deployment plan identifiers, and a second data table storing the correspondence between query parameters and deployment plan identifiers, are both stored in a first database. Therefore, when performing data queries, there is no need to pass parameters across modules, resulting in lower performance consumption. In addition, after retrieving the target deployment plan identifier corresponding to the user identifier from the first data table, a temporary data table can be generated by connecting the second data table based on the target deployment plan identifier. Then, the target query data can be retrieved from the temporary data table for feedback. Compared with table-by-table queries, data retrieval speed is faster by retrieving data through data table connections.

[0056] In addition, when performing zero-padding operations, zero-padding can be directly performed on the query parameters of all deployment plans that require zero-padding in the temporary data table, eliminating the need for multiple comparisons and resulting in minimal performance overhead.

[0057] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0058] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0059] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0060] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0061] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0062] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0063] To facilitate understanding of this embodiment, a data query method disclosed in this disclosure will first be described in detail. The execution subject of the data query method provided in this disclosure is a query server.

[0064] See Figure 2 The diagram shows a flowchart of a data query method provided in an embodiment of this disclosure. The method includes steps 201 to 204, wherein:

[0065] Step 201: Receive a query request carrying a user identifier and query parameters.

[0066] Step 202: Based on the user identifier, search for the target delivery plan identifier of the media content corresponding to the user identifier in the first data table stored in the first database of the query server.

[0067] Step 203: Based on the target delivery plan identifier, connect at least one second data table in the first database corresponding to the query parameter to generate a temporary data table; wherein, the second data table stores parameter values ​​corresponding to the query parameter, and the parameter values ​​are interactive data values ​​generated after media content is delivered according to the delivery plan corresponding to the delivery plan identifier.

[0068] Step 204: Pad the query parameter values ​​of the target deployment plan identifiers in the temporary data table with empty query parameter values ​​with zeros, and return the target query data corresponding to the query request based on the zero-padding temporary data table.

[0069] The following is a detailed explanation of the steps described above.

[0070] Regarding step 201,

[0071] Here, the user identifier can be an identifier for a user who has specified a delivery plan. The delivery plan is used to deliver media content. For example, the delivery plan may include the delivery platform, delivery time, delivery content, delivery format, etc. The same user can specify multiple delivery plans.

[0072] The query parameters can be parameters that reflect the delivery effect of media content, or user interaction parameters, such as the number of clicks, plays, favorites, and shares of the media content.

[0073] In one possible implementation, the query request can be sent by a user client. The user can select query parameters through the user client and send a query request carrying the user identifier and query parameters through the user client.

[0074] Regarding step 202,

[0075] The first data table may be a data table that stores the correspondence between user identifiers and deployment plan identifiers. Here, the first data table may store multiple user identifiers. When the amount of user identifiers or deployment plan identifiers is large, the first data table may include multiple tables.

[0076] The first database can refer to a database that supports join operations, such as the Doris database.

[0077] In one possible implementation, the query request may further include a second query condition corresponding to the campaign plan. Here, the second query condition may be a condition used to restrict the query of the campaign plan, such as the campaign launch time, the campaign plan formulation time, etc.

[0078] Correspondingly, the first data table may also store attribute information of each delivery plan, and the attribute information corresponds to the second query condition; when the query request carries the second query condition, the target delivery plan identifier can be found from the first data table based on the user identifier and the second query condition.

[0079] Regarding step 203,

[0080] Optionally, the query request may carry multiple query parameters, and different query parameters may be stored in different second data tables. The number of second data tables that need to be joined may be the same as the number of query parameters.

[0081] For example, if the target delivery plan identifier found in the first data table includes "1, 2, 3, 4", and the second data table is Table 1 and Table 2 above, then after joining the second data table based on the target delivery plan identifier, the generated temporary data table is shown in Table 3 below:

[0082] Table 3

[0083] 1 1 2 3 5 3 5 6 4 7

[0084] Therefore, it can be seen that the temporary data packet includes the target deployment plan identifier of the deployment plan, the query parameters, and the parameter values ​​under each query parameter.

[0085] The data table corresponding to the query parameters can be pre-stored in Elasticsearch (ES), and then the data table of query parameters stored in ES is migrated to the first database. The first database and ES are different storage modules.

[0086] However, in practical applications, besides user queries, other business lines may also need to retrieve data from the query parameter data table. Furthermore, given the large volume of data in the query parameter data table, migrating the entire query parameter data table to the first database could incur significant performance overhead. Therefore, based on this, the data table migrated to the first database can only contain a portion of the query parameters, while Elasticsearch retains a portion of the query parameter data table.

[0087] Specifically, the query server also stores a third data table, which may store a first query parameter identifier. The fourth data table containing the parameter value corresponding to the first query parameter is stored in a second database, which may be the database of the ES.

[0088] The data table for query parameters migrated to the first database can be a data table for query parameters with high query frequency, such as click count, impression count, etc. Which query parameter data table to migrate can be set manually, or it can be determined based on the query parameters carried in historical query requests, identifying query parameters with a higher query frequency than a preset frequency, and then migrating the data table for query parameters with a higher query frequency than the preset frequency to the first database.

[0089] Since ES does not support join, when connecting at least one second data table in the first database corresponding to the query parameter based on the target delivery plan identifier, it can mean connecting at least one second data table in the first database corresponding to other second query parameters besides the first query parameter in the third data table, based on the target delivery plan identifier.

[0090] That is, before performing the join, the first query parameter belonging to the third data table and the second query parameter other than the first query parameter are determined from the query parameters carried by the query request. Then, based on the target delivery plan identifier, the second data table corresponding to the second query parameter is joined.

[0091] If, based on the third data table, it is determined that the query parameters carried in the query request include at least one first query parameter, the fourth data table containing the first query parameter carried in the query request can be queried from the second database to obtain the first query data corresponding to the target deployment plan identifier, and then the first query data can be added to the temporary data table.

[0092] In practical applications, since the data granularity of the fourth data table may be updated, in order to reduce the amount of parameters transmitted, the fourth data table can be integrated first, with the deployment plan identifier as the integration granularity, and then the first query data corresponding to the target deployment plan identifier can be obtained from the integrated fourth data table.

[0093] For example, if the smallest data granularity in the fourth data table is "creative_id" and the query parameter contained in the fourth data table is "click", then the data contained in the fourth data table can be as shown in Table 4 below:

[0094] Table 4

[0095] 123 1 6 124 1 7 122 2 8 111 3 9 456 3 10 788 4 11

[0096] Using the campaign identifier as the integration granularity, after integrating Table 4 above, we can obtain the data in Table 5 below:

[0097] Table 5

[0098]

[0099]

[0100] When integrating Table 4, there are two data entries with ad_id = 1. By merging the first and second data entries, we can obtain the click data 13 corresponding to ad_id1. Similarly, there are two data entries with ad_id = 13. By merging the fourth and fifth data entries, we can obtain the click data 19 corresponding to ad_id3.

[0101] When retrieving data from the integrated data table, the data can be retrieved directly based on the target deployment plan identifier. Compared to retrieving data from the data table before integration, this method can reduce the amount of data retrieved and reduce performance overhead.

[0102] Similarly, when generating a temporary data table by connecting at least one second data table in the first database corresponding to the query parameters based on the target delivery plan identifier, the data in the second data table corresponding to the target delivery identifier can be integrated according to the target delivery identifier and the query parameters to obtain integrated data; then the integrated data is added to the temporary data table.

[0103] The specific integration method is the same as that of the fourth data table mentioned above, and will not be repeated here.

[0104] In one possible implementation, the query request may also carry a first query condition, which is a parameter used to limit the query parameters. For example, it may be a condition that limits the generation time of the query parameters; or it may be a condition that limits the generation source of the query parameters, etc.

[0105] When the query request carries a first query condition, when generating a temporary data table by connecting at least one second data table in the first database corresponding to the query parameter based on the target delivery plan identifier, the data in the connected at least one second data table corresponding to the query parameter can be filtered based on the first query condition to generate the temporary data table.

[0106] Alternatively, when the query request carries the first query condition, when generating a temporary data table by connecting at least one second data table in the first database corresponding to the query parameter based on the target delivery plan identifier, the data in the connected data table can be filtered based on the first query condition to generate the temporary data table.

[0107] Regarding step 204,

[0108] The temporary data table is exemplified in Table 3 above. In Table 3, some query parameters corresponding to target deployment plan identifiers have empty values. Therefore, it is necessary to pad the temporary data table with zeros to complete it.

[0109] Optionally, the above join operation can be a left join, that is, based on the left table. The left table can be a data table containing the target delivery plan identifier found from the first data table. Therefore, the temporary data table contains all the target delivery plan identifiers corresponding to the user identifier. Correspondingly, the temporary data table may contain cases where some query parameters corresponding to the target delivery plan identifier have null values, or it may contain cases where all query parameters corresponding to the target delivery plan identifier have null values.

[0110] The zero-padding process for the temporary data table can be understood as padding all parameter values ​​in the temporary data table that are empty, with zeros added to them.

[0111] In one possible implementation, when returning the target query data corresponding to the query request based on the temporary data table after zero-padding, the target query data can first be sorted according to the target query parameters, and then the target query data can be determined and returned based on the sorting result.

[0112] Optionally, when the query request is a paginated query request, the query request may carry the page number of the requested query data and the number of data contained in each page. After the temporary data table after zero-padding is sorted according to the target query parameters, the target query data that matches the paginated query request in the sorted temporary data table can be determined and the target query data can be returned.

[0113] Here, the target query data that meets the pagination query request can refer to the number of data entries that are sorted according to the page number.

[0114] In the above process, the process of joining multiple second data tables to generate a temporary data table and the data filtering process (the data filtering here can include the data filtering based on the first query condition and / or the second query condition) can be executed in parallel by multiple machines. Therefore, the speed of generating a temporary data table is relatively fast. In contrast, the existing Elasticsearch query solution requires multiple comparison processes and only passes parameters (referring to passing the full plan data) once. Therefore, the existing execution process can only be executed by one machine, which is less efficient.

[0115] In the data query method provided in this embodiment, a first data table storing the correspondence between user identifiers and delivery plan identifiers, and a second data table storing the correspondence between query parameters and delivery plan identifiers, are both stored in a first database. Therefore, when performing data queries, there is no need to pass parameters across modules, resulting in lower performance consumption. In addition, after retrieving the target delivery plan identifier corresponding to the user identifier from the first data table, a temporary data table can be generated by connecting the second data table based on the target delivery plan identifier. Then, the target query data can be retrieved from the temporary data table for feedback. Compared with table-by-table queries, data retrieval is faster by retrieving data through table connections.

[0116] The following section provides an overall overview of the data query methods described above, using the multimedia content being delivered as an example and the query parameters stored in Doris as the basic data for the advertisement. See [link to Doris documentation]. Figure 3 The diagram shown is an overall flowchart of a data query method provided in this embodiment of the disclosure, which specifically includes:

[0117] Users can initiate Doris queries to Doris (the first database) through the query service. After receiving the query request, Doris mainly performs three types of queries: one is to query the target campaign identifier within Doris; another is to perform a join operation within Doris using the queried target campaign identifier as the left table to query the basic advertising data table; and the third is to query doris_on_es (the third data table mentioned above). After obtaining the query parameters, Doris queries data from Elasticsearch. Data transfer during the query process can be performed using FLINK. After all the data is retrieved and a temporary data table is generated, zeros are added before the data is returned to the user.

[0118] For a detailed description of the above steps, please refer to the above embodiment; further details will not be provided hereafter.

[0119] After data storage is performed according to the above steps, when new data is generated, it can be stored directly according to the data migration data storage method. For example, if query parameter A is migrated from the second database of Elasticsearch to the first database of Doris, when data for query parameter A is generated again, it can be directly stored in the first database.

[0120] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0121] Based on the same inventive concept, this disclosure also provides a data query device corresponding to the data query method. Since the principle of the device in this disclosure for solving the problem is similar to the data query method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0122] Reference Figure 4 The diagram shown is an architectural schematic of a data query device provided in an embodiment of this disclosure. The device includes: a receiving module 401, a searching module 402, a connecting module 403, and a zero-padding module 404; wherein,

[0123] The receiving module 401 is used to receive a query request carrying a user identifier and query parameters;

[0124] The lookup module 402 is used to look up the target delivery plan identifier of the media content corresponding to the user identifier from the first data table stored in the first database of the query server, based on the user identifier.

[0125] The connection module 403 is used to connect to at least one second data table in the first database corresponding to the query parameter based on the target delivery plan identifier, and generate a temporary data table; wherein, the second data table stores parameter values ​​corresponding to the query parameter, and the parameter values ​​are interactive data values ​​generated after media content is delivered according to the delivery plan corresponding to the delivery plan identifier;

[0126] The zero-padding module 404 is used to pad the query parameter values ​​of the target deployment plan identifiers that have empty query parameter values ​​in the temporary data table with zeros, and return the target query data corresponding to the query request based on the zero-padding temporary data table.

[0127] In one possible implementation, the query server also stores a third data table containing a first query parameter identifier, and a fourth data table containing the parameter value corresponding to the first query parameter is stored in a second database.

[0128] In one possible implementation, the connection module 403, when connecting to at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier, is used to:

[0129] Based on the target deployment plan identifier, connect at least one second data table corresponding to each of the other second query parameters in the first database, excluding the first query parameter in the third data table.

[0130] In one possible implementation, if, based on the third data table, it is determined that the query parameters carried in the query request include at least one first query parameter, the connection module 403 is further configured to:

[0131] Query the fourth data table containing the first query parameter carried in the query request from the second database, and obtain the first query data corresponding to the target deployment plan identifier;

[0132] Add the first query data to the temporary data table.

[0133] In one possible implementation, the connection module 403, when generating a temporary data table by connecting to at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier, is used to:

[0134] The data in the second data table corresponding to the target delivery identifier are integrated according to the target delivery identifier and the query parameters to obtain the integrated data.

[0135] The integrated data is added to the temporary data table.

[0136] In one possible implementation, the query request also carries a first query condition corresponding to the query parameter;

[0137] The connection module 403 is further configured to connect to at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier, and when generating a temporary data table, it is configured to:

[0138] Based on the target deployment plan identifier, at least one second data table corresponding to the query parameters is connected, and based on the first query condition, the data in the connected at least one second data table is filtered to generate the temporary data table.

[0139] In one possible implementation, the query request is a paginated query request;

[0140] The zero-padding module 404, when returning the target query data corresponding to the query request based on the temporary data table after zero-padding, is used for:

[0141] The temporary data table after zero-padding is sorted according to the target query parameters;

[0142] Determine the target query data in the sorted temporary data table that matches the pagination query request, and return the target query data.

[0143] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0144] Based on the same technical concept, this disclosure also provides a computer device. (See also...) Figure 5 The diagram shown is a structural schematic of a computer device 500 provided in an embodiment of this disclosure. The computer device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers, or various forms of servers, such as standalone servers or server clusters. Figure 5 The computer device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0145] like Figure 5 As shown, computer device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from memory 505 into random access memory (RAM) 503. RAM 503 also stores various programs and data required for the operation of computer device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0146] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows computer device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5A computer device 500 with various devices is shown; however, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or included alternatively.

[0147] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing a data query method. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by a processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0148] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the data query method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0149] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the data query method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0150] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0151] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0152] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0153] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0154] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0155] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A data query method, characterized in that, Applied to query servers, including: Receive query requests carrying user identifiers and query parameters; Based on the user identifier, the target delivery plan identifier of the media content corresponding to the user identifier is retrieved from the first data table stored in the first database of the query server. Based on the target delivery plan identifier, at least one second data table in the first database corresponding to the query parameter is connected to generate a temporary data table; wherein, the second data table stores parameter values ​​corresponding to the query parameter, and the parameter values ​​are interactive data values ​​generated after media content is delivered according to the delivery plan corresponding to the delivery plan identifier; For the target deployment plan identifier in the temporary data table where the corresponding query parameter value is empty, zero-padding is performed on the query parameter value. Based on the zero-padding temporary data table, the target query data corresponding to the query request is returned. The query server also stores a third data table containing a first query parameter identifier, and a fourth data table containing the parameter value corresponding to the first query parameter is stored in the second database. The step of connecting at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier includes: Based on the target deployment plan identifier, connect at least one second data table corresponding to each of the other second query parameters in the first database, excluding the first query parameter in the third data table.

2. The method according to claim 1, characterized in that, If, based on the third data table, it is determined that the query parameters carried in the query request include at least one first query parameter, the method further includes: Query the fourth data table containing the first query parameter carried in the query request from the second database, and obtain the first query data corresponding to the target deployment plan identifier; Add the first query data to the temporary data table.

3. The method according to claim 1, characterized in that, The step of generating a temporary data table by connecting at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier includes: The data corresponding to the target delivery identifier in the second data table are integrated according to the target delivery identifier and the query parameters to obtain the integrated data. The integrated data is added to the temporary data table.

4. The method according to claim 1, characterized in that, The query request also carries a first query condition corresponding to the query parameters; The step of generating a temporary data table by connecting at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier includes: Based on the target deployment plan identifier, at least one second data table corresponding to the query parameters is connected, and based on the first query condition, the data in the connected at least one second data table is filtered to generate the temporary data table.

5. The method according to claim 1, characterized in that, The query request is a paginated query request; The temporary data table, after zero-padding, returns the target query data corresponding to the query request, including: The temporary data table after zero-padding is sorted according to the target query parameters; Determine the target query data in the sorted temporary data table that matches the pagination query request, and return the target query data.

6. A data query device, characterized in that, Applied to query servers, including: The receiving module is used to receive query requests carrying user identifiers and query parameters; The lookup module is used to look up the target delivery plan identifier of the media content corresponding to the user identifier from the first data table stored in the first database of the query server, based on the user identifier. The connection module is used to connect to at least one second data table in the first database corresponding to the query parameter based on the target delivery plan identifier, and generate a temporary data table; wherein, the second data table stores parameter values ​​corresponding to the query parameter, and the parameter values ​​are interactive data values ​​generated after media content is delivered according to the delivery plan corresponding to the delivery plan identifier; The zero-padding module is used to pad the query parameter values ​​of target deployment plan identifiers with empty query parameter values ​​in the temporary data table with zeros, and based on the zero-padding temporary data table, return the target query data corresponding to the query request. The query server also stores a third data table containing a first query parameter identifier, and a fourth data table containing the parameter value corresponding to the first query parameter is stored in the second database. The connection module, when connecting to at least one second data table in the first database corresponding to the query parameters based on the target deployment plan identifier, is used for: Based on the target deployment plan identifier, connect at least one second data table corresponding to each of the other second query parameters in the first database, excluding the first query parameter in the third data table.

7. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the data query method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the data query method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Advertisement putting bidding strategy determination method and device, equipment and storage medium

    CN115409555A

  • Advertisement delivery data query method and device, electronic equipment and storage medium

    CN116126897A