Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7478918B2 - Task intelligent processing method based on distributed heterogeneous system - Google Patents
[go: Go Back, main page]

JP7478918B2 - Task intelligent processing method based on distributed heterogeneous system - Google Patents

Task intelligent processing method based on distributed heterogeneous system Download PDF

Info

Publication number
JP7478918B2
JP7478918B2 JP2023063960A JP2023063960A JP7478918B2 JP 7478918 B2 JP7478918 B2 JP 7478918B2 JP 2023063960 A JP2023063960 A JP 2023063960A JP 2023063960 A JP2023063960 A JP 2023063960A JP 7478918 B2 JP7478918 B2 JP 7478918B2
Authority
JP
Japan
Prior art keywords
data processing
thread
task
tasks
assigned
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2023063960A
Other languages
Japanese (ja)
Other versions
JP2023171264A (en
Inventor
劉東升
劉彦▲に▼
陳亜輝
劉礼芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Gongshang University
Original Assignee
Zhejiang Gongshang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Gongshang University filed Critical Zhejiang Gongshang University
Publication of JP2023171264A publication Critical patent/JP2023171264A/en
Application granted granted Critical
Publication of JP7478918B2 publication Critical patent/JP7478918B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Description

本開示は、タスクインテリジェント処理技術分野に関し、具体的には分散型異機種混在シ
ステムに基づくタスクインテリジェント処理方法に関する。
The present disclosure relates to the field of task intelligent processing technology, and in particular to a task intelligent processing method based on a distributed heterogeneous system.

分散型異機種混在システムのタスク処理問題は、システムの並列性能の発揮と負荷バラン
スの維持に非常に重要な意義を持っている。既存のタスク処理方法は、通常、タスクをス
レッドに直接またはランダムに割り当て、スレッドは割り当てられたタスクを実行する。
しかしながら、上記の方式を採用する場合には、次のような技術的課題がしばしば存在す
る。
第一に、指定されたスレッドにタスクを直接割り当て、スレッドの負荷と実行状態を考慮
せず、スレッドの負荷が不均衡になり、複数のスレッドの並列効率が低い。
第二に、データ処理タスクを等級分割せずに、指定されたスレッドにタスクを割り当てる
ことにより、等級の低いタスクが先に実行され、等級の高いタスクが後で実行され、デー
タ処理タスクの実行順序に影響を与える。
第三に、データ処理タスクの数がタスクを実行可能なスレッドの数と一致している場合、
データ処理タスクを直接またはランダムに各スレッドに割り当て、負荷の高いスレッドが
データ処理量の大きいタスクを実行することが頻繁に発生し、それによってスレッドの詰
まりが発生する頻度が高い。
第四に、データ処理タスクの数がタスクを実行可能なスレッドの数より大きい場合、デー
タ処理タスクを直接またはランダムに各スレッドに割り当て、新規スレッドの作成方法を
考慮せず、タスク処理の効率を低下させる。
第五に、データ処理タスクの数が実行可能なタスクのスレッドの数より大きい場合、デー
タ処理タスクを直接またはランダムに各スレッドに割り当て、データ処理タスクの待ち時
間が長くなることがある。
The task processing problem in distributed heterogeneous systems is of great significance to the realization of the system's parallel performance and to maintaining load balance. Existing task processing methods usually assign tasks to threads directly or randomly, and the threads execute the assigned tasks.
However, when the above method is adopted, the following technical problems often arise.
First, it directly assigns tasks to specified threads without considering the load and running state of threads, which leads to unbalanced thread loads and low parallel efficiency of multiple threads.
Second, by assigning tasks to designated threads without dividing data processing tasks into ranks, tasks with lower ranks are executed earlier and tasks with higher ranks are executed later, thereby affecting the execution order of data processing tasks.
Third, if the number of data processing tasks matches the number of threads that can execute the tasks,
Data processing tasks are assigned directly or randomly to each thread, and it often happens that a thread with a high load executes a task that involves a large amount of data processing, which frequently causes thread clogging.
Fourth, when the number of data processing tasks is greater than the number of threads that can execute the tasks, the data processing tasks are assigned to each thread directly or randomly, without considering how to create new threads, which reduces the efficiency of task processing.
Fifth, when the number of data processing tasks is greater than the number of executable task threads, data processing tasks are assigned directly or randomly to each thread, which may result in long latency of the data processing tasks.

本開示のいくつかの実施形態は、上記の背景技術の欄で言及された技術的問題のうちの1
つまたは複数を解決するために、分散異性化システムに基づくタスク処理方法、装置、装
置、および媒体を提案する。
Some embodiments of the present disclosure address one or more of the technical problems mentioned in the Background section above.
In order to solve one or more of the above problems, a task processing method, device, apparatus, and medium based on a distributed isomerization system are proposed.

第1態様では、本開示のいくつかの実施形態は、タスクの受け渡し端、事前にトレーニン
グされた優先度決定モデル、およびスレッドプールを含む分散型異機種混在システムに基
づくタスクインテリジェント処理方法を提供する。前記スレッドプールには所定数のスレ
ッドが含まれ、前記方法は、前記タスクの受け渡し端を制御してデータ処理タスクの受け
渡し処理を行い、データ処理タスクの集合を得る、前記データ処理タスク集合を前記事前
トレーニングされた優先度決定モデルに入力し、優先度集合を得る、上記スレッドプール
内の各スレッドの初期負荷情報と状態情報を取得し、初期負荷情報集合と状態情報集合を
取得する、前記初期負荷情報集合、前記状態情報集合及び前記優先度集合に基づいて、前
記データ処理タスク集合中の各データ処理タスクを前記スレッドプール中のスレッドに割
り当て、前記スレッドプール中の各スレッドには1つのデータ処理タスクが割り当てられ
、スレッドプールに割り当てられたデータ処理タスクのスレッド起動を制御し、割り当て
られたデータ処理タスクを実行する。
In a first aspect, some embodiments of the present disclosure provide a task intelligent processing method based on a distributed heterogeneous system including a task delivery end, a pre-trained priority determination model, and a thread pool, the thread pool including a predetermined number of threads, the method includes: controlling the task delivery end to perform data processing task delivery processing to obtain a set of data processing tasks; inputting the set of data processing tasks into the pre-trained priority determination model to obtain a priority set; obtaining initial load information and state information of each thread in the thread pool, obtaining an initial load information set and a state information set; assigning each data processing task in the set of data processing tasks to a thread in the thread pool based on the initial load information set, the state information set and the priority set, each thread in the thread pool is assigned one data processing task, controlling thread activation of the data processing tasks assigned to the thread pool, and executing the assigned data processing tasks.

第2態様では、本開示のいくつかの実施形態は、タスクの受け渡し端、事前トレーニング
された優先度決定モデル、およびスレッドプールを含む分散型異機種混在システムに基づ
くタスクインテリジェント処理装置を提供する。この装置は、前記タスクの受け渡し端を
制御してデータ処理タスクの受け渡し処理を行い、データ処理タスクの集合を得るように
配置された第1制御ユニットと、前記データ処理タスク集合を前記事前トレーニングされ
た優先度決定モデルに入力して優先度集合を得る入力部と、前記スレッドプール内の各ス
レッドの初期負荷情報及び状態情報を取得し、初期負荷情報集合及び状態情報集合を得る
取得部と、前記初期負荷情報集合、前記状態情報集合及び前記優先度集合に基づいて、前
記データ処理タスク集合中の各データ処理タスクを前記スレッドプール中のスレッドに割
り当てる割当部と、第2制御部は、前記スレッドプールに割り当てられたデータ処理タス
クのスレッド起動を制御し、割り当てられたデータ処理タスクを実行するように構成され
る。
In a second aspect, some embodiments of the present disclosure provide a task intelligent processing device based on a distributed heterogeneous system, including a task handover end, a pre-trained priority determination model, and a thread pool, the device including a first control unit arranged to control the task handover end to perform data processing task handover processing and obtain a set of data processing tasks, an input unit configured to input the set of data processing tasks to the pre-trained priority determination model to obtain a priority set, an acquisition unit configured to acquire initial load information and state information of each thread in the thread pool and obtain an initial load information set and a state information set, an allocation unit configured to allocate each data processing task in the set of data processing tasks to a thread in the thread pool based on the initial load information set, the state information set, and the priority set, and a second control unit configured to control thread activation of the data processing tasks allocated to the thread pool and execute the allocated data processing tasks.

第3の態様では、本開示のいくつかの実施形態は、タスクの受け渡し端、事前トレーニン
グの優先度決定モデル、スレッドプール1つ以上のプロセッサ、1つ以上のプログラムが
1つ以上のプロセッサによって実行され、1つ以上のプロセッサが上記第1態様のいずれ
かに記載の方法を実現するようにする1つ以上のプログラムが格納されている記憶装置で
ある。
In a third aspect, some embodiments of the present disclosure are a task handoff end, a pre-trained prioritization model, a thread pool, one or more processors, and a storage device having stored thereon one or more programs that are executed by the one or more processors and cause the one or more processors to implement a method according to any of the first aspects above.

第4の態様では、本開示のいくつかの実施形態は、プロセッサによって実行されるときに
上述の第1態様のいずれかに記載の方法を実装するコンピュータプログラムを格納したコ
ンピュータ可読媒体を提供する。
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method according to any of the first aspects above.

本開示の上述の各実施形態は、本開示のいくつかの実施形態の分散型異機種混在システム
に基づくタスクインテリジェント処理方法によりデータ処理タスクを割り当て、スレッド
負荷分散、複数スレッドの並列効率向上の効果を実現するという有益な効果を有する。具
体的には、スレッドの負荷が不均衡になり、複数のスレッドの並列効率が低下した理由は
、既存のデータ処理タスク割り当て方式は、スレッドの負荷や実行状態を考慮していない
。指定されたスレッドにタスクを直接割り当てるためである。これに基づいて、本開示の
いくつかの実施形態の分散型異機種混在システムに基づくタスクインテリジェント処理方
法を提供する。まず、前記タスク受け渡し端を制御してデータ処理タスク受け渡し処理を
行い、データ処理タスク集合を得ることができる。これにより、受信したデータ処理タス
クを等級分割することができる。次に、前記データ処理タスク集合を前記事前トレーニン
グされた優先度決定モデルに入力し、優先度集合を得ることができる。これにより、まず
等級の高いデータ処理タスクを実行することができ、したがって、時間要求の高いタスク
が最初に実行されて完了するようにすることができる。その後、上記スレッドプール内の
各スレッドの初期負荷情報と状態情報を取得し、初期負荷情報集合と状態情報集合を得る
ことができる。これにより、各スレッドの負荷状況を決定することができ、したがって、
時間要求の高いタスクを負荷の低いスレッドに割り当て、時間要求の低いタスクを負荷の
高いスレッドに割り当てることができ、したがって、各スレッド間の負荷を均衡させるこ
とができる。そして、前記初期負荷情報集合、前記状態情報集合及び前記優先度集合に基
づいて、前記データ処理タスク集合中の各データ処理タスクを、前記スレッドプール中の
スレッド毎に1つのデータ処理タスクを割り当てる。前記スレッドプール中のスレッドに
割り当てることができる。これにより、各スレッドにおける各タスクの実行効率が向上す
る。最後に、上記スレッドプールに割り当てられたデータ処理タスクのスレッド起動を制
御し、割り当てられたデータ処理タスクを実行することができます。これにより、データ
処理タスクを等級分割し、データ処理タスクの優先度と各スレッドの負荷状況と実行状態
に基づいて、各データ処理タスクを各スレッドにそれぞれ割り当てることにより、スレッ
ド負荷分散を実現し、複数スレッドの並列効率を向上させる。
The above-mentioned embodiments of the present disclosure have the beneficial effect of allocating data processing tasks by the task intelligent processing method based on the distributed heterogeneous system of some embodiments of the present disclosure, thereby realizing the effect of thread load balancing and improving the parallel efficiency of multiple threads. Specifically, the reason why the load of threads becomes unbalanced and the parallel efficiency of multiple threads decreases is that the existing data processing task allocation method does not consider the load or running state of the threads. This is because the task is directly allocated to the specified thread. Based on this, a task intelligent processing method based on the distributed heterogeneous system of some embodiments of the present disclosure is provided. First, the task passing end is controlled to perform data processing task passing processing, and a data processing task set can be obtained. Thus, the received data processing tasks can be divided into grades. Next, the data processing task set is input into the pre-trained priority determination model to obtain a priority set. Thus, the data processing tasks with higher grades can be executed first, so that the tasks with higher time requirements can be executed and completed first. Then, the initial load information and state information of each thread in the thread pool are obtained, and an initial load information set and a state information set can be obtained. Thus, the load situation of each thread can be determined, and thus,
A task with a high time requirement can be assigned to a thread with a low load, and a task with a low time requirement can be assigned to a thread with a high load, thus balancing the load among the threads. Then, based on the initial load information set, the state information set, and the priority set, each data processing task in the data processing task set is assigned to a thread in the thread pool, one data processing task per thread. The data processing tasks can be assigned to threads in the thread pool. This improves the execution efficiency of each task in each thread. Finally, the thread startup of the data processing tasks assigned to the thread pool can be controlled, and the assigned data processing tasks can be executed. This realizes thread load balancing and improves the parallel efficiency of multiple threads by dividing the data processing tasks into ranks and assigning each data processing task to each thread based on the priority of the data processing task and the load status and execution status of each thread.

本開示のいくつかの実施形態による分散型異機種混在システムに基づくタスクインテリジェント処理方法の適用場面の概略図である。1 is a schematic diagram of an application scenario of a task intelligent processing method based on a distributed heterogeneous system according to some embodiments of the present disclosure; FIG. 本開示による分散型異機種混在システムに基づくタスクインテリジェント処理方法のいくつかの実施形態のフローチャートである。1 is a flowchart of some embodiments of a task intelligent processing method based on a distributed heterogeneous system according to the present disclosure. 本開示による分散異性化システムに基づくタスクインテリジェント処理装置のいくつかの実施形態の構成図である。FIG. 1 is a block diagram of some embodiments of a task intelligent processing device based on a distributed isomerization system according to the present disclosure. 本開示のいくつかの実施形態を実現するのに適した電子機器の構造概略図である。FIG. 1 is a structural schematic diagram of an electronic device suitable for implementing some embodiments of the present disclosure.

以下、図面を参照し、実施例に関連して本開示を詳細に説明する。
図1は、本開示のいくつかの実施形態による分散型異機種混在システムに基づくタスクイ
ンテリジェント処理方法の適用場面の概略図である。
図1の応用場面において、まず、計算装置101は、上記タスク受け渡し端102を制御
してデータ処理タスク受け渡し処理を行い、データ処理タスク集合103を得ることがで
きる。次に、計算装置101は、上記データ処理タスク集合103を上記事前トレーニン
グの優先度決定モデル104に入力し、優先度集合105を得ることができ、上記スレッ
ドプール内の各スレッドの初期負荷情報と状態情報を取得し、初期負荷情報集合106と
状態情報集合107を取得する。前記初期負荷情報集合106、前記状態情報集合107
及び前記優先度集合105に基づいて、前記データ処理タスク集合103中の各データ処
理タスクを前記スレッドプール108中のスレッドに割り当て、前記スレッドプール10
8中の各スレッドには1つのデータ処理タスクが割り当てられ、上記スレッドプール10
8に割り当てられたデータ処理タスクのスレッド起動を制御し、割り当てられたデータ処
理タスクを実行する。
なお、上記計算装置101は、ハードウェアであってもよいし、ソフトウェアであっても
よい。コンピューティング装置がハードウェアである場合、複数のサーバまたは端末装置
からなる分散クラスタとして実装することも、単一のサーバまたは単一の端末装置として
実装することもできる。コンピューティング装置がソフトウェアとして具現化される場合
、上記に挙げたハードウェア装置にインストールすることができる。これは、例えば、分
散サービスを提供するための複数のソフトウェアまたはソフトウェアモジュールとして実
装されてもよく、単一のソフトウェアまたはソフトウェアモジュールとして実装されても
よい。ここでは具体的に限定しない。
図1の計算装置の数は概略的なものにすぎないことを理解すべきである。実装の必要に応
じて、任意の数の計算装置を有することができる。
The present disclosure will now be described in detail with reference to the accompanying drawings and with reference to the embodiments.
FIG. 1 is a schematic diagram of an application scenario of a task intelligent processing method based on a distributed heterogeneous system according to some embodiments of the present disclosure.
In the application scenario of Fig. 1, first, the computing device 101 controls the task passing end 102 to perform data processing task passing processing, and obtains a data processing task set 103. Next, the computing device 101 inputs the data processing task set 103 into the pre-training priority determination model 104 to obtain a priority set 105, and obtains initial load information and state information of each thread in the thread pool to obtain an initial load information set 106 and a state information set 107. The initial load information set 106 and the state information set 107
and assigning each data processing task in the data processing task set 103 to a thread in the thread pool 108 based on the priority set 105;
Each thread in the thread pool 8 is assigned one data processing task.
8 to control thread initiation for the data processing task assigned thereto, and executes the assigned data processing task.
It should be noted that the computing device 101 may be hardware or software. If the computing device is hardware, it may be implemented as a distributed cluster of multiple servers or terminal devices, or as a single server or single terminal device. If the computing device is embodied as software, it may be installed on the hardware devices listed above. It may be implemented, for example, as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitations are provided here.
It should be understood that the number of computing devices in Figure 1 is merely approximate, and any number of computing devices may be included as required by the implementation.

引き続き図2を参照して、本開示による分散異性化システムに基づくタスクインテリジェ
ント処理方法のいくつかの実施形態のフロー200を示す。分散型異機種混在システムに
基づくタスクインテリジェント処理方法は、次のステップを含む。
ステップ201では、タスク受け渡し端を制御してデータ処理タスク受け渡し処理を行い
、データ処理タスク集合を得る。
いくつかの実施形態では、分散型異機種混在システムに基づくタスクインテリジェント処
理方法の実行主体(図1に示す計算装置101)は、上記タスク受け渡し端を制御してデ
ータ処理タスク受け渡し処理を行い、データ処理タスク集合を得ることができる。ここで
、前記タスク受け渡し端は、クライアントから送信されたデータ処理タスクを受信し、そ
して前記実行主体は、前記タスク受け渡し端が受信したデータ処理タスクを取得すること
ができる。上記データ処理タスクの集合におけるデータ処理タスクは、データ処理に関連
する任意のタスクであってもよい。
一例として、上記データ処理タスクは、最新のリアルタイム気象情報を取得するために5
分おきに気象サーバに行ってもよい。上記データ処理タスクは、列車の便に応じて、いく
つかの時点を設定して分割発券してもよい。
ステップ202では、データ処理タスク集合を事前トレーニングの優先度決定モデルに入
力し、優先度集合を得る。
いくつかの実施形態では、前記実行主体は、前記データ処理タスク集合を前記事前トレー
ニングの優先度決定モデルに入力し、優先度集合を得ることができる。
ここで、上記事前トレーニングの優先度決定モデルは、以下のようなトレーニングにより
得られる。
サンプルデータ処理タスクと、サンプルデータ処理タスクに対応する優先度とを含むサン
プル集合を取得する。
上記サンプル集合に基づいて、次のトレーニング手順を実行する。
上記サンプル集合内の少なくとも1つのサンプルのサンプルデータ処理タスクをそれぞれ
初期ニューラルネットワークに入力し、上記少なくとも1つのサンプル中の各サンプルに
対応する優先度を得る。前記少なくとも1つのサンプル中の各サンプルに対応する優先度
と、少なくとも1つのサンプル中の各サンプルに対応する優先度とに基づいて、前記少な
くとも1つのサンプル中の各サンプルに対応する優先度の損失値を決定する。前記損失値
が所定の閾値に収束することを決定することに応答して、前記初期ニューラルネットワー
クをトレーニング完了の優先度決定モデルとする。前記損失値が所定の閾値に収束しない
ことを決定することに応答して、初期ニューラルネットワークのネットワークパラメータ
を調整し、未使用のサンプルを用いてトレーニングサンプル集合を構成し、調整後の初期
ニューラルネットワークを初期ニューラルネットワークとして、再び前記トレーニングス
テップを実行する。ここで、上記初期ニューラルネットワークは、データに基づいてタス
クを処理し、そのタスクの優先度を得る様々なニューラルネットワーク、例えば、畳み込
みニューラルネットワーク、深度ニューラルネットワークなどであってもよい。
上記ステップ202は、本開示の実施例の1つの発明点として、背景技術で言及された技
術問題2「データ処理タスクを等級分割せず、直接タスクを指定されたスレッドに割り当
てることにより、等級の低いタスクが先に実行され、等級の高いタスクが後で実行され、
データ処理タスクの実行順序に影響を与える」を解決する。データ処理タスクの実行順序
に影響を与える原因は、データ処理タスクを等級分割せずに指定されたスレッドにタスク
を割り当てることで、等級の低いタスクが先に実行され、等級の高いタスクが後で実行さ
れることになることが多い。このような原因を解決すれば、各データ処理タスクを優先度
の高い順に実行することができる。この効果を達成するために、事前トレーニングされた
優先度決定モデルを導入することにより、各データ処理タスクの優先度を決定する。初期
ニューラルネットワークをトレーニングすることにより、トレーニング完了の優先度決定
モデルを得る。これにより、トレーニング完了の優先度決定モデルによりデータ処理タス
クの等級を区分し、データ処理タスクの等級に応じてタスクの実行を行うことができ、し
たがって、各データ処理タスクは優先度の高い順にタスクの実行を完了することができる

ステップ203では、スレッドプール内の各スレッドの初期負荷情報と状態情報を取得し
、初期負荷情報集合と状態情報集合を得る。
いくつかの実施形態では、前記実行主体は、前記スレッドプール内の各スレッドの初期負
荷情報及び状態情報を取得し、初期負荷情報集合及び状態情報集合を得ることができる。
ここで、上記スレッドプールには所定数のスレッドが含まれていてもよい。上記のスレッ
ドプールは、スレッド作成機能を有するスレッドプールであってもよい。
ステップ204では、初期負荷情報集合、状態情報集合、優先度集合に基づいて、データ
処理タスク集合内の各データ処理タスクをスレッドプール内のスレッドに割り当てる。
いくつかの実施形態では、前記実行主体は、前記初期負荷情報集合、前記状態情報集合、
及び前記優先度集合に基づいて、前記データ処理タスク集合中の各データ処理タスクを前
記スレッドプール中のスレッドに割り当てることができる。ここで、上記スレッドプール
内のスレッドごとに1つのデータ処理タスクが割り当てられている。
いくつかの実施形態のいくつかの代替的な実施形態では、前記実行主体は、前記初期負荷
情報集合、前記状態情報集合、および前記優先度集合に基づいて、前記データ処理タスク
集合中の各データ処理タスクを前記スレッドプール中のスレッドに割り当て、前記状態情
報集合中の状態情報は、実行状態と未実行状態とを含み、以下のステップを含むことがで
きる。
第1ステップでは、上記スレッドプールにおけるスレッドの状態情報を実行状態のスレッ
ドとし、第1スレッドとして特定し、第1スレッド集合を得る。なお、前記第1スレッド
集合中の第1スレッドにはデータ処理タスクが割り当てられていない。前記第1スレッド
集合中の第1スレッドは、スレッドの状態情報が実行状態であるスレッドであってもよい

第2ステップでは、前記スレッドプールにおける前記第1スレッド集合を除く他のスレッ
ドを第2スレッドとして特定し、第2スレッド集合を得る。ここで、前記第2スレッド集
合中の第2スレッドに対してデータ処理タスクの割り当てを行う。前記第2スレッド集合
中の第2スレッドは、スレッドの状態情報が未実行状態のスレッドであってもよく、未実
行状態のスレッドに対してデータ処理タスクの割り当てを行うことができる。
オプションとして、前記実行主体は、前記初期負荷情報集合、前記状態情報集合、および
前記優先度集合に基づいて、前記データ処理タスク集合中の各データ処理タスクを前記ス
レッドプール中のスレッドに割り当て、前記状態情報集合中の状態情報は、実行状態と未
実行状態とを含み、以下のステップを含むことができる。
第1ステップでは、上記第2スレッド集合における第2スレッドの数を決定し、割り当て
られるスレッドの数を得る。例えば、第2スレッド集合における第2スレッドの数は5で
あってもよく、すなわち割り当てられるスレッドの数は5であってもよい。
第二に、前記データ処理タスクの集合におけるデータ処理タスクの数を決定し、データ処
理タスクの数を得る。例えば、上記データ処理タスクの集合におけるデータ処理タスクの
数は4であってもよく、すなわちデータ処理タスクの数は4であってもよい。
ステップ3では、前記データ処理タスクの数が前記割当対象スレッドの数以上であるかど
うかを判断する。
ステップ4では、前記データ処理タスクの数が前記割当先スレッドの数以下であることに
応答して、前記データ処理タスクの集合に対して、以下のタスク割当ステップを実行する

上記データ処理タスクの集合から、割り当てられるデータ処理タスクとして最も優先度の
高い(例えば、等級1の優先度が最も高い)データ処理タスクを選別する。前記第2スレ
ッド集合に対応する各初期負荷情報に基づいて、前記割り当てられるデータ処理タスクの
前記第2スレッド集合中の各第2スレッド上の実行時間長を決定し、実行時間長集合を得
る。ここでは、割り当てるべきデータ処理タスクの種々の負荷状況のスレッドにおける履
歴実行時間を参照として、実行時間を求める(例えば、ある割り当てられるデータ処理タ
スクに対して、この割り当てられるデータ処理タスクを取得するスレッドの負荷がケース
1の場合、この割り当てられるデータ処理タスクのマルチタスク実行時間は長く、複数の
タスク実行時間は平均値を求め、割り当てられるデータ処理タスクの負荷がケース1のス
レッドでの実行時間とする)。上記実行時間長集合から最も短い実行時間をターゲット実
行時間長として絞り込む。上記ターゲット実行時間長に対応する第2スレッドをターゲッ
トスレッドとして決定する。ここで、上記ターゲットスレッドは、割り当てられるデータ
処理タスクを実行するためのスレッドであってもよい。前記割り当てられるデータ処理タ
スクを前記ターゲットスレッドに割り当てる前記割当待ちデータ処理タスクを前記データ
処理タスク集合から削除し、タスク削除後のデータ処理タスク集合が空であるかどうかを
決定し、タスク削除後のデータ処理タスク集合が空であることに応答して、タスク割当ス
テップの実行が終了する。タスク削除後のデータ処理タスク集合が空でないことに応答し
て、タスク削除後のデータ処理タスク集合をデータ処理タスク集合として、上記タスク割
当ステップを実行し続ける。
上記第1ステップから第4ステップは、本開示の実施例の1つの発明点として、背景技術
で言及された技術問題3「データ処理タスクの数がタスクを実行可能なスレッドの数と一
致する場合、データ処理タスクを直接またはランダムに各スレッドに割り当て、負荷の高
いスレッドがデータ処理量の大きいタスクを実行することが頻繁に発生し、それによって
スレッドの詰まりが発生する頻度が高い」を解決した。スレッドの詰まりを引き起こす頻
度が高い理由は、データ処理タスクの数が実行可能タスクのスレッドの数と一致している
場合、データ処理タスクを直接またはランダムに各スレッドに割り当て、負荷の高いスレ
ッドがデータ処理量の大きいタスクを実行することが頻繁に発生するためであることが多
い。上記の原因を解決すれば、スレッド詰まりの発生頻度を減らす効果が得られる。この
効果を達成するためには、まず、割り当てられるスレッドの数を決定し、その後、データ
処理タスクの数を決定し、前記データ処理タスクの数と前記割り当てられるスレッドの数
との大小関係を決定し、前記データ処理タスクの数が前記割り当てられるスレッドの数以
下の場合、前記データ処理タスクの集合に対して、タスク割り当てステップを実行するこ
とができる。これにより、データ処理タスクの数がタスクを実行可能なスレッドの数と一
致している場合に、データ処理タスクの集合中の各データ処理タスクを各スレッドに割り
当てることにより、スレッド毎に1つのデータ処理タスクを実行させることができ、負荷
の高いスレッドがデータ処理量の大きいタスクを実行することの頻度を減少させるととも
に、スレッド詰まりの発生頻度を減少させることができる。
オプションとして、前記実行主体は、前記初期負荷情報集合、前記状態情報集合、および
前記優先度集合に基づいて、前記データ処理タスク集合中の各データ処理タスクを前記ス
レッドプール中のスレッドに割り当て、前記状態情報集合中の状態情報は、実行状態と未
実行状態とを含み、以下のステップを含むことができる。
第1に、前記データ処理タスクの数が前記割当先スレッドの数よりも大きいことに応答し
て、前記データ処理タスクの数と前記割当先スレッドの数との差を決定する。例えば、差
は2であってもよい。
第2に、上記スレッドプールを制御して、上記差分値と同じ数のスレッドを作成する。た
とえば、新規スレッドを2つ作成できる。
第3に、前記データ処理タスクの集合中のデータ処理タスクを、優先度が高い順に、前記
第二スレッドの集合と作成されたスレッドに割り当てる。ここで、前記データ処理タスク
の集合におけるデータ処理タスクの数は、前記第2スレッドの集合と作成されたスレッド
の数と同じであり、これにより、データ処理タスクごとに1スレッドに割り当てることが
できる。したがって、実装され、スレッドごとに1つのデータ処理タスクが実行される。
上記第1ステップから第3ステップは、本開示の実施形態の発明点の1つとして、背景技
術で言及されている技術問題4「データ処理タスクの数がタスクを実行可能なスレッドの
数よりも大きい場合、データ処理タスクを直接またはランダムに各スレッドに割り当て、
新規スレッドの方式を考慮せず、タスク処理の効率を低下させる」を解決した。タスク処
理の効率性が低下する理由は、データ処理タスクの数がタスクを実行可能なスレッドの数
よりも大きい場合、新規スレッドの作成方法を考慮せずに、データ処理タスクを直接また
はランダムに各スレッドに割り当てるためであることが多い。上記の原因を解決すれば、
タスク処理の効率化効果を実現することができる。この効果を達成するために、まず、デ
ータ処理タスクの数が前記割当先スレッドの数よりも大きく、前記データ処理タスクの数
と前記割当先スレッドの数との差を決定することができる。次に、前記スレッドプールを
制御して、前記差分値と同じ数のスレッドを作成する。最後に、前記データ処理タスクの
集合中のデータ処理タスクを、優先度が高い順に、前記第2スレッドの集合と作成された
スレッドに割り当てることができる。これにより、新規スレッドを作成することにより、
各データ処理タスクをそれぞれのスレッド上で実行することができ、タスク処理の効率が
向上する。
オプションとして、前記実行主体は、前記初期負荷情報集合、前記状態情報集合、および
前記優先度集合に基づいて、前記データ処理タスク集合中の各データ処理タスクを前記ス
レッドプール中のスレッドに割り当て、前記状態情報集合中の状態情報は、実行状態と未
実行状態とを含み、以下のステップを含むことができる。
第1ステップでは、前記データ処理タスクの数が前記割り当てられるスレッドの数よりも
大きいことに応答して、前記データ処理タスクの集合中のデータ処理タスクを、優先度が
高い順に前記第2スレッドの集合に割り当て、割り当て結果を得て、前記割り当て結果は
、未割り当てデータ処理タスクの集合を含む。データ処理タスクの数がスレッドの数より
も多いため、優先度の高いデータ処理タスクが先に実行される。
ステップ2では、未割当てデータ処理タスクの集合に対して、次のタスク再割当てステッ
プを実行する。
前記第2スレッド集合中の第2スレッドの実行が終了したか否かを検出し、前記第2スレ
ッド集合中に実行が終了した第2スレッドが存在することに応答して、実行が終了した第
2スレッドを再割当対象スレッドとして決定する。前記未割当データ処理タスクの集合の
中で最も優先度の高い未割当データ処理タスクを前記再割当待ちスレッドに割り当てる優
先度が最も高い未割当てデータ処理タスクを前記未割当てデータ処理タスク集合から除去
し、未割当てタスク除去後のデータ処理タスク集合が空であるかどうかを決定し、未割当
てタスク除去後のデータ処理タスク集合が空であることに応答して、タスク再割当てステ
ップの実行が終了する。未割当てタスク削除後のデータ処理タスク集合が空でないことに
応答して、未割当てタスク削除後のデータ処理タスク集合を未割当てデータ処理タスク集
合として、上記タスク再割当てステップを実行し続ける。これにより、相対的に優先度の
高いデータ処理タスクの実行が終了した後、このスレッドは未実行状態にあり、未割り当
てデータ処理タスクの集合の中で最も優先度の高い未割り当てデータ処理タスクをスレッ
ドに割り当てることができ、したがって、新しいスレッドを作成せずに、迅速なデータ処
理タスクの実行を実現することができる。
上記第1ステップから第2ステップは、本開示の実施形態の1つの発明点として、背景技
術で言及された技術的問題5「データ処理タスクの数が実行可能タスクのスレッドの数よ
り大きい場合、データ処理タスクを直接またはランダムに各スレッドに割り当て、データ
処理タスクのいくつかの待ち時間を長くする」を解決した。データ処理タスクの中には、
実行可能なタスクのスレッド数よりもデータ処理タスクの数が多い場合に、データ処理タ
スクを直接またはランダムに各スレッドに割り当てるための待ち時間が長くなるものがあ
る。このような理由を解決すれば、データ処理タスクの待ち時間を低減する効果が得られ
る。この効果を達成するために、まず、データ処理タスクの数が前記割り当てられるスレ
ッドの数より大きい場合、前記データ処理タスクの集合中のデータ処理タスクを、優先度
が高い順に前記第2スレッドの集合に割り当てることができる。割り当てられていないデ
ータ処理タスクに対して、タスク再割り当てステップを実行する。これにより、相対的に
優先度の高いデータ処理タスクの実行が終了した後、このスレッドは未実行状態にあり、
未割当てデータ処理タスクの集合の中で最も優先度の高い未割当てデータ処理タスクをこ
のスレッドに割り当てることができ、したがって、新しいスレッドを作成することなく、
データ処理タスクを迅速に実行し、データ処理タスクの待ち時間を低減する効果を実現す
ることができる。
ステップ205では、スレッドプールに割り当てられたデータ処理タスクのスレッド起動
を制御し、割り当てられたデータ処理タスクを実行する。
いくつかの実施形態では、前記実行主体は、前記スレッドプールに割り当てられたデータ
処理タスクのスレッド起動を制御し、割り当てられたデータ処理タスクを実行することが
できる。
あるいは、上記方法は、割り当てられたデータ処理タスクを実行する際の上記スレッドプ
ール内のスレッドの実行状態を検出することをさらに含むことができる。前記実行状態に
は、実行正常と実行異常が含まれる。そして、実行状態が異常を実行するスレッドで実行
されるデータ処理タスクに対して、タスクコピー処理を行い、レプリカデータ処理タスク
を得ることができる。その後、上記スレッドプールに未実行状態のスレッドが存在するか
どうかを判断することができる。前記スレッドプールに未実行状態のスレッドが存在する
ことに応答して、前記レプリカデータ処理タスクを前記スレッドプールに未実行状態のス
レッドに割り当てて実行する前記スレッドプールに未実行状態のスレッドが存在しないこ
とに応答して、前記スレッドプール作成スレッドを制御し、前記レプリカデータ処理タス
クを作成したスレッドに割り当てて実行する。
さらに図3を参照すると、上述した各図に示された方法の実現として、本開示は、図2に
示された方法の実施形態に対応する分散型異性体システムに基づくタスクインテリジェン
ト処理装置のいくつかの実施形態を提供し、この装置は、具体的には様々な電子機器に適
用することができる。
2, a flow 200 of some embodiments of a task intelligent processing method based on a distributed heterogeneous system according to the present disclosure is shown. The task intelligent processing method based on a distributed heterogeneous system includes the following steps:
In step 201, a task passing end is controlled to perform data processing task passing processing, and a data processing task set is obtained.
In some embodiments, the execution subject of the task intelligent processing method based on a distributed heterogeneous system (the computing device 101 shown in FIG. 1 ) can control the task passing end to perform data processing task passing processing to obtain a data processing task set, where the task passing end receives a data processing task sent from a client, and the execution subject can obtain the data processing task received by the task passing end. The data processing tasks in the set of data processing tasks may be any tasks related to data processing.
As an example, the data processing task may include:
The above data processing task may be performed at several points in time depending on the train schedule, and tickets may be issued in installments.
In step 202, the data processing task set is input to a pre-trained prioritization model to obtain a priority set.
In some embodiments, the execution entity may input the set of data processing tasks into the pre-trained prioritization model to obtain a set of priorities.
Here, the pre-trained priority decision model is obtained by the following training.
A sample set including sample data processing tasks and corresponding priorities for the sample data processing tasks is obtained.
Based on the above sample set, the following training procedure is carried out.
Input the sample data processing tasks of at least one sample in the sample set into an initial neural network, respectively, and obtain a priority corresponding to each sample in the at least one sample. Determine a loss value of the priority corresponding to each sample in the at least one sample based on the priority corresponding to each sample in the at least one sample and the priority corresponding to each sample in the at least one sample. In response to determining that the loss value converges to a predetermined threshold, set the initial neural network as a training completion priority determination model. In response to determining that the loss value does not converge to a predetermined threshold, adjust network parameters of the initial neural network, construct a training sample set using unused samples, and perform the training step again with the adjusted initial neural network as the initial neural network. Here, the initial neural network may be various neural networks, such as convolutional neural networks, deep neural networks, etc., that process tasks based on data and obtain priorities for the tasks.
The above step 202 is one of the inventive features of the embodiment of the present disclosure, and addresses technical problem 2 mentioned in the Background Art, "by not dividing data processing tasks into ranks but directly assigning tasks to designated threads, tasks with lower ranks are executed first and tasks with higher ranks are executed later,
The present invention solves the problem of affecting the execution order of data processing tasks. The cause of affecting the execution order of data processing tasks is often that tasks with low ranks are executed first and tasks with high ranks are executed later by allocating tasks to a specified thread without dividing the data processing tasks into ranks. By solving such a cause, each data processing task can be executed in order of priority. To achieve this effect, a pre-trained priority decision model is introduced to determine the priority of each data processing task. A training-completed priority decision model is obtained by training an initial neural network. In this way, the ranks of data processing tasks can be divided by the training-completed priority decision model, and task execution can be performed according to the rank of the data processing task, and therefore each data processing task can complete task execution in order of priority.
In step 203, the initial load information and state information of each thread in the thread pool are obtained to obtain an initial load information set and a state information set.
In some embodiments, the execution entity may obtain initial load information and state information for each thread in the thread pool to obtain a set of initial load information and a set of state information.
Here, the thread pool may include a predetermined number of threads. The thread pool may be a thread pool having a thread creation function.
In step 204, each data processing task in the set of data processing tasks is assigned to a thread in the thread pool based on the set of initial load information, the set of status information, and the set of priorities.
In some embodiments, the execution subject is the initial load information set, the state information set,
and based on the priority set, each data processing task in the set of data processing tasks may be assigned to a thread in the thread pool, where one data processing task is assigned to each thread in the thread pool.
In some alternative embodiments of some embodiments, the execution entity assigns each data processing task in the set of data processing tasks to a thread in the thread pool based on the set of initial load information, the set of state information, and the set of priority, wherein state information in the set of state information includes a running state and a not-running state, and may include the following steps:
In a first step, a thread in the thread pool is identified as a first thread having state information of a running thread, and a first thread set is obtained, where the first thread in the first thread set does not have a data processing task assigned to it. The first thread in the first thread set may be a thread having thread state information of a running state.
In a second step, the other threads in the thread pool other than the first thread set are identified as second threads to obtain a second thread set. Here, a data processing task is assigned to the second thread in the second thread set. The second thread in the second thread set may be a thread whose thread state information is in an unexecuted state, and the data processing task can be assigned to the unexecuted thread.
Optionally, the execution entity assigns each data processing task in the set of data processing tasks to a thread in the thread pool based on the set of initial load information, the set of state information and the set of priority, wherein state information in the set of state information includes a running state and a not-running state, and may include the following steps:
In the first step, the number of second threads in the second thread set is determined to obtain the number of allocated threads. For example, the number of second threads in the second thread set may be 5, i.e., the number of allocated threads may be 5.
Secondly, determine the number of data processing tasks in the set of data processing tasks to obtain the number of data processing tasks. For example, the number of data processing tasks in the set of data processing tasks may be 4, i.e. the number of data processing tasks may be 4.
In step 3, it is determined whether the number of data processing tasks is equal to or greater than the number of threads to be assigned.
In step 4, in response to the number of said data processing tasks being equal to or less than the number of said assigned threads, the following task allocation steps are performed for said set of data processing tasks.
From the set of data processing tasks, a data processing task having the highest priority (e.g., the highest priority of grade 1) is selected as the data processing task to be assigned. Based on each initial load information corresponding to the second thread set, the execution time length on each second thread in the second thread set of the data processing task to be assigned is determined, and a set of execution time lengths is obtained. Here, the execution time is obtained by referring to the historical execution time in threads of various load situations of the data processing task to be assigned (e.g., for a certain data processing task to be assigned, if the load of the thread that acquires the data processing task to be assigned is case 1, the multitask execution time of the data processing task to be assigned is long, and the average execution time of the multiple tasks is obtained, and the execution time in the thread with the load of the data processing task to be assigned is case 1). The shortest execution time is narrowed down from the set of execution time lengths as the target execution time length. The second thread corresponding to the target execution time length is determined as the target thread. Here, the target thread may be a thread for executing the data processing task to be assigned. The data processing task awaiting assignment is deleted from the data processing task set, which assigns the data processing task to be assigned to the target thread, and it is determined whether the data processing task set after the task deletion is empty, and in response to the data processing task set after the task deletion being empty, execution of the task allocation step is terminated. In response to the data processing task set after the task deletion being not empty, execution of the task allocation step is continued, with the data processing task set after the task deletion being the data processing task set.
The above first to fourth steps solve technical problem 3 mentioned in the background art as one of the inventive features of the embodiment of the present disclosure: "When the number of data processing tasks matches the number of threads capable of executing tasks, data processing tasks are directly or randomly assigned to each thread, and threads with high loads frequently execute tasks with large amounts of data processing, which results in high frequency of thread clogging." The reason why thread clogging occurs frequently is often because, when the number of data processing tasks matches the number of threads capable of executing tasks, data processing tasks are directly or randomly assigned to each thread, and threads with high loads frequently execute tasks with large amounts of data processing. By solving the above cause, the effect of reducing the frequency of thread clogging can be obtained. To achieve this effect, first, the number of threads to be assigned is determined, then the number of data processing tasks is determined, and the magnitude relationship between the number of the data processing tasks and the number of the assigned threads is determined, and when the number of the data processing tasks is equal to or less than the number of the assigned threads, a task allocation step can be performed for the set of data processing tasks. As a result, when the number of data processing tasks matches the number of threads capable of executing the tasks, each data processing task in the set of data processing tasks can be assigned to each thread, allowing one data processing task to be executed by each thread, reducing the frequency with which a high-load thread executes a task with a large amount of data processing, and reducing the frequency with which thread clogging occurs.
Optionally, the execution entity assigns each data processing task in the set of data processing tasks to a thread in the thread pool based on the set of initial load information, the set of state information and the set of priority, wherein state information in the set of state information includes a running state and a not-running state, and may include the following steps:
First, in response to the number of data processing tasks being greater than the number of assigned threads, determining a difference between the number of data processing tasks and the number of assigned threads. For example, the difference may be two.
Second, the thread pool is controlled to create a number of threads equal to the delta value, for example, two new threads can be created.
Third, the data processing tasks in the set of data processing tasks are assigned to the second set of threads and the created threads in descending order of priority, where the number of data processing tasks in the set of data processing tasks is the same as the number of the second set of threads and the created threads, thereby allowing one data processing task to be assigned to one thread. Thus, implementation is made such that one data processing task is executed per thread.
The above first to third steps are one of the inventive features of the embodiment of the present disclosure, which addresses Technical Problem 4 mentioned in the Background Art: "When the number of data processing tasks is greater than the number of threads capable of executing the tasks, assign data processing tasks directly or randomly to each thread;
The problem of "Task processing efficiency is reduced without considering the method of creating new threads" has been solved. The reason for the decrease in task processing efficiency is often that when the number of data processing tasks is greater than the number of threads that can execute the tasks, data processing tasks are assigned directly or randomly to each thread without considering the method of creating new threads. By solving the above causes,
The effect of improving the efficiency of task processing can be realized. To achieve this effect, first, the number of data processing tasks is greater than the number of assigned threads, and a difference between the number of data processing tasks and the number of assigned threads can be determined. Next, the thread pool is controlled to create threads whose number is equal to the difference value. Finally, data processing tasks in the set of data processing tasks can be assigned to the second set of threads and the created threads in descending order of priority. In this way, by creating new threads,
Each data processing task can be executed on its own thread, improving the efficiency of task processing.
Optionally, the execution entity assigns each data processing task in the set of data processing tasks to a thread in the thread pool based on the set of initial load information, the set of state information and the set of priority, wherein state information in the set of state information includes a running state and a not-running state, and may include the following steps:
In a first step, in response to the number of data processing tasks being greater than the number of assigned threads, data processing tasks in the set of data processing tasks are assigned to the second set of threads in descending order of priority to obtain an assignment result, the assignment result including a set of unassigned data processing tasks. Because the number of data processing tasks is greater than the number of threads, data processing tasks with higher priority are executed first.
In step 2, the following task reassignment steps are performed on the set of unassigned data processing tasks:
a step of detecting whether execution of a second thread in the second thread set has been completed, and determining the second thread that has been completed as a thread to be reassigned in response to the existence of a second thread in the second thread set that has been completed; a step of removing an unassigned data processing task with the highest priority from the unassigned data processing task set, which is assigned to the thread waiting for reassignment, and determining whether the data processing task set after the unassigned task removal is empty, and in response to the data processing task set after the unassigned task removal being empty, execution of the task reassignment step is terminated; and in response to the data processing task set after the unassigned task removal being not empty, execution of the task reassignment step is continued with the data processing task set after the unassigned task removal as the unassigned data processing task set. As a result, after execution of a relatively high priority data processing task has been completed, this thread is in an unexecuted state, and the unassigned data processing task with the highest priority from the set of unassigned data processing tasks can be assigned to the thread, and therefore, rapid execution of data processing tasks can be realized without creating a new thread.
The above first and second steps solve technical problem 5 mentioned in the Background Art, which is one of the inventive features of the embodiment of the present disclosure: "When the number of data processing tasks is greater than the number of threads of executable tasks, the data processing tasks are directly or randomly assigned to each thread, and the waiting time of some of the data processing tasks is increased." Among the data processing tasks,
When the number of data processing tasks is greater than the number of executable task threads, the waiting time for directly or randomly allocating data processing tasks to each thread may become long. By solving such reasons, the effect of reducing the waiting time of data processing tasks can be obtained. To achieve this effect, first, when the number of data processing tasks is greater than the number of the allocated threads, the data processing tasks in the set of data processing tasks can be allocated to the set of second threads in descending order of priority. A task reallocation step is performed for the unallocated data processing tasks. As a result, after the execution of the relatively high priority data processing task is finished, this thread is in an unexecuted state,
The highest priority unassigned data processing task from the set of unassigned data processing tasks can be assigned to this thread, thus without creating a new thread.
It is possible to realize the effects of quickly executing data processing tasks and reducing the waiting time of the data processing tasks.
In step 205, thread activation of the data processing task assigned to the thread pool is controlled to execute the assigned data processing task.
In some embodiments, the execution entity is capable of controlling thread initiation for data processing tasks assigned to the thread pool, and executing the assigned data processing tasks.
Alternatively, the method may further include detecting an execution state of a thread in the thread pool when executing an assigned data processing task. The execution state includes normal execution and abnormal execution. Then, a task copy process is performed on the data processing task executed by the thread executing the abnormal execution state to obtain a replica data processing task. Then, it can be determined whether or not a thread in an unexecuted state exists in the thread pool. In response to the existence of an unexecuted thread in the thread pool, the replica data processing task is assigned to the unexecuted thread in the thread pool for execution. In response to the existence of no unexecuted thread in the thread pool, the thread pool creation thread is controlled to assign the replica data processing task to the created thread for execution.
Further referring to FIG. 3, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides several embodiments of a task intelligent processing device based on a distributed isomer system corresponding to the embodiment of the method shown in FIG. 2, which can be specifically applied to various electronic devices.

図3に示すように、いくつかの実施形態の分散型異機種混在システムに基づくタスクイン
テリジェント処理装置300は、第1制御部301、入力部302、取得部303、割当
部304、および第2制御部305を含む。ここで、第1制御部301は、前記タスク受
け渡し端を制御してデータ処理タスク受け渡し処理を行い、データ処理タスク集合を得る
ように構成され、入力部302は、前記データ処理タスク集合を前記事前トレーニングさ
れた優先度決定モデルに入力して優先度集合を得るように構成され、取得部303は、上
記スレッドプール内の各スレッドの初期負荷情報及び状態情報を取得し、初期負荷情報集
合及び状態情報集合を得るように構成され、割当部304は、前記初期負荷情報集合、前
記状態情報集合及び前記優先度集合に基づいて、前記データ処理タスク集合中の各データ
処理タスクを前記スレッドプール中のスレッドに割り当てるように構成され、前記スレッ
ドプール中の各スレッドにはデータ処理タスクが割り当てられ、第2制御部305は、上
記スレッドプールに割り当てられたデータ処理タスクのスレッド起動を制御し、割り当て
られたデータ処理タスクを実行するように構成される。
装置300に記載されたユニットは、図2を参照して説明された方法の各ステップに対応
していることが理解される。したがって、上述の方法について説明した操作、特徴、およ
び生成された有益な効果は、装置300および装置300に含まれるユニットにも同様に
適用され、ここではこれ以上説明しない。
As shown in Fig. 3, a task intelligent processing device 300 based on a distributed heterogeneous system in some embodiments includes a first control unit 301, an input unit 302, an acquisition unit 303, an allocation unit 304, and a second control unit 305. Here, the first control unit 301 is configured to control the task passing end to perform data processing task passing processing and obtain a data processing task set, the input unit 302 is configured to input the data processing task set into the pre-trained priority determination model to obtain a priority set, the acquisition unit 303 is configured to acquire initial load information and state information of each thread in the thread pool and obtain an initial load information set and a state information set, the allocation unit 304 is configured to allocate each data processing task in the data processing task set to a thread in the thread pool based on the initial load information set, the state information set and the priority set, and each thread in the thread pool is assigned a data processing task, and the second control unit 305 is configured to control thread startup of the data processing tasks assigned to the thread pool and execute the assigned data processing tasks.
It will be understood that the units depicted in the apparatus 300 correspond to the steps of the method described with reference to Fig. 2. Thus, the operations, features and beneficial effects produced as described for the method described above apply equally to the apparatus 300 and the units contained therein and will not be described further herein.

以下、図4を参照すると、本開示のいくつかの実施形態を実現するのに適した電子機器(
例えば、図1の計算装置101)400の構造概略図が示されている。図4に示す電子機
器は単なる一例であり、本開示の実施形態の機能及び使用範囲に何ら制限を与えるもので
はない。
図4に示すように、電子機器400は、読取り専用メモリ(ROM)402に格納された
プログラム、または記憶装置408からランダムアクセスメモリ(RAM)403にロー
ドされたプログラムに従って様々な適切な動作および処理を実行することができる処理装
置(例えば中央プロセッサ、グラフィックプロセッサなど)401を含むことができる。
RAM403には、電子機器400の動作に必要な各種プログラムやデータも格納されて
いる。処理装置401、ROM402、およびRAM403は、バス404を介して互い
に接続されている。バス404には、入出力(I/O)インタフェース405も接続され
ている。
一般に、I/Oインタフェース405には、タッチスクリーン、タッチパッド、キーボー
ド、マウス、カメラ、マイク、加速度計、ジャイロスコープなどを含む入力装置406、
液晶ディスプレイ(LCD)、スピーカ、バイブレータなどを含む出力装置407、磁気
テープ、ハードディスクなどを含む記憶装置408、および通信装置409を含む。通信
装置409は、電子装置400が他の装置とデータを交換するために無線または有線通信
することを可能にすることができる。図4は、様々な装置を備えた電子機器400を示し
ているが、図示された装置のすべてを実施または備える必要はないことが理解されるべき
である。代替的に、より多くまたはより少ない装置を実装または備えることができる。図
4に示す各ブロックは、1つの装置を表してもよく、必要に応じて複数の装置を表しても
よい。
特に、本開示のいくつかの実施形態によれば、フローチャートを参照して上述したプロセ
スをコンピュータソフトウェアプログラムとして実装することができる。例えば、本開示
のいくつかの実施形態は、フローチャートに示される方法を実行するためのプログラムコ
ードを含むコンピュータ可読媒体上に担持されたコンピュータプログラムを含むコンピュ
ータプログラム製品を含む。そのようないくつかの実施形態では、コンピュータプログラ
ムは、通信装置409を介してネットワークからダウンロードされてインストールされて
もよいし、記憶装置408からインストールされてもよいし、ROM402からインスト
ールされてもよい。コンピュータプログラムが処理装置401によって実行されると、本
開示のいくつかの実施形態の方法において定義された上述の機能が実行される。
Referring now to FIG. 4, an electronic device suitable for implementing some embodiments of the present disclosure (e.g.,
For example, a structural schematic diagram of the computing device 101) 400 of Figure 1 is shown. The electronic device shown in Figure 4 is merely an example and does not pose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
As shown in FIG. 4, the electronic device 400 may include a processing device (e.g., a central processor, a graphics processor, etc.) 401 capable of performing various suitable operations and processes according to a program stored in a read-only memory (ROM) 402 or loaded from a storage device 408 into a random access memory (RAM) 403.
The RAM 403 also stores various programs and data necessary for the operation of the electronic device 400. The processing device 401, the ROM 402, and the RAM 403 are connected to one another via a bus 404. An input/output (I/O) interface 405 is also connected to the bus 404.
Generally, the I/O interface 405 includes input devices 406, which may include a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.
The electronic device 400 includes an output device 407 including a liquid crystal display (LCD), a speaker, a vibrator, etc., a storage device 408 including a magnetic tape, a hard disk, etc., and a communication device 409. The communication device 409 can enable the electronic device 400 to communicate wirelessly or by wire to exchange data with other devices. Although FIG. 4 shows the electronic device 400 with various devices, it should be understood that it is not necessary to implement or include all of the devices shown. Alternatively, more or fewer devices can be implemented or included. Each block shown in FIG. 4 may represent one device or multiple devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium including program code for performing the methods shown in the flowcharts. In some such embodiments, the computer program may be downloaded and installed from a network via the communication device 409, or may be installed from the storage device 408, or may be installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are performed.

Claims (2)

分散型異機種混在システムに基づくタスクインテリジェント処理方法であって、
前記分散型異機種混在システムは、タスクの受け渡し端と、事前トレーニングの優先度決
定モデルと、スレッドプールと、を含み、
前記スレッドプールには所定数のスレッドが含まれ、
前記タスクの受け渡し端を制御してデータ処理タスク受け渡し処理を行い、データ処理タ
スク集合を得るステップと、
前記データ処理タスク集合を前記事前トレーニングの優先度決定モデルに入力し、優先度
集合を得るステップと、
前記スレッドプール内の各スレッドの初期負荷情報と状態情報を取得し、初期負荷情報集
合と状態情報集合を取得するステップと、
前記初期負荷情報集合、前記状態情報集合及び前記優先度集合に基づいて、前記スレッド
プール内のスレッドに前記データ処理タスクの集合内の各データ処理タスクを割り当てる
ステップと、ここで、前記スレッドプール内の各スレッドにはデータ処理タスクが割り当
てられ、
前記スレッドプールに割り当てられたデータ処理タスクのスレッド起動を制御し、割り当
てられたデータ処理タスクを実行するステップと、
を含む、分散型異機種混在システムに基づくタスクインテリジェント処理方法。
A method for intelligent task processing based on a distributed heterogeneous system, comprising:
The distributed heterogeneous system includes a task handoff end, a pre-trained prioritization model, and a thread pool;
the thread pool includes a predetermined number of threads;
controlling the task transfer end to perform a data processing task transfer process and obtain a data processing task set;
inputting the set of data processing tasks into the pre-trained prioritization model to obtain a set of priorities;
obtaining initial load information and state information for each thread in the thread pool to obtain a set of initial load information and a set of state information;
assigning each data processing task in the set of data processing tasks to a thread in the thread pool based on the set of initial load information, the set of status information and the set of priorities, where each thread in the thread pool is assigned a data processing task;
controlling thread activation of data processing tasks assigned to the thread pool and executing the assigned data processing tasks;
A method for intelligently processing tasks based on a distributed heterogeneous system, comprising:
コンピュータプログラムが格納されたコンピュータ可読媒体であって、
前記コンピュータプログラムがプロセッサによって実行されると、請求項1に記載の方法
が実現される、コンピュータ可読媒体。
A computer-readable medium having a computer program stored thereon,
A computer readable medium, the computer program product of which, when executed by a processor, implements the method of claim 1 .
JP2023063960A 2022-05-18 2023-04-11 Task intelligent processing method based on distributed heterogeneous system Active JP7478918B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210543938.2A CN114968569A (en) 2022-05-18 2022-05-18 Intelligent task processing method based on distributed heterogeneous system
CN202210543938.2 2022-05-18

Publications (2)

Publication Number Publication Date
JP2023171264A JP2023171264A (en) 2023-12-01
JP7478918B2 true JP7478918B2 (en) 2024-05-08

Family

ID=82985469

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023063960A Active JP7478918B2 (en) 2022-05-18 2023-04-11 Task intelligent processing method based on distributed heterogeneous system

Country Status (2)

Country Link
JP (1) JP7478918B2 (en)
CN (1) CN114968569A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858115A (en) * 2022-11-25 2023-03-28 百度在线网络技术(北京)有限公司 Method and device for handling advertising material
CN115904724B (en) * 2022-12-16 2026-04-24 广州文远知行科技有限公司 Thread allocation methods, devices, storage media, and computer equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080295107A1 (en) 2007-05-23 2008-11-27 Fabrizio Muscarella Adaptive Thread Pool
JP2010243717A (en) 2009-04-03 2010-10-28 Kyocera Mita Corp Image processor
JP2013206248A (en) 2012-03-29 2013-10-07 Hitachi Ltd Information processing system and processing method thereof
JP2019106120A (en) 2017-12-14 2019-06-27 日本電気株式会社 Process scheduling device, process execution device, and process scheduling method
US20200125400A1 (en) 2018-10-18 2020-04-23 Oracle International Corporation Selecting threads for concurrent processing of data
JP2020161014A (en) 2019-03-28 2020-10-01 富士通株式会社 Information processing device and execution control program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8209701B1 (en) * 2007-09-27 2012-06-26 Emc Corporation Task management using multiple processing threads
KR101576628B1 (en) * 2015-05-14 2015-12-10 주식회사 티맥스 소프트 Method, server and computer-readable recording medium for managing size of thread pool dynamically

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080295107A1 (en) 2007-05-23 2008-11-27 Fabrizio Muscarella Adaptive Thread Pool
JP2010243717A (en) 2009-04-03 2010-10-28 Kyocera Mita Corp Image processor
JP2013206248A (en) 2012-03-29 2013-10-07 Hitachi Ltd Information processing system and processing method thereof
JP2019106120A (en) 2017-12-14 2019-06-27 日本電気株式会社 Process scheduling device, process execution device, and process scheduling method
US20200125400A1 (en) 2018-10-18 2020-04-23 Oracle International Corporation Selecting threads for concurrent processing of data
JP2020161014A (en) 2019-03-28 2020-10-01 富士通株式会社 Information processing device and execution control program

Also Published As

Publication number Publication date
JP2023171264A (en) 2023-12-01
CN114968569A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
CN109564528B (en) System and method for computing resource allocation in distributed computing
JP4112420B2 (en) Method and system for allocating system resources to applications using weights
CN114968567B (en) Methods, apparatus, and media for allocating computing resources for computing nodes
JP7478918B2 (en) Task intelligent processing method based on distributed heterogeneous system
WO2021180092A1 (en) Task dispatching method and apparatus
CN109936604A (en) A kind of resource regulating method, device and system
CN116157778B (en) Systems and methods for hybrid centralized and distributed scheduling on shared physical hosts
CN113032102A (en) Resource rescheduling method, device, equipment and medium
CN115113817B (en) Network card-based storage optimization method, system, electronic device and storage medium
CN116610422A (en) Task scheduling method, device and system
CN112559122A (en) Virtualization instance management and control method and system based on electric power special security and protection equipment
JP2022025055A (en) System and method for scheduling of resource-based command
CN110162397B (en) Resource allocation method, device and system
JP6007516B2 (en) Resource allocation system, resource allocation method, and resource allocation program
CN117472570A (en) Methods, apparatus, electronic devices and media for scheduling accelerator resources
CN120196421A (en) GPU resource virtualization computing power scheduling method and device
US20090187784A1 (en) Fair and dynamic central processing unit scheduling
CN119105853A (en) A virtualized resource scheduling method, device, equipment, storage medium and product
CN109189581B (en) A job scheduling method and device
CN113010309B (en) Cluster resource scheduling method, device, storage medium, equipment and program product
CN114546587A (en) A method for expanding and shrinking capacity of online image recognition service and related device
CN115617451B (en) Data processing method and data processing device
CN113407313A (en) Resource demand-aware multi-queue scheduling method, system and server
CN116501486A (en) A cluster resource scheduling method, system, terminal and storage medium
EP1611523B1 (en) Controlling usage of system resources by a network manager

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230411

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20230411

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230801

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231019

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20231116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231128

R150 Certificate of patent or registration of utility model

Ref document number: 7478918

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150