Delay estimation device, delay estimation method, and delay estimation system
Patent Information
- Application Number
- JP2024551017
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-10-14
- Filing Date
- 2022-10-14
- Publication Date
- 2024-11-28
- Estimated Expiration
- 2042-10-14
AI Technical Summary
Conventional delay estimation technologies in microservices focus on response time between microservices but fail to identify which specific queries cause delays, making it difficult to pinpoint the source of delays, thereby complicating repair efforts.
A delay estimation device that acquires and analyzes response times for each query, using a data model to determine whether delays have occurred by comparing current response times with past times, and employing a threshold-based determination to identify delayed queries and their associated microservices.
Enables easy identification of delayed queries and microservices, reducing the effort required to diagnose issues and preventing further problems by stopping affected microservices.
Abstract
Description
Delay estimation device, delay estimation method, and delay estimation system
[0001] The present disclosure relates to a delay estimation device, a delay estimation method, and a delay estimation system.
[0002] In recent years, various technologies have been proposed for architectures in which multiple functions are divided into multiple microservices and the multiple microservices are combined to build systems such as clouds. For example, Patent Literature 1 proposes a technology for determining the delay of a microservice.
[0003] Japanese Patent Application Laid-Open No. 2021-196970
[0004] Conventional technology focuses on the response time between microservices, making it possible to determine the delay in the path of a microservice where a delay is occurring. However, it does not determine which query used by the microservice is causing the delay. As a result, when repairing a problem, users must check a relatively wide range of microservices where the delay is occurring, which creates the problem of not being able to easily identify such parts.
[0005] Therefore, the present disclosure has been made in consideration of the above-mentioned problems, and aims to provide a technology that allows users to easily identify the part of a microservice where delays occur.
[0006] The delay estimation device according to the present disclosure includes an acquisition unit that acquires, for each query in a data model in which multiple queries are pre-associated, the response time of one or more microservices that use the queries, and a determination unit that determines whether a delay has occurred for each query based on the current response time and the past response times.
[0007] According to the present disclosure, whether a delay has occurred for each query is determined based on the current response time and past response times. With this configuration, the user can easily identify the part of the microservice where the delay has occurred.
[0008] The objects, features, aspects and advantages of the present disclosure will become more apparent from the following detailed description and the accompanying drawings.
[0009] 1 is a block diagram showing a configuration of a delay estimation system according to embodiment 1. FIG. 2 is a diagram showing an example of data stored in a monitoring data management DB according to embodiment 1. FIG. 3 is a diagram showing an example of a data model stored in a data model management DB according to embodiment 1. FIG. 4 is a diagram showing an example of a response time stored in a history management unit according to embodiment 1. FIG. 5 is a flowchart showing the operation of a delay estimation device according to embodiment 1. FIG. 6 is a flowchart showing the operation of a delay estimation device according to embodiment 1. FIG. 7 is a diagram showing an example of a response time stored in a history management unit according to modified example 3. FIG. 8 is a block diagram showing a hardware configuration of a delay estimation device according to another modified example. FIG. 9 is a block diagram showing a hardware configuration of a delay estimation device according to another modified example.
[0010] <First Embodiment> Fig. 1 is a block diagram showing the configuration of a delay estimation system according to the first embodiment. The delay estimation system in Fig. 1 includes a microservice 1, a monitoring data management DB 2, a delay estimation device 3, a data model management DB 4, a history management unit 5, and a control device 6. Note that the DBs in the monitoring data management DB 2 and the data model management DB 4 refer to "databases."
[0011] A microservice 1 has a specific function, and multiple microservices 1 combine the specific functions to form a functional system such as a cloud that has a desired function. The microservice 1 realizes the specific function by performing processes such as retrieval, search, and modification using queries on data stored in a monitoring data management DB 2. Note that the microservice 1 may also realize the specific function by performing processes such as retrieval, search, and modification using queries on data processed by another microservice 1, in addition to data stored in the monitoring data management DB 2.
[0012] Microservice 1 uses one or more queries. Metadata such as equipment, year, and building are assigned to the names used to identify the queries. For example, microservice 1 uses a query named with a year to perform processes such as retrieval, search, and modification of data related to the year. Note that one microservice 1 may use multiple queries in parallel, multiple queries in series, or multiple queries selectively.
[0013] The data that is to be acquired, searched, or changed by the query of microservice 1 is stored in monitoring data management DB 2.
[0014] FIG. 2 is a diagram illustrating an example of data stored in the monitoring data management DB 2 according to the first embodiment. In the example of FIG. 2, sensor names and values such as sensor measurement values are stored in association with each other. For example, multiple tables shown in FIG. 2 are associated with each sensor and stored in the monitoring data management DB 2. When the microservice 1 uses a query for the sensor A3, the microservice 1 obtains data related to the sensor A3 from the multiple tables in the monitoring data management DB 2. The monitoring data management DB 2 is configured, for example, by a relational database.
[0015] 1 cooperates with a data model management DB 4 and a history management unit 5 to estimate the delay of a query used by the microservice 1 when the microservice 1 executes a specific function. The delay estimation device 3, the data model management DB 4, and the history management unit 5 will be described in detail below.
[0016] The delay estimation device 3 includes an acquisition unit 3a, a determination unit 3b, and an estimation unit 3c.
[0017] The acquisition unit 3a acquires, for each query, a response time of one or more microservices 1 that use a query for a data model in which multiple queries are associated in advance. In the first embodiment, the one or more microservices 1 include one microservice 1 and another microservice 1. In the first embodiment, the data model is stored in the data model management DB 4.
[0018] 3 is a diagram showing an example of a data model stored in the data model management DB 4 according to the first embodiment. In the example of Fig. 3, a plurality of queries are associated in advance in a hierarchical structure in the data model, and include facility queries, device queries, and sensor queries defined in order from the highest level in the hierarchical structure. Note that in the first embodiment, the data model is set by the user, but the present invention is not limited to this.
[0019] In the example of Figure 3, the query for facility A1 is associated with the queries for lower-level devices A2 and B2. The query for device A2 is associated with the queries for lower-level sensors A3, B3, and C3, and the query for device B2 is associated with the query for lower-level sensor D3. The queries for sensors A3, B3, C3, and D3 are associated with values corresponding to the values in Figure 2, and the query for sensor C3 is further associated with the value obtained as a result of processing microservice E.
[0020] For example, when the data model is set as shown in Fig. 3, microservice 1 that uses a query from facility A1 essentially uses queries from devices A2 and B2. Similarly, microservice 1 that uses a query from device A2 essentially uses queries from sensors A3, B3, and C3.
[0021] The acquisition unit 3a in Fig. 1 acquires, for each query, the response time of the microservice 1 that uses a query for a data model in which multiple queries are associated in advance. For example, when the microservice 1 uses a query for the sensor A3, the acquisition unit 3a acquires the response time from the request to the response of the query for the sensor A3 according to the data model in Fig. 3. For example, when the microservice 1 uses a query for the device A2, the acquisition unit 3a acquires the response time from the request to the response of each query for the device A2 and the sensors A3, B3, and C3 according to the data model in Fig. 3. The history management unit 5 stores the response times acquired by the acquisition unit 3a.
[0022] 4 is a diagram showing an example of response times stored in the history management unit 5 according to the present embodiment 1. The history management unit 5 stores the most recently acquired current response time and the previous response time, which is an example of a past response time acquired in the past.
[0023] 4, microservice A selectively uses a query from sensor A3 and a query from sensor B3, and the current response time for sensor B3 is shown to have been obtained. Similarly, in the example of FIG. 4, microservices C and E use a query from sensor A3, and the current response time for sensor A3 is shown to have been obtained. Note that the difference in response times between microservices C and E that use the same query from sensor A3 is due to factors other than the query from sensor A3, such as differences in the network.
[0024] 1 determines whether a delay has occurred for each query based on the current response time and past response times. In the first embodiment, the determination unit 3b determines whether a delay has occurred for each query based on the current response time and a threshold value.
[0025] Fig. 5 is a flowchart showing the operation of the determination unit 3b according to the present embodiment 1. Note that the operation in Fig. 5 is performed for each query when the microservice 1 uses a query and the acquisition unit 3a acquires the response time.
[0026] First, in step S1, the determining unit 3b performs statistical processing on a plurality of past response times to calculate statistics of the past response times, such as the mean, median, variance, and standard deviation.
[0027] In step S2, the determination unit 3b calculates a weighting for the query. For example, the determination unit 3b calculates the importance of the query or the importance of the microservice 1 that uses the query as the weighting for the query, based on query information such as the frequency of use of the query.
[0028] In step S3, the determining unit 3b determines a threshold value based on the statistics calculated in step S1 and the query weighting calculated in step S2.
[0029] In step S4, the determination unit 3b determines whether a delay has occurred in the query for which the current response time has been acquired, based on whether the current response time is greater than the threshold determined in step S3. In the first embodiment, the determination unit 3b determines that a delay has occurred in the query if the current response time is greater than the threshold, and determines that a delay has not occurred in the query if the current response time is equal to or less than the threshold. Thereafter, the operation of FIG. 5 ends.
[0030] In the above operation, for example, if the statistic is an average value, the determination unit 3b determines the sum or product of the average value and a predetermined margin value as the threshold. If only one past response time has been acquired and the statistic cannot be calculated in step S1, the determination unit 3b determines the sum or product of the past response time value and a predetermined margin value as the threshold. The determination unit 3b then weights the query, i.e., the higher the importance of the query or microservice, the smaller the margin value. With this configuration, the higher the importance of the query, the stricter the determination of query delay can be, making it easier to detect delays in highly important queries or microservices 1.
[0031] 4, in microservice A that uses a query from sensor B3, the current response time is almost the same as the previous response time, so the determination unit 3b tends to determine that no delay has occurred in the query from sensor B3. On the other hand, in microservices C and E that use a query from sensor A3, the current response time is much longer than the previous response time, so the determination unit 3b tends to determine that a delay has occurred in the query from sensor A3.
[0032] In the following description, for convenience of explanation, a query determined by the determining unit 3b to be experiencing a delay may be referred to as a "delayed query."
[0033] 1 estimates, based on the data model and the delay query, that a delay has occurred in both the microservice 1 that uses the delay query and the query associated with the delay query in the data model. Note that the estimation unit 3c is not limited to this, and may estimate that a delay has occurred in either the microservice 1 that uses the delay query or the query associated with the delay query in the data model, but not in both.
[0034] Furthermore, in the first embodiment, the estimation unit 3c estimates, based on the data model and the delayed query, that a delay has occurred in a query that is associated with the delayed query and is at a higher level in the hierarchical structure than the delayed query.
[0035] Fig. 6 is a flowchart showing the operation of the estimation unit 3c according to the present embodiment 1. The operation of Fig. 6 is performed when the determination unit 3b determines that the query is a delay query.
[0036] First, in step S11, the estimation unit 3c identifies the position of the delay query in the data model.
[0037] In step S12, the estimation unit 3c identifies a query that is associated with the delayed query and that is at a higher level in the hierarchical structure of the data model than the delayed query. For example, if the data model is the data model of FIG. 3 and the query of sensor A3 is determined to be a delayed query, in step S12, the estimation unit 3c identifies queries of device A2 and facility A1.
[0038] In step S13, the estimation unit 3c estimates that a delay has occurred between microservice 1 that uses a delayed query and the query identified in step S12. For example, assume that the data model is the data model of FIG. 3 and the query of sensor A3 used by microservice E in FIG. 4 is determined to be a delayed query. In this case, in step S13, the estimation unit 3c estimates that a delay has occurred between microservice E in FIG. 4 and the queries of device A2 and facility A1. Then, the operation in FIG. 6 ends.
[0039] The control device 6 in Fig. 1 controls the display of the determination results and estimation results of the delay estimation device 3 on a display device (not shown). The control device 6 also stops microservice 1 that uses a delay query determined by the delay estimation device 3. For example, as in the above example, if a query of sensor A3 used by microservice E in Fig. 4 is determined to be a delay query, the control device 6 stops microservice E in Fig. 4. The control device 6 may stop the entire functional system constructed with microservice 1 that uses a delay query, or may stop only microservice 1 that uses a delay query in the functional system.
[0040] Summary of First Embodiment The delay estimation device 3 according to the first embodiment determines whether a delay has occurred for each query based on the current response time and the past response times. This configuration makes it possible to determine which query in the microservice 1 has caused a delay, allowing the user to easily identify the part of the microservice 1 where the delay has occurred.
[0041] Furthermore, in the first embodiment, based on the data model and the delayed query, it is estimated that a delay has occurred in at least one of a microservice that uses the delayed query and a query associated with the delayed query in the data model. As an example, based on the data model and the delayed query, it is estimated that a delay has occurred in a query that is associated with the delayed query and is at a higher level in the hierarchical structure than the delayed query. This configuration reduces the effort required of a user to examine the data model and identify microservices that use the delayed query and queries associated with the delayed query.
[0042] In addition, in the first embodiment, a threshold for determining whether a delay has occurred for each query is determined based on the past response time and the weighting of the query. With this configuration, it is possible to make the determination of delay stricter for queries with high importance or for microservice 1.
[0043] Furthermore, in the first embodiment, microservices that use delay queries are stopped, so that further problems caused by delay queries can be prevented.
[0044] 3 in the first embodiment includes a set of facility queries, device queries, and sensor queries defined in order from the highest level in the hierarchical structure, but is not limited to this. For example, the multiple queries may include a set of year queries, month queries, and day queries defined in order from the highest level in the hierarchical structure, or may include a set of building queries, floor queries, and person queries defined in order from the highest level in the hierarchical structure.
[0045] <Modification 2> In the first embodiment, when a delay query is determined from one microservice 1 based on the data model and the delay query, the estimation unit 3c may estimate that a delay has occurred in another microservice 1 that uses the delay query. Then, the control device 6 may stop the other microservice 1 that uses the delay query. For example, in FIG. 4, when a query from sensor A3 is determined to be a delay query in microservice E, it may be estimated that a delay has occurred in microservices A and C that use the query from sensor A3, and microservices A and C may be stopped. With this configuration, it is possible to prevent further malfunctions from occurring due to delay queries.
[0046] <Variation 3> Assume that variation 2 in embodiment 1 is not applied, and another microservice 1 uses the same query as a query used by one microservice. In such a case, one microservice 1 may determine that the query is delayed, but the other microservice may not determine that the query is delayed. In this case, the estimation unit 3c may estimate that a delay is occurring in a part of the one microservice 1 other than the query.
[0047] Fig. 7 is a diagram showing an example of the response time stored in the history management unit 5 according to Modification 3. In Fig. 7, the current response time in microservice C has been changed from Fig. 4 to a smaller value.
[0048] 7, for example, assume that it is determined that the query from microservice E to sensor A3 is delayed, but it is not determined that the query from microservice C to sensor A3 is delayed. In this case, the estimation unit 3c may estimate that the delay is not occurring in the query from sensor A3, but in a portion of microservice E other than the query from sensor A3, for example, in the network of microservice E. With this configuration, the portion where the delay has occurred is estimated in more detail, allowing the user to easily identify the portion of the microservice where the delay has occurred.
[0049] <Modification 4> In the first embodiment, the number of data models in FIG. 3 is one, but there may be more than one.
[0050] For example, the control device 6 may generate a data model by performing machine learning including at least one of supervised learning, unsupervised learning, and reinforcement learning, using, for example, deep learning, on the names of multiple queries.
[0051] The control device 6 configured in this manner can associate, for example, a query named "Water Purification Plant X Sludge Land △ Sensor A3" and a query named "Water Purification Plant X Sludge Land △ Sensor B3" with a query named "Water Purification Plant X Sludge Land △." Furthermore, the control device 6 can associate, for example, a query named "Water Purification Plant X Sludge Land △" with a query named "Water Purification Plant X." In this way, the control device 6 can automatically generate a data model, thereby reducing the effort required of the user to set up the data model.
[0052] <Modification 5> In the first embodiment, the determination unit 3 b determines whether a delay has occurred for each query based on the current response time and a threshold value, but this is not limited to this. For example, the determination unit 3 b may create a transition pattern of response time from the current response time and past response times, and perform machine learning similar to the above-described machine learning on the transition pattern to determine whether a delay has occurred for each query.
[0053] <Variation 6> In the first embodiment, the delay estimation device 3 and the control device 6 are provided separately, but this is not limited to this. For example, although not shown, the delay estimation device 3 may include a control unit having the same functions as the control device 6, in addition to the acquisition unit 3a, determination unit 3b, and estimation unit 3c. Furthermore, the delay estimation system is not limited to the delay estimation system according to the first embodiment, as long as it is a system having the same functions as the acquisition unit 3a and the same functions as the determination unit 3b.
[0054] <Other Modifications> The acquisition unit 3a, determination unit 3b, and estimation unit 3c in FIG. 1 described above will be referred to as the "acquisition unit 3a, etc." The acquisition unit 3a, etc. are realized by a processing circuit 81 shown in FIG. 8. That is, the processing circuit 81 includes: an acquisition unit 3a that acquires, for each query, the response time of one or more microservices that use a query for a data model in which multiple queries are previously associated; a determination unit 3b that determines whether a delay has occurred for each query based on the current response time and past response times; and an estimation unit 3c that estimates, based on the data model and the delayed query, that a delay has occurred in at least one of the microservice that uses the delayed query and the query associated with the delayed query in the data model. The processing circuit 81 may be implemented by dedicated hardware, or may be implemented by a processor that executes a program stored in memory. Examples of the processor include a central processing unit, a processing unit, an arithmetic unit, a microprocessor, a microcomputer, and a DSP (Digital Signal Processor), and is provided in, for example, a personal computer or a server.
[0055] When the processing circuitry 81 is dedicated hardware, the processing circuitry 81 corresponds to, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a combination thereof. The functions of each unit such as the acquisition unit 3a may be realized by a circuit in which processing circuits are distributed, or the functions of each unit may be realized together by a single processing circuit.
[0056] When the processing circuit 81 is a processor, the functions of the acquisition unit 3a and the like are realized in combination with software and the like. Software and the like may include, for example, software, firmware, or software and firmware. The software and the like is written as a program and stored in memory. As shown in FIG. 9 , the processor 82 applied to the processing circuit 81 realizes the functions of each unit by reading and executing a program stored in memory 83. That is, the delay estimation device 3 includes a memory 83 for storing a program that, when executed by the processing circuit 81, results in the following steps: acquiring, for each query, a response time of one or more microservices that use a query for a data model in which multiple queries are previously associated; determining whether a delay has occurred for each query based on the current response time and past response times; and estimating, based on the data model and the delayed query, that a delay has occurred in at least one of the microservice that uses the delayed query and the query associated with the delayed query in the data model. In other words, this program can be said to cause a computer to execute the procedures and methods of the acquisition unit 3a and the like. Here, the memory 83 may be, for example, a non-volatile or volatile semiconductor memory such as a RAM (Random Access Memory), a ROM (Read Only Memory), a flash memory, an EPROM (Erasable Programmable Read Only Memory), or an EEPROM (Electrically Erasable Programmable Read Only Memory), a HDD (Hard Disk Drive), a magnetic disk, a flexible disk, an optical disk, a compact disk, a mini disk, a DVD (Digital Versatile Disc), a drive device for any of these, or any storage medium to be used in the future.
[0057] The above describes a configuration in which each function of the acquisition unit 3a, etc. is realized either by hardware or software, etc. However, this is not limited to this, and a configuration in which part of the acquisition unit 3a, etc. is realized by dedicated hardware and another part is realized by software, etc. For example, the function of the acquisition unit 3a can be realized by the processing circuit 81 as dedicated hardware, an acquisition processing circuit, and the other functions can be realized by the processing circuit 81 as a processor 82 reading and executing a program stored in the memory 83.
[0058] As described above, the processing circuitry 81 can realize the above-described functions by hardware, software, or a combination of these.
[0059] The contents of the embodiments can be modified or omitted as appropriate.
[0060] The above description is illustrative in all respects and is not restrictive. It is understood that countless variations not illustrated can be envisioned.
[0061] 1 Microservice, 3 Delay estimation device, 3a Acquisition unit, 3b Determination unit, 3c Estimation unit.
Claims
1. An acquisition unit that acquires, for each query, a response time of one or more microservices that use a plurality of queries in a data model in which the queries are associated in advance; a determination unit that determines whether or not a delay has occurred for each query based on the current response time and the past response times; A delay estimator comprising:
2. 2. The delay estimation device according to claim 1, The delay estimation device further includes an estimation unit that estimates, based on the data model and a delayed query, which is the query determined to be experiencing a delay, that a delay is occurring in at least one of the microservice that uses the delayed query and the query associated with the delayed query in the data model.
3. 3. The delay estimation device according to claim 1, further comprising: The delay estimation device, wherein the multiple queries are previously associated with each other in a hierarchical structure in the data model.
4. 3. The delay estimation device according to claim 2, The plurality of queries are previously associated in a hierarchical structure in the data model; The estimation unit is and a delay estimation device that estimates, based on the data model and the delayed query, that a delay has occurred in the query that is associated with the delayed query and is at a higher level in the hierarchical structure than the delayed query.
5. 4. The delay estimation device according to claim 3, The plurality of queries includes: A set of facility queries, device queries, and sensor queries defined in order from the highest level in the hierarchical structure; A set of a year query, a month query, and a day query defined in order from the highest level in the hierarchical structure; A delay estimation device including at least one of a set of building queries, floor queries, and person queries defined in order from the highest hierarchical level in the hierarchical structure.
6. 3. The delay estimation device according to claim 1, further comprising: The determination unit is determining whether a delay is occurring for each of the queries based on the current response time and a threshold; The threshold is determined based on the past response times and a weighting of the queries.
7. 3. The delay estimation device according to claim 2, The delay estimator stops the microservices that use the delay queries.
8. 3. The delay estimation device according to claim 2, The one or more microservices include one microservice and another microservice; The estimation unit is When the delayed query is determined from the one microservice based on the data model and the delayed query, the delay estimation device estimates that a delay is occurring in the other microservice that uses the delayed query.
9. 9. A delay estimation device according to claim 8, comprising: The delay estimator stops the other microservices that use the delay query.
10. 3. The delay estimation device according to claim 2, The one or more microservices include one microservice and another microservice that uses the query used in the one microservice; The estimation unit is When it is determined that the query is delayed from the one microservice and the query is not determined that the query is delayed from the other microservice, the delay estimation device estimates that a delay is occurring in a part of the one microservice other than the query.
11. 3. The delay estimation device according to claim 1, further comprising: A delay estimation device, wherein the data model is generated by performing machine learning on the names of the plurality of queries.
12. For a data model in which a plurality of queries are associated in advance, a response time of one or more microservices using the queries is obtained for each of the queries; The delay estimation method determines whether or not a delay has occurred for each query based on the current response time and the past response times.
13. A function of acquiring, for each query, a response time of one or more microservices that use a plurality of queries for a data model in which the queries are associated in advance; a function of determining whether a delay has occurred for each query based on the current response time and the past response times; A delay estimation system comprising:
