API provision system

The API system dynamically adjusts processing order based on request frequency and priority, addressing the inefficiency of conventional systems by prioritizing high-priority requests without pre-registration, ensuring timely processing even under heavy loads.

JP7565705B2Active Publication Date: 2024-10-11MITSUBISHI ELECTRIC CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2020082372
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-05-08
Publication Date
2024-10-11
Estimated Expiration
2040-05-08

AI Technical Summary

Technical Problem

Conventional API provision systems fail to prioritize high-priority requests effectively without pre-registering a unique identifier and priority, leading to delayed processing of high-priority requests when numerous low-priority requests are present.

Method used

An API providing system that receives requests chronologically, stores them, and includes a priority change mechanism to adjust the processing order of existing requests when duplicates are detected, allowing high-priority requests to be processed efficiently without pre-registration of identifiers.

Benefits of technology

Enables flexible and efficient prioritization of API requests, ensuring high-priority requests are processed promptly even during high request frequencies, preventing overload and maintaining system responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007565705000001
    Figure 0007565705000001
  • Figure 0007565705000002
    Figure 0007565705000002
  • Figure 0007565705000003
    Figure 0007565705000003
Patent Text Reader

Abstract

To solve the problem that an API providing system lacked versatility because a combination of a unique identifier indicating a requester or a requesting system and a priority should be registered in advance for a request for processing with high priority.SOLUTION: An API providing system comprises: a processing accumulating unit for accumulating API requests received by an API message reception unit; an API request storage unit for storing a new API request accumulated by the processing accumulating unit; a priority change unit for changing the processing order of API requests received by the API message reception unit; and a processing execution unit for executing the API requests according to the processing priority stored in the API request storage unit. The processing accumulating unit calls the priority change unit to advance the processing order of API requests that has already existed by one if the same API request from the same API request source as the API request stored in the API request storage unit has already existed.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to an API providing system. [Background technology]

[0002] Conventional API provision systems process API (Application Programming Interface) requests in the order in which they are received, but if the priority of the API requests is not taken into consideration, a problem occurs in that even if a high-priority request appears after excessive API requests, the high-priority request cannot be processed until all of the excessive requests have been processed. For this reason, a system is known in which a combination of a unique identifier indicating a requester or a requesting system and a priority is registered in advance, and API requests are prioritized based on this registered information (see Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2017-16408 A Summary of the Invention [Problem to be solved by the invention]

[0004] However, in the API provision system disclosed in Patent Document 1 above, it was necessary to register in advance a combination of a unique identifier indicating the requester or requesting system and a priority, making it lacking in versatility for general users. The present application discloses technology for solving the problems described above, and aims to provide an API provision system that is capable of prioritizing processing of high priority requests without the need to register a combination of a unique identifier indicating the requester or requesting system and a priority. [Means for solving the problem]

[0005] The API provision system according to the present application includes an API message receiving unit that receives API requests in chronological order, a processing storage unit that accumulates the API requests in the order in which they were received by the API message receiving unit, an API request storage unit that stores the API requests accumulated by the processing storage unit in an order in which they are to be processed in the order in which they were received, a priority changing unit that changes the order of processing of the API requests received by the API message receiving unit, and a processing execution unit that executes the API requests in accordance with the processing priority order stored in the API request storage unit upon receiving the API requests, and when the processing storage unit newly stores the API request in the API request storage unit, the processing storage unit detects whether the API request has already been processed in the API request storage unit from the same request source. The same API request If a new API request exists, the priority change unit is called instead of storing the API request anew, and the priority change unit moves the processing order of the API request already existing in the API request storage unit up by one. Effect of the Invention

[0006] The API providing system according to the present application can be a highly versatile system that can give priority to processing when the frequency of API requests is high. [Brief description of the drawings]

[0007] [Figure 1] 1 is a block diagram showing an overall configuration of an API providing system according to a first embodiment. [Diagram 2] 1 is a block diagram showing a hardware configuration of an API providing system according to a first embodiment. [Diagram 3] 4 is a flowchart for explaining the operation of the API providing system according to the first embodiment. [Figure 4] 2 is a conceptual diagram illustrating time-series transition of processing data in the API providing system according to the first embodiment. FIG. [Diagram 5] 2 is a conceptual diagram illustrating time-series transition of processing data in the API providing system according to the first embodiment. FIG. [Figure 6] 2 is a conceptual diagram illustrating time-series transition of processing data in the API providing system according to the first embodiment. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008] Embodiment 1 FIG. 1 is a block diagram showing an overall configuration of an API providing system according to the first embodiment. In the figure, API provision system 1 is configured to provide applications sequentially based on API requests made by general users (requestors) such as API request unit A, API request unit B, API request unit C, API request unit D, API request unit E, and is configured to include an API message receiving unit 10 that receives API requests, a processing accumulation unit 11 that accumulates API requests received by API message receiving unit 10, an API request storage unit 12 that stores new API requests accumulated by the processing accumulation unit 11, a priority changing unit 13 that changes the processing priority of API requests, and a processing execution unit 14 that executes API requests in accordance with the processing priority stored in API request storage unit 12.

