JP2022522609A - How to execute user code of programming platform and platform, node, device, medium - Google Patents

How to execute user code of programming platform and platform, node, device, medium Download PDF

Info

Publication number
JP2022522609A
JP2022522609A JP2021540579A JP2021540579A JP2022522609A JP 2022522609 A JP2022522609 A JP 2022522609A JP 2021540579 A JP2021540579 A JP 2021540579A JP 2021540579 A JP2021540579 A JP 2021540579A JP 2022522609 A JP2022522609 A JP 2022522609A
Authority
JP
Japan
Prior art keywords
task
node
calculation
user code
task queue
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.)
Pending
Application number
JP2021540579A
Other languages
Japanese (ja)
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.)
Shenzhen Sensetime Technology Co Ltd
Original Assignee
Shenzhen Sensetime Technology Co Ltd
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 Shenzhen Sensetime Technology Co Ltd filed Critical Shenzhen Sensetime Technology Co Ltd
Publication of JP2022522609A publication Critical patent/JP2022522609A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)
  • Electrically Operated Instructional Devices (AREA)
  • Electrophonic Musical Instruments (AREA)
  • Input Circuits Of Receivers And Coupling Of Receivers And Audio Equipment (AREA)

Abstract

本願は、プログラミング・プラットフォームのユーザコードの実行方法及びプラットフォーム、ノード、機器、媒体を開示する。ここで、プログラミング・プラットフォームは、サービスノード、タスクキュー、計算ノードを備え、前記方法は、サービスノードが、ユーザ端末を表すためのユーザコードを取得し、ユーザコードを実行タスクとしてタスクキューに登録することと、計算ノードが、タスクキューを監視して、実行タスクを取得することと、計算ノードが、実行タスクを計算して、計算結果を取得することと、サービスノードが、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックすることと、を含む。【選択図】図1This application discloses a method of executing a user code of a programming platform and a platform, a node, a device, and a medium. Here, the programming platform includes a service node, a task queue, and a compute node. In the above method, the service node acquires a user code for representing a user terminal and registers the user code in the task queue as an execution task. That, the compute node monitors the task queue and gets the execution task, the compute node calculates the execution task and gets the computation result, and the service node gets the computation result from the compute node. And feed back the calculation result to the user terminal. [Selection diagram] Fig. 1

Description

本願は、2020年02月14日に中国特許局に提出された、出願番号が202010093681.6である中国特許出願に基づいて提出されるものであり、当該中国特許出願の優先権を主張し、当該中国特許出願の全ての内容が参照によって本願に組み込まれる。 This application is submitted on the basis of a Chinese patent application with an application number of 20200093681.6 filed with the Chinese Patent Office on February 14, 2020, claiming the priority of the Chinese patent application. The entire contents of the Chinese patent application are incorporated herein by reference.

本願は、プログラミング技術分野に関し、特に、プログラミング・プラットフォームのユーザコードの実行方法及びプラットフォーム、ノード、機器、媒体に関する。 This application relates to the field of programming technology, and more particularly to the method of executing user code of a programming platform and the platform, node, device, medium.

人工知能の急速な発展に伴い、コード操作に依存する様々なシステムも現れている。コードは、ますます多様化するだけでなく、システムが提供できる機能に対してますます高い要件が課せされている。 With the rapid development of artificial intelligence, various systems that rely on code operations are emerging. Not only is the code becoming more diverse, but it also imposes ever-increasing requirements on the functionality that the system can provide.

ますます複雑になるコードに直面して、現在のプログラミング・プラットフォームでは、Kernel(実行環境)などのコードの実行環境は通常、ユーザ端末との接続関係を維持するとともに、ユーザ端末によって発行されたコードを計算する必要があり、その結果、システム能力はコード実行要件を満たすことができなくなる。 In the face of increasingly complex code, in today's programming platforms, code execution environments such as the Kernel (execution environment) typically maintain connectivity with the user terminal and are issued by the user terminal. As a result, the system power cannot meet the code execution requirements.

上記事情に鑑みて、ユーザコードを実行するプログラミング・プラットフォームの同時実行能力をどのように改善するかが、解決すべき緊急の課題になっている。 In view of the above circumstances, how to improve the concurrency of the programming platform that executes the user code has become an urgent issue to be solved.

本願は、プログラミング・プラットフォームのユーザコードの実行方法及びプラットフォーム、ノード、機器、媒体を提供する。 The present application provides a method of executing a user code of a programming platform and a platform, a node, a device, and a medium.

本願に係るプログラミング・プラットフォームは、サービスノード、タスクキュー、計算ノードを備える。本願の第1態様は、プログラミング・プラットフォームのユーザコードの実行方法を提供し、前記方法は、前記サービスノードが、ユーザ端末を表すためのユーザコードを取得し、前記ユーザコードを実行タスクとして前記タスクキューに登録することと、前記計算ノードが、前記タスクキューを監視して、前記実行タスクを取得することと、前記計算ノードが、前記実行タスクを計算して、計算結果を取得することと、前記サービスノードが、前記計算ノードから前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックすることと、を含む。 The programming platform according to the present application includes a service node, a task queue, and a calculation node. A first aspect of the present application provides a method of executing a user code of a programming platform, wherein the service node acquires a user code for representing a user terminal, and the user code is used as an execution task. To register in the queue, to monitor the task queue and acquire the execution task, and to have the calculation node calculate the execution task and acquire the calculation result. The service node acquires the calculation result from the calculation node and feeds back the calculation result to the user terminal.

したがって、サービスノードは、ユーザ端末との接続を実現し、ユーザコードをキューに登録し、計算ノードは、ユーザコードを計算し、これにより、ユーザコードの実行を実現する。上記のユーザコードの実行中、サービスノードと計算ノードは別々に設置されるため、ユーザ端末の接続とユーザコードの計算は、それぞれサービスノード及び計算ノードによって完了し、ユーザコードの実行の非同期通信を実現し、システムの同時実行能力を向上させる。 Therefore, the service node realizes the connection with the user terminal and registers the user code in the queue, and the calculation node calculates the user code, thereby realizing the execution of the user code. Since the service node and the calculation node are installed separately during the execution of the above user code, the connection of the user terminal and the calculation of the user code are completed by the service node and the calculation node, respectively, and asynchronous communication of the execution of the user code is performed. Realize and improve the simultaneous execution capacity of the system.

ここで、前記計算ノードの数は少なくとも2つであり、前記計算ノードが、前記タスクキューを監視して、前記実行タスクを取得することは、少なくとも2つの前記計算ノードが、前記タスクキューを監視し、前記実行タスクを取得するように前記タスクキューに要求することと、前記タスクキューが、1つの前記実行タスクを1つの前記計算ノードに割り当てることと、を含む。 Here, the number of the calculation nodes is at least two, and the calculation node monitors the task queue to acquire the execution task, that is, at least two calculation nodes monitor the task queue. However, the task queue includes requesting the task queue to acquire the execution task, and the task queue allocates one execution task to one calculation node.

したがって、複数の計算ノードがタスクキュー内の1つの実行タスクを監視する場合、複数の計算ノードはすべて、実行タスクを取得するようにタスクキューに要求し、タスクキューは、当該実行タスクを1つの計算ノードに割り当てることにより、タスクキューを介して実行タスクの合理的な割当を完了することができる。 Therefore, if multiple compute nodes monitor one execution task in a task queue, all the compute nodes request the task queue to get the execution task, and the task queue has one execution task. By assigning to a compute node, you can complete the rational allocation of executed tasks via the task queue.

ここで、前記タスクキューは、第1タスクキュー及び第2タスクキューを含み、少なくとも2つの前記計算ノードは、第1計算ノード及び第2計算ノードを含み、前記ユーザコードを実行タスクとしてタスクキューに登録することは、前記ユーザコードの計算特徴に従って、前記ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録することを含み、前記計算ノードが、前記タスクキューを監視することは、前記第1計算ノードが、前記第1タスクキューを監視し、前記第2計算ノードが、前記第2タスクキューを監視することを含む。 Here, the task queue includes a first task queue and a second task queue, and at least two of the calculation nodes include a first calculation node and a second calculation node, and the user code is used as an execution task in the task queue. Registration includes registering the user code in the first task queue or the second task queue as an execution task according to the calculation feature of the user code, and the calculation node monitoring the task queue. The first compute node monitors the first task queue, and the second compute node monitors the second task queue.

したがって、サービスノードは、ユーザコードの計算特徴に基づいてユーザコードを区別し、それらをそれぞれ第1タスクキュー又は第2タスクキューに登録することができるため、異なる計算ノードは、異なるタスクキューを監視し、それにより、ユーザコードの様々な実行要件に応じて、異なる方式でユーザコードを処理することができる。 Therefore, the service node can distinguish user codes based on the computational characteristics of the user code and register them in the first task queue or the second task queue, respectively, so that different compute nodes monitor different task queues. It is then possible to process the user code in different ways depending on the various execution requirements of the user code.

ここで、前記サービスノードの数は少なくとも2つであり、前記サービスノードが、ユーザ端末を表すためのユーザコードを取得することは、少なくとも2つの前記サービスノードが、リバースプロキシを介して割り当てられる前記ユーザコードを取得することを含む。 Here, the number of the service nodes is at least two, and when the service node acquires a user code for representing a user terminal, the service nodes are assigned via the reverse proxy. Includes getting a user code.

したがって、本願は、少なくとも2つのサービスノードを提供することができ、サービスノードは、リバースプロキシを介して割り当てられるユーザコードを取得し、それにより、複数のサービスノードにより、ユーザ端末によって発行されたユーザコードを受信することを実現でき、同時実行処理能力を向上させる。 Therefore, the present application can provide at least two service nodes, which obtain a user code assigned via a reverse proxy, thereby a user issued by a user terminal by a plurality of service nodes. It is possible to receive the code and improve the concurrency processing capacity.

ここで、前記計算ノードが、前記実行タスクの計算を完了した後、対応する計算リソースを解放し、前記タスクキューを監視し続ける。 Here, after the calculation node completes the calculation of the execution task, it releases the corresponding calculation resource and continues to monitor the task queue.

したがって、計算ノードは計算を完了した後すぐにリソースを解放し、新しい実行タスクを取得するために、タスクキューを監視し続ける。計算ノードは、実行タスクの実行を完了した後すぐにリソースを解放するため、計算リソースとメモリリソースが再利用され、ハードウェアリソースを十分かつ合理的に使用することができる。 Therefore, the compute node releases resources as soon as it completes the computation and continues to monitor the task queue to get new execution tasks. Since the compute node releases the resource immediately after completing the execution of the execution task, the compute resource and the memory resource are reused, and the hardware resource can be sufficiently and rationally used.

ここで、前記プログラミング・プラットフォームはメッセージキューを更に含み、前記サービスノードが、前記計算ノードから前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックすることは、前記計算ノードが、前記計算結果を前記メッセージキューに登録することと、前記サービスノードが、前記メッセージキューを監視して前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックすることと、を含む。 Here, the programming platform further includes a message queue, and the calculation node obtains the calculation result from the calculation node and feeds back the calculation result to the user terminal. This includes registering the result in the message queue, the service node monitoring the message queue, acquiring the calculation result, and feeding back the calculation result to the user terminal.

したがって、計算ノードは、任意のユーザコードに対応する実行タスクの実行を完了した後、計算結果をメッセージキューに一律に登録し、サービスノードは、メッセージキューを監視することで、計算ノードの計算結果を取得することができるため、計算結果を一律に管理できる。 Therefore, after the calculation node completes the execution of the execution task corresponding to any user code, the calculation result is uniformly registered in the message queue, and the service node monitors the message queue to calculate the calculation result of the calculation node. Can be obtained, so the calculation results can be managed uniformly.

ここで、前記サービスノードが、前記計算結果を取得するまで、前記ユーザ端末とのセッション接続を維持する。 Here, the service node maintains a session connection with the user terminal until the calculation result is acquired.

したがって、サービスノードは、前記計算結果を取得するまで、常にユーザ端末とのセッション接続を維持し、すなわち、サービスノードとユーザ端末との間の接続を維持し、計算結果をユーザ端末にフィードバックするのに便利である。 Therefore, the service node always maintains a session connection with the user terminal until the calculation result is acquired, that is, maintains a connection between the service node and the user terminal, and feeds back the calculation result to the user terminal. It is convenient for.

本願の第2態様は、プログラミング・プラットフォームのユーザコードの実行方法を提供し、当該方法は、ユーザ端末を表すためのユーザコードを取得することと、計算ノードがタスクキューから実行タスクを取得して計算するように、前記ユーザコードを前記実行タスクとして前記タスクキューに登録することと、前記計算ノードの計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックすることと、を含む。 A second aspect of the present application provides a method of executing a user code of a programming platform, wherein the method obtains a user code for representing a user terminal and a compute node obtains an execution task from a task queue. The user code is registered in the task queue as the execution task so as to be calculated, and the calculation result of the calculation node is acquired and the calculation result is fed back to the user terminal.

したがって、サービスノードは、ユーザ端末と接続し、ユーザ端末によって発行されたユーザコードを実行タスクとしてタスクキューに登録するように構成され、これにより、サービスノードから独立した計算ノードがタスクキューから実行タスクを取得して計算することにより計算結果を取得した後に、サービスノードは、計算ノードの計算結果を取得し、計算結果をユーザ端末にフィードバックすることにより、ユーザコードの実行を実現する。 Therefore, the service node is configured to connect to the user terminal and register the user code issued by the user terminal in the task queue as an execution task, whereby the compute node independent of the service node is executed from the task queue. After acquiring the calculation result by acquiring and calculating, the service node acquires the calculation result of the calculation node and feeds back the calculation result to the user terminal to realize the execution of the user code.

ここで、計算ノードがタスクキューから実行タスクを取得して計算できるように、前記ユーザコードを前記実行タスクとして前記タスクキューに登録することは、前記ユーザコードの計算特徴に従って、前記ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録することにより、第1計算ノードが前記第1タスクキューから前記実行タスクを取得して計算できるようにするか、又は第2計算ノードが前記第2タスクキューから前記実行タスクを取得して計算できるようにすることを含む。 Here, registering the user code as the execution task in the task queue so that the calculation node can acquire the execution task from the task queue and calculate the execution task executes the user code according to the calculation characteristics of the user code. By registering it in the first task queue or the second task queue as a task, the first calculation node can acquire the execution task from the first task queue and calculate it, or the second calculation node can calculate the first task queue. 2 It includes acquiring the execution task from the task queue and making it possible to calculate.

したがって、サービスノードは、ユーザコードの計算特徴に基づいてユーザコードを区別し、それらをそれぞれ第1タスクキュー又は第2タスクキューに登録することができるため、異なる計算ノードは、異なるタスクキューを監視し、それにより、ユーザコードの様々な実行要件に応じて、異なる方式でユーザコードを処理することができる。 Therefore, the service node can distinguish user codes based on the computational characteristics of the user code and register them in the first task queue or the second task queue, respectively, so that different compute nodes monitor different task queues. It is then possible to process the user code in different ways depending on the various execution requirements of the user code.

ここで、前記ユーザ端末を表すためのユーザコードを取得することは、リバースプロキシを介して割り当てられる前記ユーザコードを取得することを含む。 Here, acquiring the user code for representing the user terminal includes acquiring the user code assigned via the reverse proxy.

したがって、サービスノードは、リバースプロキシを介して割り当てられるユーザコードを取得し、それにより、サービスノードは、ユーザ端末によって発行されたユーザコードを合理的に割り当てることができる。 Therefore, the service node obtains the user code assigned via the reverse proxy, whereby the service node can reasonably assign the user code issued by the user terminal.

ここで、前記方法は、前記計算結果を取得するまで、前記ユーザ端末とのセッション接続を維持することを含む。 Here, the method includes maintaining a session connection with the user terminal until the calculation result is acquired.

したがって、サービスノードは、前記計算結果を取得するまで、常にユーザ端末とのセッション接続を維持し、すなわち、サービスノードとユーザ端末との間の接続を維持し、計算結果をユーザ端末にフィードバックするのに便利である。 Therefore, the service node always maintains a session connection with the user terminal until the calculation result is acquired, that is, maintains a connection between the service node and the user terminal, and feeds back the calculation result to the user terminal. It is convenient for.

