JP2020004000A - Control program, control method and control device - Google Patents
Control program, control method and control device Download PDFInfo
- Publication number
- JP2020004000A JP2020004000A JP2018121857A JP2018121857A JP2020004000A JP 2020004000 A JP2020004000 A JP 2020004000A JP 2018121857 A JP2018121857 A JP 2018121857A JP 2018121857 A JP2018121857 A JP 2018121857A JP 2020004000 A JP2020004000 A JP 2020004000A
- Authority
- JP
- Japan
- Prior art keywords
- processes
- request
- received
- storage unit
- execution request
- 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.)
- Granted
Links
Images
Landscapes
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
本発明は、制御プログラム、制御方法および制御装置に関する。 The present invention relates to a control program, a control method, and a control device.
Webサービスの提供において、サーバは、クライアントからの要求に応じて、複数の処理を順番に実行する場合がある。例えば、Webショッピングにおいて、サーバは、商品をカートに追加する処理、住所を入力する処理、支払い方法を選択する処理、購入を確定する処理といった一連の処理を、それぞれクライアントからのAPI(Application Programming Interface)リクエストに応じて順番に行う。 In providing a web service, a server may execute a plurality of processes in order in response to a request from a client. For example, in Web shopping, the server performs a series of processes such as a process of adding a product to a cart, a process of inputting an address, a process of selecting a payment method, and a process of confirming purchase, each of which is performed by an API (Application Programming Interface) from a client. ) In order according to the request.
このとき、一連の処理が途切れてしまうと、ユーザの満足度の低下やサーバの負荷の増加が起こることがある。例えば、Webショッピングにおいて、前述の一連の処理がエラーやタイムアウト等により途中で途切れてしまうと、ユーザは既に行った操作を最初からやり直すことになる。これにより、サーバへのリクエストが増加し、さらにはユーザの目的の商品が売り切れてしまうことが考えられる。 At this time, if a series of processing is interrupted, the satisfaction of the user may decrease and the load on the server may increase. For example, in the Web shopping, if the above-described series of processing is interrupted halfway due to an error, timeout, or the like, the user starts over the operation that has already been performed from the beginning. As a result, it is conceivable that the number of requests to the server increases, and that the user's target product is sold out.
これに対し、従来、サーバが、リクエスト成功時にレスポンスにトークンを付与し、次回トークンを持つリクエストを優先処理することで、一連の処理が途切れることを防止する方法が知られている。また、サーバを複数用意し、クライアントとサーバとの間に設置したリバースプロキシが、トークンを付与したリクエストを複数のサーバのいずれかに振り分けることで負荷を軽減する方法が知られている。 On the other hand, conventionally, there has been known a method in which a server appends a token to a response when a request succeeds, and prioritizes a request having the next token, thereby preventing a series of processes from being interrupted. There is also known a method in which a plurality of servers are prepared, and a reverse proxy installed between a client and a server distributes a request with a token to one of the plurality of servers to reduce a load.
しかしながら、従来の方法では、一連の処理の実行を保証するために、サーバの負荷が増加することがある。例えば、従来のトークンを付与する方法には、トークンの管理または整合性の確認をサーバが行うことから、サーバの負荷がかえって増加するという問題がある。 However, in the conventional method, the load on the server may increase in order to guarantee execution of a series of processes. For example, the conventional method of providing a token has a problem that the load on the server is increased because the server manages the token or checks the consistency.
一つの側面では、一連の処理の実行を保証することによるサーバ負荷の軽減をはかることができる制御プログラム、制御方法および制御装置を提供することにある。 An aspect of the present invention is to provide a control program, a control method, and a control device capable of reducing a server load by guaranteeing execution of a series of processes.
一つの態様では、制御プログラムは、順序付けられた複数の処理のうち、いずれかの処理の実行要求を受け付ける処理をコンピュータに実行させる。また、制御プログラムは、複数の処理のうち、実行要求を受け付ける前に実行要求の要求元から受け付けた実行要求に応じて実行された処理を記憶する記憶部を参照する処理をコンピュータに実行させる。また、制御プログラムは、受け付けたいずれかの処理と、記憶部に記憶された処理との間の順序関係が特定関係であるか否かの判定を行う処理をコンピュータに実行させる。また、制御プログラムは、判定の結果に基づき、受け付けたいずれかの処理の実行順序に関する優先度を制御する処理をコンピュータに実行させる。 In one aspect, the control program causes a computer to execute a process of receiving an execution request for any one of a plurality of ordered processes. Further, the control program causes the computer to execute a process of referring to a storage unit that stores a process executed in response to an execution request received from a request source of the execution request before accepting the execution request among the plurality of processes. Further, the control program causes the computer to execute a process of determining whether or not the order relationship between any of the received processes and the process stored in the storage unit is a specific relationship. Further, the control program causes the computer to execute a process of controlling the priority regarding the execution order of any of the received processes based on the result of the determination.
一連の処理の実行を保証することによるサーバ負荷の軽減をはかることができる。 Server load can be reduced by guaranteeing execution of a series of processes.
以下、図面に基づいて、本願の開示する制御プログラム、制御方法および制御装置の実施例を詳細に説明する。なお、本実施例により、開示技術が限定されるものではない。また、以下の実施例は、矛盾しない範囲で適宜組みあわせてもよい。 Hereinafter, embodiments of a control program, a control method, and a control device disclosed in the present application will be described in detail with reference to the drawings. Note that the disclosed technology is not limited by the present embodiment. Further, the following embodiments may be appropriately combined within a consistent range.
図1を用いて、制御システム1の構成について説明する。図1は、実施例の制御システムの構成の一例を示すブロック図である。図1に示すように、制御システム1は、制御装置10、端末20およびサーバ30を有する。
The configuration of the
例えば、端末20は、スマートフォンおよびパーソナルコンピュータである。また、例えば、サーバ30は、Webショッピング等のサービスを提供するためのWebサーバである。また、制御装置10は、AGW(API Gateway)として機能する装置である。制御装置10は、端末20からのリクエストをサーバ30に転送し、サーバ30から返却されたレスポンスを端末20に転送する。その際、制御装置10は、サーバ30の負荷を軽減しつつ、一連の処理を保証するための制御を実行する。なお、一連の処理とは、順序付けられた複数の処理である。
For example, the
図2を用いて、制御装置10の構成について説明する。図2は、実施例の制御装置の構成の一例を示すブロック図である。図2に示すように、制御装置10は、通信部11と、記憶部12と、制御部13とを有する。なお、制御装置10は、図1に示す機能部以外にも既知のコンピュータが有する各種の機能部、例えば各種の入力デバイスや音声出力デバイス等の機能部を有することとしてもかまわない。
The configuration of the
通信部11は、例えば、NIC(Network Interface Card)等によって実現される。通信部11は、ネットワークを介して有線または無線で接続された端末20、サーバ30および他の装置との間で情報の通信を司る通信インタフェースである。
The
記憶部12は、例えば、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)等の半導体メモリ素子、ハードディスクや光ディスク等の記憶装置によって実現される。記憶部12は、処理情報記憶部121およびトークン記憶部122を有する。また、記憶部12は、制御部13での処理に用いる情報を記憶する。
The storage unit 12 is realized by a semiconductor memory element such as a random access memory (RAM) or a flash memory, or a storage device such as a hard disk or an optical disk. The storage unit 12 includes a processing
処理情報記憶部121は、一連の処理を定義するための情報を記憶する。図3は、処理情報記憶部の一例を示す図である。図3に示すように、処理情報記憶部121は、複数の処理のそれぞれについて、順序、リクエストおよび処理名を記憶する。順序は、一連の処理の中で各処理が実行される順序である。また、リクエストは、各処理が実行される際に、端末20から送信されるリクエストのコマンドである。また、処理名は、各処理の名称である。
The processing
図3の例では、処理情報記憶部121は、一連の処理の中で1番目に実行される、処理名が「カート追加」である処理のリクエストのコマンドが「[POST]/cart」であることを記憶する。また、図3の例では、処理情報記憶部121は、一連の処理の中で3番目に実行される、処理名が「支払い選択」である処理のリクエストのコマンドが「[POST]/payment」であることを記憶する。図3の例では、「カート追加」、「住所入力」、「支払い選択」および「購入確定」は、Webショッピングにおける一連の処理である。
In the example of FIG. 3, the processing
トークン記憶部122は、端末20を利用するユーザごとに、一連の処理の進捗状況を示す情報であるトークンを記憶する。トークン記憶部122は、実行要求の要求元から受け付けた実行要求に応じて実行された処理を記憶する記憶部の一例である。なお、実行要求の要求元とは、リクエストを送信した端末20である。
The
図4は、トークン記憶部の一例を示す図である。図4に示すように、トークン記憶部122は、ユーザID、処理進捗および有効期限を記憶する。ユーザIDは、端末20を利用するユーザを識別する情報である。また、処理進捗は、一連の処理における処理の進捗状況を示す情報であり、実行された処理の処理名およびリクエストである。また、有効期限は、トークン記憶部122に記憶された各情報を使用可能な期限を示す情報である。
FIG. 4 is a diagram illustrating an example of the token storage unit. As shown in FIG. 4, the
図2の説明に戻って、制御部13は、例えば、CPU(Central Processing Unit)やMPU(Micro Processing Unit)等によって、内部の記憶装置に記憶されているプログラムがRAMを作業領域として実行されることにより実現される。また、制御部13は、例えば、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等の集積回路により実現されるようにしてもよい。制御部13は、受付部131、転送部132、管理部133、判定部134、優先度制御部135を有し、以下に説明する情報処理の機能や作用を実現または実行する。なお、制御部13の内部構成は、図1に示した構成に限られず、後述する情報処理を行う構成であれば他の構成であってもよい。
Returning to the description of FIG. 2, the
受付部131は、端末20からサーバ30に宛てられるリクエストを受け付ける。また、受付部131は、サーバ30から端末20に返却されるレスポンスを受け付ける。ここで、受付部131は、受け付けたリクエストおよびレスポンスをキューに追加する。また、受付部131は、優先度制御部135による制御に従って、リクエストおよびレスポンスをキューに追加する。また、転送部132は、キューに従ってリクエストおよびレスポンスを、それぞれサーバ30および端末20に転送する。
The receiving
管理部133は、トークンの管理を行う。管理部133は、判定部134による判定の結果に従って、トークン記憶部122へのトークンの登録およびトークン記憶部122に記憶されたトークンの更新を行う。
The
判定部134は、順序付けられた複数の処理のうち、受け付けたいずれかの処理の実行要求を受け付けると、複数の処理のうち、実行要求を受け付ける前に実行要求の要求元から受け付けた実行要求に応じて実行された処理を記憶するトークン記憶部122を参照する。また、判定部134は、いずれかの処理と、トークン記憶部122に記憶された処理との間の順序関係が特定関係であるか否かの判定を行う。例えば、判定部134は、各処理の順序が連続しているか否かの判定を行う。
When accepting an execution request for one of the received processes among the plurality of ordered processes, the determination unit 134 determines the execution request received from the execution request source before accepting the execution request among the plurality of processes. Reference is made to the
また、トークン記憶部122は、実行に成功した処理についてトークンを記憶するようにしてもよい。その場合、判定部134は、実行要求の要求元から受け付けた実行要求に応じて実行された処理であって、実行に成功した処理を記憶するトークン記憶部122を参照する。
Further, the
また、判定部134は、実行要求の要求元から受け付けた実行要求に応じて実行された処理および期限を示す日時を記憶するトークン記憶部122を参照して、期限を経過しているか否かの判定をさらに行うことができる。
Further, the determination unit 134 refers to the
また、判定部134は、実行要求の要求元から受け付けた実行要求に応じて実行された処理および当該処理に対応するユーザを識別する情報を記憶するトークン記憶部122を参照する。また、判定部134は、いずれかの処理に対応するユーザと、トークン記憶部122に記憶された処理に対応するユーザとが同一であるか否かの判定をさらに行う。
In addition, the determination unit 134 refers to the
優先度制御部135は、判定の結果に基づき、受け付けたいずれかの処理の実行順序に関する優先度を制御する。また、優先度制御部135は、判定部134によって、順序関係が特定関係であって、かつ期限を経過していると判定された場合、受け付けたいずれかの処理の実行順序に関する優先度を制御することができる。
The
また、優先度制御部135は、順序関係が特定関係であって、いずれかの処理に対応するユーザとトークン記憶部122に記憶された処理に対応するユーザとが同一であると判定された場合、いずれかの処理の実行順序に関する優先度を制御することができる。
Further, the
優先度制御部135は、受け付けたいずれかの処理ごとに定められた回数を上限として、いずれかの処理の実行順序に関する優先度を制御する。優先度制御部135は、判定の結果に基づき、受け付けたいずれかの処理を実行するサーバへ、いずれかの処理の実行要求を転送する順序を変更することにより優先度を制御することができる。
The
ここで、図5を用いて、制御装置10がトークンを登録する処理について説明する。図5は、トークンの登録を説明するための図である。図5の例では、端末20は、ユーザIDが「123」であるユーザによって利用されているものとする。また、初期状態では、トークン記憶部122は、ユーザIDが「123」であるユーザのトークンを記憶していないものとする。なお、本実施形態では、サーバ30は、REST APIを用いてコマンドの受け付けおよび処理の実行を行うものとする。
Here, a process in which the
端末20は、Webショッピングにおいて、商品をカートに追加するために、「[POST]/cart?item=aaa」というコマンドをリクエストとして送信する。このとき、制御装置10の受付部131は、端末20によって送信されたリクエストを受け付ける。ここで、転送部132は、受付部131によって受け付けられたリクエストをサーバ30に転送する。
The terminal 20 transmits a command “[POST] / cart? Item = aaa” as a request in order to add a product to a cart in Web shopping. At this time, the receiving
その後、受付部131は、さらに、転送部132によって転送されたリクエストに対する処理が成功したことを示す「200 OK」というレスポンスを、サーバ30から受け付ける。ここで、管理部133は、レスポンスから処理が成功したことを確認できた場合、対応するトークンをトークン記憶部122に登録する。具体的には、管理部133は、ユーザIDが「123」、処理進捗が「カート追加:[POST]/cart」、有効期限が「2018/6/12 19:12」であるトークンをトークン記憶部122に登録する。
Thereafter, the receiving
管理部133は、処理情報記憶部121を参照し、成功した処理のリクエストの処理名およびリクエストを合わせた情報をトークンの処理進捗に設定することができる。また、管理部133は、レスポンスが受け付けられた時刻から所定時間後の時刻を、トークン記憶部122の有効期限とすることができる。例えば、レスポンスが受け付けられた時刻が「2018/6/12 19:02」であった場合、管理部133は、10分後の「2018/6/12 19:12」を、トークン記憶部122の有効期限とすることができる。
The
次に、図6を用いて、制御装置10が行う優先制御について説明する。図6は、優先制御を説明するための図である。図6の例では、端末20aは、ユーザIDが「123」であるユーザによって利用されているものとする。また、端末20bは、ユーザIDが「456」であるユーザによって利用されているものとする。なお、端末20aおよび端末20bの構成は、端末20の構成と同様であるものとする。
Next, the priority control performed by the
また、初期状態では、トークン記憶部122は、ユーザIDが「123」、処理進捗が「カート追加:[POST]/cart」、有効期限が「2018/6/12 19:12」であるトークンを記憶しているものとする。
In the initial state, the
端末20aは、Webショッピングにおいて、商品をカートに追加した後、住所を入力するために、「[POST]/address」というコマンドをリクエストとして送信する。このとき、制御装置10の受付部131は、端末20aによって送信されたリクエストを受け付ける。
The terminal 20a transmits a command “[POST] / address” as a request in order to input an address after adding a product to a cart in Web shopping. At this time, the receiving
ここで、判定部134は、受付部131によって受け付けられたリクエストが、優先制御の対象であるか否かを判定する。判定部134は、端末20aからリクエストを送信したユーザのユーザIDが、トークン記憶部122に記憶されているトークンのユーザIDと合致しているか否かを判定する。さらに、判定部134は、処理情報記憶部121を参照し、受付部131によって受け付けられたリクエストが、トークン記憶部122に記憶されているトークンの処理進捗の次の順序のものであるか否かを判定する。また、判定部134は、トークン記憶部122に記憶されているトークンの有効期限が経過しているか否かを確認する。
Here, the determining unit 134 determines whether the request received by the receiving
例えば、図6の例では、リクエストを送信したユーザのユーザIDは「123」であり、トークンのユーザIDと合致する。また、図3によれば、処理名が「住所入力」である処理の順序は2であり、処理名が「カート追加」である処理の次の順序である。また、リクエストがあった日時は、「2018/6/12 19:08」であるものとする。このとき、判定部134は、当該リクエストが優先制御の対象であると判定する。 For example, in the example of FIG. 6, the user ID of the user who transmitted the request is “123”, which matches the user ID of the token. Further, according to FIG. 3, the order of the process whose process name is “input address” is 2, which is the next order of the process whose process name is “add cart”. It is assumed that the date and time of the request is “2018/6/12 19:08”. At this time, the determination unit 134 determines that the request is a target of priority control.
優先度制御部135は、判定部134によって優先制御の対象であると判定されたリクエストが、既にキューにあるリクエストに優先して、キューの先頭に設定されるように制御する。ここで、受付部131は、優先度制御部135による優先制御に従って、リクエストをキューに追加する。
The
つまり、優先制御の対象であると判定されたリクエストはキューの先頭に追加されるので、転送部132は、キューの先頭に追加された当該リクエストを他のリクエストに優先してサーバ30に転送する。その結果、優先制御の対象であると判定されたリクエストは、サーバ30において優先して処理されることになる。
In other words, the request determined to be subject to priority control is added to the head of the queue, so the
その後、受付部131は、さらに、転送部132によって転送されたリクエストに対する処理が成功したことを示す「200 OK」というレスポンスを、サーバ30から受け付ける。ここで、管理部133は、レスポンスから処理が成功したことを確認できた場合、トークン記憶部122のトークンを更新する。具体的には、管理部133は、ユーザIDが「123」、処理進捗が「カート追加:[POST]/cart」、有効期限が「2018/6/12 19:12」であるトークンの処理進捗を「住所入力:[POST]/address」に更新し、有効期限を「2018/6/12 19:22」に更新する。
Thereafter, the receiving
一方、ユーザIDが「456」であるユーザから、「[POST]/cart?item=bbb」というコマンドがリクエストとして送信された場合、当該リクエストに対応するトークンはトークン記憶部122に存在しない。このため、判定部134は、当該リクエストを優先対象でないものと判定する。この場合、当該リクエストは、キューの最後尾に設定される。
On the other hand, when a command “[POST] / cart? Item = bbb” is transmitted as a request from a user whose user ID is “456”, the token corresponding to the request does not exist in the
また、優先度制御部135は、トークンが登録または更新された後、当該トークンが次に更新されるまでの間、特定の回数だけ優先制御を行うようにしてもよい。例えば、優先度制御部135は、トークンが登録または更新された後、1回だけ優先制御を行うようにすることができる。
Further, after the token is registered or updated, the
また、リクエストとトークンの処理進捗の順序が特定の関係にない場合、判定部134は、リクエストを優先制御の対象と判定しない。例えば、ユーザが住所入力画面に進んだ後に「back space」ボタンを押すことで、再度、商品選択画面に戻り、新たに商品をカートに追加する処理を行ったとしても、判定部134は、当該カート追加に関する処理を優先制御の対象と判定しない。これは、トークンの処理進捗である「住所入力」の次の処理は、「支払い選択」であることから、「支払い選択」以外の処理は優先対象とならないためである。 In addition, when the order of the processing progress of the request and the token does not have a specific relationship, the determination unit 134 does not determine the request as a target of the priority control. For example, even if the user presses the “back space” button after proceeding to the address input screen, the user returns to the product selection screen again and performs processing for adding a new product to the cart. The processing related to the cart addition is not determined as the target of the priority control. This is because the processing next to “address input”, which is the processing progress of the token, is “payment selection”, and processing other than “payment selection” is not a priority target.
次に、実施例の制御装置10の動作について説明する。図7は、実施例のレスポンス受け付け時の処理の一例を示すフローチャートである。また、図8は、実施例のリクエスト受け付け時の処理の一例を示すフローチャートである。
Next, the operation of the
図7に示すように、制御装置10は、サーバ30からレスポンスを受け付ける(ステップS11)。ここで、制御装置10は、処理情報記憶部121を参照し、当該レスポンスに対応するリクエストが一連の処理に含まれていて、かつ処理が成功しているか否かを判定する(ステップS12)。
As shown in FIG. 7, the
制御装置10は、リクエストが一連の処理に含まれていて、かつ処理が成功している場合(ステップS12:肯定)、トークンを登録し(ステップS13)、レスポンス受け付け時の処理を終了する。一方、制御装置10は、リクエストが一連の処理に含まれていないか、処理が成功していない場合(ステップS12:否定)、トークンを登録せずにステップS11に戻り、次のリクエストを受け付ける。なお、制御装置10は、処理が成功しているか否かにかかわらずトークンを登録するようにしてもよい。これにより、制御装置10は、優先制御に使用されるトークンを登録することができる。
When the request is included in the series of processes and the process is successful (Yes at Step S12), the
次に、図8に示すように、制御装置10は、端末20からリクエストを受け付ける(ステップS21)。ここで、制御装置10は、受け付けたリクエストが一連の処理の2つ目以降の処理であるか否かを判定する(ステップS22)。このとき、制御装置10は、受け付けたリクエストが一連の処理の2つ目以降の処理でない場合(ステップS22:否定)、ステップS21に戻り、次のリクエストを受け付ける。
Next, as shown in FIG. 8, the
一方、制御装置10は、受け付けた処理が一連の処理の2つ目以降の処理である場合(ステップS22:肯定)、受け付けた処理が優先制御の対象であるか否かを判定する(ステップS23)。つまり、制御装置10は、受け付けた処理に対応するトークンが存在し、かつ受け付けた処理がトークンに対応する処理の次の順序の処理であるか否かを判定する。
On the other hand, when the received process is the second or subsequent process of the series of processes (Step S22: Yes), the
制御装置10は、受け付けた処理のトークンが存在しない場合、または受け付けた処理がトークンが存在する処理の次の順序の処理でない場合(ステップS23:否定)、ステップS21に戻り、次のリクエストを受け付ける。一方、制御装置10は、受け付けた処理のトークンが存在し、かつ受け付けた処理がトークンが存在する処理の次の順序の処理である場合(ステップS23:肯定)、優先制御を行う(ステップS24)。
When there is no token for the accepted process or when the accepted process is not the process in the order next to the process in which the token exists (Step S23: No), the
ここで、制御装置10は、優先制御を行った処理が成功したか否かを判定する(ステップS25)。制御装置10は、優先制御を行った処理が成功した場合(ステップS25:肯定)、トークンを更新し(ステップS26)、リクエスト受け付け時の処理を終了する。一方、制御装置10は、優先制御を行った処理が成功しなかった場合(ステップS25:否定)、トークンを更新せず、リクエスト受け付け時の処理を終了する。これにより、制御装置10は、トークンを使ってリクエストの優先制御を行うことができる。
Here, the
このように、制御装置10は、順序付けられた複数の処理のうち、いずれかの処理の実行要求を受け付け、複数の処理のうち、実行要求を受け付ける前に実行要求の要求元から受け付けた実行要求に応じて実行された処理を記憶する記憶部を参照する。また、制御装置10は、受け付けたいずれかの処理と、記憶部に記憶された処理との間の順序関係が特定関係であるか否かの判定を行う。また、制御装置10は、判定の結果に基づき、受け付けたいずれかの処理の実行順序に関する優先度を制御する。このように、制御装置10は、一連の処理に含まれるリクエストが優先制御の対象であるか否かを判定した上で、優先制御を行うことができる。このため、サーバ30は、優先制御に関する処理を行う必要がない。その結果、制御装置10は、一連の処理の実行を保証することによるサーバ負荷の軽減をはかることができる。
As described above, the
制御装置10は、実行要求の要求元から受け付けた実行要求に応じて実行された処理であって、実行に成功した処理を記憶する記憶部を参照する。その結果、制御装置10は、一連の処理の進行に合わせて優先制御を行うことができる。
The
制御装置10は、実行要求の要求元から受け付けた実行要求に応じて実行された処理および期限を示す日時を記憶する記憶部を参照して、期限を経過しているか否かの判定をさらに行う。また、制御装置10は、順序関係が特定関係であって、かつ期限を経過していると判定した場合、受け付けたいずれかの処理の実行順序に関する優先度を制御する。この結果、制御装置10は、トークンがいつまでも残り、特定のユーザが優先され続けることを防止し、ユーザ間の不公平感を解消することができる。
The
制御装置10は、実行要求の要求元から受け付けた実行要求に応じて実行された処理および当該処理に対応するユーザを識別する情報を記憶する記憶部を参照する。また、制御装置10は、いずれかの処理に対応するユーザと、記憶部に記憶された処理に対応するユーザとが同一であるか否かの判定をさらに行う。また、制御装置10は、順序関係が特定関係であって、いずれかの処理に対応するユーザと記憶部に記憶された処理に対応するユーザとが同一であると判定した場合、いずれかの処理の実行順序に関する優先度を制御する。この結果、制御装置10は、ユーザごとにトークンを管理し、優先制御を行うことができる。
The
制御装置10は、受け付けたいずれかの処理ごとに定められた回数を上限として、いずれかの処理の実行順序に関する優先度を制御する。この結果、制御装置10は、トークンが何度も利用され、特定のユーザが優先され続けることを防止し、ユーザ間の不公平感を解消することができる。
The
制御装置10は、判定の結果に基づき、受け付けたいずれかの処理を実行するサーバへ、いずれかの処理の実行要求を転送する順序を変更することにより優先度を制御する。このため、サーバ30は、転送されてきたリクエストを順に処理していくだけでよい。この結果、制御装置10は、サーバの負荷を軽減することができる。
The
なお、上記の実施例では、各順序に1つの処理が対応した一連の処理について説明したが、一連の処理の各処理の順序は重複していてもよい。例えば、「カート追加」の順序が1であり、「住所入力」および「支払い選択」の両方の順序が2であってもよい。この場合、制御装置10は、カートの追加が行われた後、次のリクエストが住所入力および支払いのいずれであっても、優先制御の対象とする。
In the above-described embodiment, a series of processes in which one process corresponds to each order has been described. However, the order of each process in the series of processes may overlap. For example, the order of “add cart” may be 1, and the order of both “address input” and “payment selection” may be 2. In this case, after the cart has been added, the
図示した各部の各構成要素は、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各部の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、制御装置10の判定部134と優先度制御部135とを統合してもよい。また、図示した各処理は、上記の順番に限定されるものでなく、処理内容を矛盾させない範囲において、同時に実施してもよく、順序を入れ替えて実施してもよい。
Each component of each unit illustrated does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each unit is not limited to the one shown in the figure, and all or a part thereof is functionally or physically distributed / integrated in arbitrary units according to various loads and usage conditions. Can be configured. For example, the determination unit 134 and the
さらに、各装置で行われる各種処理機能は、CPU(またはMPU、MCU(Micro Controller Unit)等のマイクロ・コンピュータ)上で、その全部または任意の一部を実行するようにしてもよい。また、各種処理機能は、CPU(またはMPU、MCU等のマイクロ・コンピュータ)で解析実行されるプログラム上、またはワイヤードロジックによるハードウェア上で、その全部または任意の一部を実行するようにしてもよいことは言うまでもない。 Further, various processing functions performed by each device may be entirely or arbitrarily executed on a CPU (or a microcomputer such as an MPU or an MCU (Micro Controller Unit)). The various processing functions may be entirely or arbitrarily executed on a program analyzed and executed by a CPU (or a microcomputer such as an MPU or an MCU) or on hardware by wired logic. Needless to say, it's good.
ところで、上記の各実施例で説明した各種の処理は、予め用意されたプログラムをコンピュータで実行することで実現できる。そこで、以下では、上記の各実施例と同様の機能を有するプログラムを実行するコンピュータの一例を説明する。図9は、制御プログラムを実行するコンピュータの一例を示す図である。 The various processes described in the above embodiments can be realized by executing a prepared program on a computer. Therefore, in the following, an example of a computer that executes a program having the same functions as the above embodiments will be described. FIG. 9 is a diagram illustrating an example of a computer that executes a control program.
図9に示すように、コンピュータ200は、各種演算処理を実行するCPU201と、データ入力を受け付ける入力装置202と、モニタ203とを有する。また、コンピュータ200は、記憶媒体からプログラム等を読み取る媒体読取装置204と、各種装置と接続するためのインタフェース装置205と、他の情報処理装置等と有線または無線により接続するための通信装置206とを有する。また、コンピュータ200は、各種情報を一時記憶するRAM207と、ハードディスク装置208とを有する。また、各装置201〜208は、バス209に接続される。
As illustrated in FIG. 9, the
ハードディスク装置208には、図2に示した受付部131、転送部132、管理部133、判定部134および優先度制御部135の各処理部と同様の機能を有する制御プログラムが記憶される。また、ハードディスク装置208には、処理情報記憶部121、トークン記憶部122および記憶部12を実現するための各種データが記憶される。
The
入力装置202は、例えば、コンピュータ200の管理者から操作情報等の各種情報の入力を受け付ける。モニタ203は、例えば、コンピュータ200の管理者に対して出力画面等の各種画面を表示する。インタフェース装置205は、例えば印刷装置等が接続される。通信装置206は、ネットワークを介して端末20、サーバ30および他の装置と接続され、各種情報をやりとりする。
The
CPU201は、ハードディスク装置208に記憶された各プログラムを読み出して、RAM207に展開して実行することで、各種の処理を行う。また、これらのプログラムは、コンピュータ200を図2に示した受付部131、転送部132、管理部133、判定部134および優先度制御部135として機能させることができる。
The
なお、上記の制御プログラムは、必ずしもハードディスク装置208に記憶されている必要はない。例えば、コンピュータ200が読み取り可能な記憶媒体に記憶されたプログラムを、コンピュータ200が読み出して実行するようにしてもよい。コンピュータ200が読み取り可能な記憶媒体は、例えば、CD−ROMやDVD(Digital Versatile Disc)、USB(Universal Serial Bus)メモリ等の可搬型記録媒体、フラッシュメモリ等の半導体メモリ、ハードディスクドライブ等が対応する。また、公衆回線、インターネット、LAN等に接続された装置にこの制御プログラムを記憶させておき、コンピュータ200がこれらから制御プログラムを読み出して実行するようにしてもよい。
The above control program does not necessarily need to be stored in the
1 制御システム
10 制御装置
11 通信部
12 記憶部
13 制御部
20、20a、20b 端末
30 サーバ
121 処理情報記憶部
122 トークン記憶部
131 受付部
132 転送部
133 管理部
134 判定部
135 優先度制御部
Claims (8)
前記複数の処理のうち、前記実行要求を受け付ける前に前記実行要求の要求元から受け付けた実行要求に応じて実行された処理を記憶する記憶部を参照して、受け付けた前記いずれかの処理と、前記記憶部に記憶された前記処理との間の順序関係が特定関係であるか否かの判定を行い、
前記判定の結果に基づき、受け付けた前記いずれかの処理の実行順序に関する優先度を制御する、
処理をコンピュータに実行させることを特徴とする制御プログラム。 An execution request for any of the ordered processes is received,
Of the plurality of processes, before receiving the execution request, referring to a storage unit that stores a process executed in response to an execution request received from a request source of the execution request, Determine whether the order relationship between the processing stored in the storage unit is a specific relationship,
Based on the result of the determination, control the priority regarding the execution order of any of the received processing,
A control program for causing a computer to execute processing.
前記制御する処理は、前記判定を行う処理によって、前記順序関係が特定関係であって、かつ前記期限を経過していると判定された場合、受け付けた前記いずれかの処理の実行順序に関する優先度を制御することを特徴とする請求項1に記載の制御プログラム。 The process of performing the determination is performed by referring to a storage unit that stores a process executed in response to the execution request received from the request source of the execution request and a date and time indicating the deadline, and determines whether the deadline has passed. Make further judgments,
In the control process, when it is determined by the determination process that the order relationship is a specific relationship and the deadline has passed, the priority regarding the execution order of any of the received processes is determined. The control program according to claim 1, wherein the control program is controlled.
前記制御する処理は、前記判定を行う処理によって、前記順序関係が特定関係であって、かつ前記いずれかの処理に対応するユーザと、前記記憶部に記憶された前記処理に対応するユーザとが同一であると判定された場合、受け付けた前記いずれかの処理の実行順序に関する優先度を制御することを特徴とする請求項1に記載の制御プログラム。 The process of performing the determination may be performed by referring to a storage unit that stores a process executed in response to an execution request received from a request source of the execution request and information that identifies a user corresponding to the process. Further determine whether the user corresponding to the process and the user corresponding to the process stored in the storage unit are the same,
In the controlling process, by the process of performing the determination, the order relationship is a specific relationship, and a user corresponding to any of the processes and a user corresponding to the process stored in the storage unit are provided. 2. The control program according to claim 1, wherein when it is determined that they are the same, the priority regarding the execution order of any one of the accepted processes is controlled.
前記複数の処理のうち、前記実行要求を受け付ける前に前記実行要求の要求元から受け付けた実行要求に応じて実行された処理を記憶する記憶部を参照して、受け付けた前記いずれかの処理と、前記記憶部に記憶された前記処理との間の順序関係が特定関係であるか否かの判定を行い、
前記判定の結果に基づき、受け付けた前記いずれかの処理の実行順序に関する優先度を制御する、
処理をコンピュータが実行することを特徴とする制御方法。 An execution request for any of the ordered processes is received,
Of the plurality of processes, before receiving the execution request, referring to a storage unit that stores a process executed in response to an execution request received from a request source of the execution request, Determine whether the order relationship between the processing stored in the storage unit is a specific relationship,
Based on the result of the determination, control the priority regarding the execution order of any of the received processing,
A control method, wherein the processing is executed by a computer.
前記複数の処理のうち、前記実行要求を受け付ける前に前記実行要求の要求元から受け付けた実行要求に応じて実行された処理を記憶する記憶部を参照して、受け付けた前記いずれかの処理と、前記記憶部に記憶された前記処理との間の順序関係が特定関係であるか否かの判定を行う判定部と、
前記判定の結果に基づき、受け付けた前記いずれかの処理の実行順序に関する優先度を制御する優先度制御部と、
を有することを特徴とする制御装置。
An execution request for any of the ordered processes is received,
Of the plurality of processes, before receiving the execution request, referring to a storage unit that stores a process executed in response to an execution request received from a request source of the execution request, A determination unit that determines whether an order relation between the processing and the processing stored in the storage unit is a specific relation,
Based on the result of the determination, a priority control unit that controls the priority regarding the execution order of any of the received processes,
A control device comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018121857A JP7139721B2 (en) | 2018-06-27 | 2018-06-27 | Control program, control method and control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018121857A JP7139721B2 (en) | 2018-06-27 | 2018-06-27 | Control program, control method and control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020004000A true JP2020004000A (en) | 2020-01-09 |
JP7139721B2 JP7139721B2 (en) | 2022-09-21 |
Family
ID=69100195
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018121857A Active JP7139721B2 (en) | 2018-06-27 | 2018-06-27 | Control program, control method and control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7139721B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007125942A1 (en) * | 2006-04-26 | 2007-11-08 | Nippon Telegraph And Telephone Corporation | Load control device and its method |
-
2018
- 2018-06-27 JP JP2018121857A patent/JP7139721B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007125942A1 (en) * | 2006-04-26 | 2007-11-08 | Nippon Telegraph And Telephone Corporation | Load control device and its method |
Also Published As
Publication number | Publication date |
---|---|
JP7139721B2 (en) | 2022-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190007421A1 (en) | Extended oauth architecture support in a scalable environment | |
US10503723B2 (en) | Method and system for migrating data between systems without downtime | |
WO2012133300A1 (en) | Virtual desktop system, network processing device, management method, and management program | |
TWI475398B (en) | Share the file management system, its control methods and programs | |
US10042338B2 (en) | Method and system for controlling devices with a chat interface | |
JP2020004000A (en) | Control program, control method and control device | |
JP7006408B2 (en) | Usage fee determination program, usage fee determination method, and information processing equipment | |
JP2018013994A (en) | Program, computer and information processing method | |
JP6816373B2 (en) | Examination management system | |
JP6816511B2 (en) | Session management program, session management method, information processing device, and information processing system | |
US11500622B2 (en) | Information processing apparatus, information processing system, and non-transitory computer readable medium for coordinating a switch to an updated program in a cluster to suppress confusion on users | |
JP5831552B2 (en) | Transfer control program, control device, and transfer control method | |
JP7191974B2 (en) | CONTRACT PROCESSING METHOD, CONTRACT PROCESSING SYSTEM AND PROGRAM | |
JP6696927B2 (en) | Cluster system, update management device for cluster system, update distribution device, update management method, update distribution method and program | |
JP6786835B2 (en) | Management equipment, servers, thin client systems, management methods and programs | |
JP6423491B1 (en) | Method for providing service to customer by at least one operator using network and network thereof | |
JP7108253B1 (en) | Information processing program and information processing device | |
JP2007164407A (en) | Alternate bidding server and method, and program | |
JP7288727B1 (en) | Matrix optimization system, matrix optimization method, and program | |
JP6171597B2 (en) | Verification system, verification method, verification program | |
JP6226666B2 (en) | Batch processing control program, batch processing system | |
JP7243144B2 (en) | Terminal device, authentication support device and program | |
JP5365377B2 (en) | Distribution system, collection system, distribution method, collection method, and program | |
WO2022259378A1 (en) | Information processing system, resource management device, resource management method, and program | |
JP6880981B2 (en) | Update control program, update control method and update control device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210310 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220127 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220215 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220406 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20220809 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220822 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7139721 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |