Task processing method and apparatus, and medium and electronic device
By creating target adjustment tasks for each historical date in the data warehouse and executing them in parallel, the problem of data errors and circular dependencies caused by changes in data associated object identifiers in the data warehouse is solved, and the processing efficiency of multi-day data adjustment tasks is improved.
Patent Information
- Application Number
- PCT/CN2024/079538
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-01
- Filing Date
- 2024-03-01
- Publication Date
- 2024-09-06
AI Technical Summary
In the existing technology, data errors occur in the data warehouse due to changes in the identification of data-related objects, and there are cyclic dependencies in the appeal form reconciliation operations for multiple consecutive days, resulting in low processing efficiency.
By creating adjustment tasks within a preset period, creating target adjustment tasks for each historical date, and executing all target adjustment tasks in parallel, the cyclic dependency problem is solved and processing efficiency is improved.
It realizes efficient processing of multi-day data adjustment tasks in the data warehouse, avoids circular dependencies, and improves processing efficiency.
Smart Images

Figure CN2024079538_06092024_PF_FP
Abstract
Description
Task processing method, device, medium and electronic equipment
[0001] This application claims priority to Chinese Patent Application No. 202310201730.7 filed on March 1, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] The present disclosure relates to a task processing method, device, medium and electronic device. Background Art
[0003] Data warehouses are usually used to store data to facilitate subsequent statistical analysis of the stored data. However, due to certain special circumstances, the stored data may be incorrect, so it is necessary to perform an adjustment operation on the erroneous data. The adjustment operation can be understood as an operation to modify the data.
[0004] Typically, adjustments are performed on relevant data based on complaint forms submitted by users. The adjustment for the complaint form submitted the following day depends on the adjustment results for the complaint form submitted the previous day. This results in low processing efficiency due to circular dependencies when batches of complaint forms generated over multiple consecutive days need to be processed.
[0005] Summary of the Invention
[0006] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] In a first aspect, the present disclosure provides a task processing method, comprising:
[0008] Obtaining adjustment tasks created within a preset period, wherein each adjustment task is used to instruct to perform a first specified operation on data in a first target data source that meets a filtering condition, the filtering condition including a specified historical date set, the specified historical date set including at least one historical date;
[0009] For each of the adjustment tasks, creating a target adjustment task for each historical date in the specified historical date set in the screening condition corresponding to the adjustment task according to the adjustment task, wherein the target adjustment task for each of the historical dates is used to instruct to perform the first specified operation on the data belonging to the historical date in the first target data source;
[0010] Execute the target adjustment tasks corresponding to all the historical dates in parallel.
[0011] In a second aspect, the present disclosure provides a task processing device, comprising:
[0012] an acquisition module, configured to acquire adjustment tasks created within a preset period, wherein each adjustment task is configured to instruct a first specified operation to be performed on data in a first target data source that meets a screening condition, wherein the screening condition includes a specified historical date set, and the specified historical date set includes at least one historical date;
[0013] a first creation module configured to create, for each of the adjustment tasks, a target adjustment task for each historical date in a set of specified historical dates in a screening condition corresponding to the adjustment task, wherein the target adjustment task for each historical date is configured to instruct to perform the first specified operation on the data belonging to the historical date in the first target data source;
[0014] The task execution module is used to execute the target adjustment tasks corresponding to all the historical dates in parallel.
[0015] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processing device.
[0016] In a fourth aspect, the present disclosure provides an electronic device, comprising:
[0017] a storage device having a computer program stored thereon;
[0018] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.
[0019] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:
[0021] FIG1 is an architecture diagram of an electronic device according to at least one embodiment of the present disclosure;
[0022] FIG2 is a flowchart illustrating a task processing method according to at least one embodiment of the present disclosure;
[0023] FIG3 is a schematic diagram illustrating a created adjustment task according to at least one embodiment of the present disclosure;
[0024] FIG4 is a schematic diagram illustrating a method for creating a target adjustment task according to at least one embodiment of the present disclosure;
[0025] FIG5 is a block diagram of a task processing device according to at least one embodiment of the present disclosure; and
[0026] FIG6 is a schematic structural diagram of an electronic device according to at least one embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0029] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0030] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0031] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0032] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0033] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0034] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested 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 electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0035] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0036] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0037] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0038] For example, when storing data between two related objects in a data warehouse, the identifier representing one of the related objects may change. Failure to promptly attach the new identifier to the other object can lead to data errors. Typically, data is reconciled based on user-submitted complaint forms. The reconciliation process for the next day's complaint form depends on the results of the previous day's complaint form. This leads to inefficient processing due to circular dependencies when batching complaint forms generated over multiple consecutive days.
[0039] In view of this, embodiments of the present disclosure provide a task processing method, apparatus, medium, and electronic device to improve task processing efficiency.
[0040] The present disclosure is explained below with reference to the accompanying drawings.
[0041] Figure 1 is an architecture diagram of an electronic device according to at least one embodiment of the present disclosure. Referring to Figure 1, the electronic device includes an access layer, a compilation layer, a scheduling layer, a computing layer, a storage layer, and a configuration platform. The access layer reads the adjustment information and creates an adjustment task corresponding to the adjustment information according to the adjustment information; the compilation layer compiles the adjustment task to obtain a target adjustment task that is oriented to the data source operation and is only for each historical date; the scheduling layer is used to schedule the target adjustment task for each historical date according to certain rules; the computing layer is used to execute the target adjustment tasks corresponding to all historical dates in parallel and perform specified operations on the corresponding data; the storage layer includes the storage dependency MySQL of the configuration platform, the storage dependency MySQL of the adjustment task, and is used to maintain Hive and ClickHouse. Hive and ClickHouse can be understood as the storage location of data in the data source respectively; the configuration platform is used to provide business configuration, data source configuration and adjustment configuration. Business configuration may include business line configuration, data source configuration may include data table configuration, dimension configuration and indicator configuration, and adjustment configuration may include adjustment type configuration, adjustment task template instance configuration and priority configuration. FIG2 is a flowchart illustrating a task processing method according to at least one embodiment of the present disclosure. The task processing method is applied in an electronic device. Referring to FIG2 , the task processing method includes the following steps:
[0042] Step 201: Acquire adjustment tasks created within a preset period, wherein each adjustment task is used to instruct a first specified operation to be performed on data in a first target data source that meets a screening condition, the screening condition including a specified historical date set, and the specified historical date set including at least one historical date.
[0043] The preset period includes at least two days. For example, the preset period can be two days or five days, which is not limited in this embodiment.
[0044] Different adjustment tasks uniquely correspond to one first target data source and one first specified operation. The adjustment tasks uniquely correspond to one first target data source and one first specified operation, which can reduce the difficulty of understanding the architecture of the entire electronic device, that is, reduce the difficulty of development.
[0045] It is worth noting that the first specified operation of the adjustment task is related to the target adjustment type of the adjustment task, and one target adjustment type uniquely corresponds to one first specified operation. For example, the first specified operation can be an insert data operation, a modify dimension operation, a split data operation, a dimension attachment operation, or an expansion new type operation. For example, the modify dimension operation can further include a modify dimension value operation, an add dimension operation, a delete dimension operation, and so on. In addition, for explanations of the target adjustment type, please refer to the following related embodiments, which will not be elaborated in this embodiment.
[0046] The filtering condition is used to select data on which the first specified operation is to be performed. For example, when the filtering condition includes a specified historical date set, the data on which the first specified operation is to be performed is data corresponding to a historical date in the specified historical date set. Furthermore, the filtering condition may also include a target field, and the data on which the first specified operation is to be performed is data corresponding to a historical date in the specified historical date set and corresponding to the target field.
[0047] Referring to Figure 3, date 1, date 2, and date 3 each create adjustment tasks. Date 1 creates adjustment tasks 1, 2, and 3; date 2 creates adjustment tasks 4, 5, and 6; and date 3 creates adjustment tasks 7, 8, and 9. Taking adjustment task 1 as an example, it represents the execution of a first specified operation on data belonging to historical date 1 in the first target data source. Taking adjustment task 9 as another example, it represents the execution of the first specified operation on data belonging to historical dates 1, 2, and 3 in the first target data source.
[0048] For example, the troubleshooting task can be represented by a DSL (Data Structure Language), and the target troubleshooting task can also be described by a DSL, so that the computing layer only focuses on the data model described by the DSL when executing the target troubleshooting task, without having to pay attention to the business logic corresponding to the target troubleshooting task.
[0049] Step 202: For each adjustment task, a target adjustment task is created for each historical date in the specified historical date set in the filtering conditions corresponding to the adjustment task. The target adjustment task for each historical date is used to instruct to perform a first specified operation on the data belonging to the historical date in the first target data source.
[0050] It is worth noting that, for each adjustment task, data leveling can be performed on the adjustment task according to the adjustment task, thereby creating a target adjustment task corresponding to each historical date in the specified historical date set.
[0051] Continuing with the example shown in FIG3 above, referring to FIG4 , data leveling operations are performed on the adjustment tasks created for Date 1, Date 2, and Date 3, respectively, thereby obtaining the target adjustment task corresponding to Historical Date 1, the target adjustment task corresponding to Historical Date 2, and the target adjustment task corresponding to Historical Date 3, respectively. That is, the target adjustment task corresponding to Historical Date 1 includes Adjustment Task 1, Adjustment Task 2, Adjustment Task 3, the first sub-adjustment task 5, the first sub-adjustment task 6, and the first sub-adjustment task 9; the target adjustment task corresponding to Historical Date 2 includes Adjustment Task 4, the second sub-adjustment task 5, the second sub-adjustment task 6, the first sub-adjustment task 8, and the second sub-adjustment task 9; and the target adjustment task corresponding to Historical Date 3 includes Adjustment Task 7, the second sub-adjustment task 8, and the third sub-adjustment task 9. The first sub-task 5 and the second sub-task 5 are obtained by leveling the data of the first target data source. The first sub-task 5 is used to instruct the first specified operation to be performed on the data of the first target data source on historical date 1, and the second sub-task 5 is used to instruct the first specified operation to be performed on the data of the first target data source on historical date 2. Similarly, the other sub-tasks are similar and are all obtained by leveling the corresponding target data source. For related explanations, please refer to the explanation of leveling the data of the target data source 5.
[0052] Step 203: Execute the target adjustment tasks corresponding to all historical dates in parallel.
[0053] Following the example shown in FIG4 , the target adjustment task corresponding to historical date 1 , the target adjustment task corresponding to historical date 2 , and the target adjustment task corresponding to historical date 3 are executed in parallel.
[0054] It's worth noting that for adjustment tasks created on different dates, there may be overlaps in the erroneous data that needs to be adjusted for these tasks. This means that there may be overlaps in the historical dates in the specified historical date sets for different adjustment tasks. For example, the historical dates and first specified operations specified in the filter criteria for the adjustment tasks created on the first day and the second day may be partially or completely identical. Therefore, in some cases, the adjustment task created on the first day needs to be processed first, followed by the adjustment task created on the second day. This means that the processing of the task on the second day depends on the processing results of the task on the previous day. This circular dependency becomes more severe when the preset period is long, resulting in low processing efficiency.
[0055] Through the above method, for each batch adjustment task created within the preset period, a target adjustment task corresponding to each historical date in the specified historical date set of the adjustment task is created, that is, the first specified operation involved in the adjustment task of the specified historical date set is applied to the data corresponding to each historical date in the specified historical date set. Since the data of each historical date are independent of each other, the target adjustment tasks corresponding to all historical dates can be executed in parallel, which solves the problem of circular dependency caused by the need to rely on the processing results of the adjustment task of the previous day to process the adjustment task of the next day, thereby improving the processing efficiency of the adjustment task.
[0056] In some embodiments, the method further includes: in response to obtaining the survey information, creating a survey task corresponding to the survey information based on the survey information, wherein the survey information includes a survey scenario, a filtering condition, and a target survey type, the survey scenario is used to determine the first target data source, the filtering condition is used to determine the data in the first target data source belonging to a historical date in a specified historical date set, and the target survey type is used to determine the first specified operation.
[0057] For example, the adjustment information can be determined based on user operations. For example, the electronic device can allow the user to select an adjustment scenario and a target adjustment type through a visual interface. Furthermore, based on the user-selected adjustment scenario and target adjustment type, the electronic device provides the user with a form corresponding to the adjustment scenario and target adjustment type. The form allows the user to configure filter conditions to obtain the corresponding adjustment information.
[0058] For example, when the first specified operation corresponding to the target adjustment type of a target adjustment task is a dimension modification operation, the filter criteria may also include the target field to be modified, and the adjustment information may also include the target data corresponding to the target field to be modified, which can be obtained from the form. Correspondingly, a target adjustment task for a historical date instructs that the data corresponding to the target field in the first target data source, belonging to the historical date, be modified to the target data.
[0059] It is worth noting that the same form can provide different filter condition configurations, so that a survey task can be generated based on a piece of data in the form, the survey scenario, and the target survey type.
[0060] For example, see Table 1 below:
[0061] Table 1
[0062] In Table 1 above, Table 1 illustrates a form for a target adjustment type corresponding to a dimension modification operation and an adjustment scenario of adjusting a second object identifier associated with a first object identifier. Based on the adjustment scenario, it can be determined that the first target data source can be a dimension table that maintains an association relationship between the first object identifier and the second object identifier; the first object identifier, the start date, and the end date can be filtering conditions, and the start date and the end date are used to determine a specified historical date set; the second object identifier is the target field; 201 and 202 are target data corresponding to the target field.
[0063] In Table 1, two pieces of data are involved, so two adjustment tasks can be generated. One adjustment task is used to instruct to modify the value corresponding to the second object identification field in the first target data source that is associated with the first object identification 101 and has a historical date between May 1 and May 31 to 201. The other adjustment task is used to instruct to modify the value corresponding to the second object identification field in the first target data source that is associated with the first object identification 102 and has a historical date between May 1 and May 31 to 202.
[0064] For example, see Table 2 below:
[0065] Table 2
[0066] In Table 2 above, Table 2 illustrates a form for a target survey type corresponding to an insert data operation and a survey scenario of adjusting the attributes of a first object identifier. Based on this survey scenario, it can be determined that the first target data source can be a dimension table that maintains the attributes of the first object identifier; the first object identifier, the start date, and the end date can be filtering conditions, and the start date and the end date are used to determine a specified historical date set; attribute A is the field to be inserted; 11 and 12 are the target data corresponding to the inserted field.
[0067] In Table 2, two pieces of data are involved, so two adjustment tasks can be generated. One adjustment task is used to instruct the insertion of attribute A and target data 11 corresponding to attribute A into the data associated with the first object identifier 101 and the historical date from 5.1 to 5.4 in the first target data source. The other adjustment task is used to instruct the insertion of attribute A and target data 12 corresponding to attribute A into the data associated with the first object identifier 102 and the historical date from 5.1 to 5.4 in the first target data source.
[0068] Through the above method, the adjustment information selected by the user is received, thereby creating a corresponding adjustment task to achieve the change of the data in the data source.
[0069] In some embodiments, the above-mentioned response to obtaining the adjustment information and the step of creating an adjustment task corresponding to the adjustment information based on the adjustment information can be implemented in the following manner: in response to obtaining the adjustment information, determining the target adjustment task template instance corresponding to the target adjustment type; creating an adjustment task corresponding to the adjustment information based on the adjustment scenario, screening conditions and the target adjustment task template instance.
[0070] It's worth noting that the target adjustment type can be any of the following: insert data type, modify dimension type, split data type, attach dimension type, or extend new type. Each target adjustment type uniquely corresponds to a first specified operation. It's worth noting that the target adjustment type in this example corresponds one-to-one to the first specified operation in the above example.
[0071] For example, a target survey task template instance can be understood as a code file described using a DSL. Each target survey type corresponds to a target survey task template instance, that is, a code file described using a DSL. This code file can include information such as the data source and updated fields required by different target survey types.
[0072] For example, the corresponding fields in the target troubleshooting task template instance may be instantiated based on the troubleshooting scenario and the screening conditions to obtain the troubleshooting task.
[0073] For example, the target adjustment task template instance includes the following fields:
[0074] Filter:[
[0075] {
[0076] fieldName:advertiser_id,
[0077] operator:in,
[0078] target:, / / Get from the survey information
[0079] }
[0080] ]
[0081] For the target field, following the example in Table 1, the target adjustment task template instance in the example is instantiated based on the information obtained from Table 1 to obtain:
[0082] Filter:[
[0083] {
[0084] fieldName:advertiser_id,
[0085] operator:in,
[0086] target:101, / / Get from the survey information
[0087] }
[0088] ]
[0089] The above-mentioned step of obtaining the adjustment information in response and determining the target adjustment task template instance corresponding to the target adjustment type can be implemented in the following way: in response to obtaining the adjustment information, obtaining the association relationship between the preset adjustment type and the adjustment task template instance; based on the association relationship, determining the target adjustment task template instance corresponding to the target adjustment type.
[0090] It is worth noting that the preset adjustment types may include inserting data types, modifying dimension types, splitting data types, attaching dimension types, and extending new types, etc.
[0091] Through this approach, we pre-set task template instances corresponding to different adjustment types. Based on the target adjustment type in the user's adjustment information, we retrieve the corresponding target adjustment task template instance. Then, based on the adjustment information, we instantiate the target adjustment task template instance to obtain the corresponding adjustment task. Furthermore, when adding a new adjustment type, we can directly configure the corresponding adjustment task template instance through the configuration platform, reducing development complexity.
[0092] In some embodiments, the method may further include: after executing the target adjustment task corresponding to the historical date, generating and executing a derivative task associated with the target adjustment task.
[0093] It's worth noting that after executing certain target adjustment tasks, some of their related data may also need to be modified. For example, when modifying a detailed address, because the detailed address includes multiple address units of different levels, the detailed address is composed of address units of different levels. However, the user only submits modifications to the lower-level address units, while higher-level address units may also need to be modified. Therefore, if the task of modifying the lower-level address units is used as the target adjustment task, the task of modifying the higher-level address units can be used as a derivative task of the target adjustment task.
[0094] For example, a derivative task can also be described using a DSL. The derivative task instructs to perform a second specified operation on data in a second target data source, where the data represents the data to be modified. The second target data source, the data, and the second specified operation can be determined by the target adjustment task. The explanation of the second target data source, the data, and the second specified operation can be referenced above with respect to the first target data source, the first specified operation, etc., and is not further elaborated in this embodiment.
[0095] In the above manner, by generating and executing a derivative task associated with the target difference adjustment task, automatic modification of data related to the target difference adjustment task is achieved.
[0096] In some embodiments, the target adjustment task corresponding to each historical date is executed in the following manner: the target adjustment tasks corresponding to the historical date are sorted according to a priority rule to obtain a sorting result; and the target adjustment tasks in the sorting result are processed in sequence.
[0097] It is worth noting that for the same historical date, there may be multiple corresponding target adjustment tasks, different target adjustment tasks may target the same data, and there may be conflicts between target adjustment tasks of the same target adjustment type. In these cases, if the execution order of the target adjustment tasks is different, the final results will be different. Therefore, the priority of task execution can be configured to obtain the expected results.
[0098] In some embodiments, the electronic device may generate a priority rule in response to the first configuration operation, where the priority rule is used to indicate a priority order between different attributes.
[0099] For example, the electronic device may provide a visual configuration interface for the user to configure the priority rules.
[0100] It's worth noting that attributes are related to the target investigation task. For example, attributes can include the investigation type, the time the investigation report was created, the date the investigation report was created, the time the investigation report was submitted, the date the investigation report was submitted, the time the investigation report was approved, the date the investigation report was approved, the time the investigation report was approved, and the date the investigation report was approved.
[0101] It's worth noting that the "Create Survey Information" time and date describe the time and date when the user edited the survey information, including the survey scenario, target survey type, and form, using the visual interface. The "Submit Survey Information" time and date describe the time and date when the user submitted the edited survey information. The "Approval Survey Information" time and date describe the time and date when the approver approved the submitted survey information. The "Approved Survey Information" time and date describe the time and date when the approver approved the submitted survey information. After submission, the edited survey information will proceed to the approval stage for review. Once approved, the survey task creation can begin. Continuing with the above example, let's assume that the survey type includes both insert and split data types. The priority order of the attributes in the priority rule can be insert data type and split data type, respectively. Therefore, according to this priority rule, the target survey task for the insert data type can be prioritized over the target survey task for the split data type, giving priority to the target survey task for the insert data type.
[0102] Through the above method, priority rules can be configured to flexibly support the priority requirements of different businesses and obtain different processing results.
[0103] In some embodiments, the first target data source includes data from multiple business lines, and the method may further include: generating data access management rules for the business lines in response to a second configuration operation for the business lines; wherein the second configuration operation is used to indicate whether specified operations are allowed on the data of the business lines when executing the target adjustment task, and if the second configuration operation indicates that specified operations are not allowed on the data of the business lines, the data of the business lines are not accessed and specified operations are not performed during the execution of the target adjustment task, and the specified operations include the first specified operations.
[0104] It is worth noting that some business line data do not require data adjustment, so you can configure whether to perform specified operations on the business line data.
[0105] In this way, in the process of executing the target adjustment task, based on the data access management rules of the business line, it can be determined whether the electronic device can access and specify operations on the data of the business line, thereby realizing support for the configuration of whether the data of different business lines are allowed to be adjusted; in addition, when access and specified operations are not supported, the resource consumption caused by data access can be reduced.
[0106] In some embodiments, the electronic device may also support configuration for data sources, including data table configuration, dimension configuration, indicator configuration, etc. The configuration here may refer to related technologies, and will not be described in detail in this embodiment.
[0107] FIG5 is a block diagram of a task processing device according to at least one embodiment of the present disclosure. Referring to FIG5 , the device 500 includes:
[0108] An acquisition module 501 is configured to acquire adjustment tasks created within a preset period, wherein each adjustment task is configured to instruct a first specified operation to be performed on data in a first target data source that meets a screening condition, wherein the screening condition includes a specified historical date set, and the specified historical date set includes at least one historical date;
[0109] A first creation module 502 is configured to create, for each of the adjustment tasks, a target adjustment task for each historical date in a set of specified historical dates in a screening condition corresponding to the adjustment task, wherein the target adjustment task for each historical date is used to instruct to perform the first specified operation on the data belonging to the historical date in the first target data source; and
[0110] The task execution module 503 is used to execute the target adjustment tasks corresponding to all the historical dates in parallel.
[0111] In some embodiments, the apparatus 500 further includes:
[0112] The first response module is used to respond to the acquisition of the survey information and create a survey task corresponding to the survey information based on the survey information, wherein the survey information includes a survey scenario, a filtering condition, and a target survey type. The survey scenario is used to determine the first target data source, the filtering condition is used to determine the data in the first target data source that belongs to a historical date in a specified historical date set, and the target survey type is used to determine the first specified operation.
[0113] In some embodiments, the first response module includes:
[0114] A first response submodule is configured to respond to the acquisition of the adjustment information and determine a target adjustment task template instance corresponding to the target adjustment type; and
[0115] The first creation submodule is configured to create a troubleshooting task corresponding to the troubleshooting information according to the troubleshooting scenario, the screening condition, and the target troubleshooting task template instance.
[0116] In some embodiments, the adjustment task uniquely corresponds to one first target data source.
[0117] In some embodiments, the first response submodule is specifically used to respond to the acquisition of the adjustment information, obtain the association relationship between the preset adjustment type and the adjustment task template instance; and determine the target adjustment task template instance corresponding to the target adjustment type based on the association relationship.
[0118] In some embodiments, the apparatus 500 further includes:
[0119] The generating module is configured to generate and execute a derivative task associated with the target adjustment task after executing the target adjustment task corresponding to the historical date.
[0120] In some embodiments, the target adjustment task corresponding to each historical date is performed in the following manner:
[0121] Sorting the target adjustment tasks corresponding to the historical dates according to a priority rule to obtain a sorting result;
[0122] The target adjustment tasks in the sorting results are processed in sequence.
[0123] In some embodiments, the apparatus 500 further includes:
[0124] The second response module is configured to generate a priority rule in response to the first configuration operation, wherein the priority rule is used to indicate a priority order between different attributes.
[0125] In some embodiments, the first target data source includes data of multiple business lines, and the apparatus 500 further includes:
[0126] a third response module, configured to generate a data access management rule for the business line in response to a second configuration operation for the business line;
[0127] Among them, the second configuration operation is used to indicate whether specified operations are allowed on the data of the business line when executing the target adjustment task, and when the second configuration operation indicates that specified operations are not allowed on the data of the business line, the data of the business line will not be accessed and specified operations will not be performed during the execution of the target adjustment task, and the specified operations include the first specified operation.
[0128] The specific implementation of each module in the above device can refer to the above related embodiments, and this embodiment will not be described in detail here.
[0129] Reference is now made to FIG6 , which illustrates a schematic diagram of the structure of an electronic device 600 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG6 is merely an example and should not limit the functionality or scope of use of embodiments of the present disclosure.
[0130] As shown in Figure 6, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0131] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 6 shows the electronic device 600 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0132] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0133] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0134] In some embodiments, the electronic devices can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0135] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0136] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device is caused to: obtain adjustment tasks created within a preset period, wherein each adjustment task is used to indicate a first specified operation to be performed on data in a first target data source that meets a filtering condition, wherein the filtering condition includes a specified historical date set, and the specified historical date set includes at least one historical date; for each adjustment task, create a target adjustment task for each historical date in the specified historical date set in the filtering condition corresponding to the adjustment task according to the adjustment task, wherein the target adjustment task for each historical date is used to indicate the first specified operation to be performed on data in the first target data source belonging to the historical date; and execute the target adjustment tasks corresponding to all the historical dates in parallel.
[0137] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0138] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] The modules involved in the embodiments described in this disclosure may be implemented in software or hardware. The name of a module does not necessarily limit the module itself.
[0140] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0141] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0142] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the present disclosure.
[0143] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0144] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. A task processing method, comprising: Acquire adjustment tasks created within a preset period, wherein each adjustment task is used to instruct to perform a first specified operation on data in a first target data source that meets a screening condition, wherein the screening condition includes a specified historical date set, and the specified historical date set includes at least one historical date; For each of the adjustment tasks, creating a target adjustment task for each historical date in a specified historical date set in a screening condition corresponding to the adjustment task according to the adjustment task, wherein the target adjustment task for each of the historical dates is used to instruct to perform the first specified operation on the data belonging to the historical date in the first target data source; and The target adjustment tasks corresponding to all the historical dates are executed in parallel.
2. The method according to claim 1, further comprising: In response to obtaining the survey information, a survey task corresponding to the survey information is created according to the survey information, wherein the survey information includes a survey scenario, a filtering condition and a target survey type, the survey scenario is used to determine the first target data source, the filtering condition is used to determine the data in the first target data source that belongs to the historical date in the specified historical date set, and the target survey type is used to determine the first specified operation.
3. The method according to claim 2, wherein: In response to acquiring the adjustment information, creating an adjustment task corresponding to the adjustment information according to the adjustment information includes: In response to acquiring the adjustment information, determining a target adjustment task template instance corresponding to the target adjustment type; and A troubleshooting task corresponding to the troubleshooting information is created according to the troubleshooting scenario, the screening condition, and the target troubleshooting task template instance.
4. The method according to claim 2, wherein: The adjustment task uniquely corresponds to one first target data source.
5. The method according to claim 3, wherein: In response to acquiring the adjustment information, determining a target adjustment task template instance corresponding to the target adjustment type includes: In response to obtaining the adjustment information, obtaining an association relationship between a preset adjustment type and an adjustment task template instance; and According to the association relationship, a target adjustment task template instance corresponding to the target adjustment type is determined.
6. The method according to claim 1, further comprising: After executing the target adjustment task corresponding to the historical date, a derivative task associated with the target adjustment task is generated and executed.
7. The method according to claim 1, wherein: Execute the target adjustment task corresponding to each of the historical dates, including: Sorting the target adjustment tasks corresponding to the historical dates according to the priority rule to obtain a sorting result; and The target adjustment tasks in the sorting results are processed in sequence.
8. The method according to claim 7, further comprising: In response to the first configuration operation, the priority rule is generated, wherein the priority rule is used to indicate a priority order between different attributes.
9. The method according to claim 1, wherein: The first target data source includes data of multiple business lines, and the method further includes: In response to a second configuration operation for the business line, generating a data access management rule for the business line; The second configuration operation is used to indicate whether specified operations are allowed on the data of the business line when executing the target adjustment task, and when the second configuration operation indicates that the specified operations are not allowed on the data of the business line, the data of the business line will not be accessed and the specified operations will not be performed during the execution of the target adjustment task, and the specified operations include the first specified operations.
10. A task processing device, comprising: an acquisition module, configured to acquire adjustment tasks created within a preset period, wherein each adjustment task is used to instruct to perform a first specified operation on data in a first target data source that meets a screening condition, wherein the screening condition includes a specified historical date set, and the specified historical date set includes at least one historical date; a first creation module configured to create, for each of the adjustment tasks, a target adjustment task for each historical date in a specified historical date set in a screening condition corresponding to the adjustment task, wherein the target adjustment task for each of the historical dates is used to instruct to perform the first specified operation on the data belonging to the historical date in the first target data source; and The task execution module is configured to execute the target adjustment tasks corresponding to all the historical dates in parallel.
11. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processing device, the task processing method according to any one of claims 1 to 9 is implemented.
12. An electronic device, wherein: include: a storage device having a computer program stored thereon; as well as A processing device is configured to execute the computer program in the storage device to implement the task processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Database synchronization method and device
CN104809200A
Parallel processing method of DDL tasks, computing node and electronic equipment
CN115687378A
Task processing method and device, medium and electronic equipment
CN116149825A
Reducing the Response Time of Flexible Highly Data Parallel Tasks
US20120110047A1
System and method for optimizing data recovery in a parallel database
US8296271B1