本願の第3態様は、プログラミング・プラットフォームのユーザコードの実行方法を提供し、前記方法は、タスクキューを監視して、実行タスクを取得することであって、前記タスクキューは前記実行タスクを含み、前記実行タスクは前記ユーザコードに対応することと、前記実行タスクを計算して、計算結果を取得することと、を含む。 A third aspect of the present application provides a method of executing a user code of a programming platform, wherein the method is to monitor a task queue and acquire an execution task, wherein the task queue includes the execution task. , The execution task includes corresponding to the user code, calculating the execution task, and acquiring the calculation result.

したがって、タスクキューは、実行タスクを含み、実行タスクはユーザコードに対応するため、計算ノードは、実行タスクを含むタスクキューを監視して、ユーザコードに対応する実行タスクを取得し、実行タスクを計算して計算結果を取得することにより、実行タスクの取得と計算を実現する。 Therefore, since the task queue includes the execution task and the execution task corresponds to the user code, the compute node monitors the task queue including the execution task, acquires the execution task corresponding to the user code, and performs the execution task. By calculating and acquiring the calculation result, the execution task is acquired and the calculation is realized.

ここで、プログラミング・プラットフォームのユーザコードの実行方法は、前記実行タスクの計算を完了した後、対応する計算リソースを解放し、前記タスクキューを監視し続けることを含む。 Here, the method of executing the user code of the programming platform includes releasing the corresponding calculation resource and continuing to monitor the task queue after completing the calculation of the execution task.

したがって、計算ノードは計算を完了した後すぐにリソースを解放し、新しい実行タスクを取得するために、タスクキューを監視し続け、異なる計算ノードでユーザコードを実行し、計算ノードは、実行タスクの実行を完了した後すぐにリソースを解放するため、計算リソースとメモリリソースが再利用され、ハードウェアリソースを十分かつ合理的に使用することができる。 Therefore, the compute node releases resources immediately after completing the computation, keeps an eye on the task queue to get new execution tasks, executes user code on different compute nodes, and compute nodes of the execution task. Since the resources are released immediately after the execution is completed, the computational resources and the memory resources are reused, and the hardware resources can be used sufficiently and rationally.

本願の第4態様は、プログラミング・プラットフォームを提供し、当該プログラミング・プラットフォームは、サービスノード、タスクキュー、計算ノードを備え、前記サービスノードは、ユーザ端末を表すためのユーザコードを取得し、前記ユーザコードを実行タスクとして前記タスクキューに登録するように構成され、前記計算ノードは、前記タスクキューを監視して、前記実行タスクを取得するように構成され、前記計算ノードは更に、前記実行タスクを計算して、計算結果を取得するように構成され、前記サービスノードは更に、前記計算ノードから前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックするように構成される。 A fourth aspect of the present application provides a programming platform, which comprises a service node, a task queue, and a compute node, wherein the service node obtains a user code for representing a user terminal, and the user. The code is configured to register the code as an execution task in the task queue, the compute node is configured to monitor the task queue and acquire the execute task, and the compute node further configures the execute task. It is configured to calculate and acquire the calculation result, and the service node is further configured to acquire the calculation result from the calculation node and feed back the calculation result to the user terminal.

ここで、前記計算ノードの数は少なくとも2つであり、前記計算ノードが、前記タスクキューを監視して、前記実行タスクを取得するように構成される場合、少なくとも2つの前記計算ノードは前記タスクキューを監視し、前記実行タスクを取得するように前記タスクキューに要求するように構成され、前記タスクキューは、1つの前記実行タスクを1つの前記計算ノードに割り当てるように構成される。 Here, the number of the calculation nodes is at least two, and when the calculation nodes are configured to monitor the task queue and acquire the execution task, the at least two calculation nodes are the tasks. The task queue is configured to monitor the queue and request the task queue to acquire the execution task, and the task queue is configured to allocate one execution task to one compute node.

ここで、前記タスクキューは、第1タスクキュー及び第2タスクキューを含み、少なくとも2つの前記計算ノードは、第1計算ノード及び第2計算ノードを含み、前記サービスノードが、前記ユーザコードを実行タスクとしてタスクキューに登録するように構成される場合、具体的に、前記サービスノードが、前記ユーザコードの計算特徴に従って、前記ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録するように構成される場合、前記計算ノードは前記タスクキューを監視するように構成され、具体的に、前記第1計算ノードは前記第1タスクキューを監視するように構成され、前記第2計算ノードは前記第2タスクキューを監視するように構成される。 Here, the task queue includes a first task queue and a second task queue, at least two of the compute nodes include a first compute node and a second compute node, and the service node executes the user code. When configured to be registered in the task queue as a task, specifically, the service node registers the user code in the first task queue or the second task queue as an execution task according to the calculation characteristics of the user code. When configured as such, the compute node is configured to monitor the task queue, specifically, the first compute node is configured to monitor the first task queue and the second compute node. Is configured to monitor the second task queue.

ここで、前記サービスノードの数は少なくとも2つであり、前記サービスノードがユーザ端末を表すためのユーザコードを取得するように構成される場合、少なくとも2つの前記サービスノードは、リバースプロキシを介して割り当てられる前記ユーザコードを取得するように構成される。 Here, the number of the service nodes is at least two, and when the service nodes are configured to acquire a user code for representing a user terminal, the at least two service nodes are connected via a reverse proxy. It is configured to acquire the assigned user code.

ここで、前記計算ノードは、前記実行タスクの計算を完了した後、対応する計算リソースを解放し、前記タスクキューを監視し続けるように構成される。 Here, the calculation node is configured to release the corresponding calculation resource and continue to monitor the task queue after completing the calculation of the execution task.

ここで、前記プログラミング・プラットフォームはメッセージキューを更に含み、前記サービスノードが前記計算ノードから前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックするように構成される場合、前記計算ノードは、前記計算結果を前記メッセージキューに登録するように構成され、前記サービスノードは、前記メッセージキューを監視して前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックするように構成される。 Here, if the programming platform further includes a message queue and the service node is configured to acquire the calculation result from the calculation node and feed the calculation result back to the user terminal, the calculation node is configured. , The service node is configured to monitor the message queue, acquire the calculation result, and feed back the calculation result to the user terminal. ..

ここで、前記サービスノードは更に、前記計算結果を取得するまで、前記ユーザ端末とのセッション接続を維持するように構成される。 Here, the service node is further configured to maintain a session connection with the user terminal until the calculation result is acquired.

本願の第5態様は、サービスノードを提供し、前記サービスノードは、受信ユニット、登録ユニット及び取得ユニットを備え、前記受信ユニットは、ユーザ端末を表すためのユーザコードを取得するように構成され、前記登録ユニットは、計算ノードがタスクキューから実行タスクを取得して計算できるように、前記ユーザコードを前記実行タスクとして前記タスクキューに登録するように構成され、前記取得ユニットは、前記計算ノードの計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックするように構成される。 A fifth aspect of the present application provides a service node, wherein the service node includes a receiving unit, a registration unit, and an acquisition unit, and the receiving unit is configured to acquire a user code for representing a user terminal. The registration unit is configured to register the user code as the execution task in the task queue so that the calculation node can acquire the execution task from the task queue and calculate it, and the acquisition unit is the calculation node. It is configured to acquire the calculation result and feed back the calculation result to the user terminal.

ここで、前記登録ユニットは、計算ノードがタスクキューから実行タスクを取得して計算できるように、前記ユーザコードを前記実行タスクとして前記タスクキューに登録するように構成され、前記登録ユニットは更に、前記ユーザコードの計算特徴に従って、前記ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録することにより、第1計算ノードが前記第1タスクキューから前記実行タスクを取得して計算できるようにするか、又は第2計算ノードが前記第2タスクキューから前記実行タスクを取得して計算できるようにするように構成される。 Here, the registration unit is configured to register the user code as the execution task in the task queue so that the compute node can acquire the execution task from the task queue and calculate it, and the registration unit is further configured. By registering the user code as an execution task in the first task queue or the second task queue according to the calculation feature of the user code, the first calculation node can acquire the execution task from the first task queue and calculate. Or it is configured to allow the second compute node to acquire and compute the execution task from the second task queue.

ここで、前記受信ユニットは、ユーザ端末を表すためのユーザコードを取得するように構成され、前記受信ユニットは更に、リバースプロキシを介して割り当てられる前記ユーザコードを取得するように構成される。 Here, the receiving unit is configured to acquire a user code for representing a user terminal, and the receiving unit is further configured to acquire the user code assigned via a reverse proxy.

ここで、前記取得ユニットが前記計算結果を取得するまで、前記サービスノードは、前記ユーザ端末とのセッション接続を維持するように構成される。 Here, the service node is configured to maintain a session connection with the user terminal until the acquisition unit acquires the calculation result.

本願の第6態様は、計算ノードを提供し、前記計算ノードは、監視ユニット及び計算ユニットを備え、前記監視ユニットは、タスクキューを監視して実行タスクを取得するように構成され、前記タスクキューは前記実行タスクを含み、前記実行タスクは前記ユーザコードに対応し、前記計算ユニットは、前記実行タスクを計算して、計算結果を取得するように構成される。 A sixth aspect of the present application provides a calculation node, wherein the calculation node includes a monitoring unit and a calculation unit, and the monitoring unit is configured to monitor a task queue and acquire an execution task. Includes the execution task, the execution task corresponds to the user code, and the calculation unit is configured to calculate the execution task and obtain a calculation result.

ここで、前記計算ユニットは更に、前記実行タスクの計算を完了した後、対応する計算リソースを解放し、前記タスクキューを監視し続けるように構成される。 Here, the calculation unit is further configured to release the corresponding calculation resource and continue to monitor the task queue after completing the calculation of the execution task.

本願の第7態様は、電子機器を提供し、前記電子機器は、相互に結合されているメモリとプロセッサを備え、前記プロセッサは、前記メモリに記憶されているプログラム命令を実行することにより、上記の第1態様におけるプログラミング・プラットフォームのユーザコードの実行方法、及び/又は、上記の第2態様におけるプログラミング・プラットフォームのユーザコードの実行方法、及び/又は、上記の第3態様におけるプログラミング・プラットフォームのユーザコードの実行方法を実現するように構成される。 A seventh aspect of the present application provides an electronic device, wherein the electronic device comprises a memory and a processor coupled to each other, and the processor executes a program instruction stored in the memory. The method of executing the user code of the programming platform in the first aspect of the above, and / or the method of executing the user code of the programming platform in the second aspect of the above, and / or the user of the programming platform in the third aspect of the above. It is configured to implement how the code is executed.

したがって、サービスノードは、ユーザ端末との接続を実現し、ユーザコードをキューに登録するように構成され、計算ノードは、ユーザコードを計算するように構成され、これにより、ユーザコードの実行を実現する。上記のユーザコードの実行中、サービスノードと計算ノードは別々に設置されるため、ユーザ端末の接続とユーザコードの計算は、それぞれサービスノード及び計算ノードによって完了し、ユーザコードの実行の非同期通信を実現し、システムの同時実行能力を向上させる。 Therefore, the service node is configured to provide a connection to the user terminal and queue the user code, and the compute node is configured to compute the user code, thereby achieving the execution of the user code. do. Since the service node and the calculation node are installed separately during the execution of the above user code, the connection of the user terminal and the calculation of the user code are completed by the service node and the calculation node, respectively, and asynchronous communication of the execution of the user code is performed. Realize and improve the simultaneous execution capacity of the system.

本願の第8態様は、プロセッサ実行可能なプログラム命令が記憶されているコンピュータ可読記憶媒体を提供し、プログラム命令は、上記の第1態様におけるプログラミング・プラットフォームのユーザコードの実行方法、及び/又は、上記の第2態様におけるプログラミング・プラットフォームのユーザコードの実行方法、及び/又は、上記の第3態様におけるプログラミング・プラットフォームのユーザコードの実行方法を実現するために使用される。 Eighth aspect of the present application provides a computer-readable storage medium in which program instructions that can be executed by a processor are stored, and the program instructions are the method of executing the user code of the programming platform in the first aspect described above, and / or. It is used to realize the method of executing the user code of the programming platform in the second aspect described above and / or the method of executing the user code of the programming platform in the third aspect described above.

したがって、上記のユーザコードの実行中、サービスノードは、ユーザ端末との接続を実現するように構成され、計算ノードは、ユーザコードの計算を実現するように構成され、ユーザコードの実行の非同期通信を実現し、システムの同時実行能力を向上させる。 Therefore, during the execution of the user code described above, the service node is configured to implement the connection with the user terminal, the compute node is configured to implement the computation of the user code, and asynchronous communication of the execution of the user code. And improve the simultaneous execution capacity of the system.

ここでの図面は、本明細書に組み込まれてその一部を構成し、これらの図面は、本願と一致する実施例を示し、明細書とともに本願の実施例の技術的解決策を説明するために使用される。
本願実施例に係るプログラミング・プラットフォームのユーザコードの実行方法の実施プロセスの概略図である。 本願実施例に係るプログラミング・プラットフォームのユーザコードの実行方法の別の実施プロセスの概略図である。 本願実施例に係るプログラミング・プラットフォームのユーザコードの実行方法の更に別の実施プロセスの概略図である。 本願実施例に係るプログラミング・プラットフォームの概略構造図である。 本願実施例に係るプログラミング・プラットフォームのサービスノード41の概略構造図である。 本願実施例に係るプログラミング・プラットフォームの計算ノード43の概略構造図である。 本願実施例に係るプログラミング・プラットフォームの別の概略構造図である。 本願実施例に係る電子機器のフレームワークの概略図である。 本願実施例に係る記憶装置のフレームワークの概略図である。
The drawings herein are incorporated herein to constitute a portion thereof, and these drawings are intended to show examples consistent with the present application and to illustrate the technical solutions of the embodiments of the present application together with the specification. Used for.
It is a schematic diagram of the implementation process of the execution method of the user code of the programming platform which concerns on embodiment of this application. It is a schematic diagram of another implementation process of the method of executing the user code of the programming platform according to the embodiment of the present application. It is a schematic diagram of yet another implementation process of the method of executing the user code of the programming platform according to the embodiment of the present application. It is a schematic structural diagram of the programming platform which concerns on embodiment of this application. It is a schematic structural diagram of the service node 41 of the programming platform which concerns on embodiment of this application. It is a schematic structural diagram of the calculation node 43 of the programming platform which concerns on embodiment of this application. It is another schematic structure diagram of the programming platform which concerns on embodiment of this application. It is a schematic diagram of the framework of the electronic device which concerns on embodiment of this application. It is a schematic diagram of the framework of the storage device which concerns on embodiment of this application.

以下、本願実施例の様々な例示的な実施例、特徴および態様を、図面を参照して詳細に説明する。図面における同じ参照番号は、同じまたは類似の機能の要素を表示する。実施例の様々な態様を図面に示したが、特に明記しない限り、縮尺通りに図面を描く必要がない。 Hereinafter, various exemplary examples, features, and embodiments of the embodiments of the present application will be described in detail with reference to the drawings. The same reference number in the drawing indicates an element of the same or similar function. Various embodiments of the examples are shown in the drawings, but it is not necessary to draw the drawings to scale unless otherwise specified.

以下では、図面を参照して、本願実施例の技術的解決策を詳細に説明する。 Hereinafter, the technical solution of the embodiment of the present application will be described in detail with reference to the drawings.

以下、本願実施例における図面を参照して、本願実施例における技術的解決策を明確且つ完全に説明するが、説明された実施例は、本願実施例の一部に過ぎず、実施例の全部ではないことは明らかであろう。本願実施例に基づき、創造的な努力なしに当業者が取得した他のすべての実施例は、本願の保護範囲に含まれる。本明細書における「第1」、「第2」という用語は、説明のためにのみ採用されており、相対的な重要性を示したり暗示したり、示された技術的特徴の数を暗黙的に示したりするものとして理解されるべきではない。 Hereinafter, the technical solution in the embodiment of the present application will be clearly and completely described with reference to the drawings in the embodiment of the present application. It will be clear that it is not. All other examples obtained by one of ordinary skill in the art based on the examples of the present application without creative effort are included in the scope of protection of the present application. The terms "first" and "second" herein are used for illustration purposes only and imply a number of technical features that indicate or imply relative importance. It should not be understood as being shown in.

