Task storage method and device, electronic equipment and computer readable medium

By associating and sorting streaming data task groups, the problem of data disorder in streaming computing is solved, achieving ordered storage and efficient computing.

CN114443328BActive Publication Date: 2026-01-20BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210109295.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-28
Publication Date
2026-01-20
Estimated Expiration
2042-01-28

AI Technical Summary

Technical Problem

In big data streaming computing, existing technologies suffer from insufficient resources when inserting/storing multiple streaming data into a message queue, leading to data disorder, reduced computing efficiency, and inconsistent storage results.

Method used

By associating task groups in the processing stream data, classifying and sorting them using the primary identifier and primary offset, generating target task groups, and storing them in the task queue, the data order is ensured.

Benefits of technology

It improves the computation efficiency of streaming data, filters out-of-order data, ensures that streaming data is stored in the message queue in an orderly manner, and reduces subsequent processing latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114443328B_ABST
    Figure CN114443328B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a task storage method, device, electronic equipment and computer readable medium. A specific implementation of the method comprises: performing association processing on each first target task in a first target task group and a corresponding second target task in a second target task group to obtain a set of associated target task groups; performing classification and sorting on the set of associated target task groups according to the main identifier and the main offset included in the associated target task in the set of associated target task groups to obtain a sequence group of associated target tasks; determining the first associated target task in each associated target task sequence in the sequence group of associated target tasks as a target task to obtain a target task group; and generating a target associated task group according to the target task group and the first target task group. The implementation filters out out-of-order data in the data stream, ensuring that the stream data can be stored in order in the message queue.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of computer, and particularly to a task storage method and device, electronic equipment and computer readable medium. BACKGROUND

[0002] In the field of big data stream computing, when multiple stream data are inserted / stored into a message queue, there is often a problem of insufficient resources such as cluster node network, CPU, and memory, which causes the order of data arriving on the message queue to change, and the consumer consumes out-of-order data, resulting in inconsistency with the expected result. At present, in order to solve the out-of-order problem of multiple stream data in the message queue, the commonly used solution is to open a time window to cache all data entering the window during the process of inserting / storing multiple stream data into the message queue, and then sort the data in the time window.

[0003] However, when the above sorting method is used, the following technical problems often exist: opening a time window during the process of inserting / storing multiple stream data into the message queue will reduce the timeliness of stream data calculation; in addition, when two out-of-order data are not divided into the same time window, the result of storing into the message queue will be out of order. SUMMARY

[0004] This part of the disclosure is used to introduce the concept in a brief form, which will be described in detail in the specific implementation part. This part of the disclosure is not intended to identify the key features or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0005] Some embodiments of the present disclosure provide a task storage method, device, electronic equipment and computer readable medium to solve one or more of the technical problems mentioned in the background section.

[0006] In a first aspect, some embodiments of the present disclosure provide a task storage method, which comprises: according to the from identifier included in the first target task in the first target task group, associating each first target task in the first target task group with the corresponding second target task in the second target task group to obtain a set of associated target task groups; according to the main identifier and the main offset included in the associated target task in the set of associated target task groups, sorting the set of associated target task groups to obtain a sequence group of associated target tasks; determining the first associated target task in each associated target task sequence in the sequence group of associated target tasks as a target task to obtain a target task group; generating a target associated task group according to the target task group and the first target task group; and storing the target associated task group into a preset task queue.

[0007] Optionally, before the associating each first target task in the first target task group with a corresponding second target task in the second target task group according to the slave identifier included in the first target task, the method further comprises: obtaining a first task set and a second task set; classifying the first tasks included in the first task set according to the master identifier included in the first task, to obtain a first task group set; generating the first target task group according to the first task group set; classifying the second tasks included in the second task set according to the slave identifier included in the second task, to obtain a second task group set; and generating the second target task group according to the second task group set.

[0008] Optionally, the generating the first target task group according to the first task group set comprises: for each first task group in the first task group set, performing the following processing steps: storing the first tasks in the first task group into a first storage node in sequence according to the acquisition time corresponding to the first task in the first task group, to obtain a first task sequence, wherein the node identifier of the first storage node corresponds to the master identifier included in the first task in the first task group; determining the serial number of each first task in the first task sequence as the master offset of the first task, and adding the master offset to the first task to update the first task, to obtain an updated first task as a first target task.

[0009] Optionally, the generating the second target task group according to the second task group set comprises: for each second task group in the second task group set, performing the following processing steps: storing the second tasks in the second task group into a second storage node in sequence according to the acquisition time corresponding to the second task in the second task group, to obtain a second task sequence, wherein the node identifier of the second storage node corresponds to the slave identifier included in the second task in the second task group; determining the serial number of each second task in the second task sequence as the slave offset of the second task, and adding the slave offset to the second task to update the second task, to obtain an updated second task as a second target task.

[0010] Optionally, the second target task in the second target task group comprises a slave identifier and a slave offset.

[0011] Optionally, the above-mentioned association process of each first target task in the first target task group with the corresponding second target task in the second target task group based on the slave identifier included in the first target task in the first target task group includes: for each first target task in the first target task group, performing the following processing steps: selecting at least one second target task from the second target task group whose slave identifier is the same as the slave identifier included in the first target task as a candidate second target task group; and sequentially associating the master identifier and master offset included in the first target task with the slave identifier and slave offset included in each candidate second target task in the candidate second target task group.

[0012] Optionally, the first target task in the first target task group mentioned above includes a first transformation field.