[0009] Here, each component part in the API providing system 1 is formed by, for example, a microprocessor 20 and a memory 21 for storing programs and various information, as shown in FIG.

[0010] Next, the operation of the API providing system configured as described above will be described with reference to the flowchart shown in FIG. First, in step S101, it is determined whether there is a newly accepted API request in the API message accepting unit 10, and if there is an API request, the process storage unit 11 stores this API request (step S102).

[0011] Next, in step S103, it is determined whether or not the API request accumulated in step S102 is stored in the API request storage unit 12. If the API request is not stored (N), the process proceeds to step S104 to determine whether a virtual API request is stored in the API request storage unit 12, and if it is not stored (N), the API request storage unit 12 stores the actual API request, and generates and additionally stores a virtual API request corresponding to the actual API request (step S105). Also, if it is determined in step S104 that a virtual API request is stored (Y), the process proceeds to step S106 where only the actual API request is stored.

[0012] On the other hand, if in step S103 an actual API request has already been stored (Y), the process proceeds to step S107, and it is determined whether or not a virtual API request has been stored immediately before in the API request storage unit 12. Here, if a virtual API request has not been stored immediately before (N), the priority change unit 13 causes the API request storage unit 12 to only perform processing to move the actual API request up one position in the processing priority, and does not store a new API request. Also, if a virtual API request has been stored immediately before (Y), the priority change unit 13 does not perform the moving up processing. Through the above-mentioned processing steps, the process returns to step S101, where it is determined whether there is a new received message, and the same processing is repeated until there are no more new received messages. The process execution unit 14 executes the processes according to the processing priority of the API requests stored in the API request storage unit 12 through the above steps.

[0013] Next, specific time-series transitions of processing data in the API providing system will be described with reference to FIGS. In each figure, the upper column shows a table of new requests representing new API requests received by API message receiving unit 10, and the lower column shows the processing order of API requests stored in API request storage unit 12. Also, the progression of time is shown from left to right, with the request order indicating the order in which new API requests were received, the request content indicating the type of processing to be executed by processing execution unit 14, and the source of the request indicating which of API request units A to E. Furthermore, the request content is described here as being requested only for processing 1 and processing 1', with processing 1 being the actual processing request that was actually requested, and processing 1' indicating a virtual processing request formed in conjunction with the actual processing request.

[0014] In FIG. 4, it is assumed that at an initial time t1, no processing requests are stored in API request storage unit 12, and API message receiving unit 10 receives six new requests. First, at time t2, process accumulation unit 11 stores process 1 from request source A, which is request order 1 in the table of new requests received at time t1, in API request storage unit 12, and also generates process 1' from request source A, which is a virtual request, and adds it immediately after process 1. At this time, it is assumed that no new requests have been input to API message reception unit 10, and five new requests remain.

[0015] Next, at time t3, process accumulator 11 stores process 1 from request source B, which has request order 1 remaining in the new request table, in API request storage unit 12, and generates process 1' from request source B, which is a virtual request, and adds it immediately afterwards. At this time, it is assumed that no new requests have been input to API message receiver 10, and four new requests remain.

[0016] Next, at time t4, process accumulator 11 stores process 1 from request source C, which has request order 1 remaining in the new request table, in API request storage unit 12, and generates process 1' from request source C, which is a virtual request, and adds it immediately afterwards. At this time, it is assumed that no new requests have been input to API message receiver 10, and three new requests remain.

[0017] Next, at time t5, process accumulator 11 stores process 1 from request source D, which has request order 1 remaining in the new request table, in API request storage unit 12, and generates process 1' from request source D, which is a virtual request, and adds it immediately afterwards. At this time, it is assumed that no new requests have been input to API message receiver 10, and two new requests remain.

