Task processing method, electronic equipment, storage medium and program product
By performing semantic processing on user questions to determine the primary indicator and primary dimension, and using a pre-generated secondary list for filtering, the problem of low query efficiency caused by the large amount of data in the logical wide table is solved, thereby improving task processing efficiency.
Patent Information
- Application Number
- CN202511035634.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-18
AI Technical Summary
In the field of big data, when the data volume of a logical wide table is large, the data retrieval efficiency is low, and existing technologies are unable to process the task efficiently.
By acquiring user questions and performing semantic processing, we can determine the primary indicator and primary dimension, and then use a pre-generated secondary list for filtering, thereby reducing the amount of data queried and improving task processing efficiency.
By determining the query results in a pre-generated second list, the amount of query data is reduced, thus improving the efficiency of task processing.
Smart Images

Figure CN120973489A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data, and in particular to a task processing method, electronic device, storage medium, and program product. Background Technology
[0002] Metric-based Q&A is a method that uses predefined metrics to quickly obtain and answer user questions related to data.
[0003] In related technologies, data can be traversed within a database based on the user's question to find the corresponding data as the answer and then provided back to the user. The data in the database can be linked with fact tables and multiple dimension tables to form logical wide tables.
[0004] However, in the above methods, the data lookup efficiency is low when the amount of data in the logical wide table is large. Summary of the Invention
[0005] This application provides a task processing method, electronic device, storage medium, and program product to improve task processing efficiency.
[0006] In a first aspect, embodiments of this application provide a task processing method, including:
[0007] The first question in acquiring users;
[0008] Perform semantic processing on the first question to obtain the first index for querying the first question and the first dimension for querying the first index.
[0009] Based on the first indicator and the first dimension, a first list is determined in the database. The database includes a second list corresponding to multiple preset indicators. The second list includes the preset indicators and a second dimension. The second dimension is obtained by filtering multiple dimensions associated with the preset indicators.
[0010] Based on the first question, the first dimension, and the first list, determine the query results for the first question.
[0011] In one possible design, before determining the first list in the database, the following is also included:
[0012] For any preset indicator, determine the original list corresponding to the preset indicator, wherein the original list includes the preset indicator and the original dimension;
[0013] Based on the original list and the original dimension, determine the second list corresponding to the preset index.
[0014] In a possible design, the second list corresponding to the preset index is determined according to the original list and the original dimensions, including:
[0015] In the original dimensions, a third dimension is determined, and a frequency of use of the third dimension is greater than or equal to a first threshold value;
[0016] A target dimension combination is determined according to the third dimension;
[0017] The original list is merged according to the target dimension combination, to obtain a second list.
[0018] In a possible design, the target dimension combination is determined according to the third dimension, including:
[0019] The third dimension is input into a first model, to obtain a first dimension combination, and the first dimension combination includes a plurality of third dimensions that have a semantic correlation relationship;
[0020] The target dimension combination is determined according to the first dimension combination.
[0021] In a possible design, the target dimension combination is determined according to the first dimension combination, including:
[0022] The original dimensions are combined to obtain a plurality of second dimension combinations;
[0023] A parameter corresponding to each second dimension combination is determined, and the parameter is used to indicate a query efficiency improvement ratio of the second dimension combination compared with the original dimensions;
[0024] The target dimension combination is determined according to the parameter corresponding to each second dimension combination, the plurality of second dimension combinations, and the first dimension combination.
[0025] In a possible design, the target dimension combination is determined according to the parameter corresponding to each second dimension combination, the plurality of second dimension combinations, and the first dimension combination, including:
[0026] According to the parameter of each second dimension combination, a third dimension combination is determined from the plurality of second dimension combinations, and the parameter of the third dimension combination is greater than or equal to a second threshold value;
[0027] The target dimension combination is determined according to the third dimension combination and the first dimension combination.
[0028] In a possible design, the first list is determined in a database according to the first index and the first dimension, including:
[0029] According to the first index, a third list is determined in the second list, and the first index and the preset index of the third list are the same.
[0030] According to the first dimension, a first list is determined in the third list, and a similarity between a second dimension of the first list and the first dimension is maximum.
[0031] In a second aspect, the embodiments of the present application provide a task processing apparatus, comprising: an obtaining module, a processing module, a first determining module and a second determining module, wherein,
[0032] The obtaining module is configured to obtain a first question of a user.
[0033] The processing module is configured to perform semantic processing on the first question, to obtain a first index of the first question query and a first dimension of the first index.
[0034] The first determining module is configured to determine a first list in a database according to the first index and the first dimension, wherein the database comprises a second list corresponding to a plurality of preset indexes, the second list comprises the preset index and a second dimension, and the second dimension is obtained by screening a plurality of dimensions associated with the preset index.
[0035] The second determining module is configured to determine a query result of the first question according to the first question, the first dimension and the first list.
[0036] In a possible design, the apparatus further comprises a third determining module, wherein,
[0037] The third determining module is configured to determine, for any one preset index, an original list corresponding to the preset index, wherein the original list comprises the preset index and an original dimension.
[0038] According to the original list and the original dimension, a second list corresponding to the preset index is determined.
[0039] In a possible design, the third determining module is specifically configured to,
[0040] In the original dimension, a third dimension is determined, and a usage frequency of the third dimension is greater than or equal to a first threshold value.
[0041] According to the third dimension, a target dimension combination is determined.
[0042] According to the target dimension combination, the original list is processed to obtain a second list.
[0043] In a possible design, the third determining module is specifically configured to,
[0044] inputting the third dimension into the first model to obtain a first dimension combination, the first dimension combination including a plurality of third dimensions having semantic correlation;
[0045] determining the target dimension combination according to the first dimension combination.
[0046] In a possible design, the third determining module is specifically configured to,
[0047] combining the original dimensions to obtain a plurality of second dimension combinations;
[0048] determining a parameter corresponding to each second dimension combination, the parameter being used to indicate a query efficiency improvement ratio of the second dimension combination compared with the original dimensions;
[0049] determining the target dimension combination according to the parameter corresponding to each second dimension combination, the plurality of second dimension combinations, and the first dimension combination.
[0050] In a possible design, the third determining module is specifically configured to,
[0051] determining, according to the parameter of each second dimension combination, a third dimension combination from the plurality of second dimension combinations, the parameter of the third dimension combination being greater than or equal to a second threshold value;
[0052] determining the target dimension combination according to the third dimension combination and the first dimension combination.
[0053] In a possible design, the first determining module is specifically configured to,
[0054] determining, according to the first index, a third list from the second list, the first index and the preset index of the third list being the same;
[0055] determining, according to the first dimension, a first list from the third list, a second dimension of the first list and the first dimension having the maximum similarity.
[0056] In a third aspect, an embodiment of the present application provides a task processing device, including: a memory, a processor;
[0057] the memory stores computer execution instructions;
[0058] the processor executes the computer execution instructions stored in the memory, so that the processor executes the first aspect and / or various possible implementation manners of the first aspect.
[0059] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.
[0060] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.
[0061] The task processing method, the electronic device, the storage medium and the program product provided in the embodiments of the present application can obtain a first question of a user when a task needs to be processed, perform semantic processing on the first question to obtain a first index of a first question query and a first dimension of the first index, determine a first list in a database according to the first index and the first dimension, the database comprising a second list corresponding to a plurality of preset indexes, the second list comprising a preset index and a second dimension, the second dimension being obtained by screening a plurality of dimensions associated with the preset index, and determining a query result of the first question according to the first question, the first dimension and the first list. In this way, the first index and the first dimension of the first question can be used to determine the first list in the second list generated in advance, the second dimension of the second list is obtained after screening, and the amount of data for query can be reduced compared with an original list. The amount of data for query is reduced, that is, the result can be determined by querying only in the first list, and the efficiency of task processing is improved. BRIEF DESCRIPTION OF DRAWINGS
[0062] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0063] Figure 1 The system architecture schematic diagram provided in the embodiments of the present application;
[0064] Figure 2 The flowchart of the task processing method provided in the embodiments of the present application;
[0065] Figure 3 The schematic diagram of the visual operation window of the question and answer system provided in the embodiments of the present application;
[0066] Figure 4 The determination process schematic diagram of the second list corresponding to any one preset index provided in the embodiments of the present application;
[0067] Figure 5 The structure schematic diagram of the task processing device provided in the embodiments of the present application;
[0068] Figure 6 Another task processing device structure schematic diagram provided by an embodiment of the present application is shown in the following figure.
[0069] Figure 7 A structure schematic diagram of an electronic device provided by an embodiment of the present application is shown in the following figure.
[0070] The specific embodiments of the present application have been shown in the above figures, and will be described in more detail hereinafter. These figures and the written description are not intended to limit the scope of the present application in any way, but to illustrate the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0071] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals refer to like elements, unless the context of use indicates otherwise. The following exemplary embodiments described in the following exemplary embodiments are not meant to represent all embodiments in accordance with the present application. Rather, they are merely examples of apparatus and methods in accordance with some aspects of the present application as detailed in the appended claims.
[0072] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards in relevant regions, necessary security measures are taken, public order and good customs are not violated, and appropriate operation portals are provided for users to choose authorization or refusal.
[0073] And the present application involves big data analysis of user information (including but not limited to personal biological characteristics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and uses artificial intelligence technology for automatic decision-making, and makes technical solutions for decisions that have a significant impact on personal rights and interests according to the automatic decision-making results, provides appropriate operation portals for users to choose to agree or refuse the automatic decision-making results; if the user chooses to refuse, the expert decision-making process is entered.
[0074] It should be noted that the task processing method, electronic device, storage medium and program product provided by the present application can be used in the field of big data, and can also be used in any field other than the field of big data. The application field of the task processing method, electronic device, storage medium and program product in the present application is not limited.
[0075] It should be noted that in the embodiments of the present application, some industry existing solutions of software, components, models, etc. may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but does not mean that the applicant has or will necessarily use the solution.
[0076] For ease of understanding, the following will be combined with Figure 1 The system architecture applicable to the embodiments of the present application is described.
[0077] Figure 1 The system architecture provided by the embodiments of the present application is shown in the following Figure 1 , including a user terminal 101 and an electronic device 102, the user terminal 101 can be a local terminal device of the user, for example, a computer, a mobile phone, a tablet computer, etc. of the user, and the electronic device 102 can be a device with on-end computing capability, for example, a terminal device, a server, etc. The electronic device 102 can store a database therein. The user terminal 101 can send a user question to the electronic device 102, and the electronic device 102 can find a query result corresponding to the user question in the database after receiving the user question, and return the query result to the user terminal 101.
[0078] In the related art, the data in the database can be traversed according to the content of the user's question, and the data corresponding to the question is found as the answer to the question and fed back to the user. Among them, the data in the database can be associated to form a logical wide table through a fact table and multiple dimension tables. However, in the above method, when the data amount of the logical wide table is large, the data searching efficiency is low.
[0079] To solve the above technical problems, in the embodiments of the present application, when a task needs to be processed, a first question of a user can be obtained; the first question is semantically processed to obtain a first index of a first question query and a first dimension for querying the first index; a first list is determined in a database according to the first index and the first dimension, the database includes a second list corresponding to a plurality of preset indexes, the second list includes a preset index and a second dimension, and the second dimension is obtained by filtering a plurality of dimensions associated with the preset index; and a query result of the first question is determined according to the first question, the first dimension and the first list. In this way, through the above method, the first list can be determined in the second list generated in advance according to the first index and the first dimension of the first question, and the query result can be determined in the first list, thereby reducing the amount of query data, i.e. only the query in the first list is needed to determine the result, and the efficiency of task processing is improved.
[0080] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0081] Figure 2 A flowchart of a task processing method provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the method can include the following steps: Figure 2
[0082] S201, obtaining a first question of a user.
[0083] The execution subject of the embodiment of the present application can be an electronic device, or a task processing apparatus provided in the electronic device, wherein the electronic device can be a device with on-end computing capability, such as a server, a terminal device, etc., and the task processing apparatus can be implemented by software, or by a combination of software and hardware.
[0084] The first question can be a to-be-processed question sent by the user to the electronic device through a user terminal. The first question can be an index question and answer question. For example, the first question can be: Please help me query the sales amount of A store in October 2024.
[0085] The user terminal can be a terminal device local to the user, such as a computer, a mobile phone, a tablet, etc. The user terminal can be provided with a visual operation window of a question and answer system, which can be used to process the first question input by the user.
[0086] The first question can be obtained in the following manner: the user can input the first question in the visual operation window of the question and answer system, click a “process” control, send a task processing request to the electronic device, and the electronic device obtains the first question input by the user in response to the task processing request.
[0087] Next, the visual operation window of the question and answer system will be described below with reference to Figure 3 .
[0088] Figure 3 A schematic diagram of the visual operation window of the question and answer system provided by the embodiment of the present application is shown in FIG. 2. As shown in FIG. 2, the visual operation window includes a question input control and a “process” control. The user can input the first question to be processed in the question input control, and click the “process” control. The electronic device can process the first question, and output the answer to the first question. Figure 3
[0089] S202, perform semantic processing on the first question to obtain a first index of the first question query and a first dimension of the first index.
[0090] The semantic processing can refer to text preprocessing, keyword extraction, intent recognition and the like on the first question, so as to determine the first index of the first question query and the first dimension of the first index. The text preprocessing can refer to basic processing such as word segmentation, stop word removal, and part-of-speech tagging on the first question; the keyword extraction can identify key entities in the first question, such as "sales", "growth rate", "product", "date", "time", and the like; and the intent recognition can refer to understanding the intent of the user's question, so as to determine the first index that the user needs to query and the first dimension of the first index.
[0091] The first index of the first question query can refer to the main index queried by the user. For example, assuming that the first question is "What is the sales in the past month?", the "sales" is the first index, i.e., the main index queried by the user.
[0092] The first dimension of the first index can refer to the dimension that limits the first index. For example, assuming that the first question is "What is the profit of store 1 in A city in March last year?", the first index can be "profit", and the dimension that limits the first index can be "last March", "A city", and "store 1", i.e., the first dimension can be "time", "sales area", and "store".
[0093] S203, determine a first list in the database according to the first index and the first dimension.
[0094] The database can be set in the storage space of the electronic device. The database can include a second list corresponding to a plurality of preset indexes, wherein the second list includes a preset index and a second dimension, and the second dimension is obtained by filtering a plurality of dimensions associated with the preset index.
[0095] It can be understood that the preset index can have a plurality of associated dimensions, and the second dimension can be obtained by filtering the plurality of associated dimensions. For example, assuming that the preset index includes dimension 1, dimension 2, dimension 3, dimension 4, and dimension 5, the second dimension can be dimension 1, dimension 2, and dimension 3, and the second dimension can also be dimension 2 and dimension 5.
[0096] Optionally, the second list can be as shown in Table 1, please refer to Table 1,
[0097] Table 1
[0098]
[0099]
[0100] For example, assuming that the preset indicator 1 is sales, the second dimension 1 is date, the second dimension 2 is city, and the second dimension 3 is product type, the second list can be shown in Table 2, please refer to Table 2.
[0101] Table 2
[0102]
[0103] According to Table 2, for example, it can be determined that the sales of electronic products in A city on January 1 is 3000, the sales of clothing in B city on January 2 is 1000, and the sales of toys in A city on January 3 is 500.
[0104] The first list can be determined in the database by the following method: determining a third list in the second list according to the first indicator, the preset indicator of the third list being the same as the first indicator; and determining the first list in the third list according to the first dimension, the second dimension of the first list being the most similar to the first dimension.
[0105] For example, assuming that the first indicator is indicator 1, the second list includes list 1A corresponding to indicator 1, list 1B corresponding to indicator 1, list 1C corresponding to indicator 1, list 2A corresponding to indicator 2, list 2B corresponding to indicator 2, list 2C corresponding to indicator 2, list 3A corresponding to indicator 3, list 3B corresponding to indicator 3, and list 3C corresponding to indicator 3, the third list can be determined as list 1A corresponding to indicator 1, list 1B corresponding to indicator 1, and list 1C corresponding to indicator 1 in the second list; assuming that the similarity between the second dimension of list 1A and the first dimension is 0.8, the similarity between the second dimension of list 1B and the first dimension is 0.6, and the similarity between the second dimension of list 1C and the first dimension is 0.9, it can be determined that the similarity between the second dimension of list 1C and the first dimension is the largest, i.e., list 1C can be determined as the first list.
[0106] In S204, the query result of the first question is determined according to the first question, the first dimension, and the first list.
[0107] The query result can be determined by the following method: determining the value corresponding to the first dimension according to the first question; and determining the query result corresponding to the first question in the first list according to the value corresponding to the first dimension.
[0108] For example, assuming that the first list is shown in Table 2, please refer to Table 2, and the first question is “What is the sales of clothing in B city on January 3”, it can be determined that the value corresponding to the first dimension 1 is “January 3”, the value corresponding to the first dimension 2 is “B city”, and the value corresponding to the first dimension 3 is “clothing”, and then the query result corresponding to the first question can be determined as 800 in the first list according to the value corresponding to the first dimension.
[0109] In the embodiment of the present application, when a task needs to be processed, a first question of a user can be acquired, the first question can be a to-be-processed question sent by the user to the electronic device through the user terminal; the first question is subjected to semantic processing to obtain a first index of a first question query and a first dimension of querying the first index, the first index of the first question query can refer to a main index queried by the user, the first dimension of querying the first index can refer to a dimension for limiting the first index, and the semantic processing can refer to text preprocessing, keyword extraction, intent recognition and the like of the first question; according to the first index and the first dimension, a first list is determined in a database, the database can include a second list corresponding to a plurality of preset indexes, wherein the second list includes a preset index and a second dimension, and the second dimension is obtained by filtering a plurality of dimensions associated with the preset index; according to the first question, the first dimension and the first list, a query result of the first question is determined. In this way, by the above manner, the first list can be determined in the second list generated in advance according to the first index and the first dimension of the first question, and then the query result can be determined in the first list, so as to reduce the data amount of the query data, that is, the result can be determined only by querying in the first list, and the efficiency of the task processing is improved.
[0110] On the basis of any one of the above embodiments, in the following, combined with Figure 4 The determination process of the second list is described in detail.
[0111] Figure 4 The determination process of the second list corresponding to any one of the preset indexes provided in the embodiment of the present application is shown in the following table. Please refer to Figure 4 The method can include:
[0112] S401, for any one of the preset indexes, determining an original list corresponding to the preset index.
[0113] The original list can be determined by the following manner: according to the preset index, a fact table corresponding to the preset index and a plurality of dimension tables associated with the fact table are determined, the original list is generated according to the fact table and the plurality of dimension tables, and is cached in a storage space.
[0114] The fact table can store the actual value of the preset index, and the dimension table can store the data describing the preset index.
[0115] For example, Table 3 is a fact table, please refer to Table 3,
[0116] Table 3
[0117]
[0118] As shown in Table 3, for example, assuming that the preset index is sales, A can be 1000, B can be 800, and C can be 1200.
[0119] For example, Table 4 is a dimension table, as shown in Table 4.
[0120] Table 4
[0121]
[0122] As shown in Table 4, for example, assuming that the dimension is product type, A can be clothing, B can be toys, and C can be electronic products.
[0123] According to the fact table and the plurality of dimension tables, an original list can be generated, and the original list can include the preset index and original dimensions, wherein the original dimensions are dimensions corresponding to the plurality of dimension tables.
[0124] For example, Table 5 is an original list, assuming that the preset index of the original list is sales, and the original dimensions include month, region, brand, product category, and style, as shown in Table 5.
[0125] Table 5
[0126]
[0127] In S402, a third dimension is determined in the original dimensions.
[0128] The use frequency of the third dimension is greater than or equal to a first threshold value.
[0129] The third dimension can be determined by the following method: obtaining historical query information, determining historical query dimensions according to the historical query information, and determining the third dimension in the original dimensions, wherein the third dimension is a dimension in the historical query dimensions with a use frequency greater than or equal to the first threshold value. The first threshold value can be a value set by the user in advance, for example, the first threshold value can be 10.
[0130] For example, assuming that the original dimensions include original dimension 1, original dimension 2, original dimension 3, original dimension 4, and original dimension 5, the first threshold value is 10, and according to the historical query dimensions, the use frequency of the original dimension 1 is 8, the use frequency of the original dimension 2 is 12, the use frequency of the original dimension 3 is 15, the use frequency of the original dimension 4 is 13, and the use frequency of the original dimension 5 is 7, then the original dimension 2, the original dimension 3, and the original dimension 4 can be determined as the third dimension.
[0131] Optionally, the third dimension can also be determined by the following method: inputting the original dimensions into a first model, and receiving the third dimension with a higher use frequency (greater than or equal to the first threshold value) filtered by the first model, wherein the first model can be a large language model that has been trained.
[0132] S403, input the third dimension into the first model to obtain a first dimension combination.
[0133] The first model can be a large language model that has been trained.
[0134] The first dimension combination includes multiple third dimensions that have a semantic association relationship.
[0135] For example, assuming that the third dimensions include third dimension 1, third dimension 2, third dimension 3, third dimension 4, and third dimension 5, after inputting the third dimensions into the first model, the first model can output a first dimension combination, where the first dimension combination can be (third dimension 1, third dimension 3), (third dimension 2, third dimension 4, third dimension 5), (third dimension 2, third dimension 5), (third dimension 2, third dimension 3, third dimension 4, third dimension 5), etc., where the multiple third dimensions in the first dimension combination have a semantic association relationship.
[0136] S404, combine the original dimensions to obtain multiple second dimension combinations.
[0137] It can be understood that assuming that there are N original dimensions, combining the N original dimensions can obtain 2 N -1 second dimension combinations.
[0138] For example, assuming that there are three original dimensions, namely original dimension 1, original dimension 2, and original dimension 3, combining the three original dimensions can obtain seven second dimension combinations, namely (original dimension 1), (original dimension 2), (original dimension 3), (original dimension 1, original dimension 2), (original dimension 1, original dimension 3), (original dimension 2, original dimension 3), and (original dimension 1, original dimension 2, original dimension 3).
[0139] S405, determine the parameters corresponding to each second dimension combination.
[0140] The parameter can be used to indicate the query efficiency improvement ratio of the second dimension combination compared with the original dimension.
[0141] The parameter corresponding to any second dimension combination can be determined in the following manner: determine the first number of rows of the original list, determine the second number of rows after merging the original list according to the second dimension combination, and determine the number of original dimensions in the second dimension combination; according to the first number of rows, the second number of rows, and the number of original dimensions, determine the parameter corresponding to the second dimension combination.
[0142] Exemplarily, assuming that L1 is the first row number of the original list, L2 is the second row number, and n is the original dimension number in the second dimension combination, the parameter K corresponding to the second dimension combination can be expressed in the following manner:
[0143]
[0144] Exemplarily, assuming that the first row number L1 of the original list is 100, the second row number L2 of the original list after being merged according to the second dimension combination is 50, and the original dimension number in the second dimension combination is 5, it can be determined that the parameter K is equal to 5.
[0145] S406. Determine a target dimension combination according to the parameters corresponding to each second dimension combination, the plurality of second dimension combinations, and the first dimension combination.
[0146] The target dimension combination can be determined in the following manner: according to the parameters of each second dimension combination, determine a third dimension combination from the plurality of second dimension combinations, wherein the parameter of the third dimension combination is greater than or equal to a second threshold value; and determine the target dimension combination according to the third dimension combination and the first dimension combination. The second threshold value is a value pre-set by a user, for example, the second threshold value is 15.
[0147] Optionally, the third dimension combination and the first dimension combination can be merged and de-duplicated to obtain the target dimension combination.
[0148] Optionally, the third dimension combination can also be input into the first model to obtain a fourth dimension combination commonly used after being screened by the first model, and the fourth dimension combination and the first dimension combination can be merged and de-duplicated to obtain the target dimension combination.
[0149] S407. Merge and process the original list according to the target dimension combination to obtain a second list.
[0150] Exemplarily, assuming that the original list is shown in Table 5, and the target dimension combination is (month, brand, product category), the original list can be merged and processed to obtain a second list, and the second list is shown in Table 6, please refer to Table 6,
[0151] Table 6
[0152]
[0153] Optionally, after obtaining the second list, further comprising: obtaining historical query data, determining historical indicators corresponding to the historical query data and historical dimension combinations corresponding to the historical indicators, for any one historical indicator, determining a historical original list corresponding to the historical indicator, determining a target historical dimension combination in the historical dimension combinations, the target historical dimension combination being a dimension combination with a usage frequency greater than or equal to a first threshold, performing merging processing on the historical original list according to the target historical dimension combination to obtain a fourth list, and adding the fourth list to the second list, and storing the updated second list in the database.
[0154] In Figure 4 In the embodiment shown, when a task needs to be processed, a plurality of second lists can be generated first, which are obtained by filtering the original dimensions and merging the original lists. For any one preset indicator, determine the original list corresponding to the preset indicator, and determine the third dimension in the original dimensions, wherein the usage frequency of the third dimension is greater than or equal to a first threshold; input the third dimension into the first model to obtain the first dimension combination, the first model can be a large language model that has been trained, and the first dimension combination includes a plurality of third dimensions that have semantic association relationship; combine the original dimensions to obtain a plurality of second dimension combinations; determine the parameters corresponding to each second dimension combination, the parameters can be used to indicate the query efficiency improvement ratio of the second dimension combination compared with the original dimension; determine the target dimension combination according to the parameters corresponding to each second dimension combination, the plurality of second dimension combinations, and the first dimension combination; and merge the original list according to the target dimension combination to obtain the second list. In this way, the first model is used to optimize and combine the original dimensions to obtain the first dimension combination, the greedy algorithm is used to optimize and combine the original dimensions to obtain the third dimension combination, and then the first dimension combination and the third dimension combination are merged and de-duplicated to obtain the target dimension combination with the highest benefit ratio. In this way, the original list can be divided into a plurality of dimension aggregation tables with fewer rows, thereby improving the query efficiency.
[0155] Figure 5 A structural schematic diagram of a task processing device provided by an embodiment of the present application is shown in Figure 5 The task processing device 10 comprises an obtaining module 11, a processing module 12, a first determining module 13, and a second determining module 14, wherein
[0156] The obtaining module 11 is configured to obtain a first question of a user.
[0157] The processing module 12 is configured to perform semantic processing on the first question to obtain a first indicator queried by the first question and a first dimension for querying the first indicator.
[0158] The first determining module 13 is configured to determine a first list in a database according to the first index and the first dimension, the database comprising a second list corresponding to a plurality of preset indexes, the second list comprising the preset index and a second dimension, the second dimension being obtained by screening a plurality of dimensions associated with the preset index.
[0159] The second determining module 14 is configured to determine a query result of the first question according to the first question, the first dimension and the first list.
[0160] The task processing apparatus provided in the embodiments of the present application can implement the technical solutions shown in the method embodiments, and has similar principles and beneficial effects, which will not be repeated here.
[0161] Figure 6 Another task processing apparatus provided in the embodiments of the present application is shown in a structural schematic diagram. In Figure 5 the basis of the above, please refer to Figure 6 The task processing apparatus 10 further comprises a third determining module 15, wherein,
[0162] The third determining module 15 is configured to determine, for any one preset index, an original list corresponding to the preset index, the original list comprising the preset index and an original dimension.
[0163] According to the original list and the original dimension, a second list corresponding to the preset index is determined.
[0164] In a possible design, the third determining module 15 is specifically configured to,
[0165] In the original dimension, a third dimension is determined, the usage frequency of the third dimension being greater than or equal to a first threshold value;
[0166] According to the third dimension, a target dimension combination is determined.
[0167] According to the target dimension combination, the original list is processed to obtain a second list.
[0168] In a possible design, the third determining module 15 is specifically configured to,
[0169] The third dimension is input into a first model to obtain a first dimension combination, the first dimension combination comprising a plurality of third dimensions having a semantic association relationship.
[0170] According to the first dimension combination, the target dimension combination is determined.
[0171] In a possible design, the third determining module 15 is specifically configured to,
[0172] combining the original dimensions to obtain a plurality of second dimension combinations;
[0173] determining a parameter corresponding to each second dimension combination, the parameter being used to indicate a query efficiency improvement ratio of the second dimension combination compared with the original dimension;
[0174] determining the target dimension combination according to the parameter corresponding to each second dimension combination, the plurality of second dimension combinations, and the first dimension combination.
[0175] In a possible design, the third determining module 15 is specifically configured to,
[0176] determining, according to the parameter of each second dimension combination, a third dimension combination from the plurality of second dimension combinations, the parameter of the third dimension combination being greater than or equal to a second threshold value;
[0177] determining the target dimension combination according to the third dimension combination and the first dimension combination.
[0178] In a possible design, the first determining module 13 is specifically configured to,
[0179] determining, according to the first index, a third list from the second list, the preset index of the third list being the same as the first index;
[0180] determining, according to the first dimension, a first list from the third list, a second dimension of the first list being the most similar to the first dimension.
[0181] The task processing apparatus provided in the embodiments of the present application can execute the technical solutions shown in the method embodiments, and the implementation principles and beneficial effects are similar, which will not be repeated here.
[0182] Figure 7 The electronic device provided in the embodiments of the present application is shown in a structural schematic diagram. As shown in the figure, Figure 7 The electronic device 20 can include a transceiver 21, a processor 22, and a memory 23.
[0183] The processor 22 executes computer execution instructions stored in the memory, so that the processor 22 executes the schemes in the above embodiments. The processor 22 can be a general-purpose processor, including a central processing unit CPU, a network processor NP, etc.; and can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0184] The memory 23 is connected with the processor 22 through the system bus and completes communication between each other, and the memory 23 is used for storing computer program instructions.
[0185] The transceiver 21 can be used to obtain a to-be-run task and configuration information of the to-be-run task.
[0186] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus. The transceiver is used to realize communication between the database access device and other computers (such as a client, a read-write library and a read-only library). The memory can include random access memory (RAM), and can also include non-volatile memory.
[0187] The electronic device provided by the embodiment of the application can be the terminal device of the above-mentioned embodiment.
[0188] The embodiment of the application further provides a chip for running instructions, which is used for executing the technical solution of the task processing method in the above-mentioned embodiment.
[0189] The embodiment of the application further provides a computer readable storage medium, which stores computer instructions, and when the computer instructions run on a computer, the computer executes the technical solution of the task processing method in the above-mentioned embodiment.
[0190] The embodiment of the application further provides a computer program product, which includes a computer program stored in a computer readable storage medium, at least one processor can read the computer program from the computer readable storage medium, and when the at least one processor executes the computer program, the technical solution of the task processing method in the above-mentioned embodiment can be realized.
[0191] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the embodiments of the device described above are merely schematic. For example, the division of the modules is merely logical function division. There can be another division manner for the actual implementation. For example, a plurality of modules or a function can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.
[0192] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to implement the embodiments of the present application.
[0193] In addition, each function module in each embodiment of the present application can be integrated in one processing unit, or each module can be physically present separately, or two or more modules can be integrated in one unit. The unit formed by the above modules can be realized in the form of hardware, or in the form of hardware plus software function unit.
[0194] The integrated module realized in the form of software function module can be stored in a computer readable storage medium. The software function module stored in the storage medium includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute part of the steps of the method of each embodiment of the present application.
[0195] It should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor and the like. The steps of the method disclosed in the present application can be directly embodied as a hardware processor to execute, or be executed by a combination of hardware and software modules in the processor.
[0196] The memory can include a high-speed RAM memory, and can also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0197] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.
[0198] The storage medium described above can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk, or an optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0199] An exemplary storage medium is coupled to the processor so that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be part of the processor. The processor and the storage medium can be located in an application specific integrated circuits (ASIC). Of course, the processor and the storage medium can exist as discrete components in an electronic control unit or a host device.
[0200] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by relevant hardware instructed by programs. The foregoing programs can be stored in a computer readable storage medium. When the programs are executed, the steps of the above-mentioned method embodiments are executed; and the foregoing storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disks, or optical disks.
[0201] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A task processing method, characterized in that, include: The first question in acquiring users; Perform semantic processing on the first question to obtain the first index for querying the first question and the first dimension for querying the first index. Based on the first indicator and the first dimension, a first list is determined in the database. The database includes a second list corresponding to multiple preset indicators. The second list includes the preset indicators and a second dimension. The second dimension is obtained by filtering multiple dimensions associated with the preset indicators. Based on the first question, the first dimension, and the first list, determine the query results for the first question.
2. The method according to claim 1, characterized in that, Before determining the first list in the database, the process also includes: For any preset indicator, determine the original list corresponding to the preset indicator, wherein the original list includes the preset indicator and the original dimension; Based on the original list and the original dimension, determine the second list corresponding to the preset index.
3. The method according to claim 2, characterized in that, Based on the original list and the original dimension, a second list corresponding to the preset indicator is determined, including: In the original dimensions, a third dimension is determined, wherein the frequency of use of the third dimension is greater than or equal to the first threshold. Based on the third dimension, determine the target dimension combination; Based on the target dimension combination, the original list is merged to obtain a second list.
4. The method according to claim 3, characterized in that, Based on the third dimension, the target dimension combination is determined, including: The third dimension is input into the first model to obtain a first dimension combination, which includes multiple third dimensions that have semantic relationships. The target dimension combination is determined based on the first dimension combination.
5. The method according to claim 4, characterized in that, Determining the target dimension combination based on the first dimension combination includes: The original dimensions are combined to obtain multiple combinations of second dimensions; Determine the parameters corresponding to each combination of second dimensions, wherein the parameters are used to indicate the query efficiency improvement ratio of the combination of second dimensions compared to the original dimensions; The target dimension combination is determined based on the parameters corresponding to each second dimension combination, the plurality of second dimension combinations, and the first dimension combination.
6. The method according to claim 5, characterized in that, The target dimension combination is determined based on the parameters corresponding to each of the second dimension combinations, the plurality of second dimension combinations, and the first dimension combination, including: Based on the parameters of each second dimension combination, a third dimension combination is determined among the plurality of second dimension combinations, wherein the parameters of the third dimension combination are greater than or equal to a second threshold. The target dimension combination is determined based on the third dimension combination and the first dimension combination.
7. The method according to any one of claims 1-6, characterized in that, Based on the first indicator and the first dimension, a first list is determined in the database, including: Based on the first indicator, a third list is determined from the second list, wherein the preset indicator of the third list is the same as the first indicator; Based on the first dimension, a first list is determined in the third list, wherein the second dimension of the first list has the greatest similarity to the first dimension.
8. A task processing device, characterized in that, include: The module comprises an acquisition module, a processing module, a first determination module, and a second determination module, wherein, The acquisition module is used to acquire the user's first question; The processing module is used to perform semantic processing on the first question to obtain a first index for querying the first question and a first dimension for querying the first index. The first determining module is used to determine a first list in a database based on the first indicator and the first dimension. The database includes a second list corresponding to multiple preset indicators. The second list includes the preset indicators and a second dimension. The second dimension is obtained by filtering multiple dimensions associated with the preset indicators. The second determining module is used to determine the query result of the first question based on the first question, the first dimension, and the first list.
9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.