[0013] Optionally, generating a target-related task group based on the target task group and the first target task group includes: generating an updated target task group based on the target task group and the first target task group; adding each updated target task in the updated target task group to the first target task group, and deleting the first target task corresponding to the updated target task in the first target task group to update the first target task group; and determining the updated first target task group as the target-related task group.

[0014] Optionally, generating an updated target task group based on the target task group and the first target task group includes: for each target task in the target task group, performing the following steps: selecting a first target task corresponding to the target task from the first target task group as a first target task to be associated; adding the first transformation field included in the first target task to be associated to the target task to update the target task and generate an updated target task.

[0015] Secondly, some embodiments of this disclosure provide a task storage device, comprising: an association unit configured to associate each first target task in the first target task group with a corresponding second target task in a second target task group based on a slave identifier included in the first target task in the first target task group, thereby obtaining an associated target task group set; a sorting unit configured to classify and sort the associated target task group set based on a master identifier and a master offset included in the associated target task in the associated target task group set, thereby obtaining an associated target task sequence group; a determination unit configured to determine the first associated target task of each associated target task sequence in the associated target task sequence group as a target task, thereby obtaining a target task group; a generation unit configured to generate a target associated task group based on the target task group and the first target task group; and a storage unit configured to store the target associated task group in a preset task queue.

[0016] Optionally, prior to the association unit, the apparatus further includes: an acquisition unit configured to acquire a first task set and a second task set; a first classification unit configured to classify the first tasks included in the first task set according to the master identifier included in the first task set to obtain a first task group set; a first generation unit configured to generate a first target task group according to the first task group set; a second classification unit configured to classify the second tasks included in the second task set according to the slave identifier included in the second task set to obtain a second task group set; and a second generation unit configured to generate a second target task group according to the second task group set.

[0017] Optionally, the first generation unit may be further configured to: for each first task group in the first task group set, perform the following processing steps: according to the acquisition time corresponding to the first task in the first task group, sequentially store the first tasks in the first task group into the first storage node to obtain a first task sequence, wherein the node identifier of the first storage node corresponds to the main identifier included in the first task in the first task group; determine the sequence number of each first task in the first task sequence as the main offset of the first task, and add the main offset to the first task to update the first task, thereby obtaining the updated first task as the first target task.

[0018] Optionally, the second generation unit may be further configured to: for each second task group in the aforementioned second task group set, perform the following processing steps: according to the acquisition time corresponding to the second task in the aforementioned second task group, sequentially store the second tasks in the aforementioned second task group into the second storage node to obtain a second task sequence, wherein the node identifier of the aforementioned second storage node corresponds to the slave identifier included in the aforementioned second task group; determine the sequence number of each second task in the aforementioned second task sequence as the slave offset of the aforementioned second task, and add the aforementioned slave offset to the aforementioned second task to update the aforementioned second task, thereby obtaining the updated second task as the second target task.

[0019] Optionally, the second target task in the aforementioned second target task group includes the identifier and the offset.

[0020] Optionally, the association unit can be further configured to perform the following processing steps for each first target task in the first target task group: select at least one second target task from the second target task group whose slave identifier is the same as the slave identifier included in the first target task as a candidate second target task group; and associate the master identifier and master offset included in the first target task with the slave identifier and slave offset included in each candidate second target task in the candidate second target task group.

[0021] Optionally, the first target task in the first target task group mentioned above includes a first transformation field.

[0022] Optionally, the generation unit may be further configured to: generate an updated target task group based on the aforementioned target task group and the aforementioned first target task group; add each updated target task in the aforementioned updated target task group to the aforementioned first target task group, and delete the first target task in the aforementioned first target task group corresponding to the aforementioned updated target task, so as to update the aforementioned first target task group; and determine the updated first target task group as the target associated task group.

[0023] Optionally, the generation unit can be further configured to perform the following steps for each target task in the target task group: select a first target task corresponding to the target task from the first target task group as the first target task to be associated; add the first transformation field included in the first target task to be associated to the target task to update the target task and generate an updated target task.

[0024] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0025] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0026] The above embodiments of this disclosure have the following beneficial effects: the task storage method of some embodiments of this disclosure improves the computation efficiency of streaming data, filters out-of-order data in the streaming data, and ensures that the streaming data can be stored in the message queue in an orderly manner. Specifically, the reason for the out-of-order result stored in the message queue is that opening a time window during the process of inserting / storing multiple streaming data into the message queue will reduce the computation efficiency of the streaming data; in addition, when two out-of-order data are not assigned to the same time window, the result stored in the message queue will be out-of-order. Based on this, the task storage method of some embodiments of this disclosure firstly associates each first target task in the first target task group with the corresponding second target task in the second target task group according to the slave identifier included in the first target task (streaming data) group, to obtain an associated target task group set. Thus, different tasks can be associated together, which facilitates the subsequent filtering of out-of-order second target tasks in the second target task group. Secondly, according to the master identifier and master offset included in the associated target tasks in the associated target task group set, the associated target task group set is classified and sorted to obtain an associated target task sequence group. Therefore, associated target tasks with the same primary identifier can be sorted, facilitating subsequent filtering of out-of-order associated target tasks in the associated target task sequence. Next, the first associated target task in each associated target task sequence group is determined as the target task, resulting in a target task group. This allows selection of the associated target task with the largest primary offset in each associated target task sequence, ensuring that associated target tasks (stream data) are stored in an orderly manner in the message queue (task queue). Then, based on the aforementioned target task group and the first target task group, a target associated task group is generated. Finally, the aforementioned target associated task group is stored in a preset task queue. This allows target associated task groups to be written to the task queue in real time, reducing subsequent task processing latency, improving the computational efficiency of the data stream (target associated tasks), filtering out out-of-order data in the data stream (target associated tasks), and ensuring that the stream data is stored in an orderly manner in the message queue (task queue). Attached Figure Description