[0018] Next, at time t6, processing accumulation unit 11 attempts to store processing 1 from request source D, which has request order 1 remaining in the new request table, in API request storage unit 12, but since processing 1 from request source D already exists in API request storage unit 12, instead of storing processing 1 from request source D in API request storage unit 12, priority change unit 13 is called, and priority change unit 13 performs processing to move processing 1 from request source D up one position in the processing order. At this time, it is assumed that no new request has been input to API message reception unit 10, and one new request remains.

[0019] Next, at time t7, process accumulation unit 11 attempts to store process 1 from request source D, which has request order 1 remaining in the new request table, in API request storage unit 12, but since process 1 from request source D already exists in API request storage unit 12, instead of storing process 1 from request source D in API request storage 12, priority change unit 13 is called, and priority change unit 13 performs processing to move process 1 from request source D up one position in the processing order. At this time, it is assumed that no new request has been input to API message reception unit 10, and the number of remaining new requests becomes 0.

[0020] Next, as shown in FIG. 5, it is assumed that API message receiving unit 10 receives six new requests at time t8. At time t9, process accumulation unit 11 attempts to store in API request storage unit 12 process 1 from request source D, which is in request order 1 in the table of new requests received at time t8, but since process 1 from request source D already exists in API request storage unit 12, instead of storing process 1 from request source D in API request storage 12, priority change unit 13 is called, and priority change unit 13 performs processing to move process 1 from request source D up one position in the processing order. At this time, it is assumed that no new requests have been input to API message reception unit 10, and five new requests remain.

[0021] Next, at time t10, processing accumulation unit 11 attempts to store processing 1 from request source D, which has request order 1 remaining in the new request table, in API request storage unit 12, but processing 1 from request source D already exists in API request storage unit 12, so priority change unit 13 will move processing 1 from request source D up one position in the processing order, as described above. At this time, it is assumed that no new requests have been input to API message reception unit 10, and four new requests remain.

[0022] Next, at time t11, processing accumulation unit 11 attempts to store processing 1 from request source D, which has request order 1 remaining in the new request table, in API request storage unit 12, but processing 1 from request source D already exists in API request storage unit 12, so priority change unit 13 will move processing 1 from request source D up one position in the processing order, as described above. At this time, it is assumed that no new requests have been input to API message reception unit 10, and three new requests remain.

[0023] Next, at time t12, processing accumulation unit 11 attempts to store processing 1 from request source D, which has request order 1 remaining in the new request table, in API request storage unit 12, but processing 1 from request source D already exists in API request storage unit 12, so priority change unit 13 will move processing 1 from request source D up one position in the processing order, as described above. At this time, it is assumed that no new request has been input to API message reception unit 10, and two new requests remain.

[0024] Next, at time t13, processing accumulation unit 11 attempts to store processing 1 from request source D, which has request order 1 remaining in the new request table, in API request storage unit 12, but since processing 1 from request source D already exists in API request storage unit 12, priority change unit 13 is called instead of storing processing 1 from request source D in API request storage unit 12. Here, priority change unit 13 attempts to move up the processing order of processing 1 from request source D by one, but since the processing order of processing 1 from request source D is already "1", it is decided not to change the processing order. At this time, it is assumed that no new request has been input to API message reception unit 10, and one new request remains.

[0025] Next, at time t14, process accumulation unit 11 stores process 1 from request source E, which has request order 1 remaining in the table of new requests, in API request storage unit 12, and generates process 1' from request source E, which is a virtual request, and adds it immediately after process 1. At this point, the number of remaining new requests becomes 0. Also, if process execution unit 14 now executes process 1 from request source D, which has request order 1, the processing order in API request storage unit 12 moves up by 1, to the one shown at time t15 in FIG. 6.

[0026] Next, as shown in FIG. 6, it is assumed that API message receiving unit 10 receives four new requests at time t15. At time t16, process accumulation unit 11 stores process 1 from request source D, which is request order 1 in the table of new requests received at time t15, in API request storage unit 12 and attempts to generate process 1' from request source D, which is a virtual request, but because API request storage unit 12 already contains process 1', which is a virtual request for process 1 from request source D, no new process 1' from request source D is generated. At this time, it is assumed that no new requests have been input to API message reception unit 10, and three new requests remain.

[0027] Next, at time t17, processing accumulation unit 11 attempts to store processing 1 from request source D, which is in request order 1 in the new request table, in API request storage unit 12, but since processing 1 from request source D already exists in API request storage unit 12, instead of storing processing 1 from request source D in API request storage unit 12, priority change unit 13 is called, and priority change unit 13 moves processing 1 from request source D up one position in the processing order. At this time, it is assumed that no new request has been input to API message reception unit 10, and two new requests remain.

