Entry creation method and entry creation program
The proposed solution addresses the inefficiencies in key-value stores by optimizing data storage and retrieval, reducing the number of reads and enhancing data management in key-value stores.
Patent Information
- Application Number
- JP2022112667
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2026-01-07
- Estimated Expiration
- 2042-07-13
AI Technical Summary
Existing systems fail to efficiently handle the storage and retrieval of data in key-value stores, particularly in managing the storage and retrieval of data in key-value stores, where the storage and retrieval of data in key-value stores, particularly in managing the storage and retrieval of data in key-value stores, particularly in managing the storage and retrieval of data in key-value storage systems, particularly in managing the storage and retrieval of data in key-value storage systems.
The proposed solution is a key-value storage and retrieval of data in key-value stores, particularly in managing the storage and retrieval of data in key-value stores, particularly in managing the storage and retrieval of data in key-value stores.
The proposed solution reduces the number of reads and enhances the storage and retrieval of data in key-value stores, particularly in managing the storage and retrieval of data in key-value stores, particularly in managing the storage and retrieval of data in key-value stores.
Smart Images

Figure 0007795104000001 
Figure 0007795104000002 
Figure 0007795104000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to an entry creation method and an entry creation program. [Background technology]
[0002] Key-value stores are often used to store data in information processing systems. Key-value stores hold keys and corresponding values. For example, key-value stores are sometimes used to store time-series data used in stream processing.
[0003] For example, a storage system has been proposed that reads out divided data for a section between a first time and a second time that is a predetermined time after the first time from a data storage unit that stores divided data obtained by dividing time-series data. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2014-199581 Summary of the Invention [Problem to be solved by the invention]
[0005] A single entry in a key-value store may store data for a specific time range. Also, a read request specifying a certain time range may be made to the key-value store. In this case, the smaller the time range of a single entry in the key-value store is compared to the time range of the read request, the more times entries are read from the key-value store to read the data for the requested time range.
[0006] In one aspect, the present invention aims to reduce the number of reads. [Means for solving the problem]
[0007] In one aspect, an entry creation method is provided. In this entry creation method, a computer determines a first time range, which is equal to or greater than the longest time range among the time ranges to be read in response to read requests from each program to a key-value store that holds data corresponding to time, as a time range to be associated with one entry in the key-value store. Based on the input data for each time, the computer creates entries corresponding to multiple pieces of data that belong to the time range of the first time range and stores the entries in the key-value store.
[0008] Also, in one aspect, an entry creation program executed by a computer is provided. [Effects of the Invention]
[0009] On the one hand, the number of reads can be reduced. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a diagram illustrating an information processing apparatus according to a first embodiment. [Figure 2] FIG. 10 illustrates an example of an information processing system according to a second embodiment. [Figure 3] FIG. 1 illustrates an example of hardware of an information processing device. [Figure 4] FIG. 2 is a diagram illustrating an example of functions of an information processing device. [Figure 5] FIG. 10 is a diagram illustrating an example of state access of user logic. [Figure 6] FIG. 10 is a diagram illustrating an example of a time width threshold table. [Figure 7] FIG. 10 is a diagram illustrating an example of event data. [Figure 8] FIG. 10 is a diagram illustrating an example of maximum access width information. [Figure 9] FIG. 10 is a diagram illustrating an example of a KVS entry. [Figure 10] FIG. 10 is a diagram illustrating an example of creating a KVS entry. [Figure 11]FIG. 10 is a diagram illustrating an example of creating a KVS entry. [Figure 12] 10 is a flowchart illustrating an example of stream processing. [Figure 13] 10 is a flowchart illustrating an example of a sub-process when receiving data. [Figure 14] 10 is a flowchart illustrating an example of processing of a user logic. [Figure 15] 10 is a flowchart illustrating an example of an access pattern acquisition sub-process. [Figure 16] 10 is a flowchart illustrating an example of a state writing sub-process. [Figure 17] 10 is a flowchart illustrating an example of an entry creation decision sub-process. [Figure 18] FIG. 10 is a diagram illustrating an example of determining the time range of an entry. [Figure 19] FIG. 13 illustrates an example of an access pattern table according to the third embodiment. [Figure 20] FIG. 10 is a diagram illustrating an example of an entry in a KVS according to an access pattern. [Figure 21] FIG. 10 is a diagram illustrating an example of state access of user logic. [Figure 22] FIG. 10 is a diagram illustrating an example of access history information. [Figure 23] FIG. 10 is a diagram illustrating an example of a KVS entry. [Figure 24] FIG. 10 is a diagram illustrating an example of a count of access patterns. [Figure 25] FIG. 10 is a diagram illustrating an example of creating a KVS entry. [Figure 26] 10 is a flowchart illustrating an example of an access pattern acquisition sub-process. [Figure 27] 10 is a flowchart illustrating an example of an entry creation decision sub-process. [Figure 28] FIG. 13 illustrates an example of a time range of an entry according to the fourth embodiment. [Figure 29] FIG. 13 illustrates an example of correcting a time offset error according to the fifth embodiment. [Figure 30]FIG. 23 illustrates an example of changing the time width of an access pattern according to the sixth embodiment. [Figure 31] FIG. 1 is a diagram illustrating an example of services provided by an information processing system. DETAILED DESCRIPTION OF THE INVENTION
[0011] The present embodiment will be described below with reference to the drawings. [First embodiment] A first embodiment will be described.
[0012] FIG. 1 is a diagram illustrating an information processing apparatus according to a first embodiment. The information processing device 10 has a storage unit 11 and a processing unit 12. The storage unit 11 may be a volatile storage device such as a random access memory (RAM), or a non-volatile storage device such as a hard disk drive (HDD) or flash memory. The processing unit 12 may include a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), etc. The processing unit 12 may be a processor that executes a program. The term "processor" may also include a collection of multiple processors (a multiprocessor).
[0013] The storage unit 11 has a key-value store 11a. However, the key-value store 11a may be included in a storage device external to the information processing device 10. The key-value store 11a holds data corresponding to a time. Specifically, the key-value store 11a holds entries each having a key and a value corresponding to the key. One entry corresponds to one record. Data is written to and read from the key-value store 11a on an entry-by-entry basis.
[0014] Here, the key is an identifier corresponding to a time. The key may be an identifier corresponding to a time range. In addition to the time, the key may include identification information of the device from which the data was acquired and information on the type of data. The data stored in the key-value store 11a is, for example, time-series data generated by a device such as a sensor, that is, time-series data. The data has a timestamp indicating the time when the data was generated and a value generated by the device (for example, a measurement value of a physical quantity by a sensor). The data may also be sensor data generated by a sensor.
[0015] In the example of the key-value store 11a, a time range with a time width of 5 minutes is registered in the key field. Furthermore, a plurality of values corresponding to a plurality of times belonging to the time range with a time width of 5 minutes is registered in the value field. More specifically, the key-value store 11a has an entry with the key "12:00:00~12:05:00" and the value "{12:00:00: v11, ..., 12:04:58: v12}". This entry indicates the value v11 at 12:00:00, ..., the value v12 at 12:04:58, in the 5-minute time range from 12:00:00 to 12:05:00. In the example of the key-value store 11a, a plurality of entries corresponding to the 5-minute time range up to 12:30:00 are registered.
[0016] Here, a value corresponding to a time range key such as "12:00:00~12:05:00" includes data up to the time (e.g., "12:04:59") immediately before the end time (e.g., "12:05:00"), but does not include data at the end time.
[0017] The key-value store 11a also holds an entry that stores the latest data input in chronological order from 12:30:00 until 5 minutes have passed. The key of this entry is, for example, "latest." In the example of the key-value store 11a, the entry with the key "latest" records values from 12:30:00 onwards. The processing unit 12 then determines the time range to be associated with one entry in the key-value store 11a as follows:
[0018] The processing unit 12 accepts read requests from each program for the key-value store 11a. Each program may be executed by the information processing device 10, or may be executed by another information processing device that communicates with the information processing device 10. That is, the information processing device 10 may execute multiple programs that use data in the key-value store 11a, or may accept multiple read requests from multiple programs executed by other information processing devices. The read request includes the time range to be read. In response to the read request, the processing unit 12 reads an entry having a key corresponding to the time range from the key-value store 11a and responds.
[0019] The processing unit 12 determines a first time range, which is equal to or greater than the longest time range of the read target time ranges included in the read requests from each program, as a time range to be associated with one entry in the key-value store 11a. The read target time range is the time range specified by the read target.
[0020] For example, the processing unit 12 accepts read requests R1 and R2 between 12:30:00 and 5 minutes have elapsed. The time span to be read by read request R1 is 5 minutes. The time span to be read by read request R2 is 10 minutes. The longest time span of the time spans of read requests R1 and R2 is 10 minutes. In this case, as an example, the processing unit 12 sets the first time span to 10 minutes. However, there are also cases where settable time span candidates are predetermined, such as 5 minutes, 15 minutes, etc. In that case, the processing unit 12 may set a time span candidate that is longer than 10 minutes but is close to 10 minutes, such as 15 minutes, as the first time span.
[0021] The processing unit 12 creates entries corresponding to a plurality of pieces of data that belong to the time range of the first time width based on the input data for each time, and stores the entries in the key-value store 11a. For example, at 12:35:00, the processing unit 12 has already determined that the first time span is 10 minutes. Therefore, at 12:35:00, the processing unit 12 does not create an entry for the 5-minute time span corresponding to 12:30:00 onwards, and continues recording the value in the entry for the key "latest." Then, assume that no read requests longer than a 10-minute time span are generated between 12:35:00 and 12:40:00, and the first time span remains unchanged at 10 minutes even at 12:40:00.
[0022] Then, the processing unit 12 creates an entry e1 based on the record of the key "latest" in the key-value store 11a. The entry e1 has a key of "12:30:00 to 12:40:00" and a value of "{12:30:00: v41, ..., 12:39:55: v43}". The processing unit 12 stores the entry e1 in the key-value store 11a. The key-value store 11b shows the result of storing the entry e1 in the key-value store 11a. The entry e1 corresponds to the time range of 12:30:00 to 12:40:00 (a time span of 10 minutes).
[0023] Furthermore, the processing unit 12 deletes the value of the key "latest" when the entry e1 is created. The value "{}" of the key "latest" in the key-value store 11b indicates the result of deleting the value. The entry for the key "latest" stores data input after 12:40:00.
[0024] According to the information processing device 10, a first time width, which is equal to or greater than the longest time width among the time widths to be read in response to read requests from each program to the key-value store 11a, is determined as the time width to be associated with one entry in the key-value store 11a. Based on the input data for each time, an entry e1 corresponding to multiple pieces of data belonging to the time range of the first time width is created and stored in the key-value store 11a.
[0025] This allows the information processing device 10 to reduce the number of reads. In the above example, after read request R2 is generated, there is a high possibility that read requests with a read target time span of 10 minutes, like read request R2, will continue to be generated thereafter. Therefore, by setting the time span of one entry to be equal to or greater than the longest requested time span, the information processing device 10 can read the requested entry from the key-value store 11b with a relatively small number of reads, even if a read request with the longest time span is received in the future. This allows the information processing device 10 to speed up reading entries from the key-value store 11b. For example, when the time range to be read is from 12:30:00 to 12:40:00, the information processing device 10 only needs to read entry e1 once, and can perform reads in response to read requests quickly.
[0026] Below, a more specific system will be exemplified to explain the functions of the information processing device 10 in more detail. [Second embodiment] Next, a second embodiment will be described.
[0027] FIG. 2 illustrates an example of an information processing system according to the second embodiment. The information processing system of the second embodiment includes an information processing device 100 and message queue servers 200 and 300. The information processing device 100 and the message queue servers 200 and 300 are connected to a network 20. The network 20 is, for example, a local area network (LAN). The message queue server 200 is connected to a network 30. The network 30 is a wide area network (WAN) or the Internet. Connected cars 41, 42, and 43 and an Internet of Things (IoT) device 44 are connected to the network 30. The connected cars 41, 42, and 43 and the IoT device 44 are equipped with sensors that measure physical quantities such as speed and position.
[0028] The information processing system of the second embodiment collects event data such as speed and position measured by sensors in the connected cars 41, 42, and 43 and the IoT device 44. This event data may also be called sensor data. The event data is transmitted in time series from the connected cars 41, 42, and 43 and the IoT device 44. Therefore, the event data is a type of time series data. The information processing system performs stream processing on the event data input in time series. The stream processing may also be called event stream processing.
[0029] Depending on the results of the stream processing, the information processing system provides various services to users of connected cars 41, 42, 43 and IoT devices 44. For example, there may be a service that detects swaying of the vehicle body from changes in speed over a certain period of time and warns the user of the vehicle, or a service that notifies users of vehicles near a certain road of traffic congestion information and detour route information when there are many vehicles stuck on the road.
[0030] The information processing device 100 is a server computer that receives event data from the message queue server 200 and executes stream processing based on the event data. The event data includes a timestamp and a measurement value obtained by a sensor. The program that describes the processing content of the stream processing is called user logic. One entry in the KVS is <key:value>That is, it is a pair of a key and a value. Data is written to and read from the KVS on an entry-by-entry basis.
[0031] The information processing device 100 stores received event data and data processed by user logic in a key-value store (KVS). The information processing device 100 reads data from the KVS or writes data to the KVS in response to a request from the user logic. The information processing device 100 may also transmit the processing results of the user logic to the message queue server 300 as new event data.
[0032] The message queue servers 200 and 300 are server computers that function as message queues, which are queues that hold received event data.
[0033] The message queue server 200 stores the event data received from the connected cars 41, 42, and 43 and the IoT device 44 in a message queue of the message queue server 200. The message queue server 200 transmits the event data stored in the message queue to the information processing device 100.
[0034] The message queue server 300 stores the event data received from the information processing device 100 in a message queue of the message queue server 300. The message queue server 300 transmits the event data stored in the message queue to the information processing device 100 or another server computer that executes a predetermined service in accordance with the event data. Here, the other server computer is not shown in FIG. 2 . The other server computer may transmit the above-mentioned sway warning, traffic congestion information, detour route information, and the like to the connected cars 41, 42, 43 and the IoT device 44. The process of providing the predetermined service may be executed by the information processing device 100.
[0035] In the information processing system of the second embodiment, the management units of the connected cars 41, 42, and 43 and the IoT device 44 are referred to as objects. For example, the objects corresponding to the connected cars 41, 42, and 43 may be referred to as vehicle objects. Furthermore, when the IoT device 44 acquires information about a person, the IoT device 44 may be referred to as a human object. An object is information obtained by mapping a person, device, or the like in the real world onto the information processing system. An object mapped onto the information processing system may be referred to as a digital twin of a person, device, or the like in the real world.
[0036] Data that represents the state of an object is called a state. For example, the state of a vehicle includes information such as speed, location, vehicle type, and whether the wipers are on or off. State data is associated with a timestamp, i.e., time information when the data was acquired by a sensor or the like. In user logic processing in the information processing device 100, a certain time interval is often specified and accessed from a group of state data present in chronological order.
[0037] At this time, the time width required for reading differs for each user logic and state. Furthermore, the time width for user logic to access a state changes dynamically and is unknown. If the time width per KVS entry is smaller than the time width for read access, the number of reads increases. For example, if the time width for one entry is fixed at a predetermined 1 minute, a read request to read 10 minutes of data will result in the reading of at least 10 entries, i.e., at least 10 entry reads. Similarly, a read request to read 30 minutes of data will result in the reading of at least 30 entries, i.e., at least 30 entry reads.
[0038] Thus, when storing time-series data in KVS, for example, using a predetermined time span or a time span that is uniform across the entire digital twin increases the number of read accesses, potentially lengthening the processing time. On the other hand, reading is performed on an entry-by-entry basis from KVS. For this reason, if the time span of a single KVS entry is set very long in advance, even if the read request time span is relatively short, extra data in that entry will also be read when reading, resulting in a higher read cost compared to the time span of the read request.
[0039] Therefore, the information processing device 100 provides a function for controlling the time width of one entry in the KVS so that reading from the KVS can be performed efficiently. FIG. 3 is a diagram illustrating an example of hardware of an information processing device.
[0040] The information processing device 100 includes a CPU 101, a RAM 102, an HDD 103, a GPU (Graphics Processing Unit) 104, an input interface 105, a medium reader 106, and a NIC (Network Interface Card) 107. The CPU 101 is an example of the processing unit 12 of the first embodiment. The RAM 102 or the HDD 103 is an example of the storage unit 11 of the first embodiment.
[0041] The CPU 101 is a processor that executes program instructions. The CPU 101 loads at least a portion of the programs and data stored in the HDD 103 into the RAM 102 and executes the programs. The CPU 101 may include multiple processor cores. The information processing device 100 may also have multiple processors. The processing described below may be executed in parallel using multiple processors or processor cores. A set of multiple processors may also be called a "multiprocessor" or simply a "processor."
[0042] The RAM 102 is a volatile semiconductor memory that temporarily stores programs executed by the CPU 101 and data used in calculations by the CPU 101. Note that the information processing device 100 may include a type of memory other than a RAM, or may include multiple memories.
[0043] The HDD 103 is a nonvolatile storage device that stores software programs such as an OS (Operating System), middleware, and application software, as well as data. Note that the information processing device 100 may also include other types of storage devices, such as a flash memory or an SSD (Solid State Drive), or may include multiple nonvolatile storage devices.
[0044] The GPU 104 outputs an image to a display 21 connected to the information processing device 100 in accordance with an instruction from the CPU 101. The display 21 may be any type of display, such as a CRT (Cathode Ray Tube) display, a liquid crystal display (LCD: Liquid Crystal Display), a plasma display, or an organic EL (OEL: Organic Electro-Luminescence) display.
[0045] The input interface 105 acquires an input signal from an input device 22 connected to the information processing device 100 and outputs the signal to the CPU 101. The input device 22 may be a pointing device such as a mouse, a touch panel, a touch pad, or a trackball, a keyboard, a remote controller, or a button switch. In addition, multiple types of input devices may be connected to the information processing device 100.
[0046] The medium reader 106 is a reading device that reads programs and data recorded on the recording medium 23. For example, a magnetic disk, an optical disk, a magneto-optical disk (MO: Magneto-Optical disk), a semiconductor memory, etc. can be used as the recording medium 23. Magnetic disks include flexible disks (FD: Flexible Disks) and HDDs. Optical disks include compact discs (CDs) and digital versatile discs (DVDs).
[0047] The medium reader 106 copies, for example, programs and data read from the recording medium 23 to another recording medium such as the RAM 102 or the HDD 103. The read programs are executed by, for example, the CPU 101. The recording medium 23 may be a portable recording medium, which may be used to distribute programs and data. The recording medium 23 and the HDD 103 may also be referred to as computer-readable recording media.
[0048] The NIC 107 is an interface that is connected to the network 20 and communicates with other computers via the network 20. The NIC 107 is connected to a communication device such as a switch or a router via a cable. The NIC 107 may also be a wireless communication interface.
[0049] The message queue servers 200 and 300 are also realized by the same hardware as the information processing device 100. The connected cars 41, 42, and 43 and the IoT device 44 are also realized by hardware including a CPU, a RAM, an SSD, a wireless communication interface, and a sensor.
[0050] FIG. 4 is a diagram illustrating an example of functions of the information processing device. The information processing device 100 has a KVS 110, a control information storage unit 120, and an event processing unit 130. The KVS 110 and the control information storage unit 120 use storage areas of a RAM 102 and an HDD 103. The event processing unit 130 is realized when a program stored in the RAM 102 is executed by the CPU 101.
[0051] The KVS 110 is a storage that holds keys and values. The keys include time ranges. The values include sensor measurements at each time within the time range. The control information storage unit 120 stores control information used in the processing of the event processing unit 130 .
[0052] The event processing unit 130 executes stream processing on event data received from the message queue server 200. The event processing unit 130 includes a data receiving unit 131, a user logic management unit 132, user logics 133, 134, and 135, a data sending unit 136, a read control unit 140, and a write control unit 150.
[0053] The data receiving unit 131 receives event data from the message queue server 200 . The user logic management unit 132 holds a list of the user logics 133, 134, and 135, and executes the user logic to be executed based on the event data received by the data receiving unit 131.
[0054] The user logics 133, 134, and 135 acquire the event data received by the data receiving unit 131 and read the data stored in the KVS 110 via the read control unit 140. The user logics 133, 134, and 135 execute processing related to the user logics 133, 134, and 135 based on this data. In addition, the user logics 133, 134, and 135 write the data resulting from the processing to the KVS 110 via the write control unit 150. The event processing unit 130 may have user logic other than the user logics 133, 134, and 135.
[0055] The data transmission unit 136 transmits data resulting from processing by the event processing unit 130 to an external device such as the message queue server 300, for example. The read control unit 140 controls the reading of data from the KVS 110. The read control unit 140 includes a KVS reading unit 141 and an access pattern acquisition unit 142.
[0056] The KVS reading unit 141 accesses the KVS 110 and reads data from the KVS. For example, the KVS reading unit 141 reads from the KVS 110 an entry having a key corresponding to the time range included in the read request of the user logic 133, 134, 135, and responds to the user logic 133, 134, 135.
[0057] The access pattern acquisition unit 142 acquires read access to the KVS 110 in response to a read request, i.e., a read access pattern, based on the data read from the KVS 110 by the KVS reading unit 141. The read access pattern is simply referred to as an access pattern. The access pattern acquisition unit 142 stores the acquired access pattern information in the control information storage unit 120.
[0058] The write control unit 150 controls writing of data to the KVS 110. The write control unit 150 includes an entry creation determination unit 151, an entry creation unit 152, and a KVS writing unit 153.
[0059] The entry creation determination unit 151 determines the time range to be associated with one entry in the KVS 110 based on the access pattern information stored in the control information storage unit 120. The entry creation unit 152 specifies an arbitrary key and creates an entry in the KVS 110. For example, the entry creation unit 152 specifies a time range corresponding to the time width determined by the entry creation determination unit 151 as a key and creates an entry in the KVS 110.
[0060] The KVS writing unit 153 accesses the KVS 110 and writes the entry created by the entry creating unit 152 to the KVS 110 . The information processing device 100 may have multiple event processing units, including the event processing unit 130. For example, data resulting from processing by an upstream event processing unit may be input to a downstream event processing unit, and the downstream event processing unit may execute processing. In this case, for example, a data transmission unit of the upstream event processing unit may transmit data resulting from processing to the downstream event processing unit. Furthermore, the downstream event processing unit may receive data resulting from processing from the upstream event processing unit.
[0061] FIG. 5 is a diagram illustrating an example of state access of the user logic. Table 51 shows an example of state access by the user logic 133, 134, and 135. Here, as an example, it is assumed that the state accessed by the user logic 133, 134, and 135 is speed. Note that the information processing device 100 does not need to have information equivalent to table 51.
[0062] Table 51 contains items for the name of the user logic and the content of the user logic. The name of the user logic 133 is user logic "a." The name of the user logic 134 is user logic "b." The name of the user logic 135 is user logic "c."
[0063] For example, the content of user logic 133, i.e., user logic "a," is to obtain the speed at the current time. The content of user logic 134, i.e., user logic "b," is to obtain the speed for the last three minutes. The content of user logic 135, i.e., user logic "c," is to obtain the speed for the last 30 minutes once every 30 minutes after 12:30:00.
[0064] FIG. 6 is a diagram illustrating an example of the time width threshold table. The time width threshold table 121 is information that holds the maximum and minimum values of the time width associated with one entry of the KVS 110. The time width threshold table 121 is stored in advance in the control information storage unit 120. The time width threshold table 121 includes items for type and time width.
[0065] For example, the time width threshold table 121 indicates that the time width for the type "maximum value" is "60 minutes." This indicates that regardless of the access status to the KVS 110, the data stored in one entry is time-series data for a maximum of 60 minutes.
[0066] Furthermore, the time width threshold table 121 indicates that the time width for the type "minimum value" is "3 minutes." This indicates that time series data for a minimum of 3 minutes is stored in the same entry regardless of the access status to the KVS 110.
[0067] FIG. 7 is a diagram illustrating an example of event data. The event data group 52 is a table of multiple event data that arrive at the information processing device 100. One piece of event data has time information, a state item, and a value. The time information is a timestamp that indicates the time when the event data was generated by a sensor or the like. The state item and value are a pair of a state identifier and a value corresponding to the state. One piece of event data may include multiple pairs of state items and values.
[0068] For example, the event data for time information "12:00:00" has a state item and value of "{speed: 51, position: (lon0, lat0), ...}". Here, the speed is expressed in units such as km / h (kilometers per hour). The position is expressed in coordinates such as (longitude, latitude). Although not shown, each event data also has an object name corresponding to the device that sent it.
[0069] FIG. 8 is a diagram illustrating an example of maximum access width information. The maximum access width information 122 is an example of access pattern information generated by the access pattern acquisition unit 142. The maximum access width information 122 is created by the access pattern acquisition unit 142 and stored in the control information storage unit 120. The maximum access width information 122 is created for each object and state. As an example, the maximum access width information 122 holds the maximum access width for reading from the KVS 110 for the "speed" state of a certain object. The maximum access width is the maximum value of the time width (access time width) that is the target of access due to a read request.
[0070] The maximum access width information 122 is reset to its initial value when a new entry corresponding to the relevant state of the relevant object is written to the KVS 110. The initial value of the maximum access width is the minimum value set in the time width threshold table 121, "3 minutes."
[0071] For example, the access pattern acquisition unit 142 updates the maximum access width information 122 as follows, based on the read access of the state "speed" of the object in question in the KVS 110 according to user logics "a" to "c." Note that the initial time is assumed to be 12:00:00. At time 12:00:00, the maximum access width information 122 is 3 minutes (initial value).
[0072] The access history information 123 indicates the history of read accesses to the state "speed" of the object in question by user logics "a" to "c" every second from the initial time 12:00:00. The access pattern acquisition unit 142 only needs to obtain the time span of access by each user logic at each time. The access history information 123 is an easy-to-understand representation of the access history, and does not need to be stored in the control information storage unit 120.
[0073] In the access history information 123, the access history is described by describing the pair "Read state name-time" of the state name (Read state) to be read by each user logic and the time to be read. The time to be read may be a time range. In addition, the time range of the access target is described in parentheses after "Read state name-time". In this case, the state to be read is the speed. Therefore, the "Read state name" is "speed".
[0074] For example, at 12:00:00, the following read accesses occur. The first is a read access for "Speed - 12:00:00 (0)" by user logic "a." This indicates a read access for the speed from 12:00:00 (time span 0). The second is a read access for "Speed - 11:55:00 to 12:00:00 (5 minutes)" by user logic "b." This indicates a read access for the speed from 11:55:00 to 12:00:00 (time span 5 minutes). Note that no read access occurs for user logic "c" from 12:00:00 to 12:29:59. No access is indicated by a hyphen "-" in the figure.
[0075] Also, at time 12:00:01, the following read accesses occur. The first is a read access for "Speed - 12:00:01 (0)" by user logic "a." The second is a read access for "Speed - 11:55:01 to 12:00:01 (5 minutes)" by user logic "b."
[0076] At time 12:00:01, a read access occurs with a time width of "5 minutes," which is longer than the "3 minutes" stored in the maximum access width information 122. Therefore, the access pattern acquisition unit 142 updates the maximum access width information 122 from "3 minutes" to "5 minutes." From then on, the time width of one entry stored in the KVS 110 is determined to be 5 minutes.
[0077] Up until 12:29:59, the speed at each time is read from the KVS 110 using user logic "a" and the speed for the last five minutes at each time is read using user logic "b."
[0078] Then, at the time 12:30:00, the following read accesses occur. The first is a read access for "Speed - 12:30:00 (0)" by user logic "a." The second is a read access for "Speed - 12:25:00 to 12:30:00 (5 minutes)" by user logic "b." The third is a read access for "Speed - 12:00:00 to 12:30:00 (30 minutes)" by user logic "c."
[0079] At the time 12:30:00, a read access occurs with a time width of "30 minutes," which is longer than the "5 minutes" stored in the maximum access width information 122. Therefore, the access pattern acquiring unit 142 updates the maximum access width information 122 from "5 minutes" to "30 minutes."
[0080] FIG. 9 is a diagram illustrating an example of a KVS entry. The KVS entry group 111 is an example of an entry stored in the KVS 110. One entry has a key written in the format of "object name-state name-time" and a measurement value corresponding to the state name at the relevant time. The time included in the key may be a time range. When the time included in the key is a time range, the value includes multiple measurement values corresponding to multiple times that belong to the time range.
[0081] The KVS entry group 111 also includes entries in which "latest" is set in the key time field as entries in which the most recent time data is stored. Entries in which "latest" is set in the key time field are called latest entries. For example, at 12:00:00, immediately after the start of stream processing by the information processing device 100, only entries in which "latest" is set in the key time field are held in the KVS 110 for any object and state.
[0082] For example, the KVS entry group 111 shows the entries of the KVS 110 immediately after the start of processing at 12:00:00 (for example, after about 1 to 2 minutes have passed). "car1" in the key "car1-speed-latest" is an example of an object name corresponding to a certain connected car. Also, "speed" is the state name of the state "speed". Furthermore, "position" in the key "car1-position-latest" is the state name of the state "position".
[0083] When data of a specific time range indicated by the maximum access range information 122 is accumulated in the latest entry, the entry creation unit 152 moves the data to another entry as old time-series data and empties the latest entry. However, the entry creation unit 152 may not use "latest" and may instead hold a pointer indicating, for example, that "car1-speed-12:00:00 is the latest entry." When data of a specific time range is accumulated in the latest entry, the entry creation unit 152 may create a new entry called "car1-speed-12:05:00" and update the pointer to "car1-speed-12:05:00 is the latest entry."
[0084] For the maximum access width information 122 in FIG. 8, an entry is created in the KVS 110 as follows. FIG. 10 is a diagram showing an example of creating a KVS entry.
[0085] The entry creation determination unit 151 detects that the time width of the maximum access width information 122 has elapsed since the start of storage in the latest entry. The entry creation unit 152 then creates a separate entry for the contents of the latest entry at that time, and saves this in the KVS 110 via the KVS writing unit 153. The entry creation unit 152 then initializes the contents of the latest entry in the KVS 110 via the KVS writing unit 153. Subsequent data is stored in the initialized latest entry. At this time, the entry creation determination unit 151 also initializes the maximum access width information 122.
[0086] Here, the KVS entry group 112 indicates each entry of the KVS 110 immediately before the entry was created at 12:05:00, and the KVS entry group 113 indicates each entry of the KVS 110 immediately after the entry was created at 12:05:00.
[0087] For example, the entry creation determination unit 151 detects that the maximum access width information 122 indicates "5 minutes" at 12:05:00. The entry creation determination unit 151 then determines that the latest entry stores time-series data for five minutes from 12:00:00 to 12:04:59, and therefore no more data will be stored in the same entry. In response to the determination of the entry creation determination unit 151, the entry creation unit 152 copies the value of the key "car1-speed-latest," which is the latest entry, to the entry with the key "car1-speed-12:00:00 to 12:05:00." The entry creation unit 152 also nulls the value of "car1-speed-latest." Furthermore, the entry creation determination unit 151 initializes the maximum access width information 122 in order to collect access statuses again from 12:05:00 onward.
[0088] FIG. 11 is a diagram showing an example of creating a KVS entry. Let's assume that from 12:00:00 to 12:25:00, entries in the KVS 110 are created every 5 minutes, the maximum time width of read access by user logic. Meanwhile, at 12:30:00, a 30-minute read access is executed. Therefore, the access pattern acquisition unit 142 updates the maximum access width information 122 to 30 minutes, as shown in FIG. 8.
[0089] Here, the KVS entry group 114 indicates each entry of the KVS 110 as of 12:30:00, and the KVS entry group 115 indicates each entry of the KVS 110 as of 12:55:00.
[0090] At 12:30:00, five minutes have passed since data began to be stored in the latest entry, but the entry creation determination unit 151 continues to wait until 30 minutes of data has been stored in the latest entry. Then, at 12:55:00, the entry creation determination unit 151 detects that 30 minutes have passed since data began to be stored in the latest entry, and instructs the entry creation unit 152 to create an entry with a time span of 30 minutes.
[0091] Then, the entry creation unit 152 initializes the latest entry by storing the value of the latest entry in another entry with a time width of 30 minutes via the KVS writing unit 153. In addition, the entry creation determination unit 151 initializes the maximum access width information 122.
[0092] Next, a processing procedure of the information processing apparatus 100 according to the second embodiment will be described. FIG. 12 is a flowchart illustrating an example of stream processing. (S10) Every time event data is received, the event processing unit 130 calls the data reception sub-process of step S11.
[0093] (S11) The event processing unit 130 executes a data reception sub-process. The data reception sub-process will be described in detail later. (S12) The event processing unit 130 repeats step S11 until the stream processing according to the received event data is completed. For example, if the event data includes multiple states, the stream processing may be performed for each state. Then, the stream processing is completed.
[0094] FIG. 13 is a flowchart illustrating an example of a data reception sub-process. The data reception sub-process corresponds to step S11. (S20) Based on the event data received by the data receiving unit 131, the user logic management unit 132 calls all user logics corresponding to the event data.
[0095] (S21) All the called user logics repeatedly execute step S22. (S22) The user logic executes processing based on the received event data and data read from the KVS 110. Details of the user logic processing will be described later.
[0096] (S23) When the processing of all user logics is completed, the process proceeds to step S24. (S24) The Read control unit 140 executes an access pattern acquisition subprocess. The access pattern acquisition subprocess will be described in detail later.
[0097] (S25) The write control unit 150 acquires data of the state to be written to the KVS 110. (S26) The write control unit 150 repeatedly executes step S27 for all states to be written.
[0098] (S27) The write control unit 150 executes a state write sub-process. The write target sub-process will be described in detail later. (S28) When the write control unit 150 has executed the state write sub-process for all states to be written, it ends the data reception sub-process.
[0099] FIG. 14 is a flowchart showing an example of processing of the user logic. The processing of the user logic corresponds to step S22. An example of the processing of a certain user logic will be illustrated below, but other user logics such as the user logics 133, 134, and 135 also undergo processing according to the other user logics.
[0100] (S30) The user logic acquires the received data. The received data corresponds to the event data received by the data receiving unit 131. (S31) The user logic identifies the road on which the connected car that transmitted the event data is traveling, based on the longitude and latitude information included in the received data.
[0101] (S32) The user logic reads out the speed and acceleration data for the past minute from the KVS 110 via the read control unit 140. (S33) The user logic determines whether swaying has occurred in the connected car based on changes in speed and acceleration over the past minute. If swaying has occurred, the process proceeds to step S34. If swaying has not occurred, the process proceeds to step S36.
[0102] (S34) The user logic reads data on the presence or absence of fluctuations over the past 30 minutes from the KVS 110 via the read control unit 140. (S35) If the number of swaying events is equal to or exceeds a certain number based on the number of swaying events in the past 30 minutes, the user logic notifies the connected car of a warning via the data transmission unit 136.
[0103] (S36) The user logic writes all of the received data and the result of the determination of whether or not fluctuation has occurred calculated in step S33 to the KVS 110. Then, the processing of the user logic ends.
[0104] FIG. 15 is a flowchart illustrating an example of an access pattern acquisition sub-process. The access pattern acquisition subprocess corresponds to step S24. (S40) The access pattern acquisition unit 142 acquires the time duration (access time duration) when the user logic executed immediately before performed read access to the KVS 110. The access time duration is acquired for each state.
[0105] (S41) The access pattern acquisition unit 142 acquires the maximum value of the access time width. The maximum value of the access time width is acquired for each state. (S42) The access pattern acquisition unit 142 saves the maximum value of the access time width up to the present time. The maximum value of the access time width up to the present time is saved in maximum access width information 122 for each object and state. For example, if the object has states for speed, position, and whether or not wobble has occurred, maximum access width information 122 is also held in the control information storage unit 120 for each of the object's speed, position, and whether or not wobble has occurred. Then, the access pattern acquisition subprocess ends.
[0106] FIG. 16 is a flowchart illustrating an example of a state write sub-process. The state writing subprocess corresponds to step S27. (S50) The write control unit 150 executes an entry creation determination subprocess, which will be described in detail later.
[0107] (S51) The write control unit 150 writes the state to the latest entry in the KVS 110. The state data here is, for example, in the case of the user logic processing in FIG. 14, the latest data for each state that was targeted for writing in step S36. The latest entry is the latest entry corresponding to the object name and state name of the relevant connected car in the KVS 110. For example, for the latest entry for the state corresponding to whether or not swaying has occurred, a value including the determination result of whether or not swaying has occurred and the current time is registered. The state write subprocess then ends.
[0108] FIG. 17 is a flowchart illustrating an example of an entry creation decision sub-process. The entry creation determination subprocess corresponds to step S50. (S60) The entry creation determination unit 151 acquires the start time of the latest entry in the KVS 110 that corresponds to the object and state that correspond to the current event data.
[0109] (S61) The entry creation determination unit 151 acquires the maximum value of the access time width based on the maximum access width information 122 corresponding to the object and state in question. (S62) The entry creation determination unit 151 determines whether or not a time equal to or greater than the maximum access time range has elapsed since the start time of the latest entry corresponding to the object and state in question. If so, the process proceeds to step S63. If not, the entry creation determination subprocess ends.
[0110] (S63) The entry creation unit 152 creates a new entry for the KVS 110 using the key "data name-entry start time-end time" and stores the value of the current latest entry corresponding to the relevant object and state in the newly created entry. Here, the key "data name" corresponds to "object name-state name." The entry creation unit 152 writes the newly created entry to the KVS 110 via the KVS writing unit 153.
[0111] (S64) The entry creation unit 152 initializes the current latest entry corresponding to the object and state in question via the KVS writing unit 153. (S65) The entry creation determination unit 151 deletes and initializes the maximum value of the access time width in the maximum access time width information 122 corresponding to the object and state in question, and the entry creation determination subprocess then ends.
[0112] In this way, the information processing device 100 determines the longest access time width among the access time widths for reading from the KVS 110 as the time width to be associated with one entry in the KVS 110.
[0113] FIG. 18 is a diagram illustrating an example of determining the time range of an entry. The entry creation determination unit 151 determines the time span of the entry for the state "speed" of the vehicle object 60 with the object name "car1" based on the access statistics, for example, as follows: Note that in the figure, to make it easier to understand the time span corresponding to the entry, the KVS 110 may include a "time span" item between the "key" and "value," but the KVS 110 does not need to have a "time span" item.
[0114] In the access statistics up to 12:25, the longest access time span to the KVS 110 was 5 minutes, so the entry creation determination unit 151 determines the time span of one entry in the KVS 110 to be 5 minutes. Therefore, the entry creation unit 152 creates entries at 5-minute intervals up to 12:25, and stores them in the KVS 110 via the KVS writing unit 153.
[0115] On the other hand, suppose that the longest access time range has changed to 30 minutes in the access statistics after 12:30. Then, the entry creation determination unit 151 determines the time range of one entry in the KVS 110 to be 30 minutes. Therefore, the entry creation unit 152 creates entries at 30-minute intervals after 12:30 and stores them in the KVS 110 via the KVS writing unit 153.
[0116] In this way, the information processing device 100 acquires access statistics of the user logic for each state of the vehicle object 60, and dynamically determines the time width to be stored in one entry from the access statistics.
[0117] This allows the information processing device 100 to reduce the number of reads. For example, after a read request with a time span of 30 minutes has occurred, there is a high possibility that read requests with a time span of 30 minutes will continue to occur thereafter. Therefore, by setting the time span of one entry to the longest time span requested, the information processing device 100 can read the requested entry from the KVS 110 with a relatively small number of reads, even if a read request with that longest time span is received in the future. This allows the information processing device 100 to speed up reading entries from the KVS 110.
[0118] [Third embodiment] Next, a third embodiment will be described. Differences from the second embodiment will be mainly described, and common features will be omitted.
[0119] In the third embodiment, the information processing device 100 determines the time range to be associated with one entry of the KVS 110 based on the access pattern table. FIG. 19 illustrates an example of an access pattern table according to the third embodiment.
[0120] The access pattern table 124 is information indicating candidates for a time width that is specified in advance for one entry of the KVS 110. The access pattern table 124 is stored in advance in the control information storage unit 120. The access pattern table 124 includes items for the conditions of the access pattern name, entry width, and access time width w.
[0121] The access pattern name field is where the access pattern name, which is the name of the access pattern, is registered. The entry time range field is where the time range associated with one entry in the KVS 110 is registered. The access time range w condition field is where the access pattern condition corresponding to the relevant access pattern name is registered.
[0122] For example, the access pattern table 124 has a record with an access pattern name of "A," an entry time span of "1 minute," and an access time span w condition of "w<1 minute." This record corresponds to a case where the access time span w of the access pattern with the access pattern name "A" is less than 1 minute, and indicates that in this case, the time span of one entry in the KVS 110 is 1 minute.
[0123] Furthermore, the access pattern table 124 has a record with an access pattern name of "B," an entry time span of "5 minutes," and an access time span w condition of "1 minute≦w<5 minutes." This record indicates that the access pattern with the access pattern name "B" corresponds to an access time span w that is greater than or equal to 1 minute and less than 5 minutes, and in this case, the time span of one entry in the KVS 110 is 5 minutes.
[0124] Furthermore, the access pattern table 124 has a record with an access pattern name "C", an entry time range "15 minutes", and an access time range w condition of "5 minutes≦w<15 minutes". This record indicates that the access pattern with the access pattern name "C" corresponds to an access time range w that is greater than or equal to 5 minutes and less than 15 minutes, and in this case, the time range of one entry in the KVS 110 is 15 minutes.
[0125] The access pattern table 124 also has a record with an access pattern name of "D", an entry time range of "30 minutes", and an access time range w condition of "15 minutes≦w". This record indicates that the access pattern with the access pattern name "D" corresponds to an access time range w of 15 minutes or more, and in this case, the time range of one entry in the KVS 110 is 30 minutes.
[0126] According to the access pattern table 124, the minimum value of the entry time width is “1 minute” and the maximum value is “30 minutes.” In the third embodiment, the control information storage unit 120 does not hold the time width threshold table 121.
[0127] In this way, in the third embodiment, several patterns of time range candidates are determined in advance as the time range to be associated with one entry. The time range to be stored in one entry of the KVS 110 is selected from these several patterns. There are two selection methods: the first method and the second method.
[0128] The first method is to tally up the time duration of recent read accesses by user logic for each access pattern according to the classification in the access pattern table 124, and use the time duration corresponding to the longest access pattern as the time duration of one entry.
[0129] The second method is to exclude from the selection candidates those access patterns that occur less than a certain percentage of the total access patterns, and use the time width corresponding to the longest access pattern among those that occur more than a certain percentage as the time width of one entry.
[0130] By using the second method, compared to the first method, it is possible to reduce the frequency with which unnecessary information longer than a relatively short time span is read from the KVS 110 in response to a read access with that short time span.
[0131] FIG. 20 is a diagram showing an example of a KVS entry according to an access pattern. The KVS entry group 116 is an example of an entry in the KVS 110 for the object name "car1" and the state name "speed." In the access pattern table 124, 1 minute, 5 minutes, 15 minutes, and 30 minutes are predefined as the default values for the time span. Therefore, the time associated with each entry in the KVS entry group 116 is either 1 minute, 5 minutes, 15 minutes, or 30 minutes.
[0132] FIG. 21 is a diagram illustrating an example of state access of the user logic. Table 53 shows an example of state access by four user logics executed by the information processing device 100. The state to be accessed is assumed to be speed. However, in the example of the third embodiment, the value corresponding to the state "speed" of the KVS 110 also includes position information. Note that the information processing device 100 does not need to have information equivalent to Table 53.
[0133] Table 53 lists the names of user logic and the contents of the user logic. The explanation of each item is the same as in Table 51. For example, the content of user logic "a" is to obtain the speed at the current time. The content of user logic "b" is to obtain the speed for the last three minutes. The content of user logic "c1" is to obtain the speed and position for the last 15 minutes when the position is updated. The content of user logic "d" is to obtain the speed for the last 60 minutes once every hour.
[0134] FIG. 22 is a diagram illustrating an example of access history information. The access history information 123a indicates the history of read accesses to the state "speed" of the object in question by the user logics "a," "b," "c1," and "d" every second from the initial time 12:00:00. The access pattern acquisition unit 142 only needs to obtain the time span of access by each user logic at each time. Therefore, the access history information 123a represents the access history in an easy-to-understand manner and does not need to be stored in the control information storage unit 120.
[0135] The description of each item in the access history information 123a is the same as that in the access history information 123. However, the access history information 123a includes "c1" and "d" as target user logics.
[0136] For example, at 12:00:00, the following read accesses occur. The first is a read access to "Speed - 12:00:00 (0)" by user logic "a." The second is a read access to "Speed - 11:57:00 to 12:00:00 (3 minutes)" by user logic "b." The third is a read access to "Speed - 11:50:00 to 12:00:00 (10 minutes)" and "Position - 11:50:00 to 12:00:00 (10 minutes)" by user logic "c1." The fourth is a read access to "Speed - 11:00:00 to 12:00:00 (60 minutes)" by user logic "d."
[0137] Also, at time 12:00:01, the following read accesses occur. The first is a read access of "Speed - 12:00:01 (0)" by user logic "a". The second is a read access of "Speed - 11:57:01 to 12:00:01 (3 minutes)" by user logic "b". The third is a read access of "Speed - 11:50:01 to 12:00:01 (10 minutes)" and "Position - 11:50:01 to 12:00:01 (10 minutes)" by user logic "c1". Note that no read accesses occur for user logic "d" between 12:00:01 and 12:59:59.
[0138] FIG. 23 is a diagram illustrating an example of a KVS entry. KVS entry 117 is an example of the latest entry for object name "car1" and state name "speed." KVS entry 117 indicates the latest entry in KVS 110 immediately after processing begins at 12:00:00 (for example, after 1 to 2 minutes have passed). The shortest time span for a single entry is 1 minute. In the example of KVS entry 117, a read access with a time span of more than 1 minute occurred within 1 minute of the start time of the latest entry ("12:00:00"), so the time span for this single entry is undetermined. In the figure, the fact that it is undetermined is indicated by "??".
[0139] FIG. 24 is a diagram showing an example of a count of access patterns. In the third embodiment, the information processing device 100 has a pattern tallying table 125 and a pattern occurrence ratio table 126 instead of the maximum access width information 122. The pattern tallying table 125 and the pattern occurrence ratio table 126 are generated by the access pattern acquiring unit 142 and the entry creation determining unit 151, respectively, and stored in the control information storage unit 120.
[0140] The pattern tallying table 125 records the tallying results of access patterns of read accesses that occur at each time for a certain state of a certain object. The pattern occurrence ratio table 126 registers the occurrence ratio of each access pattern from the start time of the latest entry to the current time by the entry creation determining unit 151. Here, the occurrence ratio is the ratio at which the corresponding access pattern occurs with respect to the total number of records in the pattern tallying table 125.
[0141] For example, the pattern aggregation table 125 shows the aggregation results of the access patterns for the speed states of the object. The access pattern for the read request is identified based on the condition of the access time width w in the access pattern table 124. As an example, the pattern aggregation table 125 records the aggregation results of the access patterns for the speed every second from 12:00:00.
[0142] For example, the pattern tallying table 125 has a record of the time "12:00:00" and the tallying result of the access pattern for the speed, "Speed: {A:1, B:1, C:1, D:1}." This record indicates that at the time 12:00:00, the access pattern "A" occurred once, "B" once, "C" once, and "D" once. Similarly, the pattern tallying table 125 has records from the time "12:00:00" to "12:01:00." Note that if no read access with the corresponding access pattern is observed at a certain time, the number of occurrences of the access pattern will be 0, but the record of "0" is omitted in the pattern tallying table 125.
[0143] The pattern occurrence rate table 126 shows the number of occurrences and rate of occurrence of each access pattern as of 12:01:00. For example, the number of occurrences of access pattern "A" is 61, and the rate of occurrence is 61 / 61*100=100%. The number of occurrences of access pattern "B" is 61, and the rate of occurrence is 61 / 61*100=100%. The number of occurrences of access pattern "C" is 31, and the rate of occurrence is 31 / 61*100=50%. The number of occurrences of access pattern "D" is "2", and the rate of occurrence is 2 / 61*100=3%.
[0144] According to the pattern occurrence ratio table 126 at 12:01:00, it can be seen that in addition to the 1-minute access pattern "A," there are also 5-minute and 15-minute access patterns "B" and "C." Therefore, the write control unit 150 decides to store the data from 12:01:00 onwards in the latest entry from 12:00:00.
[0145] Therefore, at 12:01:00, the write control unit 150 does not create a new entry, but continues to store data in the latest entry for 12:00:00. The candidate time range for the entry is 1 minute for access pattern "A" followed by 5 minutes for access pattern "B". Therefore, the write control unit 150 stores the data from 12:00:00 to 12:04:59 in the latest entry as is. In other words, the write control unit 150 performs processing as usual until the data for 12:05:00 arrives, and when the data for 12:05:00 arrives, it determines whether to store the data from 12:05:00 onwards in the latest entry.
[0146] FIG. 25 is a diagram showing an example of creating a KVS entry. The access pattern acquisition unit 142 creates the pattern occurrence ratio table 126a as of 12:05:00. As with the determination at 12:01:00, because a 15-minute access pattern "C" has occurred, the write control unit 150 decides not to create a new entry at 12:05:00, but to continue storing data in the latest entry that started at 12:00:00. The write control unit 150 makes another determination when 15 minutes have passed since the start time of the latest entry for the next access pattern "C."
[0147] The access pattern acquisition unit 142 creates a pattern occurrence ratio table 126b as of 12:15:00. Based on the pattern occurrence ratio table 126b, the write control unit 150 determines that the time range to be associated with one entry in the KVS 110 is 30 minutes, which corresponds to access pattern "D," because access pattern "D" has the longest access time range.
[0148] Thereafter, the write control unit 150 writes data to the latest entry until 12:29:59. For example, after the data for 12:29:59 has been processed, the write control unit 150 creates an entry to store the data from 12:00:00 to 12:29:59, copies the contents of the latest entry to the newly created entry, and initializes the latest entry. The key of the entry that stores the data from 12:00:00 to 12:29:59 is "car1-speed-12:00:00 to 12:30:00". The write control unit 150 stores subsequent data in the latest entry. The KVS entry group 118 shows an example of entries stored in the KVS 110 at this point. The write control unit 150 also initializes the pattern aggregation table and pattern occurrence table at this point (deletes all records).
[0149] The entry creation example in FIG. 25 is based on the first method described in FIG. 19. On the other hand, the write control unit 150 may create an entry based on the second method. For example, when access patterns with an occurrence rate of less than 30% are excluded from selection candidates, at 12:15:00, access pattern "D" is excluded from selection candidates, and access patterns "A" to "C" become selection candidates. In this case, the write control unit 150 adopts the entry time width of access pattern "C." That is, the write control unit 150 creates an entry for 12:00:00 to 12:15:00 at 12:15:00, copies the contents of the latest entry, and initializes the latest entry.
[0150] Next, the processing procedure of the information processing device 100 according to the third embodiment will be described. In the third embodiment, the procedures of the access pattern acquisition subprocess and the entry creation determination subprocess are different from those of the second embodiment. The other procedures are the same as those of the second embodiment, and therefore the description thereof will be omitted.
[0151] FIG. 26 is a flowchart illustrating an example of an access pattern acquisition sub-process. The access pattern acquisition subprocess corresponds to step S24. (S70) The access pattern acquisition unit 142 acquires the time span (access time span) when the user logic executed immediately before accessed the KVS 110 for reading. The access time span is acquired for each state of the object corresponding to the received event data.
[0152] (S71) The access pattern acquisition unit 142 converts the access time range into an access pattern based on the access pattern table 124. (S72) The access pattern acquisition unit 142 records the converted access pattern in the pattern aggregation table 125. Then, the access pattern acquisition sub-process ends.
[0153] FIG. 27 is a flowchart illustrating an example of an entry creation decision sub-process. The entry creation determination subprocess corresponds to step S50. (S80) The entry creation determination unit 151 acquires the start time of the latest entry in the KVS 110 that corresponds to the object and state that correspond to the current event data.
[0154] (S81) The entry creation determination unit 151 determines whether the delimiter time between access patterns has elapsed since the start time of the latest entry. If so, the process proceeds to step S82. If not, the entry creation determination subprocess ends. Here, in the example of the access pattern table 124, the delimiter time between access patterns "A" and "B" is 1 minute. Also, the delimiter time between access patterns "B" and "C" is 5 minutes. The delimiter time between access patterns "C" and "D" is 15 minutes. Also, the longest entry time width of 30 minutes in the access pattern table 124 is one delimiter time.
[0155] (S82) The entry creation determination unit 151 acquires access pattern statistics from the start of the latest entry on the basis of the pattern tally table 125, that is, the pattern occurrence ratio table 126.
[0156] (S83) The entry creation determination unit 151 extracts access patterns whose access execution ratio is equal to or greater than a certain ratio from the acquired access pattern statistics. That is, the entry creation determination unit 151 extracts access patterns whose occurrence ratio (access execution ratio) is equal to or greater than a certain ratio from the pattern occurrence ratio table 126. When the first method is used, the certain ratio may be set to 0. When the second method is used, the certain ratio is determined in advance, such as 30%. When the second method is used, it is also possible that no access pattern having an occurrence ratio equal to or greater than a certain ratio exists in step S83. In that case, the entry creation determination unit 151 may extract all access patterns recorded in the pattern occurrence ratio table 126 based on the first method.
[0157] (S84) The entry creation determination unit 151 determines whether or not a time equal to or greater than the time width of the longest pattern among the access patterns extracted in step S83 has elapsed since the start time of the latest entry corresponding to the object and state in question. The longest pattern refers to the longest access pattern among the access patterns extracted in step S83. The time width of the longest pattern is the entry time width corresponding to the longest pattern in the access pattern table 124. If a time equal to or greater than the time width of the longest pattern has elapsed, the process proceeds to step S85. If a time equal to or greater than the time width of the longest pattern has not elapsed, the entry creation subprocess ends.
[0158] (S85) The entry creation unit 152 creates a new entry for the KVS 110 using the key "data name-entry start time-end time" and stores the value of the current latest entry corresponding to the relevant object and state in the newly created entry. Here, the key "data name" corresponds to "object name-state name." The entry creation unit 152 writes the newly created entry to the KVS 110 via the KVS writing unit 153.
[0159] (S86) The entry creation unit 152 initializes the current latest entry corresponding to the object and state via the KVS writing unit 153. (S87) The entry creation determination unit 151 deletes and initializes the access pattern statistics corresponding to the object and state. Specifically, the entry creation determination unit 151 deletes and initializes all records in the pattern tally table 125 and the pattern occurrence ratio table 126. Then, the entry creation determination subprocess ends.
[0160] As described above, the information processing device 100 tallys up the access patterns that have occurred based on the access pattern table 124 and creates the pattern occurrence ratio table 126. The information processing device 100 then sets the entry time width corresponding to the longest access pattern as the time width to be associated with one entry in the KVS 110. For example, if the condition for w for access patterns "A" to "C" and access pattern "D" in the access pattern table 124 is 15 minutes≦w<30 minutes, the entry time width is determined to be longer than the access time width w corresponding to that access pattern. In this way, the information processing device 100 may set a time width longer than the actually requested access time width to be associated with one entry. This allows the information processing device 100 to reduce the number of reads from the KVS 110.
[0161] Furthermore, as shown by access pattern "D," an upper limit may be set for the entry time range. In this case, the information processing device 100 can control the time range of one entry to be 30 minutes even if the access time range w is 30 minutes or more. This allows the information processing device 100 to limit the amount of data in one entry so that it does not become too large.
[0162] Furthermore, the information processing device 100 can prevent an inappropriate time width from being adopted by excluding from selection candidates, entry time widths corresponding to access patterns whose occurrence rate is less than a certain rate based on the pattern occurrence rate table 126. For example, an access pattern that has occurred only a small number of times may be an access pattern that occurred randomly, and it may not be possible to say that it is highly likely that it will continue to occur in the future. In such cases, the information processing device 100 can prevent the entry time width from being determined based on a randomly occurring access pattern.
[0163] In particular, if the time width of an entry is determined based on infrequent accesses of long duration, extra data may be read for a relatively long duration during a read access of a relatively short duration, which may result in extra read costs. The information processing device 100 can reduce the possibility of extra read costs by ignoring access patterns that occur less frequently than a certain rate.
[0164] Modifications of the third embodiment will be described below as fourth to sixth embodiments. [Fourth embodiment] Next, a fourth embodiment will be described. Differences from the second and third embodiments will be mainly described, and descriptions of common features will be omitted.
[0165] FIG. 28 illustrates an example of the time range of an entry according to the fourth embodiment. The entry creation determination unit 151 may simplify the access pattern determination according to the access time range and the access pattern counting as follows. Specifically, the entry creation determination unit 151 limits the access patterns that are the targets of access pattern determination to the access pattern corresponding to the time range of the most recently created entry and up to one access pattern before and after it. In this way, when there are four or more access patterns, it is not necessary to determine and count all the access patterns, and only three access patterns at most need to be processed, thereby improving processing efficiency.
[0166] Furthermore, the time width of an entry can be prevented from suddenly becoming longer or shorter. For example, when determining the next entry after creating an entry with a long time width, the entry creation determination unit 151 can prevent behavior such as creating an entry with a short time width based on short-time statistics.
[0167] For example, the list 54 shows possible time ranges for entries. In the fourth embodiment, instead of predetermined access patterns in the access pattern table 124, only the upper limit of the time range for entries is predetermined. Also, as shown in the list 54, the access patterns are 2 minutes, such as 1 minute, 2 minutes, 4 minutes, ... n The unit is minutes, and n is an integer equal to or greater than 0.
[0168] For example, if the time span of the most recently adopted entry is 2 m minutes, the access pattern acquisition unit 142 obtains the access pattern according to the user logic as “2 m "More than 1 minute?", "2 m-1 "less than 2 minutes", "Otherwise (2 m Less than 2 m-1 The access pattern acquiring unit 142 then creates a pattern tallying table 125 for these three access patterns.
[0169] The entry creation determination unit 151 determines whether the latest entry has been created in two m-1 After 2 minutes have passed, the pattern aggregation table 125 is further aggregated to create a pattern occurrence ratio table 126. At this time, the access pattern with the highest occurrence ratio is "2 m-1 If the time interval is "less than 2 minutes", the entry creation determination unit 151 sets the time interval associated with one entry to 2 minutes. m-1 Otherwise, the entry creation determination unit 151 m Wait until minutes have passed.
[0170] The entry creation determination unit 151 determines whether the latest entry has been created in two m After 2 minutes have passed, the pattern aggregation table 125 is aggregated again to create a pattern occurrence ratio table 126. At this time, the access pattern with the highest occurrence ratio is "2 m Less than 2 m-1 If the time period is "2 minutes or more", the entry creation determination unit 151 sets the time period associated with one entry to 2 m If not, the entry creation determination unit 151 sets the time span to 2 m+1 minutes.
[0171] Thereafter, the entry creation determination unit 151 repeatedly executes the same procedure. For example, suppose the time width of the most recently adopted entry is 4 minutes. In this case, the candidate time width for the current entry is 2, 4, or 8 minutes. If there are many read accesses with a time width longer than 4 minutes, the entry creation determination unit 151 determines the time width for the current entry to be 8 minutes. Then, when the entry creation determination unit 151 creates an entry with a time width of 8 minutes, it aggregates the access patterns with the candidate time width for the next entry being 4, 8, or 16 minutes.
[0172] This allows the information processing device 100 to efficiently tally access patterns and prevent excessive changes in the time range of entries. The shortest and longest time ranges are predetermined (for example, the shortest is 1 minute, the longest is 30 minutes, etc.). The time range of the first entry is predetermined to one of the candidates in the list 54 (for example, the shortest value is 1 minute, etc.).
[0173] [Fifth embodiment] Next, a fifth embodiment will be described. Differences from the second to fourth embodiments will be mainly described, and descriptions of common features will be omitted.
[0174] FIG. 29 illustrates an example of correcting a time offset error according to the fifth embodiment. The entry creation determination unit 151 may align the entry time offset with the time of the read access by controlling the creation of entries in KVS110 at regular intervals with a time width other than the entry time width corresponding to a predetermined access pattern.
[0175] List 55 shows an example of read accesses that have occurred to the KVS entry group 119 of the KVS 110. The time span of each entry in the KVS entry group 119 is 15 minutes, from 11:45:00 to 12:45:00. The time span requested for each read access is also 15 minutes. In this case, for example, a time range of 12:10:00 to 12:25:00 is requested for read access. Then, the Read control unit 140 will access two entries from the KVS entry group 119: the key "car1-speed-12:00:00 to 12:15:00" and the key "car1-speed-12:15:00 to 12:30:00".
[0176] Therefore, for example, when the entry creation determination unit 151 detects that 15-minute read requests have been generated continuously for a certain period of time (for example, one hour) and that there is a deviation in the offset, it inserts an entry for correcting the offset deviation into the KVS 110. The entry for correction is created by the entry creation unit 152, and the created entry for correction is written to the KVS 110 by the KVS writing unit 153.
[0177] In the above example, the entry creation determination unit 151 inserts an entry with the key "car1-speed-12:45:00~13:10:00" into the KVS 110. The entry creation determination unit 151 then controls the entry creation unit 152 so that from then on, it again creates entries in the KVS 110 with a time span of 15 minutes. In this way, the entry creation determination unit 151 aligns the time range specified in the read request with the time range of the entry in the KVS 110.
[0178] More specifically, the read control unit 140 and the write control unit 150 execute the offset adjustment process at regular intervals as described below. First, the access pattern acquisition unit 142 detects that a read access with an offset relative to the time range of the KVS 110 entry shown in list 55 has occurred by each user logic. The access pattern acquisition unit 142 determines whether the time width of the access matches the entry time width of any access pattern in the access pattern table 124. If they match, the access pattern acquisition unit 142 saves the time width and offset. If they do not match, the access pattern acquisition unit 142 ignores the read access. For example, the access pattern acquisition unit 142 can make the above determination by saving read accesses that have occurred in the past by the executed user logic and comparing the access timing and access time width with the entry time width in the access pattern table 124.
[0179] When creating an entry, the entry creation determination unit 151 determines whether the time range of the entry matches the access time range indicated in the list 55. If they do not match, the entry creation determination unit 151 does nothing. If they match, the entry creation determination unit 151 determines whether the deviation between the creation time of the entry and the offset matches a multiple of the access time range. If they match, the entry creation determination unit 151 does nothing. If they do not match, the entry creation determination unit 151 records the deviation.
[0180] Then, the entry creation determination unit 151 extends the time width of the entry when creating the next entry by the amount of the recorded deviation at regular time intervals. This allows the information processing device 100 to suppress unnecessary accesses due to offset deviation. In the above example, before the offset deviation was corrected, the information processing device 100 accessed two entries in response to a read request, but after the offset deviation was corrected, it only needs to access one entry in response to a read request. In this way, the efficiency of read accesses is improved.
[0181] [Sixth embodiment] Next, a sixth embodiment will be described. Differences from the second to fifth embodiments will be mainly described, and descriptions of common features will be omitted.
[0182] FIG. 30 illustrates an example of changing the time width of the access pattern according to the sixth embodiment. The entry creation determination unit 151 may adjust the entry time width corresponding to the access pattern defined in the access pattern table 124 based on the actual access time width of each access pattern.
[0183] The KVS entry group 119a shows examples of entries from 11:45:00 to 15:05:00 in the KVS 110. The entry creation determination unit 151 generates a pattern ratio aggregation table 127 based on a pattern aggregation table that is a result of tallying access patterns that have occurred for the KVS entry group 119a, and stores the pattern ratio aggregation table 127 in the control information storage unit 120. As described above, the pattern aggregation table is generated by the access pattern acquisition unit 142, but is not shown in FIG. 30. Furthermore, the pattern ratio aggregation table 127 is generated instead of the pattern occurrence ratio table 126.
[0184] The pattern ratio aggregation table 127 holds, for each access pattern, the ratio at which entries are created within a certain time period for that access pattern and the longest access time width that actually occurred for that access pattern.
[0185] In the example of the pattern ratio aggregation table 127, the rate at which entries are created for access pattern "C" is 80%, which is the highest. For access pattern "C", the entry time width is 15 minutes. On the other hand, among the read accesses determined to be access pattern "C", the longest access time width that actually occurred is 10 minutes. Therefore, the entry creation determination unit 151 changes the time width of access pattern "C" from 15 minutes to 10 minutes. In this case, the entry creation determination unit 151 changes the entry time width of access pattern "C" in the access pattern table 124 from "15 minutes" to "10 minutes". Furthermore, the entry creation determination unit 151 sets the condition for the access time width w of access pattern "C" in the access pattern table 124 to "5 minutes≦w≦10 minutes", and sets the condition for access pattern "D" to "10 minutes". <w」とする。
[0186] In this way, the information processing device 100 can adjust the entry time width in the access pattern table 124 according to the actual access time width, thereby aligning the entry time width with the actually requested time width. This allows the information processing device 100 to reduce the possibility that unnecessary data will be read in response to a read request, and improves the efficiency of read access to the KVS 110.
[0187] As illustrated in FIG. 2, the functions of the information processing device 100 can be used to provide various services. FIG. 31 is a diagram illustrating an example of a service provided by an information processing system.
[0188] For example, the data center 70 has an information processing device 100 and message queue servers 200 and 300. The data center 70 further has a server 400. The message queue server 200 has a message queue (MQ) 210. The message queue server 300 has an MQ 310. The server 400 executes a service 410. The service 410 acquires data stored in the MQ 310 and uses the data to notify a device group 40 including connected cars 41 to 43 and an IoT device 44 of traffic congestion information, detour route information, advertisement recommendation information, and the like. Note that the data center 70 may have a plurality of information processing devices 100 and a plurality of servers 400.
[0189] The information processing device 100 has real-world objects 161, 162, ... including vehicle objects and human objects, and service objects 163, 164, 165. The real-world objects 161, 162, ... acquire and hold speed, position, driving log, etc., transmitted from the device group 40 on a second-by-second basis via the MQ 210.
[0190] The service objects 163, 164, and 165 are examples of user logic, and execute predetermined processing based on data such as speed and position corresponding to the real-world objects 161, 162, etc. For example, the service object 163 detects the degree of congestion for each road, generates a vehicle list 163a indicating the degree of congestion for each road, and provides the vehicle list 163a to the service objects 164 and 165. The service object 164 determines a congestion ranking for each road based on the vehicle list 163a, and stores a congestion degree list 164a indicating the congestion ranking in the MQ 310. The service object 165 also performs processing for congestion avoidance guidance for each road, and stores information on a recommended route 165a for avoiding congestion in the MQ 310. The service 410 provides feedback of an advertisement recommendation service and a congestion notification service to the device group 40 based on the congestion degree list 164a and the recommended route 165a.
[0191] In the information processing device 100, data used by the real-world objects 161, 162, ... and service objects 163, 164, 165 is stored in the KVS 110. As exemplified in the second to sixth embodiments, the information processing device 100 can reduce the number of times data is read from the KVS 110, thereby improving the efficiency of reading. For example, the speed of reading data from the KVS 110 can be increased. This makes it possible to provide services to the device group 40 in real time with little delay. In other words, the information processing device 100 can provide appropriate notification according to the status of the device group 40, which changes from moment to moment.
[0192] The data structure of the KVS 110 may be, for example, a Log-Structured Merge tree (LSM-tree). The LSM-tree is an index structure and one of the storage structures for data using the index structure, characterized by fast write speeds and slower read speeds compared to write speeds. In stream processing, which processes large amounts of input data at high speed, the KVS 110 employs an LSM-tree structure with fast write speeds. The functions of the information processing device 10 of the first embodiment and the information processing device 100 of the second to sixth embodiments are particularly effective in speeding up read speeds in a data structure with a relatively slow read speed, such as an LSM-tree structure.
[0193] As described above, the information processing device 100 executes the following processes. The event processing unit 130 determines a first time width, which is equal to or greater than the longest time width among the time widths to be read in response to read requests from each program to the KVS 110 that holds data corresponding to a time, as the time width to be associated with one entry in the KVS 110. Based on the input data for each time, the event processing unit 130 creates entries corresponding to multiple pieces of data that belong to the time range of the first time width and stores them in the KVS 110.
[0194] This allows the information processing device 100 to reduce the number of reads required to read data from the KVS 110. As a result, the information processing device 100 can speed up reading data from the KVS 110. Each of the user logics 133, 134, and 135 is an example of a program that issues a read request to the KVS 110.
[0195] The event processing unit 130 may set the first time duration to the same length as the longest time duration among the time durations to be read in response to read requests from each program. In other words, the first time duration may be the same length as the longest time duration. This allows the information processing device 100 to reduce the number of reads required to read data from the KVS 110. Furthermore, the information processing device 100 can easily determine the first time duration.
[0196] Based on first information indicating multiple candidates for time widths to be associated with one entry, the event processing unit 130 may determine, as the first time width, a candidate for time width that is longer than the longest time width and has a smallest difference from the longest time width.
[0197] This allows the information processing device 100 to reduce the number of times data is read from the KVS 110. The access pattern table 124 is an example of first information.
[0198] In the first information, each of a plurality of candidates for a time width associated with one entry may be associated with an access pattern indicating a range of access time widths that are shorter than the candidate, which indicates the time width in a read request. The event processing unit 130 may calculate the occurrence rate of read requests for each access pattern in a predetermined period based on the history of read requests for each access pattern. The event processing unit 130 may identify the longest time width by excluding read requests corresponding to access patterns whose occurrence rate is lower than a certain rate.
[0199] This allows the information processing device 100 to appropriately determine the time span to be associated with one entry. As mentioned above, if the time span of an entry is determined based on an access pattern with a relatively low occurrence rate, the time span may become too large or too small, which could reduce the efficiency of reads from the KVS 110. Therefore, the information processing device 100 can prevent a decrease in read efficiency by excluding read requests corresponding to access patterns with an occurrence rate lower than a certain rate and specifying the longest time span. The pattern aggregation table 125 is an example of a history of read requests for each access pattern. The occurrence rates in the pattern occurrence rate table 126 are an example of the occurrence rate of read requests for each access pattern over a predetermined period.
[0200] The event processing unit 130 may set candidates for the time width of the entry to be created this time, based on the first information, for the first time width of the previously created entry, as follows: a time width one step shorter than the previous first time width, the previous first time width, and a time width one step longer than the previous first time width. This allows the information processing device 100 to efficiently determine the time width of the entry. Furthermore, the information processing device 100 can prevent the time width of the entry from suddenly becoming shorter or longer.
[0201] For example, as exemplified in the fourth embodiment, the multiple candidates for the time width may be values of 2 to the power of n (n is an integer equal to or greater than 0). If the first time width of the previously created entry is a value of 2 to the power of m (m is an integer equal to or greater than 1), the event processing unit 130 may set the multiple candidates for the time width of the next entry to be created to values of 2 to the power of (m-1), 2 to the power of m, and 2 to the power of (m+1).
[0202] The event processing unit 130 may perform the following process when the time range to be read by a read request and the time range of an entry to be created are constant for a predetermined time. The event processing unit 130 detects that the difference in start time between the first time range to be read by the read request and the second time range corresponding to the entry read by the read request is constant for a predetermined time. Then, the event processing unit 130 shifts back the end time of the third time range corresponding to the next entry to be created by the amount of the difference.
[0203] This allows the information processing device 100 to align the start time of the time range of the entry in the KVS 110 with the start time of the time range specified in the read request, further reducing the number of times data is read from the KVS 110. Note that when the time range of the read target by the read request and the time range of the entry to be created remain constant for a predetermined period of time, this refers to, for example, when the state in which the time range of the read target by the read request and the time range of the entry to be created match at a constant value continues for a predetermined period of time.
[0204] Furthermore, if a candidate time span included in the first information and identified for the identified longest time span is different from the longest time span, the event processing unit 130 may change the candidate time span included in the first information based on the identified longest time span. For example, the event processing unit 130 shortens the candidate time span so that it is shorter than the candidate time span and equal to or greater than the identified longest time span. The event processing unit 130 may also make the candidate time span the same as the identified longest time span.
[0205] This allows the information processing device 100 to adjust the time span of one entry in the KVS 110 so that it does not become too long compared to the time span of the actual read request. As a result, the information processing device 100 can improve the efficiency of reading from the KVS 110.
[0206] For example, the candidate time width included in the first information and corresponding to the first access pattern to which the identified longest time width belongs may differ from the identified longest time width. In this case, the event processing unit 130 may change the candidate time width associated with the first access pattern in the first information based on the identified longest time width. For example, the event processing unit 130 shortens the candidate time width associated with the first access pattern so that it is shorter than the candidate time width and equal to or greater than the identified longest time width. The event processing unit 130 may also set the candidate time width associated with the first access pattern to the same as the identified longest time width.
[0207] This allows the information processing device 100 to adjust the time span of one entry in the KVS 110 so that it does not become too long compared to the time span of the actual read request. As a result, the information processing device 100 can improve the efficiency of reading from the KVS 110.
[0208] Furthermore, the event processing unit 130 may specify the longest time span of the read target in a read request based on the read requests received since the previous creation of an entry in the KVS 110. This allows the information processing device 100 to dynamically adjust the time span associated with one entry depending on the status of the time span of the read target in the current read request from each program (each user logic). Furthermore, the time span associated with one entry can be appropriately adjusted depending on the status of the time span of the read target in the current read request. This makes it possible to further improve the efficiency of reading data from the KVS 110. For example, it is possible to reduce the number of reads while preventing the time span of an entry from becoming too long compared to the time span of a read request. As a result, it is possible to speed up reading data from the KVS 110.
[0209] For example, when the event processing unit 130 stores the created entry in the KVS 110, it deletes the information about the time width actually specified in the read request that has been recorded up to that point.The event processing unit 130 then starts new recording of the actually specified time width in order to determine the first time width when creating the next entry.Here, the maximum access width information 122, the pattern aggregation table 125, and the pattern occurrence ratio table 126 are examples of information about the time width actually specified in the read request.
[0210] Furthermore, the data stored in the KVS 110 may be sensor data acquired by a sensor. For example, the function of the information processing device 100 is suitable for a stream processing infrastructure that performs stream processing on sensor data transmitted in time series from a sensor.
[0211] Furthermore, one entry in the KVS 110 may have a key corresponding to a time range and a value including data corresponding to each of multiple times that belong to that time range. This allows the information processing device 100 to easily read data within that time range from the KVS 110 by specifying the time range for reading by each program.
[0212] The information processing of the first embodiment can be realized by causing the processing unit 12 to execute a program. The information processing of the second embodiment can be realized by causing the CPU 101 to execute a program. The program can be recorded on a computer-readable recording medium 23.
[0213] For example, the program can be distributed by distributing recording medium 23 on which the program is recorded. Alternatively, the program may be stored in another computer and distributed via a network. For example, a computer may store (install) a program recorded on recording medium 23 or a program received from another computer in a storage device such as RAM 102 or HDD 103, and then read and execute the program from the storage device. [Explanation of symbols]
[0214] 10. Information processing equipment 11 Storage section 11a,11b Key-value store 12 Processing section R1,R2 read request e1 entry< / key:value>
Claims
1. The computer determining a first time range that is equal to or greater than the longest time range among time ranges to be read in response to read requests from each program to a key-value store that stores data corresponding to a time, as a time range to be associated with one entry of the key-value store; creating the entries corresponding to a plurality of data belonging to a time range of the first time width based on the input data for each time, and storing the entries in the key-value store; How to create an entry.
2. The first time duration is the same length as the longest time duration.
2. The entry creation method according to claim 1.
3. the computer determines, as the first time width, a candidate time width that is longer than the longest time width and has a smallest difference from the longest time width, based on first information indicating a plurality of candidates for the time width to be associated with the one entry; 2. The entry creation method according to claim 1.
4. In the first information, each of the plurality of candidates for the time duration is associated with an access pattern indicating a range of the access time duration that is shorter than the candidate, the access time duration indicating the time duration in the read request; the computer calculates an occurrence rate of the read requests for each of the access patterns in a predetermined period based on the history of the read requests for each of the access patterns, and specifies the longest time width by excluding the read requests corresponding to the access patterns whose occurrence rate is lower than a certain rate; 4. The entry creation method according to claim 3.
5. the computer sets candidates for the time width of the entry to be created this time, based on the first information, to the time width one step shorter than the first time width of the previous entry, the first time width of the previous entry, and the time width one step longer than the first time width of the previous entry; 4. The entry creation method according to claim 3.
6. When the computer detects that the difference between the start times of a first time range to be read by the read request and a second time range corresponding to the entry read by the read request is constant for a predetermined time period, the computer shifts the end time of a third time range corresponding to the entry to be created next by the difference, in a case where the time period to be read by the read request and the time period of the entry to be created are constant for a predetermined time period.
2. The entry creation method according to claim 1.
7. When the candidate time span included in the first information, which is identified for the longest time span, is different from the longest time span, the computer changes the candidate time span included in the first information based on the longest time span.
4. The entry creation method according to claim 3.
8. the computer identifies the longest time span based on the read requests received from the previous creation of the entry to the present; 2. The entry creation method according to claim 1.
9. The data is sensor data acquired by a sensor.
2. The entry creation method according to claim 1.
10. The one entry of the key-value store has a key corresponding to a time range and a value including the data corresponding to each of a plurality of times that belong to the time range.
2. The entry creation method according to claim 1.
11. On the computer, determining a first time range that is equal to or greater than the longest time range among time ranges to be read in response to read requests from each program to a key-value store that stores data corresponding to a time, as a time range to be associated with one entry of the key-value store; creating the entries corresponding to a plurality of data belonging to a time range of the first time width based on the input data for each time, and storing the entries in the key-value store; The entry creation program that executes the process.
Citation Information
Patent Citations
Data query method and device, medium and data processing system
CN112307051A
Data storage and analysis method and device, terminal and storage medium
CN114706852A
Storage system, control program for information processing unit, and control method for storage system
JP2014199581A
Time series data mapping into a key-value database
US20130103658A1
Window-based scheduling using a key-value data store
US20130263140A1