いくつかの実施例において、人工知能の普及に伴い、機械学習及び人工知能プログラミング教育もプログラミング教育の重要な部分に徐々になっている。従来の入門プログラミング教育とは異なり、人工知能プログラミング教育で学生が実行する人工知能コードは、通常、大量の計算を必要とし、対応するリソースのオーバーヘッド(例えば、中央処理装置(CPU:central processing unit)/グラフィックスプロセッシングユニット(GPU:Graphics Processing Unit)占有率、メモリスペースなど)も大きい。関連技術のプログラミング教育プラットフォームでは、各ユーザのために1つの独立したKernelが作成され、サーバメモリに格納されるため、作成された独立したKernelで各ユーザがプログラミング実験を実行することができる。このように、人工知能コードに必要なリソースオーバーヘッドが大きいため、各Kernelは大量のCPU/GPUリソース及びメモリスペースを占有し、各ユーザのKernelがメモリに常駐する場合、全体的なオーバーヘッドが大きく、リソースの利用率が低くなる。さらに、各ユーザとKernelは、厳密な1対1の対応関係を有するため、オンラインプログラミング学習を同時に実行できるユーザの数は、サーバがサポートできるKernelの数に制限される。各ユーザのKernelプロセスの実行時環境は変更しないため、ユーザコードのリソース占有状況に応じてそれらを異なる機械に柔軟にスケジューリングして実行することができず、マルチマシンが展開の場合、不当なリソースの割り当てが発生しやすく、システムの同時実行能力を向上させるのに役に立たない。このように、人工知能のオンラインプログラミング教育では、サーバのコストが急激に上昇し、宣伝や普及が困難になる。 In some examples, with the spread of artificial intelligence, machine learning and artificial intelligence programming education are gradually becoming an important part of programming education. Unlike traditional introductory programming education, artificial intelligence code executed by students in artificial intelligence programming education usually requires a large amount of computation and the corresponding resource overhead (eg, central processing unit (CPU)). / Graphics processing unit (GPU: Graphics Processing Unit) occupancy rate, memory space, etc.) is also large. In the programming education platform of the related technique, one independent kernel is created for each user and stored in the server memory, so that each user can execute a programming experiment with the created independent kernel. As described above, since the resource overhead required for the artificial intelligence code is large, each kernel occupies a large amount of CPU / GPU resources and memory space, and when the kernel of each user resides in the memory, the overall overhead is large. Resource utilization is low. Further, since each user and the kernel have a strict one-to-one correspondence, the number of users who can execute online programming learning at the same time is limited to the number of kernels that the server can support. Since the runtime environment of each user's Kernel process does not change, it is not possible to flexibly schedule and execute them on different machines according to the resource occupancy status of the user code, which is an unreasonable resource when a multi-machine is deployed. Allocations are prone to occur and do not help improve the concurrency of the system. In this way, in the online programming education of artificial intelligence, the cost of the server rises sharply, and it becomes difficult to advertise and spread it.

上記事情に鑑みて、本願実施例は、プログラミング・プラットフォームのユーザコードの実行方法を提供し、平等なサービスノードのセット及び平等な計算ノードのセットを構築することにより、ユーザがコードを提出した後、websocket(全二重通信のプロトコル)技術により、ユーザコードを任意のサービスノードに伝送する。当該サービスノードは、1つの実行タスクを作成し、それをタスクキューに入れ、現在のセッション接続を維持し、任意の計算ノードは、タスクキューから実行タスクを取得した後、ユーザコードを実行し、タスクキューを介して実行結果を対応するサービスノードに実時間でフィードバックし、その後、計算ノードは、すぐにリソースを解放する。サービスノードは、タスクキューから実行結果を読み取り、全二重通信のプロトコルを介して実時間でユーザ端末にプッシュバックし、プッシュが完了した後に現在のセッションを終了する。ここで、サービスノードは、マルチタスク同時接続をサポートし、計算ノードは、シングルタスク実行をサポートする。 In view of the above circumstances, the embodiments of the present application provide a method of executing user code of a programming platform, and after the user submits the code by constructing an equal set of service nodes and an equal set of compute nodes. , Websocket (Protocol of full-duplex communication) technology is used to transmit the user code to any service node. The service node creates one execution task, puts it in the task queue, maintains the current session connection, and any compute node gets the execution task from the task queue and then executes the user code. The execution result is fed back to the corresponding service node in real time via the task queue, and then the compute node immediately releases the resource. The service node reads the execution result from the task queue, pushes it back to the user terminal in real time via the protocol of full-duplex communication, and ends the current session after the push is completed. Here, the service node supports multitasking simultaneous connection, and the compute node supports singletask execution.

前記方法の実施プロセスは図1に示し、図1は、本願実施例に係るプログラミング・プラットフォームのユーザコードの実行方法の実施プロセスの概略図である。具体的には、本願実施例方法は、次のステップを含む。 The implementation process of the method is shown in FIG. 1, and FIG. 1 is a schematic diagram of the implementation process of the user code execution method of the programming platform according to the embodiment of the present application. Specifically, the method of the present embodiment includes the following steps.

ステップS101において、サービスノードが、ユーザ端末を表すためのユーザコードを取得し、ユーザコードを実行タスクとしてタスクキューに登録する。 In step S101, the service node acquires a user code for representing the user terminal and registers the user code in the task queue as an execution task.

本願実施例に係るプログラミング・プラットフォームは、サービスノード、タスクキュー及び計算ノードを備える。 The programming platform according to the embodiment of the present application includes a service node, a task queue, and a calculation node.

サービスノードは、複数のユーザ端末のいずれかのユーザコードを取得でき、複数のユーザ端末のユーザコードを同時に取得でき、複数のユーザ端末の同時接続をサポートすることができる。サービスノードは、サーバやコンピュータなどの処理能力を備えた任意の電子機器で実現できる。ここで、電子機器は、他の機能を実行するためにも使用されることができる。例えば、電子機器は更に、計算ノードによって取得された実行タスクの計算を実行するように構成され、即ち、サービスノード及び計算ノードは、同一の電子機器又は異なる電子機器によって実現できる。サービスノードがユーザコードを受信する方式は、websocket通信技術、ハイパーテキスト・トランスファー・プロトコル(HTTP:Hyper Text Transfer Protocol)通信技術により受信する方式を含むが、これらに限定されず、ここでは特に限定しない。サービスノードによって受信されたユーザコードのソースは多様化でき、例えば、ユーザ端末自体のコード編集ウィンドウにより、ユーザによって編集されるコードを取得してユーザコードを形成したり、ユーザ端末が、それに接続されているコード編集機器によって伝送されるユーザコードを受信したりする。 The service node can acquire the user code of any of the plurality of user terminals, can acquire the user code of the plurality of user terminals at the same time, and can support the simultaneous connection of the plurality of user terminals. A service node can be realized by any electronic device having processing power such as a server or a computer. Here, the electronic device can also be used to perform other functions. For example, the electronic device is further configured to perform the computation of the execution task acquired by the compute node, i.e., the service node and the compute node can be realized by the same electronic device or different electronic devices. The method of receiving the user code by the service node includes, but is not limited to, a method of receiving by the websocket communication technology and the hypertext transfer protocol (HTTP) communication technology, but is not particularly limited here. .. The source of the user code received by the service node can be diversified, for example, the code edit window of the user terminal itself can be used to acquire the code edited by the user to form the user code, or the user terminal is connected to it. Receives the user code transmitted by the code editing device.

本願実施例において、サービスノードの数は少なくとも2つである。サービスノードが、ユーザ端末を表すためのユーザコードを取得する場合、少なくとも2つのサービスノードは、リバースプロキシを介して割り当てられるユーザコードを取得する。これらのサービスノードは、フロントエンドアプリケーションにサービスを提供し、フロントエンドアプリケーションとサービスノードは、全二重通信のプロトコルを使用して通信し、サービスノードは、リバースプロキシサーバによって割り当てられたユーザ端末のユーザコードを受信し、ここで、ユーザ端末のユーザコードは、当該ユーザ端末の識別情報を表す。例えば、ユーザ端末のユーザコードは、当該ユーザ端末のシリアル番号、又は当該ユーザ端末のユーザアカウントなどを示す。リバースプロキシサーバを使用して、ユーザ端末と少なくとも2つのサービスノードとの間のユーザコードの割り当てを実現し、リバースプロキシサーバがユーザ端末のユーザコードを取得した場合、ユーザコードを少なくとも2つのサービスノードに割り当てることができ、これにより、各サービスノードは、リバースプロキシを介して割り当てられるユーザコードを取得することができる。同様に、サービスノードは、複数のユーザ端末のユーザコードを同時に受信でき、複数のユーザ端末の同時接続をポートすることができる。 In the embodiment of the present application, the number of service nodes is at least two. When the service node acquires the user code for representing the user terminal, at least two service nodes acquire the user code assigned via the reverse proxy. These service nodes serve the front-end application, the front-end application and the service node communicate using the full-duplex communication protocol, and the service node is the user terminal assigned by the reverse proxy server. The user code is received, and here, the user code of the user terminal represents the identification information of the user terminal. For example, the user code of the user terminal indicates the serial number of the user terminal, the user account of the user terminal, or the like. A reverse proxy server is used to achieve the allocation of user code between the user terminal and at least two service nodes, and if the reverse proxy server gets the user code of the user terminal, the user code is at least two service nodes. Can be assigned to, which allows each service node to retrieve the user code assigned via the reverse proxy. Similarly, the service node can receive the user codes of a plurality of user terminals at the same time and can port the simultaneous connection of the plurality of user terminals.

サービスノードは、ユーザコードを受信した後、各ユーザコードに対して1つの実行タスクを作成し、実行タスクをタスクキューに登録する。それにより、タスクキューは、サービスノードによって登録された、ユーザコードと1対1で対応する実行タスクを含む。キューイングキューは、リモートディクショナリサービス(Redis:Remote Dictionary Server)リストなどのストレージシステム、RabbitMQ(メッセージキュー:Message Queue)などのメッセージ指向ミドルウェアであり得る。 After receiving the user code, the service node creates one execution task for each user code and registers the execution task in the task queue. Thereby, the task queue contains the execution task registered by the service node and having a one-to-one correspondence with the user code. The queuing queue can be a storage system such as a Remote Dictionary Service (Redis) list, or message-oriented middleware such as RabbitMQ (Message Queuing).

本願実施例において、ユーザコードのリソース依存要件に応じて、ユーザコードに対応する実行タスクを分離して登録する。具体的には、タスクキューは、第1タスクキュー及び第2タスクキューを含み、第1タスクキュー及び第2タスクキュー内の実行タスクが計算される場合、異なるコードリソースに依存する。例えば、第1タスクキュー内の実行タスクは、CPUコード実行環境リソースに依存し、第2タスクキュー内の実行タスクは、GPUコード実行環境リソースに依存する。第1タスクキュー及び第2タスクキュー内の実行タスクの割り当ては、ユーザコードの計算特徴に依存し、即ち、計算特徴は、ユーザコードが第1タスクキュー又は第2タスクキューに属することを指示するために使用される。ここで、計算特徴の表現形式は、ユーザコード内のプリセットされたビット長の文字列識別子、バイナリコードなどを含むが、これらに限定されない。それにより、サービスノードがユーザコードを実行タスクとしてタスクキューに登録した場合、ユーザコードの計算特徴に従って、ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録する。 In the embodiment of the present application, the execution task corresponding to the user code is separately registered according to the resource dependency requirement of the user code. Specifically, the task queue includes a first task queue and a second task queue, and depends on different code resources when the execution tasks in the first task queue and the second task queue are calculated. For example, the execution task in the first task queue depends on the CPU code execution environment resource, and the execution task in the second task queue depends on the GPU code execution environment resource. The allocation of execution tasks in the first task queue and the second task queue depends on the computational feature of the user code, i.e., the computational feature indicates that the user code belongs to the first task queue or the second task queue. Used for. Here, the representation format of the calculation feature includes, but is not limited to, a character string identifier of a preset bit length in the user code, a binary code, and the like. As a result, when the service node registers the user code as an execution task in the task queue, the user code is registered in the first task queue or the second task queue as an execution task according to the calculation characteristics of the user code.

本願実施例において、タスクキューは、少なくとも2つサブタスクキューを含み得、サービスノードと複数のサブタスクキューとの間の関連関係を事前に確立することができ、サービスノードは、ユーザ端末を表すためのユーザコードを取得し、ユーザコードを実行タスクとして異なるサブタスクキューに登録するか、又は複数のサービスノードと複数のサブタスクキューとの間の関連関係を確立し、サービスノードの一部は、受信したユーザコードを、それらと関連関係を確立したサブタスクキューの一部に登録し、サービスノードの別の部分は、受信したユーザコードを、それらと関連関係を確立したサブタスクキューの別の部分に登録することにより、サービスノードとタスクキューとの間の対応する関連関係を実現すればよい。 In the embodiment of the present application, the task queue may include at least two subtask queues, and the relationship between the service node and the plurality of subtask queues can be established in advance, and the service node represents a user terminal. Obtain the user code and register the user code as an execution task in different subtask queues, or establish a relationship between multiple service nodes and multiple subtask queues, and some of the service nodes are the receiving users. Registering the code in one part of the subtask queue that has been associated with them, and another part of the service node registering the received user code in another part of the subtask queue that has been associated with them. Allows the corresponding association between the service node and the task queue to be realized.

ステップS102において、計算ノードが、タスクキューを監視して、実行タスクを取得する。 In step S102, the compute node monitors the task queue and acquires the execution task.

タスクキューは実行タスクを含み、計算ノードは、タスクキューを監視し、当該計算ノードによって実行可能な実行タスクがタスクキューに含まれていることを検出した場合、実行タスクを取得することができる。計算ノードがタスクキューから実行タスクを取得する方式は、タスクキューが実行タスクを計算ノードにアクティブに割り当てること、又は計算ノードが実行タスクを取得するようにタスクキューに要求し、タスクキューが要求に応じて実行タスクを計算ノードに割り当てることを含むが、これらに限定されない。 The task queue includes an execution task, and the compute node can monitor the task queue and acquire the execution task when it detects that the execution task that can be executed by the compute node is included in the task queue. In the method in which the compute node retrieves the execution task from the task queue, the task queue actively assigns the execution task to the compute node, or the compute node requests the task queue to retrieve the execution task, and the task queue makes the request. Includes, but is not limited to, assigning execution tasks to compute nodes accordingly.

本願実施例において、計算ノードの数は少なくとも2つである。計算ノードがタスクキューを監視して実行タスクを取得する場合、少なくとも2つの計算ノードは、タスクキューを監視し、実行タスクを取得するようにタスクキューに要求し、タスクキューは、1つの実行タスクを1つの計算ノードに割り当て、それにより、タスクキューは、実行タスクの合理的な割当を完了する。タスクキューが実行タスクを計算ノードに割り当てるルールは、カスタマイズ設定することができる。例えば、すべての計算ノードの優先度を事前に記憶し、タスクキューが、複数の計算ノードよる同一の実行タスクへの取得要求を受信した場合、実行タスクを優先度の高い計算ノードに割り当てるか、又はプリセットされた時間内で取得した実行タスクの数が最も少ない計算ノードに実行タスクを割り当て、ここでは特に限定しない。 In the embodiment of the present application, the number of calculation nodes is at least two. When a compute node monitors a task queue and retrieves an execution task, at least two compute nodes monitor the task queue and request the task queue to retrieve the execution task, and the task queue is one execution task. Is assigned to one compute node, whereby the task queue completes the rational allocation of execution tasks. The rules for assigning tasks executed by the task queue to compute nodes can be customized. For example, if the priority of all compute nodes is stored in advance and the task queue receives a request to acquire the same execution task from multiple compute nodes, the execution task is assigned to the compute node with higher priority. Alternatively, the execution task is assigned to the calculation node having the smallest number of execution tasks acquired within the preset time, and is not particularly limited here.