[0028] Next, at time t18, processing accumulation unit 11 attempts to store processing 1 from request source D, which is in request order 1 in the new request table, in API request storage unit 12, but since processing 1 from request source D already exists in API request storage unit 12, instead of storing processing 1 from request source D in API request storage unit 12, priority change unit 13 is invoked, and priority change unit 13 moves processing 1 from request source D up one position in the processing order. At this time, it is assumed that no new request has been input to API message reception unit 10, and one new request remains.

[0029] Next, at time t19, processing accumulation unit 11 attempts to store processing 1 from request source D, which has request order 1 in the new request table, in API request storage unit 12, but processing 1 from request source D already exists in API request storage unit 12, so instead of storing processing 1 from request source D in API request storage unit 12, priority change unit 13 is called, and priority change unit 13 attempts to move processing 1 from request source D up by one step in the processing order. However, the request that is one step earlier in the processing order than processing 1 from request source D is processing 1', which is a virtual request of processing 1 from request source D, so the processing order is not changed. In the above embodiment, the API message receiving unit 10 has been described as accepting six new API requests, but this is not limited to this, and the number of requests stored in the API request storage unit 12 can be set as necessary.

[0030] As described above, when the API provision system of the present application receives an API request, it generates a virtual request corresponding to this actual request and stores it immediately after the processing order of the real request; if an identical request is received from the same request source, it moves the processing order of the request up according to the number of requests, but does not move the processing order of the virtual request up; if, after the actual request has been processed, a virtual request remains among the requests waiting to be processed, it does not generate a new virtual request; and in addition, it is configured so that an actual request cannot be moved up in the processing order beyond its own virtual request. This makes it possible to give priority to processing when API requests are made frequently, and to prevent priority processing for multiple actual processing requests, making it possible to perform priority processing while preventing overload.

[0031] It should be noted that the various features, aspects, and functions described in the above-described embodiments are not limited to application to a particular embodiment, but may be applied to the embodiments herein alone or in various combinations. [Explanation of symbols]

[0032] 1: API providing system, A to E: API request unit, 10: API message reception unit; 11: processing storage unit; 12: API request storage unit; 13: Priority change unit, 14: Processing execution unit

Claims

1. the system comprises an API message receiving unit which receives API requests in chronological order, a processing storage unit which stores the API requests in the order in which they are received by the API message receiving unit, an API request storage unit which stores the API requests stored by the processing storage unit in the order in which they are received, a priority change unit which changes the order of processing of the API requests received by the API message receiving unit, and a processing execution unit which, upon receiving the API requests, executes the API requests in accordance with the processing priority order stored in the API request storage unit, When the processing storage unit newly stores the API request in the API request storage unit, if the API request storage unit already contains the same API request from the same request source, the processing storage unit calls the priority change unit instead of newly storing the API request, The API providing system according to the present invention, wherein the priority changing unit moves up one position in the processing order of the API request already stored in the API request storage unit.

2. When the processing storage unit newly stores the API request in the API request storage unit, the processing storage unit generates a virtual request corresponding to the API request and stores the virtual request in the API request storage unit immediately after the processing order of the API request to be newly stored.

2. The API providing system of claim 1, wherein the priority change unit, when moving the processing order of the API request up by one position, does not move the processing order of the API request up beyond the virtual request if a corresponding virtual request already exists in the API request storage unit.

3. 3. The API providing system of claim 2, wherein when the processing storage unit newly stores the API request in the API request storage unit, the processing storage unit generates a virtual request corresponding to the API request and stores it in the API request storage unit immediately after the processing order of the newly stored API request, while if a virtual request corresponding to the API request already exists in the API request storage unit, the processing storage unit does not generate the new virtual request.

4. The API providing system according to any one of claims 1 to 3, characterized in that when the priority change unit moves up the processing order of the API request by one step, if the processing order of the API request already existing in the API request storage unit is the earliest, the priority change unit does not change the processing order of the API request.

5. The API providing system of any one of claims 1 to 4, characterized in that the priority change unit does not change the processing order of the API request already stored in the API request storage unit when the API request newly stored in the API request storage unit is the same API request from the same request source as the API request already stored in the API request storage unit and has an earlier processing order.

Citation Information

Patent Citations

  • API provision system and API provision method

    JP2017016408A

  • JPP3745820B