[0027] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0028] Figure 1 This is a schematic diagram illustrating an application scenario of the task storage method according to some embodiments of this disclosure;

[0029] Figure 2 This is a flowchart of some embodiments of the task storage method according to the present disclosure;

[0030] Figure 3 This is a flowchart of some other embodiments of the task storage method according to the present disclosure;

[0031] Figure 4 This is a flowchart of yet another embodiment of the task storage method according to the present disclosure;

[0032] Figure 5 These are schematic diagrams illustrating the structure of some embodiments of the task storage device according to the present disclosure;

[0033] Figure 6 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0034] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0035] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0036] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0037] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0038] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0039] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0040] Figure 1 This is a schematic diagram of an application scenario of a task storage method according to some embodiments of the present disclosure.

[0041] exist Figure 1 In the application scenario, firstly, the computing device 101 can associate each first target task in the first target task group 102 with the corresponding second target task in the second target task group 103 based on the slave identifier 1021 included in the first target task, thus obtaining an associated target task set 104. Secondly, the computing device 101 can classify and sort the associated target task set 104 based on the master identifier 1041 and master offset 1042 included in the associated target tasks, thus obtaining an associated target task sequence group 105. Next, the computing device 101 can determine the first associated target task of each associated target task sequence in the associated target task sequence group 105 as the target task, thus obtaining a target task group 106. Then, the computing device 101 can generate a target associated task group 107 based on the target task group 106 and the first target task group 102. Finally, the computing device 101 can store the target associated task group 107 in a preset task queue.

[0042] It should be noted that the aforementioned computing device 101 can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed within the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.

[0043] It should be understood that Figure 1 The number of computing devices shown is merely illustrative. Any number of computing devices can be used depending on implementation needs.

[0044] Continue to refer to Figure 2 The flowchart 200 illustrates some embodiments of a task storage method according to the present disclosure. The task storage method includes the following steps:

[0045] Step 201: Based on the identifiers included in the first target tasks in the first target task group, associate each first target task in the first target task group with the corresponding second target task in the second target task group to obtain an associated target task group set.

[0046] In some embodiments, for each first target task in the first target task group, the execution body of the task storage method (e.g., Figure 1 The computing device 101 shown can associate second target tasks (whose slave identifiers are the same as those of the slave identifiers of the first target task) with the first target task to generate associated target task groups. Thus, an associated target task group set is obtained. Here, the execution entity of the task storage method can refer to a distributed publish-subscribe messaging system (Kafka). Here, the first target tasks included in the first target task group can be streaming data pre-stored in each partition node and having a pre-configured master identifier. Here, the master identifiers of the first target tasks stored in each partition node are the same. Here, the first target tasks in the first target task group can include, but are not limited to: master identifier, slave identifier, and master offset. Here, the master identifier can refer to the primary key identifier of the first target task (streaming data) pre-defined by the developer. For example, the master identifier can be represented by id. Here, the slave identifier can refer to the identifier of the associated field included in the first target task (streaming data) pre-defined by the developer. For example, the slave identifier can be represented by code. Here, the master offset can refer to the sequence number (incrementing version number) of the first target task in the first target tasks stored in the partition node. For example, the master offset can be represented by A-version. Here, a partition node can refer to a partition storage node in a distributed publish-subscribe messaging system (Kafka). The second target task included in the second target task group can be streaming data pre-stored in each partition node and having a pre-configured slave identifier (without a master identifier). The partition node storing the second target task is different from the partition node storing the first target task. The second target task in the second target task group can include, but is not limited to, a slave identifier and a slave offset. The slave identifier can refer to the primary key identifier of the second target task (streaming data) pre-defined by the developers. The slave offset can refer to the sequence number (incrementing version number) of the second target task stored in the partition node. For example, the slave offset can be represented by B-version. The slave identifiers of the second target tasks stored in each partition node are the same.

[0047] As an example, the first target task group could be:

[0048] {[id=1, code=c-001, A-version=1]; [id=1, code=c-002, A-version=2]; [id=1, code=c-001, A-version=3]; [id=2, code=c-003, A-version=1]; [id=2, code=c-003, A-version=2]}.

[0049] The second target task group could be:

[0050] {[code=c-001, B-version=1]; [code=c-001, B-version=2]; [code=c-002, B-version=1]; [code=c-003, B-version=1]}.

[0051] Based on the description of the embodiment of step 201, the associated target task set can be obtained:

[0052] {[id=1, code=c-001, A-version=1]-[code=c-001, B-version=1];

[0053] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=2];

[0054] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=1];

[0055] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=2]};

[0056] {[id=1, code=c-002, A-version=2]-[code=c-002, B-version=1]};

[0057] {[id=2, code=c-003, A-version=1]-[code=c-003, B-version=1];

[0058] [id=2, code=c-003, A-version=2]-[code=c-003, B-version=1]}.

[0059] In some optional implementations of certain embodiments, the following steps may be included before step 201:

[0060] The first step is to obtain the first task set and the second task set.