本願実施例において、タスクキューは、第1タスクキュー及び第2タスクキューを含み、計算ノードが第1計算ノード及び第2計算ノードを含む場合、計算ノードがタスクキューを監視することは、具体的には、第1計算ノードが第1タスクキューを監視し、第2計算ノードが第2タスクキューを監視することであり、それにより、異なる計算ノードは、異なるタスクキューをそれぞれ監視し、管理が容易になり、実行タスクの取得効率を向上させる。ここで、第1計算ノード及び第2計算ノードは、異なる構成のサーバにそれぞれ配置され、それにより、それぞれ異なる計算リソースとメモリリソースを有し、異なるユーザコードの計算を実現することができる。ユーザコードの計算の場合、計算特徴に従って、ユーザコードが計算されるときに依存する計算リソースとメモリリソースを知ることができ、即ち、ユーザコードの計算特徴は、ユーザコードが第1タスクキュー又は第2タスクキューに属することを指示するため、ユーザコードが異なる構成のサーバ上の第1計算ノード又は第2計算ノードによって計算されることを指示する。 In the embodiment of the present application, when the task queue includes the first task queue and the second task queue, and the compute node includes the first compute node and the second compute node, it is specific that the compute node monitors the task queue. The first compute node monitors the first task queue and the second compute node monitors the second task queue, so that different compute nodes monitor and manage different task queues, respectively. It becomes easy and improves the acquisition efficiency of the execution task. Here, the first calculation node and the second calculation node are arranged in servers having different configurations, whereby they have different calculation resources and memory resources, and can realize calculation of different user codes. In the case of user code calculation, according to the calculation feature, the calculation resource and memory resource that depend on when the user code is calculated can be known, that is, the calculation feature of the user code is that the user code is the first task queue or the first task queue. 2 In order to indicate that it belongs to the task queue, it is instructed that the user code is calculated by the first calculation node or the second calculation node on the server having a different configuration.

更に、第1計算ノードは、CPUサーバに設置され、第2計算ノードはGPUサーバに設置され、第1タスクキューは、CPUコード実行環境リソースに依存する実行タスクを含み、第2タスクキューは、GPUコード実行環境リソースに依存する実行タスクを含み、それにより、CPUサーバの第1計算ノードは、第1タスクキューを監視して実行タスクを取得し、GPUサーバの第2計算ノードは、第2タスクキューを監視して実行タスクを取得する。 Further, the first calculation node is installed in the CPU server, the second calculation node is installed in the GPU server, the first task queue includes an execution task depending on the CPU code execution environment resource, and the second task queue is. It contains an execution task that depends on the GPU code execution environment resource, so that the first compute node of the CPU server monitors the first task queue and acquires the execution task, and the second compute node of the GPU server is the second. Monitor the task queue and get the executed task.

ステップS103において、計算ノードが、実行タスクを計算して、計算結果を取得する。 In step S103, the calculation node calculates the execution task and acquires the calculation result.

計算ノードは、配置されているサーバで利用可能な計算リソースとメモリリソースを使用して、取得した実行タスクを計算することで、計算結果を取得することができる。計算ノードは、実行タスクの計算を完了した後、対応する計算リソースを解放し、タスクキューを監視し続ける。つまり、計算ノードは、現在の実行タスクの計算を完了した後にリソースを解放し、新しい実行タスクを取得するためにタスクキューを監視し続けるため、計算ノードは、計算リソースとメモリリソースを最大限に再利用することができる。ここで、本願では、計算ノードがタスクキュー内の任意の実行タスクを取得するか、第1計算ノード及び第2計算ノードがそれぞれ第1タスクキュー及び第2タスクキュー内の実行タスクを取得するかに関係なく、同一の計算ノードは、実行タスクを完了するとともにリソースを解放し、計算ノードの計算リソースとメモリリソースがユーザコードの実行環境リソースに準拠している限り、新しい実行タスクを継続的に取得することができる。したがって、異なる計算ノードでユーザコードを実行できるため、計算ノードの計算リソースとメモリリソースを再利用でき、サーバのハードウェアリソースを十分かつ合理的に使用することができる。 The calculation node can acquire the calculation result by calculating the acquired execution task by using the calculation resource and the memory resource available in the deployed server. After completing the calculation of the execution task, the compute node releases the corresponding compute resource and continues to monitor the task queue. That is, the compute node maximizes compute and memory resources because it releases resources after it completes the calculation of the current execution task and continues to monitor the task queue to get new execution tasks. Can be reused. Here, in the present application, whether the calculation node acquires an arbitrary execution task in the task queue, or the first calculation node and the second calculation node acquire the execution task in the first task queue and the second task queue, respectively. Regardless of, the same compute node completes the execution task and frees resources, continuously performing new execution tasks as long as the compute node's compute and memory resources comply with the user code's execution environment resources. Can be obtained. Therefore, since the user code can be executed on different compute nodes, the compute resources and memory resources of the compute node can be reused, and the hardware resources of the server can be sufficiently and rationally used.

上記のように、サービスノードは、ユーザコードの計算特徴に従って、ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録し、第1計算ノード及び第2計算ノードは、それぞれ第1タスクキュー及び第2タスクキューから実行タスクを取得し、異なる構成のサーバの第1計算ノード及び第2計算ノードは、それぞれの計算リソースとメモリリソースを使用して実行タスクを計算して、計算結果を取得する。したがって、タスクキューは、ユーザコードの実際のニーズに応じて、計算ノードへの実行タスクの割り当てを実行し、計算ノードは、異なる構成のサーバに属し、これにより、リソースの合理的な利用を実現する。例えば、第1タスクキューはCPUタスクキューであり、第2タスクキューはGPUタスクキューであり、第1計算ノード及び第2計算ノードは、それぞれCPUサーバ及びGPUサーバに配置され、第1計算ノードは、第1タスクキューから実行タスクを取得して計算し、第2計算ノードは、第2タスクキューから実行タスクを取得して計算する。具体的には、ユーザコードの計算特徴が、対応するユーザコードが第1タスクキューに属することを指示する場合、第1計算ノードは、第1タスクキューから実行タスクを取得し、CPUサーバの計算リソースとメモリリソースを使用して実行タスクを計算して、計算結果を取得する。CPUサーバ上の計算ノードは、GPUサーバリソースに依存しない従来のコードを実行することができ、GPUサーバ上の計算ノードは、GPUサーバリソースを使用するコード(例えば、ニューラルネットワークモデルのトレーニングや画像処理などを含むが、これらに限定されない)を実行することができる。 As described above, the service node registers the user code as an execution task in the first task queue or the second task queue according to the calculation characteristics of the user code, and the first calculation node and the second calculation node are each the first task. The execution task is acquired from the queue and the second task queue, and the first calculation node and the second calculation node of the servers having different configurations calculate the execution task using the respective calculation resources and memory resources, and calculate the calculation result. get. Therefore, the task queue performs the assignment of execution tasks to compute nodes according to the actual needs of the user code, which belong to servers of different configurations, thereby achieving rational use of resources. do. For example, the first task queue is a CPU task queue, the second task queue is a GPU task queue, the first compute node and the second compute node are located on the CPU server and the GPU server, respectively, and the first compute node is. , The execution task is acquired from the first task queue and calculated, and the second calculation node acquires the execution task from the second task queue and calculates. Specifically, when the calculation feature of the user code indicates that the corresponding user code belongs to the first task queue, the first calculation node acquires the execution task from the first task queue and calculates the CPU server. Calculate the execution task using resources and memory resources, and get the calculation result. Computation nodes on the CPU server can execute traditional code that does not depend on GPU server resources, and compute nodes on the GPU server use code that uses GPU server resources (eg, training of neural network models and image processing). Etc., but not limited to these).

ステップS104において、サービスノードが、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックする。 In step S104, the service node acquires the calculation result from the calculation node and feeds back the calculation result to the user terminal.

計算ノードが実行タスクを計算して計算結果を取得した後、サービスノードは、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックする。サービスノードが、計算ノードから計算結果を取得する方式は、取得要求、サブスクライブなどを介して取得する方式を含むが、これらに限定されず、ここでは特に限定しない。サービスノードが、計算ノードから計算結果を取得する方式が取得要求を介して取得する方式である場合、サービスノードは、計算ノードを監視し、計算結果を取得する取得要求を計算ノードに送信し、対応する計算ノードは、取得要求に応じて、計算結果をサービスノードにフィードバックする。サービスノードが、計算ノードから計算結果を取得する方式がサブスクライブを介して取得する方式である場合、計算ノードは、実行タスクを計算して計算結果を取得した後、計算結果をサービスノードに直接にフィードバックする。 After the calculation node calculates the execution task and acquires the calculation result, the service node acquires the calculation result from the calculation node and feeds back the calculation result to the user terminal. The method in which the service node acquires the calculation result from the calculation node includes, but is not limited to, a method of acquiring the calculation result via an acquisition request, subscription, or the like, and is not particularly limited here. When the service node acquires the calculation result from the calculation node via the acquisition request, the service node monitors the calculation node and sends an acquisition request to acquire the calculation result to the calculation node. The corresponding calculation node feeds back the calculation result to the service node in response to the acquisition request. When the service node obtains the calculation result from the calculation node via the subscribe, the calculation node calculates the execution task and obtains the calculation result, and then directly transfers the calculation result to the service node. Give feedback to.

本願実施例において、プログラミング・プラットフォームはメッセージキューを更に含み、メッセージキューは、計算ノードが実行タスクを計算することにより取得された計算結果を一時的に記憶するために使用される。メッセージキューは、Redisリストなどのストレージシステム、またはRabbitMQなどのメッセージ指向ミドルウェアであり得る。メッセージ指向のサービスノードが、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックする場合、計算ノードは計算結果をメッセージキューに登録し、サービスノードは、メッセージキューを監視して計算結果を取得し、計算結果をユーザ端末にフィードバックする。サービスノードが、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックする場合、サービスノードは、メッセージキューから計算ノードの計算結果をサブスクライブし、websocketなどの通信技術により、計算結果をユーザ端末にフィードバックする。 In an embodiment of the present application, the programming platform further includes a message queue, which is used to temporarily store the calculation result acquired by the compute node computing the execution task. The message queue can be a storage system such as a Redis list, or message-oriented middleware such as RabbitMQ. When the message-oriented service node acquires the calculation result from the calculation node and feeds back the calculation result to the user terminal, the calculation node registers the calculation result in the message queue, and the service node monitors the message queue and the calculation result. And feed back the calculation result to the user terminal. When the service node acquires the calculation result from the calculation node and feeds back the calculation result to the user terminal, the service node subscribes the calculation result of the calculation node from the message queue and outputs the calculation result by communication technology such as webbooket. Give feedback to the user terminal.

本願実施例では、サービスノードは、ユーザ端末を表すためのユーザコードを取得した後、ユーザ端末とのセッション接続を確立し、サービスノードは、計算結果を取得するまで、ユーザ端末とのセッション接続を維持し、サービスノードは、計算ノードの計算結果を取得した後、対応するユーザ端末とのセッション接続を切断する。それにより、サービスノードは、前記計算結果を取得するまで、サービスノードとユーザ端末の間の接続を維持し、計算結果のユーザ端末へのフィードバックを容易にする。ユーザコードの実行中、サービスノードと計算ノードは別々に設置されるため、ユーザ端末の接続とユーザコードの計算はそれぞれサービスノード及び計算ノードによって完了される。ここで、サービスノードがユーザ端末とのセッション接続を維持している間、計算ノードは、実行タスクの計算を完了し、対応する計算リソースを解放し、タスクキューを監視し続けるため、計算ノードは計算リソースを継続的に再利用することができ、ユーザコードの実行プロセスでは、常に計算ノードを占有する必要がなく、ユーザコードの実行の非同期通信を実現し、システムの同時実行能力を向上させる。計算ノードは、実行タスクを取得して計算して、計算結果を取得した後、対応する計算リソースを解放し、新しい実行タスクを取得し続けるため、計算ノードの計算リソースが常に占有されているわけではなく、同じ計算ノードの計算リソースの再利用を実現することにより、リソースの利用率を向上させることができる。 In the embodiment of the present application, the service node establishes a session connection with the user terminal after acquiring the user code for representing the user terminal, and the service node establishes a session connection with the user terminal until the calculation result is acquired. Maintaining, the service node disconnects the session connection with the corresponding user terminal after acquiring the calculation result of the compute node. As a result, the service node maintains the connection between the service node and the user terminal until the calculation result is acquired, and facilitates feedback of the calculation result to the user terminal. Since the service node and the calculation node are installed separately during the execution of the user code, the connection of the user terminal and the calculation of the user code are completed by the service node and the calculation node, respectively. Here, while the service node maintains a session connection with the user terminal, the compute node completes the calculation of the execution task, releases the corresponding compute resource, and continues to monitor the task queue, so that the compute node continues to monitor the task queue. Computational resources can be continuously reused, the user code execution process does not always have to occupy the compute node, asynchronous communication of user code execution is realized, and the simultaneous execution capacity of the system is improved. The compute node always occupies the compute resource of the compute node because it acquires the execution task, calculates it, acquires the calculation result, releases the corresponding compute resource, and continues to acquire new execution tasks. Instead, it is possible to improve the resource utilization rate by realizing the reuse of the computational resources of the same computational node.

上記の方式によれば、プログラミング・プラットフォームは、サービスノード、タスクキュー及び計算ノードを備え、サービスノード及び計算ノードは別々に設置され、サービスノードは、ユーザ端末を表すためのユーザコードを取得し、ユーザコードを実行タスクとしてタスクキューに登録し、計算ノードは、タスクキューを監視して、実行タスクを取得し、計算ノードは、実行タスクを計算して、計算結果を取得し、サービスノードは、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックする。それにより、サービスノードは、ユーザ端末との接続を実現し、計算ノードは、ユーザコードの計算を実現するため、ユーザコードの実行を実現する。また、ユーザコードの実行中、サービスノードと計算ノードは別々に設置されるため、ユーザ端末の接続とユーザコードの計算は、それぞれサービスノード及び計算ノードによって完了され、ユーザコードの実行の非同期通信を実現し、システムの同時実行能力を向上させる。 According to the above method, the programming platform includes a service node, a task queue and a compute node, the service node and the compute node are installed separately, and the service node obtains a user code for representing a user terminal. The user code is registered in the task queue as an execution task, the compute node monitors the task queue and gets the execution task, the compute node calculates the execution task and gets the calculation result, and the service node The calculation result is acquired from the calculation node, and the calculation result is fed back to the user terminal. As a result, the service node realizes the connection with the user terminal, and the calculation node realizes the execution of the user code in order to realize the calculation of the user code. In addition, since the service node and the calculation node are installed separately during the execution of the user code, the connection of the user terminal and the calculation of the user code are completed by the service node and the calculation node, respectively, and asynchronous communication of the execution of the user code is performed. Realize and improve the simultaneous execution capacity of the system.

本願は、プログラミング・プラットフォームのユーザコードの実行方法を実行できるサービスノードを更に提供する。図2を参照すると、図2は、本願実施例に係るプログラミング・プラットフォームのユーザコードの実行方法の別の実施プロセスの概略図である。具体的には、本願実施例の方法は、次のステップを含む。 The present application further provides a service node capable of executing a method of executing a user code of a programming platform. Referring to FIG. 2, FIG. 2 is a schematic diagram of another implementation process of a method of executing a user code of a programming platform according to an embodiment of the present application. Specifically, the method of the embodiment of the present application includes the following steps.

ステップS201において、ユーザ端末を表すためのユーザコードを取得する。 In step S201, the user code for representing the user terminal is acquired.

本願実施例において、プログラミング・プラットフォームのユーザコードの実行方法を実行するサービスノードは、上記のプログラミング・プラットフォームのユーザコードの実行方法の任意の実施例におけるサービスノードである。プログラミング・プラットフォームは、サービスノード、タスクキュー及び計算ノードを備える。 In the embodiment of the present application, the service node that executes the method of executing the user code of the programming platform is the service node in any embodiment of the method of executing the user code of the programming platform described above. The programming platform includes service nodes, task queues and compute nodes.

サービスノードは、複数のユーザ端末のいずれかのユーザコードを受信でき、複数のユーザ端末のユーザコードを同時に受信でき、複数のユーザ端末の同時接続をサポートすることができる。サービスノードがユーザコードを受信する方式は、websocket通信技術、HTTP通信技術により受信する方式を含むが、これらに限定されず、ここでは特に限定しない。サービスノードによって受信されたユーザコードのソースは多様化できる。例えば、ユーザ端末自体のコード編集ウィンドウにより、ユーザによって編集されるコードを取得してユーザコードを形成したり、ユーザ端末が、それに接続されているコード編集機器によって伝送されるユーザコードを受信したりする。 The service node can receive the user code of any of the plurality of user terminals, can receive the user codes of the plurality of user terminals at the same time, and can support the simultaneous connection of the plurality of user terminals. The method of receiving the user code by the service node includes, but is not limited to, a method of receiving by the websocket communication technology and the HTTP communication technology, and is not particularly limited here. The source of user code received by the service node can be diversified. For example, the code editing window of the user terminal itself acquires the code edited by the user to form the user code, or the user terminal receives the user code transmitted by the code editing device connected to the user terminal. do.