[0061] In practice, the aforementioned execution entity can pull the first and second task sets from the terminal device in real time via wired or wireless connections. Here, the terminal device can refer to a partition node of a distributed publish-subscribe messaging system (Kafka). The first and second task sets are stored in different partition nodes. Both the first and second task sets can be streaming data pre-stored in different partitions by developers. The first task included in the first task set can be streaming data pre-stored in the partition node and having a pre-configured master identifier. The second task included in the second task set can be streaming data pre-stored in the partition node and having a pre-configured slave identifier (without a master identifier). The partition node storing the second task is different from the partition node storing the first task.

[0062] The second step is to classify the first tasks included in the first task set according to the main identifiers of the first tasks in the first task set, so as to obtain the first task group set.

[0063] In practice, the aforementioned executing entity can group the first tasks with the same primary identifier into one category to generate a first task group, thus obtaining a first task group set.

[0064] The third step is to generate the first target task group based on the first task group set mentioned above.

[0065] In practice, for each of the first task groups in the aforementioned first task group set, the following processing steps are performed:

[0066] The first sub-step involves storing the first tasks in the first task group sequentially into the first storage node based on their acquisition times, thus obtaining the first task sequence. The node identifier of the first storage node corresponds to the primary identifier included in the first tasks of the first task group. Here, the first storage node can refer to a partitioned storage node in a distributed publish-subscribe messaging system (Kafka). For example, the primary identifier included in the first tasks of the first task group could be "id=1". The node identifier of the first storage node could be "A-partition=1". In practice, the executing entity can store the first tasks in the first task group sequentially into the first storage node according to their acquisition times, thus obtaining the first task sequence.

[0067] The second sub-step involves determining the sequence number of each first task in the aforementioned first task sequence as the main offset of that first task, and adding the main offset to the first task to update it, resulting in an updated first task as the first target task. In practice, the executing entity can first determine the sequence number of each first task in the aforementioned first task sequence as the main offset of that first task. Then, it can add the main offset to the first task to update it, resulting in an updated first task as the first target task.

[0068] The fourth step is to classify the second tasks included in the second task set according to the identifiers of the second tasks in the second task set, so as to obtain the second task group set.

[0069] In practice, the aforementioned executing entity can group the second tasks with the same primary identifier into one category to generate a second task group, thus obtaining a second task group set.

[0070] Fifth step: Generate the second target task group based on the second task group set mentioned above.

[0071] In practice, for each of the second task groups in the above-mentioned second task group set, the following processing steps are performed:

[0072] The first sub-step involves storing the second tasks in the second task group sequentially into the second storage node based on their acquisition times, thus obtaining the second task sequence. The node identifier of the second storage node corresponds to the slave identifier included in the second tasks of the second task group. Here, the second storage node can refer to a partitioned storage node in a distributed publish-subscribe messaging system (Kafka). For example, the slave identifier included in the second tasks of the second task group could be "code=2". The node identifier of the second storage node could be "B-partition=1". In practice, the executing entity can store the second tasks in the second task group into the second storage node sequentially according to their acquisition times, thus obtaining the second task sequence.

[0073] The second sub-step involves determining the sequence number of each second task in the aforementioned second task sequence as the offset of that second task, and adding the offset to the second task to update it, resulting in an updated second task as the second target task. In practice, firstly, the executing entity can determine the sequence number of each second task in the aforementioned second task sequence as the offset of that second task. Then, the executing entity can add the offset to the second task to update it, resulting in an updated second task as the second target task.

[0074] Therefore, based on the acquisition time of each task (first task / second task), an offset can be added to each task in each partition, ensuring that each task in each partition is monotonically increasing according to its identifier (master identifier / slave identifier). This facilitates the subsequent selection of the latest task.

[0075] Step 202: Based on the main identifier and main offset of the associated target tasks in the above associated target task group set, classify and sort the above associated target task group set to obtain the associated target task sequence group.

[0076] In some embodiments, firstly, the executing entity can group related target tasks with the same primary identifier within the aforementioned related target task group set into one category to generate clustered related target task groups, thus obtaining a set of clustered related target task groups. Then, for each clustered related target task group in the set, the executing entity can sort the clustered related target task groups from largest to smallest according to the values ​​of the primary offsets included in the clustered related target task group, to generate a first clustered related target task sequence. Finally, the executing entity can sort the first clustered related target tasks with the same primary offset in the first clustered related target task sequence from largest to smallest according to the values ​​of the secondary offsets included in the first clustered related target task sequence, to generate a sequence of related target tasks.

[0077] As an example, the associated target task set could be:

[0078] {[id=1, code=c-001, A-version=1]-[code=c-001, B-version=1];

[0079] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=2];

[0080] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=1];

[0081] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=2]};

[0082] {[id=1, code=c-002, A-version=2]-[code=c-002, B-version=1]};

[0083] {[id=2, code=c-003, A-version=1]-[code=c-003, B-version=1];

[0084] [id=2, code=c-003, A-version=2]-[code=c-003, B-version=1]}.

[0085] First, the aforementioned executing entity can group the associated target tasks with the same primary identifier included in the aforementioned associated target task group set in the example above into one category to generate clustered associated target task groups, thus obtaining a clustered associated target task group set:

[0086] {[id=1, code=c-001, A-version=1]-[code=c-001, B-version=1];

[0087] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=2];

[0088] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=1];

[0089] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=2];

[0090] [id=1, code=c-002, A-version=2]-[code=c-002, B-version=1]};