本願実施例において、サービスノードは、リバースプロキシを介して割り当てられるユーザコードを取得し、ユーザ端末は、サービスノードと1対1で対応する関連関係を確立する必要がなく、リバースプロキシサーバにより、ユーザ端末のユーザコードの割当を実行する。 In the embodiment of the present application, the service node acquires the user code assigned via the reverse proxy, and the user terminal does not need to establish a one-to-one correspondence with the service node. Execute the user code assignment of the terminal.

ステップS202において、計算ノードがタスクキューから実行タスクを取得して計算するように、ユーザコードを実行タスクとしてタスクキューに登録する。 In step S202, the user code is registered in the task queue as an execution task so that the calculation node acquires the execution task from the task queue and calculates it.

サービスノードは、ユーザコードを実行タスクとしてタスクキューに登録することにより、タスクキュー内の実行タスクを均一に割り当て、キューイングメカニズムによりシステムの同時応答能力を向上させることができる。サービスノードは、ユーザ端末のユーザコードを取得し、ユーザ端末とのセッション接続を維持し、ユーザ端末との接続を実現する。ユーザコードの場合、ユーザコードを実行タスクとしてタスクキューに登録した後、計算ノードにより、タスクキューから実行タスクを取得して計算することにより、ユーザ端末の接続とユーザコードの計算は、それぞれサービスノード及び計算ノードによって完了し、ユーザコードの実行の非同期通信を実現し、システムの同時実行能力を向上させる。 By registering the user code as an execution task in the task queue, the service node can evenly allocate the execution tasks in the task queue, and the queuing mechanism can improve the simultaneous response capability of the system. The service node acquires the user code of the user terminal, maintains the session connection with the user terminal, and realizes the connection with the user terminal. In the case of user code, after registering the user code as an execution task in the task queue, the calculation node acquires the execution task from the task queue and calculates it, so that the connection of the user terminal and the calculation of the user code are performed by the service node. And complete by the compute node, it realizes asynchronous communication of user code execution and improves the simultaneous execution capacity of the system.

本願実施例において、タスクキューは、第1タスクキュー及び第2タスクキューを含み、計算ノードは、第1計算ノード及び第2計算ノードを含む。サービスノードは、計算ノードがタスクキューから実行タスクを取得して計算できるように、ユーザコードを実行タスクとしてタスクキューに登録する場合、ユーザコードの計算特徴に従って、ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録することにより、第1計算ノードが第1タスクキューから実行タスクを取得して計算できるようにするか、又は第2計算ノードが第2タスクキューから実行タスクを取得して計算できるようにする。 In the embodiment of the present application, the task queue includes a first task queue and a second task queue, and the calculation node includes a first calculation node and a second calculation node. When the service node registers the user code as an execution task in the task queue so that the calculation node can acquire the execution task from the task queue and calculate it, the first task uses the user code as the execution task according to the calculation characteristics of the user code. By registering in the queue or the second task queue, the first compute node can acquire the execution task from the first task queue and calculate it, or the second compute node acquires the execution task from the second task queue. To be able to calculate.

ステップS201及びS202に関する残りの説明については、上記のステップS101~ステップS103を参照でき、ここでは繰り返して説明しない。 For the remaining description of steps S201 and S202, the above steps S101 to S103 can be referred to and will not be repeated here.

ステップS203において、計算ノードの計算結果を取得し、計算結果をユーザ端末にフィードバックする。 In step S203, the calculation result of the calculation node is acquired, and the calculation result is fed back to the user terminal.

計算ノードが計算結果を取得した後、サービスノードは、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックすることができる。本願実施例において、プログラミング・プラットフォームはメッセージキューを更に含み、メッセージキューは、計算ノードが実行タスクを計算することにより取得された計算結果を一時的に記憶するために使用される。サービスノードが、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックする場合、サービスノードは、メッセージキューを監視して計算結果を取得し、計算結果をユーザ端末にフィードバックする。ここで、サービスノードによって取得された計算結果は、計算ノードがメッセージキューに登録した計算結果である。 After the calculation node acquires the calculation result, the service node can acquire the calculation result from the calculation node and feed back the calculation result to the user terminal. In an embodiment of the present application, the programming platform further includes a message queue, which is used to temporarily store the calculation result acquired by the compute node computing the execution task. When the service node acquires the calculation result from the calculation node and feeds back the calculation result to the user terminal, the service node monitors the message queue to acquire the calculation result and feeds back the calculation result to the user terminal. Here, the calculation result acquired by the service node is the calculation result registered in the message queue by the calculation node.

本願実施例では、サービスノードは、ユーザ端末を表すためのユーザコードを取得した後、ユーザ端末とのセッション接続を確立し、サービスノードは、計算結果を取得するまで、ユーザ端末とのセッション接続を維持し、サービスノードは、計算ノードの計算結果を取得した後、対応するユーザ端末とのセッション接続を切断する。それにより、サービスノードは、前記計算結果を取得するまで、サービスノードとユーザ端末の間の接続を維持し、計算結果のユーザ端末へのフィードバックを容易にする。 In the embodiment of the present application, the service node establishes a session connection with the user terminal after acquiring the user code for representing the user terminal, and the service node establishes a session connection with the user terminal until the calculation result is acquired. Maintaining, the service node disconnects the session connection with the corresponding user terminal after acquiring the calculation result of the compute node. As a result, the service node maintains the connection between the service node and the user terminal until the calculation result is acquired, and facilitates feedback of the calculation result to the user terminal.

上記の方式によれば、サービスノードは、ユーザ端末を表すためのユーザコードを取得し、計算ノードは、タスクキューから実行タスクを取得して計算するように、ユーザコードを実行タスクとしてタスクキューに登録し、計算ノードの計算結果を取得し、計算結果をユーザ端末にフィードバックすることにより、ユーザコードの実行を実現する。サービスノードは、ユーザ端末と接続し、ユーザ端末によって発行されたユーザコードを実行タスクとしてタスクキューに登録するように構成され、これにより、サービスノードから独立した計算ノードが、タスクキューから実行タスクを取得して計算することにより計算結果を取得した後、サービスノードは、計算ノードの計算結果を取得し、計算結果をユーザ端末にフィードバックすることにより、ユーザコードの実行を実現する。 According to the above method, the service node acquires the user code for representing the user terminal, and the compute node puts the user code into the task queue as the execution task so as to acquire the execution task from the task queue and calculate. Execution of the user code is realized by registering, acquiring the calculation result of the calculation node, and feeding back the calculation result to the user terminal. The service node is configured to connect to the user terminal and register the user code issued by the user terminal in the task queue as an execution task, so that the compute node independent of the service node can execute the task from the task queue. After acquiring the calculation result by acquiring and calculating, the service node acquires the calculation result of the calculation node and feeds back the calculation result to the user terminal to realize the execution of the user code.

本願は、プログラミング・プラットフォームのユーザコードの実行方法を実行できる計算ノードを更に提供する。図3を参照すると、図3は、本願実施例に係るプログラミング・プラットフォームのユーザコードの実行方法の更に別の実施プロセスの概略図である。具体的には、本願実施例の方法は、次のステップを含む。 The present application further provides a compute node capable of executing a method of executing a user code of a programming platform. Referring to FIG. 3, FIG. 3 is a schematic diagram of yet another implementation process of the method of executing the user code of the programming platform according to the embodiment of the present application. Specifically, the method of the embodiment of the present application includes the following steps.

ステップS301において、タスクキューを監視して、実行タスクを取得する。 In step S301, the task queue is monitored and the execution task is acquired.

本願実施例において、プログラミング・プラットフォームのユーザコードの実行方法を実行する計算ノードは、上記のプラットフォームのユーザコードの実行方法の任意の実施例における計算ノードである。タスクキューは実行タスクを含み、実行タスクはユーザコードに対応する。 In the embodiments of the present application, the compute node that executes the method of executing the user code of the programming platform is the compute node in any embodiment of the method of executing the user code of the above platform. The task queue contains the execution task, and the execution task corresponds to the user code.

計算ノードは、実行タスクを含むタスクキューを監視し、タスクキューからユーザコードに1対1で対応する実行タスクを取得する。 The compute node monitors the task queue including the execution task, and acquires the execution task corresponding to the user code on a one-to-one basis from the task queue.

計算ノードは、第1計算ノード及び第2計算ノードを含み、第1計算ノード及び第2計算ノードは、それぞれCPUサーバ及びGPUサーバに配置され、それにより、第1計算ノードは、タスクキュー内の、CPUサーバの計算リソースとメモリリソースに依存する実行タスクを監視し、第2計算ノードは、タスクキュー内の、GPUサーバの計算リソースとメモリリソースに依存する実行タスクを監視する。具体的には、タスクキューは、第1タスクキュー及び第2タスクキューを含み得、第1計算ノード及び第2計算ノードは、実行タスクを取得するために、それぞれ第1タスクキュー及び第2タスクキューを監視する。 The compute node includes a first compute node and a second compute node, the first compute node and the second compute node are located on the CPU server and the GPU server, respectively, so that the first compute node is in the task queue. , The execution task that depends on the calculation resource and the memory resource of the CPU server is monitored, and the second calculation node monitors the execution task that depends on the calculation resource and the memory resource of the GPU server in the task queue. Specifically, the task queue may include a first task queue and a second task queue, and the first compute node and the second compute node may include the first task queue and the second task in order to acquire an execution task, respectively. Monitor the queue.

即ち、ユーザコードは、タスクキューに対応し、本願実施例に係る計算ノードが第1計算ノードである場合、第1タスクキューから、CPUサーバの計算リソースとメモリリソースに依存する実行タスクを取得し、計算ノードが第2計算ノードである場合、第2タスクキューから、GPUサーバの計算リソースとメモリリソースに依存する実行タスクを取得する。 That is, the user code corresponds to the task queue, and when the calculation node according to the embodiment of the present application is the first calculation node, the execution task depending on the calculation resource and the memory resource of the CPU server is acquired from the first task queue. , When the compute node is the second compute node, the execution task that depends on the compute resource and the memory resource of the GPU server is acquired from the second task queue.

ステップS302において、実行タスクを計算して、計算結果を取得する。 In step S302, the execution task is calculated and the calculation result is acquired.

計算ノードは、それが属するサーバの計算リソースとメモリリソースを使用して、実行タスクを計算して、計算結果を取得する。計算ノードは、実行タスクの計算を完了した後、対応する計算リソースを解放し、タスクキューを監視し続ける。つまり、計算ノードは、現在の実行タスクの計算を完了した後にリソースを解放し、新しい実行タスクを取得するためにタスクキューを監視し続けるため、計算ノードは、計算リソースとメモリリソースを最大限に再利用することができる。 The compute node uses the compute and memory resources of the server to which it belongs to compute the execution task and get the computation result. After completing the calculation of the execution task, the compute node releases the corresponding compute resource and continues to monitor the task queue. That is, the compute node maximizes compute and memory resources because it releases resources after it completes the calculation of the current execution task and continues to monitor the task queue to get new execution tasks. Can be reused.

上記の方式によれば、タスクキューを監視して、実行タスクを取得し、タスクキューは実行タスクを含み、実行タスクはユーザコードに対応し、実行タスクを計算して計算結果を取得することにより、計算ノードによる整然とした実行タスクの取得を実現する。タスクキューは、実行タスクを含み、実行タスクはユーザコードに対応するため、計算ノードは、実行タスクを含むタスクキューを監視して、ユーザコードに対応する実行タスクを取得し、実行タスクを計算して計算結果を取得することにより、実行タスクの取得と計算を実現する。 According to the above method, the task queue is monitored and the execution task is acquired, the task queue includes the execution task, the execution task corresponds to the user code, the execution task is calculated, and the calculation result is acquired. , Achieves orderly execution task acquisition by compute nodes. Since the task queue contains the execution task and the execution task corresponds to the user code, the compute node monitors the task queue including the execution task, acquires the execution task corresponding to the user code, and calculates the execution task. By acquiring the calculation result, the execution task can be acquired and the calculation can be realized.

本願は、プログラミング・プラットフォームを更に提供し、図4に示されたように、図4は、本願実施例に係るプログラミング・プラットフォームの概略構造図である。具体的には、本願実施例に係るプログラミング・プラットフォーム40は、サービスノード41、タスクキュー42及び計算ノード43を備える。サービスノード41は、ユーザ端末を表すためのユーザコードを取得し、ユーザコードを実行タスクとしてタスクキュー42に登録するように構成され、計算ノード43は、タスクキュー42を監視して実行タスクを取得するように構成され、計算ノード43は更に、実行タスクを計算して、計算結果を取得するように構成され、サービスノード41は更に、計算ノード43から計算結果を取得し、計算結果をユーザ端末にフィードバックするように構成される。 The present application further provides a programming platform, and as shown in FIG. 4, FIG. 4 is a schematic structural diagram of the programming platform according to an embodiment of the present application. Specifically, the programming platform 40 according to the embodiment of the present application includes a service node 41, a task queue 42, and a calculation node 43. The service node 41 is configured to acquire a user code for representing a user terminal and register the user code as an execution task in the task queue 42, and the calculation node 43 monitors the task queue 42 and acquires an execution task. The calculation node 43 is further configured to calculate the execution task and acquire the calculation result, and the service node 41 further acquires the calculation result from the calculation node 43 and obtains the calculation result from the user terminal. It is configured to feed back to.

本願実施例において、計算ノード43の数は少なくとも2つであり、計算ノード43がタスクキュー42を監視して実行タスクを取得するように構成される場合、少なくとも2つの計算ノード43は、タスクキュー42を監視し、実行タスクを取得するようにタスクキュー42に要求するように構成され、タスクキュー42は、1つの実行タスクを1つの計算ノード43に割り当てるように構成される。 In the embodiment of the present application, the number of the calculation nodes 43 is at least two, and when the calculation nodes 43 are configured to monitor the task queue 42 and acquire the execution task, the at least two calculation nodes 43 are in the task queue. The task queue 42 is configured to monitor the 42 and request the task queue 42 to acquire the execution task, and the task queue 42 is configured to allocate one execution task to one compute node 43.

本願実施例において、タスクキュー42は、第1タスクキュー及び第2タスクキューを含み、少なくとも2つの計算ノード43は、第1計算ノード及び第2計算ノードを含み、サービスノード41が、ユーザコードを実行タスクとしてタスクキュー42に登録するように構成される場合、サービスノード41は更に、ユーザコードの計算特徴に従って、ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録するように構成され、計算ノード43は、タスクキュー42を監視するように構成され、具体的には、第1計算ノードは第1タスクキューを監視し、第2計算ノードは第2タスクキューを監視する。 In the embodiment of the present application, the task queue 42 includes a first task queue and a second task queue, at least two calculation nodes 43 include a first calculation node and a second calculation node, and a service node 41 holds a user code. When configured to be registered in the task queue 42 as an execution task, the service node 41 is further configured to register the user code in the first task queue or the second task queue as an execution task according to the calculation characteristics of the user code. The compute node 43 is configured to monitor the task queue 42, specifically, the first compute node monitors the first task queue and the second compute node monitors the second task queue.

本願実施例において、サービスノード41の数は少なくとも2つであり、サービスノード41がユーザ端末を表すためのユーザコードを取得するように構成される場合、少なくとも2つのサービスノード41は、リバースプロキシを介して割り当てられるユーザコードを取得するように構成される。 In the embodiment of the present application, the number of service nodes 41 is at least two, and when the service nodes 41 are configured to acquire a user code for representing a user terminal, the at least two service nodes 41 have a reverse proxy. It is configured to get the user code assigned through.

本願実施例において、計算ノード43は更に、タスクの計算を完了した後、対応する計算リソースを解放し、タスクキュー42を監視し続けるように構成される。 In the embodiment of the present application, the calculation node 43 is further configured to release the corresponding calculation resource and continue to monitor the task queue 42 after completing the calculation of the task.