[0091] {[id=2, code=c-003, A-version=1]-[code=c-003, B-version=1];

[0092] [id=2, code=c-003, A-version=2]-[code=c-003, B-version=1]}.

[0093] Then, for each clustering-related target task group in the clustering-related target task group set, the aforementioned execution entity can sort the clustering-related target task groups from largest to smallest according to the values ​​of the principal offsets included in the clustering-related target task group, to generate the first clustering-related target task sequence:

[0094] {[id=1, code=c-001, A-version=3]-[code=c-001, B-version=1];

[0095] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=2];

[0096] [id=1, code=c-002, A-version=2]-[code=c-002, B-version=1];

[0097] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=1];

[0098] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=2]} and

[0099] {[id=2, code=c-003, A-version=2]-[code=c-003, B-version=1];

[0100] [id=2, code=c-003, A-version=1]-[code=c-003, B-version=1]}.

[0101] Finally, the aforementioned executing entity can sort the first cluster-related target tasks with the same principal offset in the first cluster-related target task sequence according to the numerical value of the offset included in the first cluster-related target task sequence from largest to smallest, in order to generate a sequence of related target tasks:

[0102] {[id=1, code=c-001, A-version=3]-[code=c-001, B-version=2];

[0103] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=1];

[0104] [id=1, code=c-002, A-version=2]-[code=c-002, B-version=1];

[0105] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=2];

[0106] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=1]} and

[0107] {[id=2, code=c-003, A-version=2]-[code=c-003, B-version=1];

[0108] [id=2, code=c-003, A-version=1]-[code=c-003, B-version=1]}.

[0109] Step 203: Determine the first associated target task of each associated target task sequence in the above associated target task sequence group as the target task, and obtain the target task group.

[0110] In some embodiments, the executing entity may determine the first associated target task of each associated target task sequence in the associated target task sequence group as the target task, thereby obtaining a target task group. Here, the first associated target task may refer to the first associated target task in the associated target task sequence.

[0111] As an example, the associated target task sequence group could be:

[0112] {[id=1, code=c-001, A-version=3]-[code=c-001, B-version=2];

[0113] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=1];

[0114] [id=1, code=c-002, A-version=2]-[code=c-002, B-version=1];

[0115] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=2];

[0116] [id=1, code=c-001, A-version=1]-[code=c-001, B-version=1]};

[0117] {[id=2, code=c-003, A-version=2]-[code=c-003, B-version=1];

[0118] [id=2, code=c-003, A-version=1]-[code=c-003, B-version=1]}.

[0119] The aforementioned executing entity can identify the first associated target task in each associated target task sequence of the aforementioned associated target task sequence group as the target task, thus obtaining the target task group:

[0120] {[id=1, code=c-001, A-version=3]-[code=c-001, B-version=2];

[0121] [id=2, code=c-003, A-version=2]-[code=c-003, B-version=1]}.

[0122] Step 204: Generate a target-related task group based on the above target task group and the above first target task group.

[0123] In some embodiments, for each target task in the aforementioned target task group, firstly, the executing entity can find a first target task in the first target task group that has the same main identifier and main offset as the target task, as a candidate task. Then, the executing entity can associate a second target task included in the target task with the candidate task to generate associated tasks. Next, the executing entity can add the generated associated tasks to the first target task group and delete the first target task corresponding to each associated task to update the first target task group. Finally, the updated first target task group can be determined as the target associated task group.

[0124] As an example, the target task group could be:

[0125] {[id=1, code=c-001, A-version=3]-[code=c-001, B-version=2];

[0126] [id=2, code=c-003, A-version=2]-[code=c-003, B-version=1]}.

[0127] The first target task group could be:

[0128] {[id=1, code=c-001, A-version=1]; [id=1, code=c-002, A-version=2]; [id=1, code=c-001, A-version=3]; [id=2, code=c-003, A-version=1]; [id=2, code=c-003, A-version=2]}.

[0129] According to the description of the embodiment in step 204, the generated target associated task group is as follows:

[0130] {[id=1, code=c-001, A-version=1];

[0131] [id=1, code=c-002, A-version=2];

[0132] [id=1, code=c-001, A-version=3]-[code=c-001, B-version=2];

[0133] [id=2, code=c-003, A-version=1];

[0134] [id=2, code=c-003, A-version=2]-[code=c-003, B-version=1]}.

[0135] Step 205: Store the above-mentioned target-related task group in a preset task queue.

[0136] In some embodiments, the execution entity can store the target-associated task group into a preset task queue in real time. Here, the preset task queue may refer to a Kafka message queue.

[0137] The above embodiments of this disclosure have the following beneficial effects: the task storage method of some embodiments of this disclosure improves the computation efficiency of streaming data, filters out-of-order data in the streaming data, and ensures that the streaming data can be stored in the message queue in an orderly manner. Specifically, the reason for the out-of-order result stored in the message queue is that opening a time window during the process of inserting / storing multiple streaming data into the message queue will reduce the computation efficiency of the streaming data; in addition, when two out-of-order data are not assigned to the same time window, the result stored in the message queue will be out-of-order. Based on this, the task storage method of some embodiments of this disclosure firstly associates each first target task in the first target task group with the corresponding second target task in the second target task group according to the slave identifier included in the first target task (streaming data) group, to obtain an associated target task group set. Thus, different tasks can be associated together, which facilitates the subsequent filtering of out-of-order second target tasks in the second target task group. Secondly, according to the master identifier and master offset included in the associated target tasks in the associated target task group set, the associated target task group set is classified and sorted to obtain an associated target task sequence group. Therefore, associated target tasks with the same primary identifier can be sorted, facilitating subsequent filtering of out-of-order associated target tasks in the associated target task sequence. Next, the first associated target task in each associated target task sequence group is determined as the target task, resulting in a target task group. This allows selection of the associated target task with the largest primary offset in each associated target task sequence, ensuring that associated target tasks (stream data) are stored in an orderly manner in the message queue (task queue). Then, based on the aforementioned target task group and the first target task group, a target associated task group is generated. Finally, the aforementioned target associated task group is stored in a preset task queue. This allows target associated task groups to be written to the task queue in real time, reducing subsequent task processing latency, improving the computational efficiency of the data stream (target associated tasks), filtering out out-of-order data in the data stream (target associated tasks), and ensuring that the stream data is stored in an orderly manner in the message queue (task queue).

[0138] Further reference Figure 3 This illustration shows some other embodiments of a task storage method according to the present disclosure. The task storage method includes the following steps:

[0139] Step 301: For each first target task in the aforementioned first target task group, perform the following processing steps:

[0140] Step 3011: Select at least one second target task from the second target task group that has the same slave identifier as the slave identifier included in the first target task as a candidate second target task group.

[0141] In some embodiments, the second target task in the aforementioned second target task group includes a slave identifier and a slave offset. Here, the slave identifier may refer to the primary key identifier of the second target task (stream data) predefined by the developer. Here, the slave offset may refer to the sequence number of the second target task in the second target tasks stored in the partition node. The execution body of the task storage method (e.g., Figure 1 The computing device 101 shown can select at least one second target task from the second target task group as an alternative second target task group, which includes a slave identifier that is the same as the slave identifier included in the first target task.

[0142] Step 3012: Associate the main identifier and main offset of the first target task with the slave identifier and slave offset of each candidate second target task in the candidate second target task group.

[0143] In some embodiments, the executing entity may sequentially associate the master identifier and master offset of the first target task with the slave identifier and slave offset of each of the candidate second target tasks in the candidate second target task group.

[0144] As an example, the first target task could be "[id=1, code=c-001, A-version=1]". The alternative second target task could be "[code=c-001, B-version=1]". The primary identifier "id=1" and primary offset "version=1" of the first target task can be associated with the secondary identifier "code=c-001" and secondary offset "B-version=1" of the alternative second target task to generate the associated target task "[id=1, code=c-001, A-version=1, B-version=1]".

[0145] Step 302: Based on the main identifier and main offset of the associated target tasks in the above associated target task group set, classify and sort the above associated target task group set to obtain the associated target task sequence group.

[0146] Step 303: Determine the first associated target task of each associated target task sequence in the above associated target task sequence group as the target task, and obtain the target task group.

[0147] Step 304: Generate a target-related task group based on the above target task group and the above first target task group.

[0148] Step 305: Store the above-mentioned target-associated task group in a preset task queue.

[0149] In some embodiments, the specific implementation of steps 302-305 and the resulting technical effects can be found in [reference needed]. Figure 2 Steps 202-205 in the corresponding embodiments will not be repeated here.

[0150] from Figure 3 It can be seen that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 3 In some corresponding embodiments, process 300 associates the master identifier and master offset of the first target task with the slave identifier and slave offset of the candidate second target task. This facilitates the subsequent selection of the associated target task with the largest master offset and slave offset, ensuring the accuracy and timeliness of storing the subsequent associated target tasks in the preset task queue.

[0151] Further reference Figure 4 This illustrates further embodiments of a task storage method for generating configuration information according to the present disclosure. The task storage method includes the following steps:

[0152] Step 401: Based on the identifiers included in the first target tasks in the first target task group, associate each first target task in the first target task group with the corresponding second target task in the second target task group to obtain an associated target task group set.

[0153] Step 402: Based on the main identifier and main offset of the associated target tasks in the above associated target task group set, classify and sort the above associated target task group set to obtain the associated target task sequence group.

[0154] Step 403: Determine the first associated target task of each associated target task sequence in the above associated target task sequence group as the target task, and obtain the target task group.

[0155] In some embodiments, the specific implementation of steps 401-403 and the resulting technical effects can be found in [reference needed]. Figure 2 Steps 201-203 in the corresponding embodiments will not be repeated here.

[0156] Step 404: Generate an updated target task group based on the above target task group and the above first target task group.

[0157] In some embodiments, the first target task in the first target task group described above includes a first transformation field. Here, the first transformation field may refer to the necessary runtime parameters when executing the task (stream data). The execution body of the task storage method (e.g., Figure 1 The computing device 101 shown can perform the following steps for each target task in the above-described target task group:

[0158] The first step is to select the first target task corresponding to the aforementioned target task from the first target task group as the first target task to be associated. In practice, the executing entity can select the first target task whose main identifier and main offset are the same as those of the aforementioned target task from the first target task group as the first target task to be associated.

[0159] The second step involves adding the first transformation field included in the first target task to be associated to the target task, thereby updating the target task and generating an updated target task. In practice, the executing entity can add the first transformation field included in the first target task to be associated to the target task, thereby updating the target task and generating an updated target task.

[0160] Step 405: Add each update target task in the above update target task group to the above first target task group, and delete the first target task corresponding to the above update target task in the above first target task group, so as to update the above first target task group.

[0161] In some embodiments, the executing entity may add each update target task in the update target task group to the first target task group, and delete the first target task corresponding to the update target task in the first target task group, so as to update the first target task group. Here, the first target task corresponding to the update target task may refer to a first target task whose main identifier and main offset are the same as those included in the update target task.

[0162] Step 406: The updated first target task group is identified as the target associated task group.

[0163] In some embodiments, the aforementioned executing entity may determine the updated first target task group as the target associated task group.

[0164] Step 407: Store the above-mentioned target-associated task group in a preset task queue.

[0165] In some embodiments, the specific implementation of step 407 and its resulting technical effects can be found in [reference needed]. Figure 2 Step 205 in the corresponding embodiments will not be repeated here.

[0166] from Figure 4 It can be seen that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 4In some corresponding embodiments, process 400 involves adding the first transformation field of the first target task to the corresponding target task. This ensures the integrity of the necessary operating parameters (first transformation field) required by the target-related tasks in the target-related task group, preventing data loss.

[0167] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a task storage device, which are similar to... Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0168] like Figure 5 As shown, the task storage device 500 in some embodiments includes: an association unit 501, a sorting unit 502, a determination unit 503, a generation unit 504, and a storage unit 505. The association unit 501 is configured to associate each first target task in the first target task group with a corresponding second target task in a second target task group based on the slave identifiers included in the first target tasks in the first target task group, thereby obtaining an associated target task group set. The sorting unit 502 is configured to classify and sort the associated target task group set based on the master identifiers and master offsets included in the associated target tasks in the associated target task group set, thereby obtaining an associated target task sequence group. The determination unit 503 is configured to determine the first associated target task of each associated target task sequence in the associated target task sequence group as a target task, thereby obtaining a target task group. The generation unit 504 is configured to generate a target associated task group based on the target task group and the first target task group. The storage unit 505 is configured to store the target associated task group in a preset task queue.

[0169] Optionally, prior to the association unit 501, the device 500 further includes: an acquisition unit configured to acquire a first task set and a second task set; a first classification unit configured to classify the first tasks included in the first task set according to the master identifier included in the first task set to obtain a first task group set; a first generation unit configured to generate a first target task group according to the first task group set; a second classification unit configured to classify the second tasks included in the second task set according to the slave identifier included in the second task set to obtain a second task group set; and a second generation unit configured to generate a second target task group according to the second task group set.

[0170] Optionally, the first generation unit (not shown in the figure) can be further configured to: for each first task group in the first task group set, perform the following processing steps: according to the acquisition time corresponding to the first task in the first task group, store the first tasks in the first task group into the first storage node in sequence to obtain a first task sequence, wherein the node identifier of the first storage node corresponds to the main identifier included in the first task in the first task group; determine the sequence number of each first task in the first task sequence as the main offset of the first task, and add the main offset to the first task to update the first task, thereby obtaining the updated first task as the first target task.

[0171] Optionally, the second generation unit (not shown in the figure) can be further configured to: for each second task group in the second task group set, perform the following processing steps: according to the acquisition time corresponding to the second task in the second task group, store the second tasks in the second task group into the second storage node in sequence to obtain a second task sequence, wherein the node identifier of the second storage node corresponds to the slave identifier included in the second task in the second task group; determine the sequence number of each second task in the second task sequence as the slave offset of the second task, and add the slave offset to the second task to update the second task, thereby obtaining the updated second task as the second target task.

[0172] Optionally, the second target task in the aforementioned second target task group includes the identifier and the offset.

[0173] Optionally, the association unit 501 can be further configured to perform the following processing steps for each first target task in the first target task group: select at least one second target task from the second target task group whose slave identifier is the same as the slave identifier included in the first target task as a candidate second target task group; and associate the master identifier and master offset included in the first target task with the slave identifier and slave offset included in each candidate second target task in the candidate second target task group.

[0174] Optionally, the first target task in the first target task group mentioned above includes a first transformation field.

[0175] Optionally, the generation unit 504 may be further configured to: generate an updated target task group based on the aforementioned target task group and the aforementioned first target task group; add each updated target task in the updated target task group to the aforementioned first target task group, and delete the first target task in the aforementioned first target task group corresponding to the updated target task, so as to update the aforementioned first target task group; and determine the updated first target task group as the target associated task group.

[0176] Optionally, the generation unit 504 can be further configured to perform the following steps for each target task in the target task group: select a first target task corresponding to the target task from the first target task group as the first target task to be associated; add the first transformation field included in the first target task to be associated to the target task to update the target task and generate an updated target task.

[0177] It is understandable that the units described in the device 500 are related to the reference. Figure 2 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 500 and the units contained therein, and will not be repeated here.

[0178] The following is for reference. Figure 6 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 The diagram shows the structure of the computing device 101) 600. Electronic devices in some embodiments of this disclosure may include, but are not limited to, mobile terminals such as laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0179] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0180] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. AlthoughFigure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.

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