本願実施例において、プログラミング・プラットフォーム40は更に、メッセージキュー44を備え、サービスノード41が、計算ノード43から計算結果を取得し、計算結果をユーザ端末にフィードバックするように構成される場合、計算ノード43は更に、計算結果をメッセージキュー44に登録するように構成され、サービスノード41は更に、メッセージキュー42を監視して計算結果を取得し、計算結果をユーザ端末にフィードバックするように構成される。 In the embodiment of the present application, the programming platform 40 further includes a message queue 44, and when the service node 41 is configured to acquire the calculation result from the calculation node 43 and feed back the calculation result to the user terminal, the calculation node. 43 is further configured to register the calculation result in the message queue 44, and the service node 41 is further configured to monitor the message queue 42 to acquire the calculation result and feed back the calculation result to the user terminal. ..

本願実施例において、サービスノード41は更に、計算結果を取得するまで、ユーザ端末とのセッション接続を維持するように構成される。 In the embodiment of the present application, the service node 41 is further configured to maintain a session connection with the user terminal until the calculation result is acquired.

図4のプログラミング・プラットフォーム40のサービスノード41は更に、プログラミング・プラットフォームのユーザコードの実行方法を実行するように構成される。具体的には、図5に示されたように、図5は、本願に係るプログラミング・プラットフォームのサービスノード41の一実施例の概略構造図である。サービスノード41は、受信ユニット411、登録ユニット412及び取得ユニット413を備える。ここで、受信ユニット411は、ユーザ端末を表すためのユーザコードを取得するように構成され、登録ユニット412は、計算ノードがタスクキューから実行タスクを取得して計算できるように、ユーザコードを実行タスクとしてタスクキューに登録するように構成され、取得ユニット413は、計算ノードの計算結果を取得し、計算結果をユーザ端末にフィードバックするように構成される。 The service node 41 of the programming platform 40 of FIG. 4 is further configured to execute the method of executing the user code of the programming platform. Specifically, as shown in FIG. 5, FIG. 5 is a schematic structural diagram of an embodiment of the service node 41 of the programming platform according to the present application. The service node 41 includes a receiving unit 411, a registration unit 412, and an acquisition unit 413. Here, the receiving unit 411 is configured to acquire a user code for representing the user terminal, and the registration unit 412 executes the user code so that the compute node can acquire the execution task from the task queue and calculate it. It is configured to be registered in the task queue as a task, and the acquisition unit 413 is configured to acquire the calculation result of the calculation node and feed back the calculation result to the user terminal.

本願実施例において、登録ユニット412が、計算ノードがタスクキューから実行タスクを取得して計算できるように、ユーザコードを実行タスクとしてタスクキューに登録するように構成される場合、前記登録ユニット412は更に、ユーザコードの計算特徴に従って、ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録することにより、第1計算ノードが第1タスクキューから実行タスクを取得して計算できるようにするか、又は第2計算ノードが第2タスクキューから実行タスクを取得して計算できるようにするように構成される。 In the embodiment of the present application, when the registration unit 412 is configured to register the user code as an execution task in the task queue so that the calculation node can acquire the execution task from the task queue and calculate the execution task, the registration unit 412 is configured. Further, by registering the user code as an execution task in the first task queue or the second task queue according to the calculation characteristics of the user code, the first calculation node can acquire the execution task from the first task queue and calculate it. Or it is configured to allow the second compute node to retrieve the executed task from the second task queue and compute it.

本願実施例において、受信ユニット411は、ユーザ端末を表すためのユーザコードを取得する場合、リバースプロキシを介して割り当てられるユーザコードを取得するように構成される。 In the embodiment of the present application, the receiving unit 411 is configured to acquire the user code assigned via the reverse proxy when acquiring the user code for representing the user terminal.

本願実施例において、取得ユニット413は、計算結果を取得するまで、サービスノード41とユーザ端末とのセッション接続を維持するように構成される。 In the embodiment of the present application, the acquisition unit 413 is configured to maintain the session connection between the service node 41 and the user terminal until the calculation result is acquired.

図4のプログラミング・プラットフォーム40の計算ノード43は更に、プログラミング・プラットフォームのユーザコードの実行方法を実行するように構成される。具体的には、図6に示されたように、図6は、本願に係るプログラミング・プラットフォームの計算ノード43の一実施例の概略構造図である。計算ノード43は、監視ユニット431及び計算ユニット432を備え、監視ユニット431は、タスクキューを監視して実行タスクを取得するように構成され、ここで、タスクキューは実行タスクを含み、実行タスクはユーザコードに対応し、計算ユニット432は、実行タスクを計算して、計算結果を取得するように構成される。 The compute node 43 of the programming platform 40 of FIG. 4 is further configured to execute the method of executing the user code of the programming platform. Specifically, as shown in FIG. 6, FIG. 6 is a schematic structural diagram of an embodiment of the compute node 43 of the programming platform according to the present application. The calculation node 43 includes a monitoring unit 431 and a calculation unit 432, and the monitoring unit 431 is configured to monitor a task queue and acquire an execution task, wherein the task queue includes an execution task and the execution task is. Corresponding to the user code, the calculation unit 432 is configured to calculate the execution task and acquire the calculation result.

本願実施例において、計算ユニット432は、実行タスクの計算を完了した後、対応する計算リソースを解放し、タスクキューを監視し続けるように構成される。 In the embodiment of the present application, the calculation unit 432 is configured to release the corresponding calculation resource and continue to monitor the task queue after completing the calculation of the execution task.

本願のプログラミング・プラットフォームを更に説明するために、図7を参照すると、図7は、本願実施例に係るプログラミング・プラットフォームの別の概略構造図である。 To further illustrate the programming platform of the present application, with reference to FIG. 7, FIG. 7 is another schematic structural diagram of the programming platform according to the embodiment of the present application.

本願実施例に係るプログラミング・プラットフォーム70は、サービスノード71、タスクキュー72、計算ノード73及びメッセージキュー74を備え、タスクキュー72は、第1タスクキュー721及び第2タスクキュー722を含み、計算ノード73は、第1計算ノード731及び第2計算ノード732を含み、第1計算ノード731はCPUサーバ701に配置され、第2計算ノード732はGPUサーバ702に配置される。 The programming platform 70 according to the embodiment of the present application includes a service node 71, a task queue 72, a calculation node 73, and a message queue 74, and the task queue 72 includes a first task queue 721 and a second task queue 722, and is a calculation node. 73 includes a first computing node 731 and a second computing node 732, the first computing node 731 is located on the CPU server 701, and the second computing node 732 is located on the GPU server 702.

特定の応用では、サービスノード71は、複数のユーザ端末のいずれかのユーザコードを受信することができ、複数のユーザ端末のユーザコードを同時に受信することができ、これにより、ユーザ端末を表すためのユーザコードの取得を実現することができる。サービスノード71は、websocketを介してユーザ端末に接続され、即ち、サービスノード71は、websocket通信方式により、ユーザ端末のユーザコードを取得する。ユーザコードを実行タスクとしてタスクキュー72に登録する場合、ユーザコードの計算特徴に従って、ユーザコードが第1タスクキュー721に属しかつCPUサーバ701のコード実行リソースを利用すると判断すると、当該ユーザコードを実行タスクとして第1タスクキュー721に登録し、第1計算ノード731は、第1タスクキュー721を監視して、実行タスクを取得して計算することにより、計算結果を取得する。あるいは、ユーザコードの計算特徴に従って、ユーザコードが第2タスクキュー722に属しかつGPUサーバ702のコード実行リソースを利用すると判断すると、当該ユーザコードを実行タスクとして第2タスクキュー722に登録し、第2計算ノード732は、第2タスクキュー722を監視して、実行タスクを取得して計算することにより、計算結果を取得する。第1計算ノード731及び第2計算ノード732は両方とも、計算結果をメッセージキュー74に登録し、サービスノード71は、メッセージキュー74を監視して計算結果を取得し、計算結果を対応するユーザ端末にフィードバックする。本願実施例におけるサービスノード71、タスクキュー72、計算ノード73及びメッセージキュー74に関する説明は、上記のプログラミング・プラットフォームの実施例を参照でき、ここでは繰り返して説明しない。 In certain applications, the service node 71 may receive the user code of any of the plurality of user terminals and may simultaneously receive the user code of the plurality of user terminals, thereby representing the user terminal. It is possible to acquire the user code of. The service node 71 is connected to the user terminal via the websocket, that is, the service node 71 acquires the user code of the user terminal by the websocket communication method. When the user code is registered in the task queue 72 as an execution task, if it is determined that the user code belongs to the first task queue 721 and uses the code execution resource of the CPU server 701 according to the calculation characteristics of the user code, the user code is executed. Registered in the first task queue 721 as a task, the first calculation node 731 monitors the first task queue 721, acquires an execution task, and calculates, thereby acquiring a calculation result. Alternatively, if it is determined that the user code belongs to the second task queue 722 and uses the code execution resource of the GPU server 702 according to the calculation characteristics of the user code, the user code is registered in the second task queue 722 as an execution task, and the second task queue 722 is registered. 2 The calculation node 732 monitors the second task queue 722, acquires the execution task, and calculates, thereby acquiring the calculation result. Both the first calculation node 731 and the second calculation node 732 register the calculation result in the message queue 74, and the service node 71 monitors the message queue 74 to acquire the calculation result, and the user terminal corresponding to the calculation result. Give feedback to. The description of the service node 71, the task queue 72, the calculation node 73, and the message queue 74 in the embodiment of the present application can refer to the above-mentioned embodiment of the programming platform, and will not be repeated here.

上記の方式によれば、サービスノードは、受信したユーザコードを実行タスクとして異なるタスクキューにそれぞれ登録し、その後、異なるサーバの計算ノードは、異なるタスクキューをそれぞれ監視し、対応する実行タスクを取得し、それにより、異なる計算リソースとメモリリソースを使用して実行タスクを計算して、計算結果を取得する。計算ノードは、計算結果をメッセージキューに登録し、最後に、サービスノードは、メッセージキューから計算ノードの計算結果を取得し、計算結果をユーザ端末にフィードバックする。ユーザコードの実行プロセスの全体において、サービスノードと計算ノードは別々に設置されるため、ユーザ端末の接続とユーザコードの計算は、それぞれサービスノード及び計算ノードによって完了し、計算ノードの計算リソースは継続的に再利用され、異なる計算ノードは、異なるメッセージキューに対応し、それにより、異なる計算リソースとメモリリソースに依存するユーザコードを取得して計算することにより、ユーザコードの実行の非同期通信を実現し、システムの同時実行能力を向上させる。 According to the above method, the service node registers the received user code as an execution task in different task queues, and then the compute node of the different server monitors the different task queues and acquires the corresponding execution task. And thereby, the execution task is calculated using different calculation resources and memory resources, and the calculation result is obtained. The calculation node registers the calculation result in the message queue, and finally, the service node acquires the calculation result of the calculation node from the message queue and feeds back the calculation result to the user terminal. Since the service node and the calculation node are installed separately in the entire user code execution process, the connection of the user terminal and the calculation of the user code are completed by the service node and the calculation node, respectively, and the calculation resource of the calculation node continues. Recycled, different compute nodes correspond to different message queues, thereby achieving asynchronous communication of user code execution by acquiring and computing user codes that depend on different compute and memory resources. And improve the concurrency of the system.

本願実施例において、プログラミング・プラットフォームは、オンラインプログラミング教育プラットフォームまたは人工知能プラットフォームであり得る。例えば、プログラミング・プラットフォームは、学校やトレーニングセンター向けのオンラインプログラミング教育プラットフォームであり、ユーザ端末は、オンラインプログラミング教育プラットフォームにアクセスする学生端末であり、ユーザコードの実行を実現する。オンラインプログラミング教育プラットフォームは、サービスノード、タスクキュー及び計算ノードを備え、ここで、タスクキューはredisリストである。学生は、学生端末のプログラミングインターフェイスを介してユーザコードを入力し、サービスノードは、学生端末のユーザコードを受信することができ、複数の学生端末のユーザコードを同時に受信することができ、これにより、オンラインプログラミング教育プラットフォームで学生によって発行されたユーザコードの受信を実現する。サービスノードは、ユーザコードを実行タスクとしてタスクキューのredisリストに登録する。計算ノードは、redisリストを監視して実行タスクを取得し、実行タスクを計算して、計算結果を取得する。サービスノードは、計算ノードから計算結果を取得し、計算結果を学生端末にフィードバックする。 In the embodiments of the present application, the programming platform can be an online programming education platform or an artificial intelligence platform. For example, a programming platform is an online programming education platform for schools and training centers, and a user terminal is a student terminal that accesses an online programming education platform and realizes execution of user code. The online programming education platform comprises service nodes, task queues and compute nodes, where the task queue is a redis list. The student enters the user code through the programming interface of the student terminal, and the service node can receive the user code of the student terminal and can receive the user code of multiple student terminals at the same time. , Achieves reception of user codes issued by students on an online programming education platform. The service node registers the user code as an execution task in the redis list of the task queue. The compute node monitors the redis list, acquires the execution task, calculates the execution task, and acquires the calculation result. The service node acquires the calculation result from the calculation node and feeds back the calculation result to the student terminal.

本願実施例において、プログラミング・プラットフォームは、オンラインプログラミング教育プラットフォームであり、ユーザ端末は、オンラインプログラミング教育プラットフォームにアクセスする学生端末である。オンラインプログラミング教育プラットフォームは、サービスノード、タスクキュー、計算ノード及びメッセージキューを含み、ここで、タスクキューは、redisリストでありかつ第1タスクキュー及び第2タスクキューを含み、計算ノードは、第1計算ノード及び第2計算ノードを含み、メッセージキューはRabbitMQである。オンラインプログラミング教育プラットフォームのサービスノードは、ユーザコードの計算特徴に従って、ユーザコードが第1タスクキューに属しかつCPUサーバのコード実行リソースを利用すると判断すると、当該ユーザコードを実行タスクとして第1タスクキューに登録し、第1計算ノードは、第1タスクキューを監視して、実行タスクを取得して計算することにより、計算結果を取得する。あるいは、サービスノードは、ユーザコードの計算特徴に従って、ユーザコードが第2タスクキューに属しかつGPUサーバのコード実行リソースを利用すると判断すると、当該ユーザコードを実行タスクとして第2タスクキューに登録し、第2計算ノードは、第2タスクキューを監視して、実行タスクを取得して計算することにより、計算結果を取得する。第1計算ノード及び第2計算ノードは両方とも、計算結果をメッセージキュー(RabbitMQ)に登録し、サービスノードは、RabbitMQを監視して計算結果を取得し、計算結果を対応する学生端末にフィードバックする。 In the embodiment of the present application, the programming platform is an online programming education platform, and the user terminal is a student terminal accessing the online programming education platform. The online programming education platform includes a service node, a task queue, a compute node and a message queue, where the task queue is a redis list and includes a first task queue and a second task queue, where the compute node is the first. The message queue is RabbitMQ, including a compute node and a second compute node. When the service node of the online programming education platform determines that the user code belongs to the first task queue and uses the code execution resource of the CPU server according to the calculation characteristics of the user code, the user code is set as the execution task in the first task queue. After registering, the first calculation node monitors the first task queue, acquires the execution task, and calculates, thereby acquiring the calculation result. Alternatively, when the service node determines that the user code belongs to the second task queue and uses the code execution resource of the GPU server according to the calculation characteristics of the user code, the service node registers the user code as an execution task in the second task queue. The second calculation node monitors the second task queue, acquires the execution task, and calculates, thereby acquiring the calculation result. Both the first calculation node and the second calculation node register the calculation result in the message queue (RabbitMQ), and the service node monitors the RabbitMQ, acquires the calculation result, and feeds back the calculation result to the corresponding student terminal. ..

上記の方式により、学校やトレーニングセンター向けのオンラインプログラミング教育プラットフォームは、より多くの学生が同時にオンラインプログラミング教育プラットフォームでオンラインプログラミング学習を実行できるようにし、計算リソースを最大限に活用し、コストを節約することができる。 With the above method, the online programming education platform for schools and training centers will allow more students to perform online programming learning on the online programming education platform at the same time, maximizing computational resources and saving costs. be able to.

図8を参照すると、図8は、本願に係る電子機器のフレームワークの概略図である。具体的には、本願実施例の電子機器800は、相互に結合されているメモリ810とプロセッサ820を備える。ここで、メモリ810は、プログラム命令及びプロセッサ820よる処理に必要なデータを記憶するように構成される。 Referring to FIG. 8, FIG. 8 is a schematic diagram of a framework for an electronic device according to the present application. Specifically, the electronic device 800 of the embodiment of the present application includes a memory 810 and a processor 820 that are coupled to each other. Here, the memory 810 is configured to store program instructions and data necessary for processing by the processor 820.

プロセッサ820は、上記のプログラミング・プラットフォームのユーザコードの実行方法の任意の実施例のステップを実現するように、メモリ810及びプロセッサ820自体を制御する。プロセッサ820は、中央処理装置(CPU:Central Processing Unit)とも呼ばれる。プロセッサ820は、信号処理機能を備えた集積回路チップであり得る。上述のプロセッサは、汎用プロセッサ、デジタル信号プロセッサ(DSP:Digital Signal Processor)、特定用途向け集積回路(ASIC:Application Specific Integrated Circuit)、フィールドプログラマブルゲートアレイ(FPGA:Field Programmable Gate Array)または他のプログラマブルロジックデバイス、ディスクリートゲートまたはトランジスタロジックデバイス、ディスクリートハードウェアコンポーネントなどであってもよい。汎用プロセッサは、マイクロプロセッサであってもよいし、任意の従来のプロセッサなどであってもよい。さらに、プロセッサ820は、複数の集積回路チップによって共同で実現されることができる。 The processor 820 controls the memory 810 and the processor 820 itself so as to realize the steps of any embodiment of the method of executing the user code of the programming platform described above. The processor 820 is also referred to as a central processing unit (CPU). The processor 820 can be an integrated circuit chip with a signal processing function. The above-mentioned processors include general-purpose processors, digital signal processors (DSPs), integrated circuits for specific applications (ASICs), field programmable gate arrays (FPGAs), and field programmable gate arrays (FPGAs: Field Programmable Logic). It may be a device, a discrete gate or transistor logic device, a discrete hardware component, and the like. The general-purpose processor may be a microprocessor, an arbitrary conventional processor, or the like. Further, the processor 820 can be jointly realized by a plurality of integrated circuit chips.

図9を参照すると、図9は、本願に係る記憶装置のフレームワークの概略図である。本願に係る記憶装置900には、プロセッサ実行可能なプログラム命令901が記憶され、プログラム命令901は、上記の任意のプログラミング・プラットフォームのユーザコードの実行方法の実施例のステップを実現するために使用される。 Referring to FIG. 9, FIG. 9 is a schematic diagram of the framework of the storage device according to the present application. The storage device 900 according to the present application stores a processor-executable program instruction 901, and the program instruction 901 is used to realize the steps of the embodiment of the method of executing the user code of any of the above programming platforms. The program.

当該記憶装置900は、具体的に、Uディスク、モバイルハードディスク、読み取り専用メモリ(ROM:Read-Only Memory)、ランダムアクセスメモリ(RAM:Random Access Memory)、プログラム命令901を記憶することができる磁気ディスク又は光ディスクなどの媒体(揮発性記憶媒体又は不揮発性記憶媒体)であってもよいし、又は当該プログラム命令901が記憶されているサーバであってもよい。当該サーバは、記憶されているプログラム命令901を他の機器に送信して実行することができ、又は記憶されている当該プログラム命令901を独立で実行することもできる。 Specifically, the storage device 900 can store a U disk, a mobile hard disk, a read-only memory (ROM: Read-Only Memory), a random access memory (RAM: Random Access Memory), and a magnetic disk capable of storing a program instruction 901. Alternatively, it may be a medium such as an optical disk (volatile storage medium or non-volatile storage medium), or it may be a server in which the program instruction 901 is stored. The server can transmit the stored program instruction 901 to another device and execute it, or can independently execute the stored program instruction 901.

本願で提供されたいくつかの実施例において、開示された方法及び装置は、他の方式で実現できることを理解されたい。例えば、上記の装置の実施形態は例示的なものに過ぎず、例えば、モジュール又はユニットの分割は、論理機能の分割に過ぎず、実際の実現では、他の分割方式が存在でき、例えば、複数のユニット又はコンポーネントを組み合わせたり、別のシステムに統合したり、又は一部の特徴を無視したり、又は実行しないことができる。さらに、表示又は議論された相互結合又は直接結合又は通信接続は、電気的、機械的又は他の形態の一部のインターフェース、装置又はユニットを介した間接的な結合又は通信接続であり得る。 It should be understood that in some of the embodiments provided herein, the disclosed methods and devices can be implemented in other ways. For example, the embodiment of the above apparatus is merely exemplary, for example, the division of a module or unit is merely a division of a logical function, and in actual realization, other division methods may exist, for example, a plurality. Units or components can be combined, integrated into another system, or some features can be ignored or not implemented. Further, the interconnect or direct coupling or communication connection displayed or discussed can be an indirect coupling or communication connection via some interface, device or unit of electrical, mechanical or other form.

分離部材として説明されたユニットは、物理的に分離されている場合とされていない場合があり、ユニットとして表示された部材は、物理ユニットである場合もそうでない場合もあり、1箇所に配置される場合もあれば、複数のネットワークユニットに分散される場合もある。実際の必要に応じて、上記のユニットの一部又は全部を選択して、本実形態の技術案の目的を達成することができる。 The unit described as a separating member may or may not be physically separated, and the member labeled as a unit may or may not be a physical unit and is located in one place. In some cases, it may be distributed over multiple network units. Part or all of the above units may be selected as needed in practice to achieve the objectives of the technical proposal of this embodiment.

また、本願の各実施例における各機能ユニットを1つの処理ユニットに統合してもよいし、各ユニットを別々に1つのユニットとして使用してもよく、あるいは、2つ以上のユニットを1つのユニットに統合してもよい。前記統合されたユニットは、ハードウェアの形で実装されてもよいし、ソフトウェア機能ユニットの形で実装されてもよい。 Further, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may be used separately as one unit, or two or more units may be used as one unit. May be integrated into. The integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

統合されたユニットがソフトウェア機能ユニットの形で実現され、スタンドアロン製品として販売または使用される場合、1つのコンピュータ可読記憶媒体に記憶されることができる。このような理解に基づいて、本願の技術的解決策の本質的な部分、すなわち、先行技術に貢献のある部分、又は前記技術的解決策の全部又は一部は、ソフトウェア製品の形で具現されることができ、当該コンピュータソフトウェア製品は、1つの記憶媒体に記憶され、コンピュータ機器(パーソナルコンピュータ、サーバ、又はネットワーク機器等であり得る)又はプロセッサ(processor))に、本願の各実施形態の方法のステップの全部又は一部を実行させるためのいくつかの命令を含む。上記の記憶媒体は、Uディスク、モバイルハードディスク、読み取り専用メモリ(ROM:Read-Only Memory)、ランダムアクセスメモリ(RAM:Random Access Memory)、磁気ディスクまたは光ディスクなどのプログラムコードを記憶することができる様々な媒体を含む。 When the integrated unit is realized in the form of a software functional unit and sold or used as a stand-alone product, it can be stored on one computer-readable storage medium. Based on this understanding, an essential part of the technical solution of the present application, that is, a part that contributes to the prior art, or all or part of the technical solution, is embodied in the form of a software product. The computer software product can be stored in one storage medium and stored in a computer device (which may be a personal computer, server, network device, etc.) or a processor (processor), according to the method of each embodiment of the present application. Includes several instructions to perform all or part of the steps in. The above storage media can store program codes such as U disks, mobile hard disks, read-only memory (ROM: Read-Only Memory), random access memory (RAM: Random Access Memory), magnetic disks, or optical disks. Includes various media.

本願は、プログラミング・プラットフォームのユーザコードの実行方法及びプラットフォーム、ノード、機器、媒体を開示する。ここで、プログラミング・プラットフォームは、サービスノード、タスクキュー及び計算ノードを備え、プログラミング・プラットフォームのユーザコードの実行方法は、サービスノードが、ユーザ端末を表すためのユーザコードを取得し、ユーザコードを実行タスクとしてタスクキューに登録することと、計算ノードが、タスクキューを監視して実行タスクを取得することと、計算ノードが、実行タスクを計算して、計算結果を取得することと、サービスノードが、計算ノードから計算結果を取得し、計算結果をユーザ端末にフィードバックすることと、を含む。 This application discloses a method of executing a user code of a programming platform and a platform, a node, a device, and a medium. Here, the programming platform includes a service node, a task queue, and a calculation node, and the method of executing the user code of the programming platform is that the service node acquires the user code for representing the user terminal and executes the user code. Registering in the task queue as a task, the compute node monitors the task queue and acquires the execution task, the compute node calculates the execution task and acquires the calculation result, and the service node , Acquiring the calculation result from the calculation node and feeding back the calculation result to the user terminal.

Claims (28)