[0182] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0183] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0184] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: associate each first target task in the first target task group with a corresponding second target task in a second target task group based on the slave identifiers included in the first target tasks in the first target task group, thereby obtaining an associated target task group set; classify and sort the associated target task group set according to the master identifiers and master offsets included in the associated target tasks in the associated target task group set, thereby obtaining an associated target task sequence group; determine the first associated target task of each associated target task sequence in the associated target task sequence group as a target task, thereby obtaining a target task group; generate a target associated task group based on the target task group and the first target task group; and store the target associated task group in a preset task queue.

[0185] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the target user's computer, partially on the target user's computer, as a standalone software package, partially on the target user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the target user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0186] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0187] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including an association unit, a sorting unit, a determining unit, a generating unit, and a storage unit. The names of these units do not necessarily limit the specific unit; for example, a storage unit may be described as "a unit that synchronizes the aforementioned target association task group to a preset task queue."

[0188] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0189] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A task storage method, comprising: Based on the slave identifiers included in the first target task group, each first target task in the first target task group is associated with a second target task in the second target task group whose slave identifiers are the same as those included in the first target task, to obtain an associated target task group set. The slave identifier is the identifier of the associated field included in the target task. Based on the primary identifier and primary offset of the associated target tasks in the associated target task group set, the associated target task group set is classified and sorted to obtain an associated target task sequence group. The primary identifier is the primary key identifier of the first target task, and the primary offset refers to the sequence number of the first target task stored in the partition node. Associated target tasks with the same primary identifier are grouped into one category to generate a clustered associated target task group set. For each clustered associated target task group set, the clustered associated target task groups are sorted from largest to smallest according to the value of the primary offset included in the clustered associated target task group set to generate an associated target task sequence. The first associated target task of each associated target task sequence in the associated target task sequence group is determined as the target task, thus obtaining the target task group; Based on the target task group and the first target task group, generate a target associated task group; Store the target associated task group in a preset task queue.