サービスノード、タスクキュー、計算ノードを備えるプログラミング・プラットフォームのユーザコードの実行方法であって、
前記サービスノードが、ユーザ端末を表すためのユーザコードを取得し、前記ユーザコードを実行タスクとして前記タスクキューに登録することと、
前記計算ノードが、前記タスクキューを監視して、前記実行タスクを取得することと、
前記計算ノードが、前記実行タスクを計算して、計算結果を取得することと、
前記サービスノードが、前記計算ノードから前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックすることと、を含む、前記プログラミング・プラットフォームのユーザコードの実行方法。
How to execute user code on a programming platform with service nodes, task queues, and compute nodes.
The service node acquires a user code for representing a user terminal and registers the user code as an execution task in the task queue.
When the compute node monitors the task queue and acquires the execution task,
When the calculation node calculates the execution task and obtains the calculation result,
A method of executing a user code of the programming platform, comprising the service node acquiring the calculation result from the calculation node and feeding back the calculation result to the user terminal.
前記計算ノードの数は少なくとも2つであり、前記計算ノードが、前記タスクキューを監視して、前記実行タスクを取得することは、
少なくとも2つの前記計算ノードが、前記タスクキューを監視し、前記実行タスクを取得するように前記タスクキューに要求することと、
前記タスクキューが、1つの前記実行タスクを1つの前記計算ノードに割り当てることと、を含む、
請求項1に記載のプログラミング・プラットフォームのユーザコードの実行方法。
The number of the calculation nodes is at least two, and the calculation nodes monitor the task queue and acquire the execution task.
At least two of the compute nodes monitor the task queue and request the task queue to get the execution task.
The task queue comprises allocating one said execution task to one said compute node.
The method of executing the user code of the programming platform according to claim 1.
前記タスクキューは、第1タスクキュー及び第2タスクキューを含み、少なくとも2つの前記計算ノードは、第1計算ノード及び第2計算ノードを含み、
前記ユーザコードを実行タスクとしてタスクキューに登録することは、
前記ユーザコードの計算特徴に従って、前記ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録することを含み、
前記計算ノードが、前記タスクキューを監視することは、
前記第1計算ノードが、前記第1タスクキューを監視し、前記第2計算ノードが、前記第2タスクキューを監視することを含む、
請求項1に記載のプログラミング・プラットフォームのユーザコードの実行方法。
The task queue includes a first task queue and a second task queue, and at least two of the compute nodes include a first compute node and a second compute node.
Registering the user code in the task queue as an execution task is not possible.
Including registering the user code in the first task queue or the second task queue as an execution task according to the calculation feature of the user code.
It is not possible for the compute node to monitor the task queue.
The first compute node monitors the first task queue, and the second compute node monitors the second task queue.
The method of executing the user code of the programming platform according to claim 1.
前記サービスノードの数は少なくとも2つであり、前記サービスノードが、ユーザ端末を表すためのユーザコードを取得することは、
少なくとも2つの前記サービスノードが、リバースプロキシを介して割り当てられる前記ユーザコードを取得することを含む、
請求項1又は2に記載のプログラミング・プラットフォームのユーザコードの実行方法。
The number of the service nodes is at least two, and it is possible for the service nodes to acquire a user code for representing a user terminal.
At least two said service nodes include getting the said user code assigned via a reverse proxy.
The method of executing the user code of the programming platform according to claim 1 or 2.
前記計算ノードは、前記実行タスクの計算を完了した後、対応する計算リソースを解放し、前記タスクキューを監視し続ける、
請求項1ないし4のいずれか一項に記載のプログラミング・プラットフォームのユーザコードの実行方法。
After completing the calculation of the execution task, the calculation node releases the corresponding calculation resource and continues to monitor the task queue.
The method for executing a user code of a programming platform according to any one of claims 1 to 4.
前記プログラミング・プラットフォームはメッセージキューを更に含み、前記サービスノードが、前記計算ノードから前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックすることは、
前記計算ノードが、前記計算結果を前記メッセージキューに登録することと、
前記サービスノードが、前記メッセージキューを監視して前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックすることと、を含む、
請求項1ないし4のいずれか一項に記載のプログラミング・プラットフォームのユーザコードの実行方法。
The programming platform further includes a message queue so that the service node can acquire the calculation result from the calculation node and feed the calculation result back to the user terminal.
When the calculation node registers the calculation result in the message queue,
The service node monitors the message queue, acquires the calculation result, and feeds back the calculation result to the user terminal.
The method for executing a user code of a programming platform according to any one of claims 1 to 4.
前記サービスノードは、前記計算結果を取得するまで、前記ユーザ端末とのセッション接続を維持する、
請求項6に記載のプログラミング・プラットフォームのユーザコードの実行方法。
The service node maintains a session connection with the user terminal until the calculation result is acquired.
The method of executing the user code of the programming platform according to claim 6.
プログラミング・プラットフォームのユーザコードの実行方法であって、
ユーザ端末を表すためのユーザコードを取得することと、
計算ノードがタスクキューから実行タスクを取得して計算できるように、前記ユーザコードを前記実行タスクとして前記タスクキューに登録することと、
前記計算ノードの計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックすることと、を含む、前記プログラミング・プラットフォームのユーザコードの実行方法。
How to execute user code on a programming platform
Obtaining a user code to represent a user terminal and
Registering the user code as the execution task in the task queue so that the calculation node can acquire the execution task from the task queue and calculate it.
A method of executing a user code of the programming platform, comprising acquiring a calculation result of the calculation node and feeding back the calculation result to the user terminal.
計算ノードがタスクキューから実行タスクを取得して計算できるように、前記ユーザコードを前記実行タスクとして前記タスクキューに登録することは、
前記ユーザコードの計算特徴に従って、前記ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録することにより、第1計算ノードが前記第1タスクキューから前記実行タスクを取得して計算できるようにするか、又は第2計算ノードが前記第2タスクキューから前記実行タスクを取得して計算できるようにすることを含む、
請求項8に記載のプログラミング・プラットフォームのユーザコードの実行方法。
Registering the user code as the execution task in the task queue so that the compute node can acquire the execution task from the task queue and calculate it is not possible.
By registering the user code as an execution task in the first task queue or the second task queue according to the calculation feature of the user code, the first calculation node can acquire the execution task from the first task queue and calculate. It also includes allowing the second compute node to obtain and compute the execution task from the second task queue.
The method of executing the user code of the programming platform according to claim 8.
前記ユーザ端末を表すためのユーザコードを取得することは、
リバースプロキシを介して割り当てられる前記ユーザコードを取得することを含む、
請求項8又は9に記載のプログラミング・プラットフォームのユーザコードの実行方法。
Obtaining a user code to represent the user terminal is
Including retrieving the user code assigned via a reverse proxy,
The method of executing the user code of the programming platform according to claim 8 or 9.
前記プログラミング・プラットフォームのユーザコードの実行方法は、前記計算結果を取得するまで、前記ユーザ端末とのセッション接続を維持することを含む、
請求項8ないし10のいずれか一項に記載のプログラミング・プラットフォームのユーザコードの実行方法。
The method of executing the user code of the programming platform includes maintaining a session connection with the user terminal until the calculation result is acquired.
The method for executing a user code of a programming platform according to any one of claims 8 to 10.
プログラミング・プラットフォームのユーザコードの実行方法であって、
タスクキューを監視して、実行タスクを取得することであって、前記タスクキューは前記実行タスクを含み、前記実行タスクは前記ユーザコードに対応する、ことと、
前記実行タスクを計算して、計算結果を取得することと、を含む、前記プログラミング・プラットフォームのユーザコードの実行方法。
How to execute user code on a programming platform
By monitoring the task queue and acquiring the execution task, the task queue includes the execution task, and the execution task corresponds to the user code.
A method of executing a user code of the programming platform, including calculating the execution task and obtaining the calculation result.
前記プログラミング・プラットフォームのユーザコードの実行方法は、前記実行タスクの計算を完了した後、対応する計算リソースを解放し、前記タスクキューを監視し続けることを含む、
請求項12に記載のプログラミング・プラットフォームのユーザコードの実行方法。
The method of executing the user code of the programming platform includes releasing the corresponding computational resource and continuing to monitor the task queue after completing the calculation of the execution task.
The method of executing the user code of the programming platform according to claim 12.
プログラミング・プラットフォームであって、
サービスノード、タスクキュー及び計算ノードを備え、
前記サービスノードは、ユーザ端末を表すためのユーザコードを取得し、前記ユーザコードを実行タスクとして前記タスクキューに登録するように構成され、
前記計算ノードは、前記タスクキューを監視して、前記実行タスクを取得するように構成され、
前記計算ノードは更に、前記実行タスクを計算して、計算結果を取得するように構成され、
前記サービスノードは更に、前記計算ノードから前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックするように構成される、前記プログラミング・プラットフォーム。
It ’s a programming platform,
Equipped with service node, task queue and compute node
The service node is configured to acquire a user code for representing a user terminal and register the user code as an execution task in the task queue.
The compute node is configured to monitor the task queue and acquire the execution task.
The calculation node is further configured to calculate the execution task and obtain the calculation result.
The programming platform is configured such that the service node further acquires the calculation result from the calculation node and feeds back the calculation result to the user terminal.
前記計算ノードの数は少なくとも2つであり、前記計算ノードが、前記タスクキューを監視して、前記実行タスクを取得するように構成される場合、少なくとも2つの前記計算ノードは、前記タスクキューを監視し、前記実行タスクを取得するように前記タスクキューに要求するように構成され、前記タスクキューは、1つの前記実行タスクを1つの前記計算ノードに割り当てるように構成される、
請求項14に記載のプログラミング・プラットフォーム。
If the number of compute nodes is at least two and the compute nodes are configured to monitor the task queue and acquire the execution task, then at least two compute nodes have the task queue. The task queue is configured to monitor and request the task queue to acquire the execution task, and the task queue is configured to assign one execution task to one compute node.
The programming platform according to claim 14.
前記タスクキューは、第1タスクキュー及び第2タスクキューを含み、少なくとも2つの前記計算ノードは、第1計算ノード及び第2計算ノードを含み、
前記サービスノードが前記ユーザコードを実行タスクとしてタスクキューに登録するように構成される場合、具体的に、前記サービスノードが、前記ユーザコードの計算特徴に従って、前記ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録するように構成される場合、前記計算ノードは前記タスクキューを監視するように構成され、具体的に、前記第1計算ノードは前記第1タスクキューを監視するように構成され、前記第2計算ノードは前記第2タスクキューを監視するように構成される、
請求項15に記載のプログラミング・プラットフォーム。
The task queue includes a first task queue and a second task queue, and at least two of the compute nodes include a first compute node and a second compute node.
When the service node is configured to register the user code as an execution task in the task queue, specifically, the service node performs the first task with the user code as an execution task according to the calculation characteristics of the user code. When configured to register in a queue or a second task queue, the compute node is configured to monitor the task queue, specifically, the first compute node is configured to monitor the first task queue. The second compute node is configured to monitor the second task queue.
The programming platform according to claim 15.
前記サービスノードの数は少なくとも2つであり、前記サービスノードが、ユーザ端末を表すためのユーザコードを取得するように構成される場合、少なくとも2つの前記サービスノードは、リバースプロキシを介して割り当てられる前記ユーザコードを取得するように構成される、
請求項14に記載のプログラミング・プラットフォーム。
The number of the service nodes is at least two, and if the service nodes are configured to obtain a user code to represent a user terminal, the at least two service nodes are assigned via a reverse proxy. Configured to retrieve the user code,
The programming platform according to claim 14.
前記計算ノードは、前記実行タスクの計算を完了した後、対応する計算リソースを解放し、前記タスクキューを監視し続けるように構成される、
請求項14ないし17のいずれか一項に記載のプログラミング・プラットフォーム。
The compute node is configured to release the corresponding compute resource and continue to monitor the task queue after completing the computation of the execution task.
The programming platform according to any one of claims 14 to 17.
前記プログラミング・プラットフォームはメッセージキューを更に含み、前記サービスノードが、前記計算ノードから前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックするように構成される場合、前記計算ノードは、前記計算結果を前記メッセージキューに登録するように構成され、前記サービスノードは、前記メッセージキューを監視して前記計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックするように構成される、
請求項14ないし18のいずれか一項に記載のプログラミング・プラットフォーム。
If the programming platform further includes a message queue and the service node is configured to acquire the calculation result from the calculation node and feed the calculation result back to the user terminal, the calculation node is said to be said. The calculation result is configured to be registered in the message queue, and the service node is configured to monitor the message queue, acquire the calculation result, and feed back the calculation result to the user terminal.
The programming platform according to any one of claims 14 to 18.
前記サービスノードは更に、前記計算結果を取得するまで、前記ユーザ端末とのセッション接続を維持するように構成される、
請求項19に記載のプログラミング・プラットフォーム。
The service node is further configured to maintain a session connection with the user terminal until the calculation result is acquired.
The programming platform of claim 19.
サービスノードであって、
受信ユニット、登録ユニット及び取得ユニットを備え、前記受信ユニットは、ユーザ端末を表すためのユーザコードを取得するように構成され、前記登録ユニットは、計算ノードがタスクキューから実行タスクを取得して計算できるように、前記ユーザコードを前記実行タスクとして前記タスクキューに登録するように構成され、前記取得ユニットは、前記計算ノードの計算結果を取得し、前記計算結果を前記ユーザ端末にフィードバックするように構成される、前記サービスノード。
A service node
The receiving unit includes a receiving unit, a registration unit, and an acquisition unit, the receiving unit is configured to acquire a user code for representing a user terminal, and the registration unit is calculated by acquiring an execution task from a task queue by a calculation node. The user code is configured to be registered in the task queue as the execution task so that the acquisition unit acquires the calculation result of the calculation node and feeds back the calculation result to the user terminal. The service node to be configured.
前記登録ユニットは、計算ノードがタスクキューから実行タスクを取得して計算できるように、前記ユーザコードを前記実行タスクとして前記タスクキューに登録するように構成され、前記登録ユニットは更に、前記ユーザコードの計算特徴に従って、前記ユーザコードを実行タスクとして第1タスクキュー又は第2タスクキューに登録することにより、第1計算ノードが前記第1タスクキューから前記実行タスクを取得して計算できるようにするか、又は第2計算ノードが前記第2タスクキューから前記実行タスクを取得して計算できるようにするように構成される、
請求項21に記載のサービスノード。
The registration unit is configured to register the user code as the execution task in the task queue so that the compute node can acquire the execution task from the task queue and calculate it, and the registration unit is further configured with the user code. By registering the user code as an execution task in the first task queue or the second task queue according to the calculation feature of the above, the first calculation node can acquire the execution task from the first task queue and calculate it. Or, it is configured to allow the second compute node to acquire and compute the execution task from the second task queue.
The service node according to claim 21.
前記受信ユニットは、ユーザ端末を表すためのユーザコードを取得するように構成され、前記受信ユニットは更に、リバースプロキシを介して割り当てられる前記ユーザコードを取得するように構成される、
請求項21又は22に記載のサービスノード。
The receiving unit is configured to acquire a user code for representing a user terminal, and the receiving unit is further configured to acquire the user code assigned via a reverse proxy.
The service node according to claim 21 or 22.
前記取得ユニットが前記計算結果を取得するまで、前記サービスノードは、前記ユーザ端末とのセッション接続を維持するように構成される、
請求項21ないし23のいずれか一項に記載のサービスノード。
The service node is configured to maintain a session connection with the user terminal until the acquisition unit acquires the calculation result.
The service node according to any one of claims 21 to 23.
計算ノードであって、
監視ユニット及び計算ユニットを備え、前記監視ユニットは、タスクキューを監視して、実行タスクを取得するように構成され、前記タスクキューは前記実行タスクを含み、前記実行タスクは前記ユーザコードに対応し、前記計算ユニットは、前記実行タスクを計算して、計算結果を取得するように構成される、前記計算ノード。
It ’s a compute node,
The monitoring unit includes a monitoring unit and a calculation unit, and the monitoring unit is configured to monitor a task queue and acquire an execution task, the task queue includes the execution task, and the execution task corresponds to the user code. , The calculation unit is configured to calculate the execution task and obtain the calculation result.
前記計算ユニットは更に、前記実行タスクの計算を完了した後、対応する計算リソースを解放し、前記タスクキューを監視し続けるように構成される、
請求項25に記載の計算ノード。
The calculation unit is further configured to release the corresponding calculation resource and continue to monitor the task queue after completing the calculation of the execution task.
25. The compute node according to claim 25.
電子機器であって、
相互に結合されているメモリとプロセッサを備え、
前記プロセッサは、前記メモリに記憶されているプログラム命令を実行することにより、請求項1ないし7のいずれか一項に記載の方法、及び/又は、請求項8ないし11のいずれか一項に記載の方法、及び/又は、請求項12又は13に記載の方法を実現するように構成される、前記電子機器。
It ’s an electronic device,
With interconnected memory and processor,
The method according to any one of claims 1 to 7 and / or any one of claims 8 to 11 by executing the program instruction stored in the memory. And / or the electronic device configured to implement the method of claim 12 or 13.
コンピュータプログラムが記憶されているコンピュータ可読記憶媒体であって、前記コンピュータプログラムが実行されるときに、請求項1ないし7のいずれか一項に記載の方法、及び/又は、請求項8ないし11のいずれか一項に記載の方法、及び/又は、請求項12又は13に記載の方法を実現する、前記コンピュータ可読記憶媒体。 A computer-readable storage medium in which a computer program is stored, wherein the method according to any one of claims 1 to 7 and / or claims 8 to 11 when the computer program is executed. The computer-readable storage medium according to any one of the methods and / or the method according to claim 12 or 13.
JP2021540579A 2020-02-14 2020-12-08 How to execute user code of programming platform and platform, node, device, medium Pending JP2022522609A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN202010093681.6A CN111427551A (en) 2020-02-14 2020-02-14 User code operation method of programming platform, equipment and storage medium
CN202010093681.6 2020-02-14
PCT/CN2020/134531 WO2021159831A1 (en) 2020-02-14 2020-12-08 Programming platform user code running method, platform, node, device and medium

Publications (1)

Publication Number Publication Date
JP2022522609A true JP2022522609A (en) 2022-04-20

Family

ID=71547088

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021540579A Pending JP2022522609A (en) 2020-02-14 2020-12-08 How to execute user code of programming platform and platform, node, device, medium

Country Status (6)

Country Link
JP (1) JP2022522609A (en)
KR (1) KR20210105378A (en)
CN (1) CN111427551A (en)
SG (1) SG11202108352TA (en)
TW (1) TWI786527B (en)
WO (1) WO2021159831A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427551A (en) * 2020-02-14 2020-07-17 深圳市商汤科技有限公司 User code operation method of programming platform, equipment and storage medium
CN113157420A (en) * 2021-04-27 2021-07-23 上海临视人工智能科技有限公司 Cross-platform distributed task scheduling system and scheduling method
CN113905083A (en) * 2021-10-15 2022-01-07 上海商汤临港智能科技有限公司 User code operation method and device, electronic equipment and storage medium
CN116560658B (en) * 2023-06-29 2024-02-06 睿思芯科(深圳)技术有限公司 Cloud technology-based chip integrated development system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030225918A1 (en) * 2002-05-31 2003-12-04 International Business Machines Corporation Method and system for off-loading user queries to a task manager
JP2009258803A (en) * 2008-04-11 2009-11-05 Hitachi Ltd Interactive processing system and interactive processing method
CN108228349A (en) * 2017-12-26 2018-06-29 北京市商汤科技开发有限公司 For handling the method for task, system and storage medium
CN110516738A (en) * 2019-08-23 2019-11-29 佳都新太科技股份有限公司 It is a kind of distributed to compare clustering method, device, electronic equipment and storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100547973C (en) * 2007-05-23 2009-10-07 华中科技大学 A kind of high performance computing system based on peer-to-peer network
US9778961B2 (en) * 2015-09-14 2017-10-03 Qualcomm Incorporated Efficient scheduling of multi-versioned tasks
WO2018047167A1 (en) * 2016-09-07 2018-03-15 Cloud Of Things, Ltd System and method for configuration of a connected device connection
WO2018108035A1 (en) * 2016-12-13 2018-06-21 腾讯科技(深圳)有限公司 Information processing and virtual resource exchange method, apparatus, and device
CN106874109A (en) * 2016-12-29 2017-06-20 朗新科技股份有限公司 A kind of distributed job distribution processing method and system
CN106874067B (en) * 2017-01-24 2020-10-02 华南理工大学 Parallel computing method, device and system based on lightweight virtual machine
CN108182111B (en) * 2018-01-23 2022-07-15 百度在线网络技术(北京)有限公司 Task scheduling system, method and device
US11017107B2 (en) * 2018-03-06 2021-05-25 Amazon Technologies, Inc. Pre-deployment security analyzer service for virtual computing resources
CN109246151B (en) * 2018-11-05 2021-03-30 国家电网有限公司 Intelligent video inspection analysis scheduling method for power transmission line
CN110032364B (en) * 2019-04-11 2023-08-15 上海商汤智能科技有限公司 Data processing method, device, electronic equipment and computer storage medium
CN110275778B (en) * 2019-06-14 2021-07-27 上海商汤智能科技有限公司 Online program running method and device, electronic equipment and computer storage medium
CN111427551A (en) * 2020-02-14 2020-07-17 深圳市商汤科技有限公司 User code operation method of programming platform, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030225918A1 (en) * 2002-05-31 2003-12-04 International Business Machines Corporation Method and system for off-loading user queries to a task manager
JP2009258803A (en) * 2008-04-11 2009-11-05 Hitachi Ltd Interactive processing system and interactive processing method
CN108228349A (en) * 2017-12-26 2018-06-29 北京市商汤科技开发有限公司 For handling the method for task, system and storage medium
CN110516738A (en) * 2019-08-23 2019-11-29 佳都新太科技股份有限公司 It is a kind of distributed to compare clustering method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111427551A (en) 2020-07-17
KR20210105378A (en) 2021-08-26
WO2021159831A1 (en) 2021-08-19
TW202131171A (en) 2021-08-16
TWI786527B (en) 2022-12-11
SG11202108352TA (en) 2021-09-29

Similar Documents

Publication Publication Date Title
JP2022522609A (en) How to execute user code of programming platform and platform, node, device, medium
US9792155B2 (en) Dynamic job processing based on estimated completion time and specified tolerance time
US20190324819A1 (en) Distributed-system task assignment method and apparatus
US8239868B2 (en) Computer system, servers constituting the same, and job execution control method and program
US20120323988A1 (en) Task allocation in a computer network
US9424096B2 (en) Task allocation in a computer network
CN107370796B (en) Intelligent learning system based on Hyper TF
CN104123265A (en) Method and system for communication among multiple kernels
CN116243995B (en) Communication method, communication device, computer readable storage medium, and electronic apparatus
TW202246977A (en) Task scheduling method and apparatus, computer device and storage medium
CN116302617B (en) Method for sharing memory, communication method, embedded system and electronic equipment
CN111104210A (en) Task processing method and device and computer system
CN114237937A (en) Multithreading data transmission method and device
CN115543615A (en) Resource allocation method and device, electronic equipment and storage medium
CN110806928A (en) Job submitting method and system
US10270847B2 (en) Method for distributing heavy task loads across a multiple-computer network by sending a task-available message over the computer network to all other server computers connected to the network
CN111858035A (en) FPGA equipment allocation method, device, equipment and storage medium
CN111738721A (en) Block chain transaction monitoring method and related device
CN112448977A (en) System, method, apparatus and computer readable medium for assigning tasks
CN117632457A (en) Method and related device for scheduling accelerator
CN112835721A (en) Method and device for distributing number of GPU cards, electronic equipment and storage medium
CN115202853A (en) Virtual reality video cloud computing service method
KR102642396B1 (en) Batch scheduling device for deep learning inference model using limited gpu resources
KR102662496B1 (en) Batch scheduling method for generating multiple deep learning model based inference responses using multi-gpu
CN116383127B (en) Inter-node communication method, inter-node communication device, electronic equipment and storage medium

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210713

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221004

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20230509