2. The method according to claim 1, wherein, Before associating each first target task in the first target task group with a corresponding second target task in the second target task group based on the identifiers included in the first target task group, the method further includes: Obtain the first task set and the second task set; Based on the main identifier included in the first task in the first task set, the first tasks included in the first task set are classified to obtain the first task group set; Generate a first target task group based on the first task group set; Based on the identifiers included in the second tasks in the second task set, the second tasks included in the second task set are classified to obtain the second task group set. A second target task group is generated based on the second task group set.

3. The method according to claim 2, wherein, The step of generating a first target task group based on the first task group set includes: For each first task group in the first task group set, perform the following processing steps: Based on the acquisition time corresponding to the first task in the first task group, the first tasks in the first task group are stored in the first storage node in sequence to obtain the first task sequence, wherein the node identifier of the first storage node corresponds to the main identifier included in the first task in the first task group. The sequence number of each first task in the first task sequence is determined as the main offset of the first task, and the main offset is added to the first task to update the first task, so as to obtain the updated first task as the first target task.

4. The method according to claim 2, wherein, The step of generating a second target task group based on the second task group set includes: For each second task group in the second task group set, perform the following processing steps: Based on the acquisition time corresponding to the second task in the second task group, the second tasks in the second task group are stored in the second storage node in sequence to obtain the second task sequence. The node identifier of the second storage node corresponds to the slave identifier included in the second task in the second task group. The sequence number of each second task in the second task sequence is determined as the offset of the second task, and the offset is added to the second task to update the second task, so that the updated second task is used as the second target task. The offset refers to the sequence number of the second target task in the second target task stored in the partition node.

5. The method according to claim 1, wherein, The second target task in the second target task group includes an identifier and an offset; as well as The step of associating each first target task in the first target task group with a corresponding second target task in the second target task group based on the identifiers included in the first target task group includes: For each first target task in the first target task group, perform the following processing steps: Select at least one second target task from the second target task group whose slave identifier is the same as that included in the first target task as an alternative second target task group; The primary identifier and primary offset of the first target task are sequentially associated with the secondary identifier and secondary offset of each candidate second target task in the candidate second target task group.

6. The method according to claim 1, wherein, The first target task in the first target task group includes a first transformation field; as well as The step of generating a target-related task group based on the target task group and the first target task group includes: Based on the target task group and the first target task group, generate an updated target task group; Each update target task in the update target task group is added to the first target task group, and the first target task corresponding to the update target task in the first target task group is deleted, so as to update the first target task group; The updated first target task group is designated as the target-related task group.

7. The method according to claim 6, wherein, The step of generating an updated target task group based on the target task group and the first target task group includes: For each target task in the target task group, perform the following steps: Select the first target task corresponding to the target task from the first target task group as the first target task to be associated; The first transformation field included in the first target task to be associated is added to the target task to update the target task and generate an updated target task.

8. A task storage device, comprising: The association unit is configured to associate each first target task in the first target task group with a second target task in the second target task group whose subsidiary identifier is the same as the subsidiary identifier of the first target task, based on the subsidiary identifier included in the first target task in the first target task group, to obtain an associated target task group set, wherein the subsidiary identifier is the identifier of the association field included in the target task; The sorting unit is configured to classify and sort the associated target task group set according to the primary identifier and primary offset included in the associated target task group set, to obtain an associated target task sequence group. The primary identifier is the primary key identifier of the first target task, and the primary offset refers to the sequence number of the first target task in the first target task stored in the partition node. Associated target tasks with the same primary identifier are grouped into one category to generate a clustered associated target task group set. For each clustered associated target task group set, the clustered associated target task groups are sorted from largest to smallest according to the value of the primary offset included in the clustered associated target task group set to generate an associated target task sequence. The determining unit is configured to determine the first associated target task of each associated target task sequence in the associated target task sequence group as the target task, thereby obtaining the target task group; The generation unit is configured to generate a target associated task group based on the target task group and the first target task group; The storage unit is configured to store the target associated task group into a preset task queue.

9. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Message processing method, message processing device, readable storage medium and electronic equipment

    CN111078422A

  • Message processing method and device

    CN112685191A