DATA PROCESSING PROGRAM, DATA PROCESSING METHOD, AND DATA PROCESSING SYSTEM
By synchronizing data processing with a switching time in a distributed stream processing platform, the method ensures consistent and ordered output by preventing duplication and omission of results during system switching.
Patent Information
- Application Number
- JP2021029184
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-25
- Publication Date
- 2024-10-17
- Estimated Expiration
- 2041-02-25
AI Technical Summary
When switching processing systems in a distributed stream processing platform, there is a risk of duplicated or missing processing results due to differences in data positions being processed by the two systems, leading to inconsistencies in the output.
A data processing method that involves comparing time information of incoming data with a set switching time to determine which processing system should process and output results, ensuring that data processed before the switching time is handled by the current system and data after the switching time is handled by the new system, while maintaining chronological order.
This approach prevents duplication and omission of processing results, ensuring consistent and ordered output even during system switching, thereby maintaining the integrity of the data processing.
Smart Images

Figure 0007568929000001 
Figure 0007568929000002 
Figure 0007568929000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a data processing program, a data processing method, and a data processing system. [Background technology]
[0002] The distributed stream processing platform is a data processing platform that processes the large volume and high frequency of IoT (Internet of Things) data sent from IoT devices with low latency. IoT data includes IDs, time information (timestamps), and arbitrary data generated for each object with a unique ID.
[0003] The distributed stream processing platform uses a stream processing execution platform (hereinafter sometimes called a processing system) that processes stream data to process large amounts of IoT data in a distributed manner in real time. Stream data is data that is generated continuously and has a timestamp.
[0004] In stream data processing, there are cases where the processing system that outputs data is switched between two running processing systems. For example, there are cases where a newly started processing system is to be used as the new production processing system instead of the currently running production processing system. Processing system switching is performed for various purposes, such as scaling out processing performance by switching between processing systems with different numbers of components, or changing business logic by updating some processing programs.
[0005] As a technology related to switching processing systems, for example, a stream switching device has been proposed that switches multiple data streams transmitted over a network with different arrival times in a timely manner. A terminal switching technology has also been proposed that seamlessly switches streaming sessions between terminals. Furthermore, an incremental workflow execution technology has been proposed to improve the efficiency of workflows in distributed systems. A technology related to the timing of switching expressions in DASH (Dynamic Adaptive Streaming over HTTP (Hyper Text Transfer Protocol)) clients has also been proposed. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] JP 2004-350237 A [Patent Document 2] JP 2007-228573 A [Patent Document 3] US Patent Application Publication No. 2019 / 0087238 [Patent Document 4] US Patent Application Publication No. 2013 / 0227122 Summary of the Invention [Problem to be solved by the invention]
[0007] When switching processing systems, for example, the same data is input to the processing system currently in operation (the original processing system) and the new processing system (the new processing system), and they are made to execute processing in parallel. Before the time to switch processing systems, only the original processing system outputs the processing results. Then, when the time to switch processing systems arrives, the original processing system stops outputting the processing results, and the new processing system starts outputting the processing results.
[0008] However, because the data positions being processed by the two processing systems are different at a given moment, there is a possibility that duplication or loss of processing results will occur when switching between processing systems, reducing the consistency of the processing results. For example, if the source processing system has already processed data and the destination processing system has unprocessed data, if switching is performed at that moment, the processing results that have already been output from the source processing system will also be output from the destination processing system after switching is performed. In other words, duplicate output of the same processing results will occur. Also, if the source processing system has not yet processed data and the destination processing system has already processed data, if switching is performed at that moment, the processing results for that data will not be output from either processing system. In other words, loss of processing results will occur.
[0009] In one aspect, the present invention aims to prevent a decrease in consistency of processing results due to switching of processing systems. [Means for solving the problem]
[0010] In one proposal, a data processing program is provided that causes a computer to perform the following processes. Each time the computer receives data including time information, it inputs the received data to both the first processing system, which is the source of switching, and the second processing system, which is the destination of switching. In the first processing system, the computer compares the time information of the data with a switching time set as the time to switch the processing system, and if the time indicated in the time information is before the switching time, outputs the processing result of the processing using the data from the first processing system. In the second processing system, the computer compares the time information of the data with the switching time, and if the time indicated in the time information is after the switching time, outputs the processing result of the processing using the data from the second processing system. Effect of the Invention
[0011] According to one aspect, it is possible to prevent a decrease in consistency of processing results due to switching of processing systems. [Brief description of the drawings]
[0012] [Figure 1]FIG. 2 illustrates an example of a data processing method according to a first embodiment. [Diagram 2] FIG. 1 illustrates an example of a system configuration according to a second embodiment; [Diagram 3] FIG. 2 illustrates an example of server hardware. [Figure 4] FIG. 2 illustrates an example of a distributed stream processing execution platform. [Diagram 5] FIG. 13 is a diagram illustrating an example of switching of a stream processing execution platform. [Figure 6] FIG. 13 is a diagram illustrating an example of data transfer between stream processing execution platforms. [Figure 7] FIG. 11 is a block diagram showing an example of the functions of each server in the second embodiment. [Figure 8] FIG. 1 / 5 shows an example of a processing system switching process. [Figure 9] FIG. 2 is a diagram (2 / 5) showing an example of a processing system switching process. [Figure 10] FIG. 3 / 5 shows an example of a processing system switching process. [Figure 11] FIG. 4 / 5 shows an example of a processing system switching process. [Figure 12] FIG. 5 is a diagram (5 / 5) showing an example of a processing system switching process. [Figure 13] 1 is a first half of a sequence diagram showing a processing procedure for switching processing systems. [Figure 14] 11 is a second half of a sequence diagram showing the processing procedure for switching the processing system. [Figure 15] 13 is a flowchart illustrating an example of a procedure for stream data processing in the processing unit. [Figure 16] 13 is a flowchart showing an example of a processing procedure of a sub-process at the time of receiving stream data in the processing unit. [Figure 17] 13 is a flowchart showing an example of a procedure for stream data processing in a process control unit. [Figure 18] 11 is a flowchart illustrating an example of a processing procedure of a sub-process at the time of receiving stream data in the process control unit; [Figure 19] 13 is a flowchart illustrating an example of a processing procedure of a sub-process at the time of receiving stream data in the process control unit; [Figure 20] 13 is a flowchart showing an example of a procedure of a sub-process when switching related data is received in the process control unit; [Figure 21] 13 is a flowchart showing an example of a procedure for stream data processing in a data output unit. [Figure 22] 13 is a flowchart showing an example of a processing procedure of an external output sub-process in a data output unit. [Figure 23] 13 is a flowchart showing an example of a processing procedure of a switching time designation sub-process in the data output unit. [Figure 24] 13 is a flowchart showing an example of a procedure for stream data processing in a buffer unit. [Diagram 25] 13 is a flowchart showing an example of a processing procedure of a data buffer sub-process in the buffer unit. [Figure 26] 13 is a flowchart showing an example of a procedure for a data buffer switching related data receiving sub-process in the buffer unit; [Figure 27] 13 is a flowchart illustrating an example of a procedure for stream data processing in a processing progress detection unit. [Figure 28] 13 is a flowchart showing an example of a processing procedure of a processing progress detection sub-process in a processing progress detection unit; [Figure 29] 10 is a flowchart showing an example of a procedure of an output destination switching process in a switching control unit. [Diagram 30] 13 is a flowchart showing an example of a processing procedure of a switching start sub-process in a switching control unit. [Diagram 31] 13 is a flowchart illustrating an example of a procedure for a process restart notification sub-process in a switching control unit. [Diagram 32] FIG. 13 is a diagram showing an example of a process for checking a safety margin for a switching time designation. [Diagram 33]FIG. 13 is a diagram illustrating an example in which a switching time specification fails in some stream processing execution platforms. [Diagram 34] FIG. 13 is a diagram showing an example of a switch cancel instruction when a switch time designation has failed. [Diagram 35] 13 is a flowchart illustrating an example of a processing procedure of a sub-process when switching-related data is received in a process control unit capable of canceling switching; [Diagram 36] 13 is a flowchart illustrating an example of a processing procedure of a sub-process when switching-related data is received in a process control unit capable of canceling switching, the latter half of the flowchart illustrating an example of a processing procedure of a sub-process when switching-related data is received in a process control unit capable of canceling switching. [Figure 37] 13 is a flowchart showing an example of a procedure for stream data processing in a data output unit capable of canceling switching; [Figure 38] 13 is a flowchart illustrating an example of a processing procedure of a switching cancellation sub-process in the data output unit. [Figure 39] 13 is a flowchart showing an example of a processing procedure of a sub-process at the time of receiving related data when switching a data buffer in a buffer section in which switching can be cancelled; [Diagram 40] 13 is a flowchart showing an example of a processing procedure of a processing progress detection sub-process in a processing progress detection unit capable of canceling switching; [Diagram 41] 13 is a flowchart illustrating an example of a procedure for an output destination switching process in a switching control unit that is capable of canceling switching. [Diagram 42] 13 is a flowchart illustrating an example of a processing procedure of a switch cancellation sub-process. [Diagram 43] FIG. 11 is a diagram (1 / 3) showing an example of a switching time designation process taking into consideration the occurrence of a failure. [Diagram 44] FIG. 2 is a diagram (2 / 3) showing an example of a switching time designation process taking into consideration the occurrence of a failure. [Diagram 45] FIG. 3 is a diagram (3 / 3) showing an example of a switching time designation process taking into consideration the occurrence of a failure. [Diagram 46] FIG. 13 illustrates an example of a failure recovery process using a snapshot. [Figure 47]1 is a first half of a sequence diagram showing a processing procedure for switching processing systems in consideration of the occurrence of a failure. [Figure 48] 13 is a second half of a sequence diagram showing a switching process procedure taking into consideration the occurrence of a failure. [Figure 49] 13 is a flowchart illustrating an example of a procedure for an output destination switching process in a switching control unit in consideration of the occurrence of a failure. [Figure 50] 13 is a flowchart illustrating an example of a procedure for a sub-process of starting switching to a switching destination in a switching control unit in consideration of the occurrence of a failure. [Figure 51] 13 is a flowchart illustrating an example of a procedure of a switching start sub-process of a switching source in a switching control unit in consideration of the occurrence of a failure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, the present embodiment will be described with reference to the drawings. Note that each embodiment can be implemented in combination with a plurality of other embodiments as long as no contradiction occurs. First Embodiment The first embodiment is a data processing method that makes it possible to switch a processing system for processing stream data, which is continuous data including time information, while maintaining the consistency of the processing results.
[0014] Fig. 1 is a diagram showing an example of a data processing method according to a first embodiment. Fig. 1 shows a data processing system 10 that realizes the data processing method. The data processing system 10 has one or more computers, and can implement the data processing method by causing the computer to execute a data processing program in which a predetermined processing procedure is described, for example.
[0015] The data processing system 10 includes a storage unit 11 and a processing unit 12. The storage unit 11 is, for example, a memory or a storage device included in the data processing system 10. The processing unit 12 is, for example, a processor or an arithmetic circuit included in the data processing system 10.
[0016] A data processing system 10 receives stream data 2 transmitted from multiple IoT devices 1a, 1b, ..., and executes real-time processing using the stream data 2. The stream data 2 includes data 2a, 2b, 2c, 2d, 2e, 2f, ..., each of which has time information (time stamp).
[0017] The storage unit 11 temporarily stores the stream data 2. The storage unit 11 can also store information indicating an internal state of a processing system executed by the processing unit 12. The information indicating the internal state includes the time when the processing system is switched (switching time).
[0018] The processing unit 12 has a plurality of processing systems for processing the stream data 2. The processing unit 12 can switch the processing of the stream data 2 to a second processing system 4 while a first processing system 3 is processing the stream data 2.
[0019] The first processing system 3, which is the source of switching, has a processing control unit 3a, a processing execution unit 3b, a processing progress detection unit 3c, and a data output unit 3d. The processing control unit 3a controls the progress of processing in the first processing system 3. For example, the processing control unit 3a sets a switching time for each unit in the first processing system 3 in response to an input specifying the switching time. The processing control unit 3a also determines whether or not a determination condition is met that the first data including time information indicating a time earlier than the switching time will not be received thereafter, and if the determination condition is met, transmits control data 5 to that effect.
[0020] The processing execution unit 3b executes real-time processing using the stream data 2. The processing progress detection unit 3c detects that processing of data including time information indicating a time before the switch time has been completed. The data output unit 3d outputs the processing result of the processing using the data including time information indicating a time before the switch time.
[0021] The second processing system 4, which is the switching destination, includes a processing control unit 4a, a processing execution unit 4b, a buffer unit 4c, and a data output unit 4d. The processing control unit 4a, for example, sets the switching time for each unit in the second processing system 4 in response to an input specifying the switching time.
[0022] The processing execution unit 4b executes processing using the input data. The buffer unit 4c holds the data including time information indicating a time after the switching time until a processing completion notification is received. The data output unit 4d outputs the processing result of the processing using the data including time information indicating a time after the switching time.
[0023] The processing unit 12 controls the first processing system 3 and the second processing system 4, and switches between the processing systems in the following procedure. Each time the processing unit 12 receives data 2a, 2b, 2c, 2d, 2e, 2f,... of the stream data 2, it inputs the received data to the first processing system 3, which is the source of switching, and to the second processing system 4, which is the destination of switching. For example, each time the processing unit 12 receives data 2a, 2b, 2c, 2d, 2e, 2f,..., it copies the data and inputs one of the data to the first processing system 3 and the other to the second processing system 4.
[0024] The processing unit 12 compares the time information of the data with the switching time set as the time to switch the processing system in the data output unit 3d of the first processing system 3. If the time indicated in the time information is before the switching time, the processing unit 12 executes processing using the data in the first processing system 3 and outputs the processing result. For example, if the switching time is "12:00", the first processing system 3 outputs the processing result of processing using the data 2a, 2b, 2c, and 2d including time information indicating a time before "12:00".
[0025] Furthermore, the processing unit 12 compares the time information of the data with the switching time in the data output unit 4d of the second processing system 4. If the time indicated in the time information is after the switching time, the processing unit 12 executes processing using the data in the second processing system 4 and outputs the processing result. For example, if the switching time is "12:00", the second processing system 4 outputs the processing result of processing using the data 2e, 2f, ..., which includes time information indicating a time after "12:00".
[0026] In this way, data is input to both of the multiple processing systems, and whether or not each processing system outputs a processing result is judged based on the results of comparing the switching time with the time information of each data, thereby maintaining the consistency of the processing results even when the processing systems are switched. In other words, the processing results of data at the same time are not output in duplicate, and the processing results of some data are not lost.
[0027] The time information of the data 2a, 2b, 2c, 2d, 2e, 2f,... of the stream data 2 is provided by each of the multiple IoT devices 1a, 1b,... In addition, there is variation in the delay time of transmission from each of the multiple IoT devices 1a, 1b,... to the data processing system 10. Therefore, the stream data 2 received by the data processing system 10 does not arrive in the order of the set time information.
[0028] On the other hand, there are cases where the processing results output from the data processing system 10 are required to be output in chronological order. In this case, the first processing system 3 and the second processing system 4 output the processing results in the order of the time information included in the processed data. For example, even if data 2d including time information indicating a time earlier than that of data 2c is received after data 2c, the first processing system 3 outputs the processing result of data 2d and then the processing result of data 2c.
[0029] In order to maintain the time-series data output even when switching between processing systems, the processing unit 12 can perform the following processing. The processing unit 12 outputs a processing completion notification when the first processing system 3 satisfies a judgment condition that the first data including time information indicating a time earlier than the switching time will not be received thereafter and processing for each of the received first data is completed. For example, when the time information of the received data satisfies the judgment condition that the first data will not be received thereafter, the processing control unit 3a transmits control data 5 indicating that the first data will not be received thereafter to the data processing path. When there are multiple processing paths, the control data 5 is transmitted to all paths. A case where the judgment condition that the first data will not be received thereafter is satisfied is, for example, when the time information of the received data is a time a predetermined time later than the switching time.
[0030] The processing execution unit 3b, which has received the control data 5, executes all processing using data including time information before the switching time, outputs the processing results, and transmits the control data 5 to a downstream processing path. The control data 5 is transferred to the processing progress detection unit 3c via the processing execution unit 3b. The processing progress detection unit 3c, which is arranged on the output side of the data processing results in the processing execution unit 3b, outputs a processing completion notification when it detects the control data 5.
[0031] Furthermore, the processing unit 12 stops outputting the processing result of the processing using the second data including time information indicating a time after the switching time in the second processing system 4 until a processing completion notice is output from the first processing system 3. For example, the buffer unit 4c of the second processing system 4 stores the second data received before the processing completion notice is output in the storage unit 11. Then, after the processing completion notice is output, the processing execution unit 3b reads the second data from the storage unit 11 and executes the processing using the second data.
[0032] In this way, in the second processing system 4 to which the switch is made, the processing of data including time information indicating a time after the switch time is stopped until a processing completion notification is received, so that the output of processing results in chronological order can be maintained even when the processing system is switched.
[0033] When the processing unit 12 receives an input specifying a switching time, if the grace period until the switching time is too short, it can suppress switching of the processing systems. In this case, the processing unit 12 calculates the grace period from the current time to the switching time in each of the first processing system 3 and the second processing system 4 in response to the input specifying the switching time. Then, if the grace period is equal to or greater than a predetermined value, the first processing system 3 and the second processing system 4 set the specified switching time as the time to switch the processing systems. Also, if the grace period is less than the predetermined value (including the case where the switching time is earlier than the current time), the first processing system 3 and the second processing system 4 output a setting failure notice without setting the switching time.
[0034] In this way, if the grace period is too short, the switching of the processing system is prevented, which makes it possible to avoid a situation in which the switching period is too short and, for example, the processing result of data after the switching time has already been output when the switching operation of the processing system is started.
[0035] Furthermore, if the processing unit 12 accepts the setting of the switching time only in one processing system and fails to set the switching time in the other processing system, the processing unit that accepted the setting of the switching time may cancel the switching of the processing systems. For example, if a setting failure notice is output from one of the first processing system 3 and the second processing system 4, the processing unit 12 transmits a switching cancellation instruction to the other processing system. If the processing unit 12 receives a switching cancellation instruction after setting the switching time in the first processing system 3 and the second processing system 4, it deletes the set switching time.
[0036] This makes it possible to prevent the processing system switching operation from being performed only in one of the processing systems, thereby preventing inconsistencies from occurring in the processing results. Furthermore, the processing unit 12 may store snapshots of the states of the first processing system 3 as the source of switching and the second processing system 4 as the destination of switching immediately after the switching time is set, assuming that a failure occurs after the setting of the switching time and an inconsistency occurs in the switching operation of the processing systems. For example, the processing unit 12 first instructs the second processing system 4 to set the switching time. After completing the setting of the switching time in the second processing system 4, the processing unit 12 stores a snapshot including the switching time in the storage unit 11. Next, after confirming the storage of the snapshot in the second processing system 4, the processing unit 12 instructs the first processing system 3 to set the switching time. After completing the setting of the switching time in the first processing system 3, the processing unit 12 stores a snapshot including the switching time in the storage unit 11. The first processing system 3 determines that the setting instruction to the source of switching is complete by confirming the storage of the second snapshot, and outputs a message indicating the completion of the setting of the switching time.
[0037] In this way, after saving a snapshot of the state after the switch time is set in the second processing system 4 of the switching destination, the first processing system 3 is instructed to set the switch time, and a snapshot of the state after the switch time is set is also saved in the first processing system 3, so that even if a failure occurs in the first processing system 3 or the second processing system 4, the state before the switch time is not restored. In other words, if the second processing system 4 returns to the state before the switch time was set due to the occurrence of a failure, the grace period at the time of the subsequent resetting of the switch time may be too short, and the setting may fail. If the second processing system 4 is restored to the state after the switch time was set using the snapshot, resetting of the switch time is not necessary, and the situation of failure to set the switch time at the switching destination can be avoided. The same applies to the occurrence of a failure in the first processing system 3.
[0038] Furthermore, since the switching time is set in the first processing system 3 of the switching source after the snapshot is saved in the second processing system 4, a situation in which the switching time is set only in the switching source and not in the switching destination is prevented from occurring. This prevents the first processing system 3 of the switching source from outputting the processing results of data after the switching time based on the switching time setting, and prevents the second processing system 4 from starting to output the processing results of the relevant data, thereby preventing a loss of processing results. Similarly, in the first processing system 3, the second processing system 4 of the switching destination starts to output the processing results of data after the switching time based on the switching time setting, and prevents duplication of processing results due to the first processing system 4 not suppressing the processing results of the relevant data. [Second embodiment] Next, a second embodiment will be described. In the second embodiment, IoT data collected from IoT devices is processed in real time at a data center, and a service is provided using the processing results.
[0039] 2 is a diagram illustrating an example of a system configuration of the second embodiment. A data center 30 is provided with a plurality of servers 100, 100a, etc. The plurality of servers 100, 100a, etc. are connected to a network 20, and function as, for example, a cloud computing system. For example, connected cars 31, 32, 33, 34, etc. are connected to the network 20 as IoT devices. The data center 30 has a distributed stream processing execution platform, and performs distributed processing on IoT data acquired from the connected cars 31, 32, 33, 34, etc.
[0040] The connected cars 31, 32, 33, 34, ... transmit IoT data including a timestamp indicating the time of occurrence when a specific event occurs. Note that the timestamp in the second embodiment is an example of the time information in the first embodiment. An event accompanied by the transmission of IoT data is a periodic data collection event that collects data such as position, speed, etc.
[0041] Note that IoT devices are not limited to connected cars 31, 32, 33, 34, . . . and include various devices such as mobile information terminals. 3 is a diagram showing an example of server hardware. The server 100 is entirely controlled by a processor 101. A memory 102 and a plurality of peripheral devices are connected to the processor 101 via a bus 109. The processor 101 may be a multiprocessor. The processor 101 is, for example, a central processing unit (CPU), a micro processing unit (MPU), or a digital signal processor (DSP). At least a part of the functions realized by the processor 101 executing a program may be realized by an electronic circuit such as an application specific integrated circuit (ASIC) or a programmable logic device (PLD).
[0042] The memory 102 is used as a main storage device of the server 100. The memory 102 temporarily stores at least a part of the OS (Operating System) program and application programs to be executed by the processor 101. The memory 102 also stores various data used for processing by the processor 101. As the memory 102, for example, a volatile semiconductor storage device such as a RAM (Random Access Memory) is used.
[0043] The peripheral devices connected to the bus 109 include a storage device 103, a GPU (Graphics Processing Unit) 104, an input interface 105, an optical drive device 106, a device connection interface 107, and a network interface 108.
[0044] The storage device 103 electrically or magnetically writes and reads data to and from a built-in recording medium. The storage device 103 is used as an auxiliary storage device for a computer. The storage device 103 stores an OS program, application programs, and various data. Note that, for example, a hard disk drive (HDD) or a solid state drive (SSD) can be used as the storage device 103.
[0045] The GPU 104 is an arithmetic device that performs image processing, and is also called a graphics controller. The GPU 104 is connected to a monitor 21. The GPU 104 displays an image on the screen of the monitor 21 in accordance with an instruction from the processor 101. The monitor 21 may be a display device using an organic EL (Electro Luminescence) display device, a liquid crystal display device, or the like.
[0046] The input interface 105 is connected to the keyboard 22 and the mouse 23. The input interface 105 transmits signals sent from the keyboard 22 and the mouse 23 to the processor 101. Note that the mouse 23 is an example of a pointing device, and other pointing devices can also be used. Examples of other pointing devices include a touch panel, a tablet, a touch pad, and a trackball.
[0047] The optical drive device 106 uses a laser beam or the like to read data recorded on the optical disc 24 or write data to the optical disc 24. The optical disc 24 is a portable recording medium on which data is recorded so that it can be read by reflection of light. The optical disc 24 includes a DVD (Digital Versatile Disc), a DVD-RAM, a CD-ROM (Compact Disc Read Only Memory), a CD-R (Recordable) / RW (ReWritable), etc.
[0048] The device connection interface 107 is a communication interface for connecting peripheral devices to the server 100. For example, a memory device 25 or a memory reader / writer 26 can be connected to the device connection interface 107. The memory device 25 is a recording medium equipped with a communication function with the device connection interface 107. The memory reader / writer 26 is a device that writes data to the memory card 27 or reads data from the memory card 27. The memory card 27 is a card-type recording medium.
[0049] The network interface 108 is connected to the network 20. The network interface 108 transmits and receives data to and from other computers or communication devices via the network 20. The network interface 108 is a wired communication interface that is connected by a cable to a wired communication device such as a switch or a router. The network interface 108 may also be a wireless communication interface that is communicatively connected by radio waves to a wireless communication device such as a base station or an access point.
[0050] The server 100 can realize the processing function of the second embodiment by the above-mentioned hardware. The other servers 100a,... in the data center 30 also have the same hardware as the server 100. The data processing system 10 shown in the first embodiment also has a computer with the same hardware as the server 100.
[0051] The server 100 realizes the processing function of the second embodiment by executing a program recorded in, for example, a computer-readable recording medium. The program describing the processing contents to be executed by the server 100 can be recorded in various recording media. For example, the program to be executed by the server 100 can be stored in the storage device 103. The processor 101 loads at least a part of the program in the storage device 103 into the memory 102 and executes the program. The program to be executed by the server 100 can also be recorded in a portable recording medium such as the optical disk 24, the memory device 25, or the memory card 27. The program stored in the portable recording medium becomes executable after being installed in the storage device 103 under the control of, for example, the processor 101. The processor 101 can also directly read out and execute the program from the portable recording medium.
[0052] In the data center 30, a distributed stream processing execution infrastructure is constructed by a plurality of servers 100, 100a, . . . . 4 is a diagram showing an example of a distributed stream processing execution platform. The multiple servers 100, 100a,... include an MQ (Message Queue) execution server 200 on the data input side, multiple stream processing execution servers 300, 400, 500, 600, an MQ execution server 700 on the data output side, and an information providing server 800. The multiple stream processing execution servers 300, 400, 500, 600 and the MQ execution server 700 realize a distributed stream processing execution platform. In the flow of stream data processing, the MQ execution server 200 side is the upstream side, and the information providing server 800 side is the downstream side.
[0053] The IoT data transmitted from the multiple connected cars 31, 32, ... is received by the MQ execution server 200. The MQ execution server 200 transmits the IoT data to at least one of the multiple stream processing execution servers 300, 400, 500, ... 600. The multiple stream processing execution servers 300, 400, 500, ... 600 execute processing using the received IoT data and transmit output data indicating the processing results to the MQ execution server 700. The MQ execution server 700 transmits the received output data to the information providing server 800. The information providing server 800 provides real-time information to the multiple connected cars 31, 32, ... based on the output data from the distributed stream infrastructure.
[0054] For example, IoT data sent from multiple connected cars 31, 32, ... includes information such as the ID, timestamp, location (latitude and longitude), speed, and driving log of the corresponding connected car. In the distributed stream processing execution platform, for example, the name of the road on which the car is traveling can be identified based on the location information in the IoT data. In addition, in the distributed stream processing execution platform, the average speed within a recent specified period can be calculated based on the speed information of the IoT data of the same connected car within the most recent specified period. Furthermore, in the distributed stream processing execution platform, the presence or absence of congestion on the road in question can be determined based on the information on the average speed of multiple connected cars on the same road.
[0055] When the presence or absence of congestion on each road is determined, the distributed stream processing execution platform outputs data indicating the presence or absence of congestion on each road. When congestion occurs, the information providing server 800 notifies the occurrence of congestion, for example, to connected cars in the vicinity of the congestion location.
[0056] In such a distributed stream processing execution platform, each of the multiple stream processing execution servers 300, 400, 500, and 600 has one or more stream processing execution platforms for processing stream data. IoT data to be processed is assigned to each stream processing execution platform, and the MQ execution server 200 transmits the IoT data to the assigned stream processing execution platform. For example, the stream processing execution platform that processes the IoT data output from a connected car is uniquely determined according to the ID of the connected car.
[0057] In this case, at least a part of the stream processing execution platform in operation may be stopped, and the processing of IoT data that was being processed by that stream processing execution platform may be taken over by a newly launched stream processing execution platform. In this case, the stream processing execution platform is switched.
[0058] Fig. 5 is a diagram showing an example of switching of stream processing execution platforms. Fig. 5 shows an example of switching of stream processing execution platforms for the purpose of scale-out. For example, it is assumed that the stream processing execution platforms 310 and 320 in the stream processing execution server 300 and the stream processing execution platform 410 in the stream processing execution server 400 are the production processing systems before switching. When the processing capacity of this processing system becomes insufficient, the stream processing execution platform is scaled out.
[0059] When scaling out, first save the save point of the source stream processing execution platform using the save point function described later. After that, the destination stream processing execution platforms 510, 520, 610, and 620 are launched on the stream processing execution servers 500 and 600 using this save point. The MQ execution server 200 also sends the same IoT data to the destination stream processing execution platforms 510, 520, 610, and 620 as it sends to the production processing system.
[0060] Before switching, the source stream processing execution platforms 310, 320, 410 send processing results to the MQ execution server 700. After switching, the source stream processing execution platforms 310, 320, 410 stop outputting processing results or switch the output destination to an MQ for debugging. Before switching, the destination stream processing execution platforms 510, 520, 610, 620 do not send processing results to the MQ execution server 700 or set the output destination to an MQ for debugging. After switching, the stream processing execution platforms 510, 520, 610, 620 become the production systems, and the stream processing execution platforms 510, 520, 610, 620 send processing results to the MQ execution server 700.
[0061] Intermediate data is sent and received between each stream processing execution platform of the processing system operating as the production system. Fig. 6 is a diagram showing an example of data transfer between stream processing execution platforms. In the example of Fig. 6, three processes "Processing A", "Processing B", and "Processing C" are being performed in the source stream processing execution platform 310, 320, 410. The stream processing execution platform 310, 320, 410 transmits the result of "Processing A" or "Processing B" to itself or to another stream processing execution platform. The stream processing execution platform 310, 320, 410 outputs the processing result of the last process "Process C" as the result of stream data processing.
[0062] The three "Processing A," "Processing B," and "Processing C" are also being performed on the output destination stream processing execution platforms 510, 520, 610, and 620. The stream processing execution platforms 510, 520, 610, and 620 then transmit the results of "Processing A" or "Processing B" to themselves or to other stream processing execution platforms. The 510, 520, 610, and 620 output the final processing result of "Processing C" as the result of stream data processing.
[0063] By switching between processing systems as shown in Figures 5 and 6, the number of processing systems is increased from three to four. In other words, scale-out is achieved. Real-time performance is required when switching between processing systems for stream data. In addition, IoT data sent from many IoT devices does not arrive at the distributed stream processing execution platform in the order of the timestamps due to variations in data transfer delays. For this reason, it is not easy to switch between processing systems while maintaining the consistency of the processing results.
[0064] For example, if real-time performance is not required, it is possible to switch processing systems using the save point function, which is a function for saving information about the execution state of a processing system.
[0065] When switching processing systems using the save point function, the stream processing execution server that is executing the currently running processing system saves the internal state of the currently running processing system and how much input data has been processed in a DB (DataBase) using, for example, the save point function. Next, the stream processing execution server performs various changes (scaling out and program changes) to the processing system to be switched to. The stream processing execution server then starts the processing system to be switched to with the internal state of the source system that was saved using the save point function. The processing system to be switched to reads the input data subsequent to the processed input data saved using the save point function from the MQ execution server 200 and starts stream data processing.
[0066] Although it is possible to switch processing systems using the save point function in this way, it takes time to store information such as the internal state of the source processing system in the DB, and then to read that information from the DB and apply it to the state of the destination processing system. During that time, the distributed stream processing execution platform does not output processing results, resulting in downtime.
[0067] Furthermore, if it takes a long time to switch the processing system, a lot of unprocessed IoT data will accumulate in the upstream MQ execution server 200. The processing system to which the switch is made will process the IoT data that has accumulated since the start of operation with a delay, and it will take time before the IoT data sent from the IoT device can be processed without delay.
[0068] Therefore, it is conceivable to input IoT data to both the source and destination processing systems and execute processing in parallel, and at a predetermined switching time, stop outputting the processing result of the source processing system and start outputting the processing result of the destination processing system. However, the positions of data that have been processed by the switching time are different in the two processing systems, the source and destination. Therefore, if there is IoT data that has been processed in the source but not processed in the destination at the switching time, the processing result of that IoT data will be output from both the source processing system and the destination processing system, resulting in duplicate output of the processing result. Conversely, if there is IoT data that has not been processed in the source but has been processed in the destination at the switching time, the processing result of that IoT data will not be output from either processing system, resulting in a missing processing result.
[0069] If the data is sent in chronological order of the timestamps, such as streaming processing of video data output from one device, the processing system can be switched based on the timestamp while maintaining the consistency of the processing results. For example, the processing results of the processing system to be switched to can be output from the data to which the timestamp next to the timestamp of the last data processed by the processing system to be switched to up until the switching time has been assigned.
[0070] However, the transmission delay time of IoT data sent from many IoT devices varies. In addition, the internal clocks of IoT devices also have errors. Therefore, the IoT data that arrives at the distributed stream processing execution platform does not arrive in the order of the timestamps. Therefore, for example, IoT data that has a timestamp that is earlier than the timestamp of the last data processed in the original processing system before the switchover may arrive at the distributed stream processing execution platform after the switchover of the processing system. In this case, if the new processing system processes only IoT data that has a timestamp that is later than the timestamp of the last data processed in the original processing system before the switchover, data will be lost.
[0071] Therefore, in the system shown in the second embodiment, control using Watermark is performed in the distributed stream processing execution platform to achieve switching of processing systems while maintaining consistency even if the data does not arrive in the order indicated by the timestamp.
[0072] A watermark is control data that represents the "timestamp value of data that has finished flowing through stream processing," which is used as a reference when processing stream data based on the data's timestamp. Watermarks are sent comprehensively from the most upstream route of the processing execution route to all routes. By using watermarks, the timestamp value of IoT data that has finished processing in the processing system before switching becomes clear, and the processing system after switching can process only the IoT data that has not been processed in the processing system before switching without any omissions.
[0073] 7 is a block diagram showing an example of the functions of each server in the second embodiment. The upstream MQ execution server 200 has a data MQ 210 and a switching control MQ 220. The data MQ 210 is a queue that stores messages including received IoT data. The switching control MQ 220 is a queue that stores messages including control data for controlling the switching of processing systems.
[0074] The stream processing execution infrastructure 310 in the stream processing execution server 300 has a data receiving unit 311, a process control unit 312, a process execution unit 319 including a plurality of processing units 313-315, a process progress detection unit 316, and a data output unit317.
[0075] The data receiving unit 311 receives a message stored in the data MQ 210 or the switching control MQ 220 from the MQ execution server 200. The data receiving unit 311 transmits data (IoT data or control data) in the received message to the process control unit 312.
[0076] The process control unit 312 uses the watermark to control the progress of stream data processing in the process execution unit 319. The watermark output by the process control unit 312 flows through all processing routes from the most upstream in the stream processing execution platform 310. Each of the processing units 313 to 315 at which the watermark arrives can determine that all data having timestamps up to the watermark has been processed.
[0077] For example, when a watermark of "12:00" arrives at the processing unit 313, the processing unit 313 recognizes that all data up to "12:00" has passed through the processing unit 313, and outputs the processing result that aggregates the data for a specified period (e.g., one minute) up to that time.
[0078] When the "12:00" watermark arrives at the processing progress detection unit 316, which is placed at the most downstream of the stream data processing, the processing progress detection unit 316 can determine that processing of data with timestamps up to "12:00" is complete. If there are multiple stream data processing paths, the processing progress detection unit 316 determines that processing of data up to "12:00" is complete when the "12:00" watermark arrives from all processing paths.
[0079] Each of the processing units 313 to 315 in the processing execution unit 319 performs data processing based on IoT data. The processing units 313 to 315 have buffer units 313a, 314a, and 315a, respectively. When the stream processing execution platform 310 becomes the switching destination of the processing system, the buffer units 313a, 314a, and 315a are buffers that store IoT data with a timestamp added after the switching time without processing it until a processing restart instruction is received.
[0080] The processing progress detection unit 316 is located at the most downstream of the processing by the processing units 313 to 315 (immediately before the external output unit), and detects that processing of data up to the switching time in switching of processing systems has been completed based on the Watermark. When the processing progress detection unit 316 detects that processing of data up to the switching time has been completed, it stores a message indicating a processing completion notification in the notification MQ 740 in the MQ execution server 700.
[0081] The data output unit 317 stores a message indicating the processing result in one of the message queues in the MQ execution server 700. The data output unit 317 has an output destination switching unit 317a that determines the destination (message queue) of the output destination of the processing result based on the timestamp of the input data. The data output unit 317 stores the message indicating the processing result in the destination determined by the output destination switching unit 317a.
[0082] The stream processing execution server 300 further includes a switching control unit 390. The switching control unit 390 controls the switching of processing systems from outside the distributed stream processing execution infrastructure. For example, the switching control unit 390 stores a message indicating the switching time of the processing systems in the switching control MQ 220 of the MQ execution server 200 in response to an instruction from a user. In addition, when the processing up to the switching time is completed in the processing system of the switching source, the switching control unit 390 stores a message indicating a processing restart instruction for the processing system of the switching destination in the switching control MQ 220 of the MQ execution server 200.
[0083] 7 show only a part of the communication paths, and communication paths other than those shown in the figure can also be set. For example, the processing result of processing unit 313 or processing unit 314 may be output as output data. In this case, the processing result is transmitted from processing unit 313 or processing unit 314 to processing progress detection unit 316. The function of each element shown in FIG. 7 can be realized, for example, by having a computer execute a program module corresponding to that element.
[0084] 7 shows the functions within the stream processing execution platform 310, other stream processing execution platforms have similar functions. Also, although the switching control unit 390 is provided within the stream processing execution server 300, the switching control unit 390 may be provided within another server.
[0085] Next, a processing system switching procedure will be described with reference to FIGS. Fig. 8 is a diagram (1 / 5) showing an example of the switching process of the processing system. When the user inputs a switching start instruction to the switching control unit 390, the switching process of the processing system starts. In the example of Fig. 8, in response to the user's input of the switching start instruction, the switching control unit 390 determines the switching time to be "12:00", the switching source to be the stream processing execution platform 310, and the switching destination to be the stream processing execution platform 510.
[0086] The switching control unit 390 transmits a control message 41 specifying the switching time to the MQ execution server 200. The MQ execution server 200 stores the received control message 41 in the MQ 220 for switching control.
[0087] The process control unit 312 of the source stream processing execution platform 310 reads the control message 41 specifying the switching time from the switching control MQ 220. Then, the process control unit 312 transmits a switching time specification instruction to the buffer units of the respective processing units 313 to 315, the process progress detection unit 316, and the output destination switching unit in the data output unit 317.
[0088] The process control unit 512 of the switching destination stream processing execution platform 510 reads the control message 41 specifying the switching time from the switching control MQ 220. Then, the process control unit 512 transmits a switching time specification instruction to the buffer units of the respective processing units 513 to 515, the process progress detection unit 516, and the output destination switching unit in the data output unit 517.
[0089] FIG. 9 is a diagram (2 / 5) showing an example of the switching process of the processing system. In the source stream processing execution platform 310, the data output unit 317 that has received a switching start instruction compares the timestamp attached to the processing result of the IoT data with the switching time by the output destination switching unit 317a (see FIG. 7). The processing result is given, for example, the latest timestamp of the IoT data used to obtain the processing result. The output destination switching unit 317a judges whether the timestamp is earlier or later than the switching time for each processing result of the IoT data. The data output unit 317 distributes the processing result of the IoT data to the operational MQ 710 and the source debug MQ 720 according to the judgment result of the output destination switching unit 317a.
[0090] For example, when the switching time is "12:00", the data output unit 317 stores messages indicating the processing results of IoT data with timestamps earlier than "12:00" in the operational MQ 710. The data output unit 317 also stores messages indicating the processing results of IoT data with timestamps later than "12:00" in the pre-switching debug MQ 720.
[0091] In the stream processing execution platform 510 at the switching destination, the most upstream processing unit 513 that received the switching start instruction compares the timestamp of the data attached to each IoT data with the switching time. The buffer unit 513a in the processing unit 513 judges whether the timestamp of each IoT data is before or after the switching time. The buffer unit 513a then holds the IoT data whose timestamp is after the switching time in the buffer, and inputs the IoT data before the switching time to the processing unit 513.
[0092] The IoT data input to the processing unit 513 is processed by the processing units 513 to 515, and the processing result is transmitted to the data output unit 517. The data output unit 517 stores a message indicating the processing result of the IoT data whose timestamp is before the switching time in the switching destination debug MQ 730.
[0093] 10 is a diagram (3 / 5) showing an example of the switching process of the processing system. When the switching source process control unit 312 judges that the input of IoT data up to the switching time is completed, it transmits a watermark of the switching time. For example, if it can be statistically judged that the input of IoT data up to the switching time "12:00" is completed, the process control unit 312 transmits a watermark indicating "12:00".
[0094] The watermark is transferred through the stream processing execution platform 310 following the IoT data previously input. When the watermark indicating the switching time reaches the processing progress detection unit 316, the processing progress detection unit 316 detects that the data processing up to the switching time at the switching source has been completed. The processing progress detection unit 316 then stores a control message 42 indicating a processing completion notification in the notification MQ 740. The control message 42 stored in the notification MQ 740 is transmitted to the switching control unit 390 by the MQ execution server 700.
[0095] 11 is a diagram (4 / 5) showing an example of the switching process of the processing system. When the switching control unit 390 receives the processing completion notification, it stores a control message 43 indicating the restart of processing in the switching control MQ 220. The stored control message 43 is transmitted by the MQ execution server 200 to the processing control unit 512 in the switching destination stream processing execution platform 510. The processing control unit 512 that receives the control message 43 transmits a processing restart instruction to the buffer unit 513a.
[0096] When the buffer unit 513a receives the processing restart instruction, it releases the buffered IoT data having a timestamp after the switching time, and restarts the processing in the processing units 513 to 515 using the IoT data.
[0097] In the data output unit 517, the internal output destination switching unit compares the timestamp attached to the processing result of the IoT data with the switching time, and judges whether the timestamp is before or after the switching time. After the processing restart instruction is issued, the timestamp after the processing result is a time after the switching time. The data output unit 517 stores the processing result with the timestamp attached after the switching time in the operational MQ 710.
[0098] Fig. 12 is a diagram (5 / 5) showing an example of the switching process of the processing system. Fig. 12 shows the operational state after the switching is completed. After the switching is completed, the data output unit 317 of the source stream processing execution platform 310 stores a message indicating the processing result in the source debug MQ 720. In addition, the buffer unit 513a of the destination stream processing execution platform 510 does not buffer the IoT data, but inputs the input IoT data directly to the processing unit 513. The data output unit 517 stores a message indicating the processing result in the operational MQ 710.
[0099] In this way, when switching processing systems, processing results with the same time stamps are prevented from being duplicated and stored in the operational MQ710, and some processing results with time stamps are also prevented from being lost.
[0100] Next, the procedure for switching the processing system will be described in chronological order with reference to FIG. 13 and FIG. 13 is the first half of a sequence diagram showing the switching process procedure of the processing system. The switching control unit 390, which has received a switching start instruction, determines the switching time (step S11). Next, the switching control unit 390 notifies the switching time to the processing control unit 312 of the switching source and the processing control unit 512 of the switching destination (step S12).
[0101] The process control unit 312 of the switching source notifies, for example, the buffer units in the processing units 313-315, the process progress detection unit 316, and the output destination switching unit 317a (see FIG. 7) in the data output unit 317 of the switching start and switching time (step S13). The process control unit 512 of the switching destination notifies, for example, the buffer units in the processing units 513-515, the process progress detection unit 516, and the output destination switching unit in the data output unit 517 of the switching start and switching time (step S14).
[0102] The process execution unit 319 of the switchover source executes the process of the stream data (step S15). The data output unit 317 outputs the process result of the stream data before the switchover time to the operation MQ 710 (step S16). The data output unit 317 also outputs the process result of the stream data after the switchover time to the debug MQ 720 of the switchover source (step S17).
[0103] The process execution unit 519 (including the processing units 513 to 515) of the switching destination executes the process for the stream data before the switching time (step S18). The data output unit 517 outputs the process result of the stream data before the switching time to the switching destination debug MQ 730 (step S19). The buffer unit 513a (see FIG. 9) of the most upstream processing unit 513 holds each IoT data of the stream data after the switching time in a buffer (step S20).
[0104] FIG. 14 is the latter half of a sequence diagram showing the switching process procedure of the processing system. The processing progress detection unit 316 detects the completion of the processing up to the switching time based on the Watermark (step S31). The processing progress detection unit 316 notifies the switching control unit 390 of the processing completion through the notification MQ 740 (see FIG. 7) (step S32). The switching control unit 390 transmits a control message indicating the restart of processing to the switching destination processing control unit 512 through the switching control MQ 220 (see FIG. 7) (step S33). The switching destination processing control unit 512 notifies the buffer unit 513a (see FIG. 9) of the first processing unit 513 in the processing execution unit 519 of the restart of processing (step S34). Then, each processing unit 513 to 515 (see FIG. 7) of the processing execution unit 519 processes the IoT data held in the buffer unit 513a (step S35). The data output unit 517 that receives the processing result outputs a message indicating the processing result to the operational MQ 710 (step S36).
[0105] The above is the overall process flow for switching processing systems. Next, we will explain in detail the process for each functional block in the stream processing execution server 300 shown in Figure 7. In the following explanation, the functions in the stream processing execution platform 310 will be described as the execution subjects, but the same process is also performed in the functions with the same names in the other stream processing execution platforms 320, 410, 510, 520, 610, and 620.
[0106] First, with processing unit 313 as the execution subject, details of stream data processing in each processing unit will be described with reference to FIGS. 15 is a flow chart showing an example of a procedure for stream data processing in the processing unit. The process shown in FIG. 15 will be described below in order of step numbers.
[0107] [Step S101] Every time the processing unit 313 receives each IoT data constituting stream data, it calls a stream data reception sub-process shown in step S102.
[0108] <Step S102> The processor 313 executes a sub-process upon receiving stream data. The details of the sub-process will be described later (see FIG. 16). [Step S103] The processor 313 repeats the process of step S102 each time stream data is received (continues the loop process) until the stream data processing ends, for example, when an input is received to stop the system service.
[0109] 16 is a flow chart showing an example of a procedure for a sub-process at the time of receiving stream data in the processing unit 100. The process shown in FIG. 16 will be described below in order of step numbers. [Step S111] The processing unit 313 acquires IoT data (received data 51) received from the upstream processing control unit 312. If there is another processing unit upstream of the processing unit 313, the processing unit 313 reads the received data 51 from the upstream processing unit. The received data 51 includes information such as the vehicle name, latitude, longitude, and timestamp of the connected car.
[0110] [Step S112] The processing unit 313 executes processing using the received data 51 according to processing logic predefined in the processing unit 313. For example, the processing unit 313 determines the road on which the vehicle is traveling based on the latitude and longitude of the received data 51. Specifically, the processing unit 313 refers to map data indicating the positions of roads, and determines that the road located at the latitude and longitude position of the vehicle is the road on which the vehicle is traveling.
[0111] [Step S113] The processing unit 313 outputs the processing result to another downstream processing unit or the processing progress detection unit 316. For example, if there is another process to be executed in the stream processing execution platform, the processing unit 313 outputs the processing result to the other processing unit. If the process executed by the processing unit 313 is the last process in the processing path in the stream processing execution platform, the processing unit 313 outputs the processing result to the processing progress detection unit 316.
[0112] The output data 52 includes, for example, the vehicle name, latitude, longitude, road name, destination MQ name, and time stamp. The destination MQ name is a name indicating the operation MQ 710 corresponding to the service using the output data when multiple operation MQs 710 are provided for each service content.
[0113] 15 and 16 are examples of stream data processing executed by the processing unit 313, and other processing units can execute other processes, for example, by using the processing results of the processing unit 313. For example, a process such as calculating the degree of congestion for each road based on the name of the road on which each connected car is traveling is possible.
[0114] Next, the details of the process executed by the process control unit 312 will be described with reference to FIGS. Fig. 17 is a flowchart showing an example of a procedure for stream data processing in the process control unit. The process shown in Fig. 17 will be explained below according to the step numbers. Note that the double lines in Fig. 17 represent asynchronous parallel processing (corresponding to fork nodes and join nodes in an activity diagram of UML (Unified Modeling Language)). That is, the processing of steps S201 to S203 and the processing of steps S204 to S206 are executed asynchronously in parallel.
[0115] [Step S201] Every time the process control unit 312 receives stream data (each IoT data) from the data MQ 210, it calls a stream data reception sub-process in step S202.
[0116] [Step S202] The process control unit 312 executes a sub-process upon receiving stream data. The details of the sub-process will be described later (see FIGS. 18 and 19). [Step S203] The process control unit 312 repeats the process of step S202 every time stream data is received until the stream data processing is completed.
[0117] [Step S204] The process control unit 312 calls a sub-process at the time of receiving switching-related data in step S205 every time switching-related data is received from the switching control MQ 220. The switching-related data is data indicating the switching time indicated in the control message stored in the switching control MQ 220 or data indicating the restart of processing.
[0118] <Step S205> The control unit 312 executes a sub-process upon receiving switching-related data. The details of the sub-process will be described later (see FIG. 20). <Step S206> The process control unit 312 repeats the process of step S205 every time switching related data is received until the stream data process is completed.
[0119] 18 is a flowchart showing an example of a sub-process for receiving stream data in the process control unit, the first half of which is shown in FIG. 18. The process shown in FIG.
[0120] [Step S211] The process control unit 312 receives IoT data (received data 51) constituting the stream data that has arrived from the data MQ 210. [Step S212] The process control unit 312 acquires the timestamp of the received data 51, and calculates a calculated timestamp indicating the time at which it can be guaranteed that the processing progress in the stream data has been completed. For example, the process control unit 312 sets the calculated timestamp to a time that is a predetermined time earlier than the timestamp of the data (for example, a time obtained by subtracting several minutes or several tens of seconds).
[0121] [Step S213] The processing control unit 312 reads out internal state switching information. The internal state is information indicating the operating state of the processing system. The internal state is stored in a memory or a storage device. The switching information indicates, for example, whether or not the watermark is stopped. For example, switching information 53 indicating that the watermark is not to be stopped contains "Stop watermark: False". Switching information 54 indicating that the watermark is to be stopped includes, in addition to "Stop watermark: True", information on whether this processing platform is the switching destination (this processing platform is the switching destination: True or False), the switching time, etc.
[0122] [Step S214] The process control unit 312 determines whether the following conditions are met: "This processing platform is the switching destination," "Watermark is stopped," and "The calculated timestamp is greater than the switching time." If all of the conditions are met, the process control unit 312 advances the process to step S215. If any one of the conditions is not met, the process control unit 312 advances the process to step S221 (see FIG. 19).
[0123] [Step S215] The process control unit 312 replaces the time of the calculated timestamp with the switching time of the processing system. After that, the process control unit 312 advances the process to step S221 (see FIG. 19).
[0124] 19 is the latter half of a flowchart showing an example of a processing procedure of the sub-process at the time of receiving stream data in the process control unit. The processing shown in FIG. 19 will be described below in order of step numbers.
[0125] <Step S221> The process control unit 312 reads out the maximum timestamp from the internal state. [Step S222] The process control unit 312 determines whether the calculated timestamp is a greater value (later time) than the maximum timestamp saved in the internal state. If the calculated timestamp is a greater value, the process control unit 312 advances the process to step S224. If the calculated timestamp is equal to or less than the maximum timestamp, the process control unit 312 ends the stream data reception sub-process.
[0126] <Step S223> The process control unit 312 updates the maximum timestamp with the calculated timestamp, and stores the updated maximum timestamp in the internal state 55 of the process control unit 312.
[0127] [Step S225] The process control unit 312 transmits the Watermark 56 carrying the calculated timestamp to all downstream processing units. In this way, the process control unit 312 transmits a watermark including an appropriate timestamp. In other words, if the watermark is not stopped, and the calculated timestamp indicating the timestamp of the IoT data that guarantees the completion of the process is greater than the maximum timestamp, the watermark including the calculated timestamp is transmitted. The maximum timestamp is the maximum value of the timestamps of the watermarks that have already been transmitted. Therefore, a watermark that is earlier than a watermark that has already been transmitted is not transmitted.
[0128] After "Stop watermark" is set, if the calculated timestamp is greater than the switch time ("Yes" in step S214 of FIG. 18), the calculated timestamp is replaced with the switch time (see step S215 of FIG. 18). As a result, the first time a calculated timestamp after the switch time is calculated, a watermark including the switch time as a timestamp is transmitted. When a calculated timestamp that is after the switch time is calculated two or more times, from the second time onwards, "maximum timestamp (the switch time saved the first time) ≧ calculated timestamp (switch time)" (No in step S222). As a result, transmission of the watermark is suppressed. In other words, the watermark timestamp stops at the switch time.
[0129] 18 and 19, it is determined whether or not to transmit a watermark each time reception data 51 is received, but the determination may be made at another timing. For example, as a variation of the timing of transmitting a watermark, the process control unit 312 may determine whether or not to transmit a watermark periodically at fixed time intervals in addition to when stream data is received. In this case, the process control unit 312 calculates a timestamp when receiving stream data, and transmits a watermark with the previously calculated timestamp at the transmission timing of the fixed time intervals.
[0130] 20 is a flowchart showing an example of a procedure for a switch-related data reception sub-process in the process control unit 100. The process shown in FIG. 20 will be described below in order of step number. [Step S231] The process control unit 312 receives the switching time designation data 57 from the switching control MQ 220. The switching time designation data 57 includes the switching time and information designating whether this control board is the switching destination or the switching source.
[0131] <Step S232> The process control unit 312 transmits the switching time designation data 57 to the output destination switching unit 317a, the buffer units 313a, 314a, and 315a of the processing units 313 to 315, and the process progress detection unit 316.
[0132] [Step S233] The process control unit 312 saves the switching information 58 in the internal state. The saved switching information 58 includes information indicating whether the control board is the switching destination, information indicating that the Watermark is to be stopped, and information indicating the switching time.
[0133] [Step S234] The process control unit 312 determines whether or not the process resumption data 59 has been stored in the switching control MQ 220. If the process resumption data 59 has been stored, the process control unit 312 proceeds to step S235. If the process resumption data 59 has not been stored, the process control unit 312 repeats the process of step S234 and waits for the process resumption data 59 to be stored.
[0134] [Step S235] The process control unit 312 receives the process restart data 59 from the switching control MQ 220. The process restart data indicates an instruction to restart the process. [Step S236] The process control unit 312 transmits the process restart data 59 to the buffer units 313a, 314a, and 315a of the process units 313-315.
[0135] [Step S237] The process control unit 312 saves the switching information 60 in the internal state. The switching information 60 includes information indicating that the watermark has been deactivated (watermark is deactivated: False).
[0136] In this way, when a switching time is specified, a setting to stop the watermark after the switching time is saved in the internal state, and when a command to resume processing is issued, a setting to not stop the watermark is saved in the internal state. The value of the internal state indicating whether or not to stop the watermark is referenced in the stream data reception sub-process (see Figures 18 and 19), and the watermark is controlled according to the setting.
[0137] The above is the details of the process performed by the process control unit 312. Next, the process performed by the data output unit 317 will be described in detail with reference to FIGS. 21 is a flow chart showing an example of a procedure for stream data processing in the data output unit 200. The process shown in FIG. 21 will be described below in order of step numbers.
[0138] [Step S301] Every time the data output unit 317 receives external output data or switching time designation data, it calls a sub-process by executing steps S302 to S304.
[0139] [Step S302] The data output unit 317 determines whether the received data is data for external output. Data for external output is data that indicates the processing result of stream data. If the received data is data for external output, the data output unit 317 proceeds to step S303. If the received data is switching time designation data, the data output unit 317 proceeds to step S304.
[0140] [Step S303] The data output unit 317 executes an external output sub-process. The external output sub-process will be described in detail later (see FIG. 22). After that, the data output unit 317 advances the process to step S305.
[0141] <Step S304> The data output unit 317 executes a switching time designation sub-process, which will be described in detail later (see FIG. 23). [Step S305] The data output unit 317 repeats the process of steps S302 to S304 every time it receives data for external output or switching time designation data until the stream data processing is completed.
[0142] 22 is a flowchart showing an example of a processing procedure of an external output sub-process in the data output unit 200. The processing shown in FIG. 22 will be described below in order of step numbers. [Step S311] The data output unit 317 receives data for external output (output data 71) from an upstream processing unit. The output data 71 includes a result of processing by the processing execution unit 319 of the stream processing execution platform 310 (see FIG. 7).
[0143] [Step S312] The output destination switching unit 317a in the data output unit 317 acquires the switching information 72 stored in the internal state. The switching information 72 includes information indicating whether this processing board is the source or destination of switching, and the switching time.
[0144] [Step S313] The output destination switching unit 317a judges whether or not the present processing board is the switching source. If the present processing board is the switching source, the output destination switching unit 317a proceeds to step S314. If the present processing board is the switching destination, the output destination switching unit 317a proceeds to step S315.
[0145] [Step S314] The output destination switching unit 317a determines whether the timestamp of the output data is before the switching time. If it is before the switching time, the output destination switching unit 317a proceeds to step S316. If it is after the switching time, the output destination switching unit 317a proceeds to step S317.
[0146] [Step S315] The output destination switching unit 317a determines whether the timestamp of the output data is after the switching time. If it is after the switching time, the output destination switching unit 317a proceeds to step S316. If it is before the switching time, the output destination switching unit 317a proceeds to step S317.
[0147] [Step S316] The data output unit 317 outputs a message including the output data 71 to the operational MQ 710, and ends the external output sub-process. [Step S317] The data output unit 317 outputs a message including the output data 71 to a debug MQ (source debug MQ 720 or destination debug MQ 730) depending on whether this processing platform is the source or destination, and terminates processing of the external output sub-process.
[0148] If no switching time setting instruction has been issued and no switching information 72 exists, the output destination switching unit 317 a outputs a message including the output data to the operational MQ 710 . 23 is a flowchart showing an example of a processing procedure of a switching time designation sub-process in the data output unit 200. The processing shown in FIG. 23 will be described below in order of step numbers.
[0149] <Step S321> The output destination switching section 317a in the data output section 317 receives the switching time designation data 57. [Step S322] The output destination switching unit 317a saves in its internal state the switching information 73. The saved switching information 73 includes information indicating whether this processing board is the source or destination of the switch, and the time of the switch.
[0150] In this way, the data output unit 317 can output the output data to an appropriate MQ based on the timestamp of the output data. The above is the details of the process performed by the data output unit 317. Next, the process performed by the buffer unit 313a will be described in detail with reference to FIGS.
[0151] Fig. 24 is a flowchart showing an example of a procedure for stream data processing in the buffer unit. The process shown in Fig. 24 will be explained below in order of step numbers. Note that the process of steps S401 to S403 and the process of steps S404 to S406 are executed asynchronously in parallel.
[0152] [Step S401] Every time the buffer unit 313a receives stream data (each IoT data) read from the data MQ 210, it calls the data buffer sub-process in step S402.
[0153] <Step S402> The buffer unit 313a executes a data buffer sub-process, the details of which will be described later (see FIG. 25). <Step S403> The process control unit 312 repeats the process of step S402 every time stream data is received until the stream data processing is completed.
[0154] [Step S404] Every time the buffer unit 313a receives switching-related data read from the switching control MQ 220, it calls the data buffer switching-related data reception sub-process of step S405.
[0155] [Step S405] The buffer unit 313a executes a data buffer switching related data reception sub-process, the details of which will be described later (see FIG. 26). <Step S406> The buffer unit 313a repeats the process of step S406 every time it receives switching related data until the stream data processing is completed.
[0156] 25 is a flowchart showing an example of a processing procedure of a data buffer sub-process in the buffer unit 200. The processing shown in FIG. 25 will be described below in order of step numbers. [Step S411] The buffer unit 313a acquires the IoT data (received data 51) received from the upstream process control unit 312.
[0157] <Step S412> The buffer unit 313a reads from the internal state the switching information 74. The switching information 74 to be read includes information indicating whether switching of the processing systems is in progress and the switching time.
[0158] [Step S413] The buffer unit 313a determines whether switching is in progress. If switching is in progress, the buffer unit 313a proceeds to step S414. If switching is not in progress, the buffer unit 313a proceeds to step S416.
[0159] [Step S414] The buffer unit 313a determines whether the timestamp of the received data 51 is after the switching time. If it is after the switching time, the buffer unit 313a proceeds to step S415. If it is before the switching time, the buffer unit 313a proceeds to step S416.
[0160] [Step S415] The buffer unit 313a stores the received data 51 in the data buffer of the internal state, and then ends the data buffer sub-process.
[0161] <Step S416> The buffer unit 313 a transmits the received data 51 to the processing unit 313. 26 is a flowchart showing an example of a processing procedure of a data buffer switching related data receiving sub-process in the buffer unit 200. The processing shown in FIG. 26 will be described below in order of step numbers.
[0162] [Step S421] The buffer unit 313a acquires switching-related data (switching time designation data 57 or processing restart data 59) from the upstream processing control unit 312. <Step S422> The buffer unit 313a reads from the internal state the switching information 75. The read switching information 75 includes information indicating whether switching of the processing systems is in progress and the switching time.
[0163] [Step S423] The buffer unit 313a determines whether the acquired switching-related data is switching time designation data 57. If the acquired switching-related data is switching time designation data 57, the buffer unit 313a proceeds to step S424. If the acquired switching-related data is processing restart data 59, the buffer unit 313a proceeds to step S425.
[0164] [Step S424] The buffer unit 313a updates the switching information and saves it in the internal state. In the updated switching information 76, the information indicating whether switching is in progress is set to information indicating that switching is in progress (switching is in progress: True). Thereafter, the buffer unit 313a ends the data buffer switching related data reception sub-process.
[0165] [Step S425] The buffer unit 313a updates the switching information and stores it in the internal state. In the updated switching information 77, the information indicating whether switching is in progress is set to information indicating that switching is not in progress (switching is in progress: False).
[0166] <Step S426> The buffer unit 313a reads all the received data from the data buffer in the internal state. <Step S427> The buffer unit 313a transmits the received data read from the data buffer to the processing unit 313.
[0167] In this way, the buffer unit 313a holds the IoT data with a timestamp after the switching time in the data buffer until an instruction to resume processing is received. Then, in response to the instruction to resume processing, processing of the buffered IoT data is started.
[0168] The above is the details of the process of the buffer unit 313a. Next, the process executed by the process progress detection unit 316 will be described in detail with reference to FIGS. 27 is a flowchart showing an example of a procedure for stream data processing in the processing progress detector 200. The processing shown in FIG. 27 will be described below in order of step numbers.
[0169] [Step S501] The processing progress detection unit 316 calls a processing progress detection sub-process in step S502 every time it acquires a watermark or switching time designation data. <Step S502> The processing progress detection unit 316 executes a processing progress detection sub-process. The details of the processing of this sub-process will be described later (see FIG. 28).
[0170] <Step S503> The processing progress detection unit 316 repeats the processing of step S502 every time it acquires a watermark or switching time designation data until the stream data processing is completed.
[0171] 28 is a flowchart showing an example of a processing procedure of a processing progress detection sub-process in the processing progress detection unit 200. The processing shown in FIG. 28 will be described below in order of step numbers. <Step S511> The processing progress detection unit 316 reads out the acquired data (the Watermark 56 or the switching time designation data 57).
[0172] [Step S512] The processing progress detection unit 316 determines whether the type of data is Watermark 56. If the type of data is Watermark 56, the processing proceeds to step S514. If the type of data is switch time designation data 57, the processing proceeds to step S513.
[0173] [Step S513] The processing progress detection unit 316 updates the switching information based on the switching time designation data 57, and saves it in the internal state. The updated switching information 81 contains information indicating that switching is in progress, information indicating whether this processing platform is the switching source or switching destination, and the switching time. The processing progress detection unit 316 then ends the processing progress detection sub-process.
[0174] <Step S514> The process progress detection unit 316 reads the switching information 82 from the internal state. [Step S515] The processing progress detection unit 316 determines whether the following conditions are met: switching is in progress, this processing platform is the source of switching, and the Watermark is after the switching time. If the conditions are met, the processing progress detection unit 316 proceeds to step S516. If the conditions are not met, the processing progress detection unit 316 ends the processing progress detection sub-process.
[0175] <Step S516> The processing progress detection unit 316 outputs a processing completion message to the notification MQ 740. <Step S517> The process progress detection unit 316 updates the switching information and stores it in the internal state. After the update, the switching information 83 is set to information indicating that switching is not in progress.
[0176] In this way, the processing progress detection unit 216 detects the completion of processing of the stream data with time stamps up to the switching time by the arrival of the Watermark after the switching time. When the completion of processing up to the switching time is detected, a processing completion notice is output.
[0177] The above is the details of the process performed by the process progress detection unit 316. Next, the process performed by the switching control unit 390 will be described in detail with reference to FIGS. 29 is a flowchart showing an example of the procedure of an output destination switching process in the switching control unit. The process shown in FIG. 29 will be described below in order of step number.
[0178] [Step S601] The switching control unit 390 executes a switching start sub-process, the details of which will be described later (see FIG. 30). [Step S602] The switching control unit 390 judges whether or not a processing completion notification has been obtained from the switching source. For example, when a message indicating a processing completion notification is stored in the notification MQ 740, the switching control unit 390 obtains the processing completion notification from the notification MQ 740. When the switching control unit 390 obtains the processing completion notification, the processing proceeds to step S603. When the switching control unit 390 has not obtained the processing completion notification, the switching control unit 390 repeats the processing of step S602 and waits for the processing completion notification to be obtained.
[0179] <Step S603> The switching control unit 390 executes a process restart notification sub-process, which will be described in detail later (see FIG. 31). 30 is a flowchart showing an example of a processing procedure of a switching start sub-process in the switching control unit. The processing shown in FIG. 30 will be described below in order of step number.
[0180] [Step S611] The switching control unit 390 determines a switching time. For example, when the switching control unit 390 receives an input instructing switching of the processing systems, the switching control unit 390 determines a time that is a predetermined time later than the input time as the switching time.
[0181] <Step S612> The switching control unit 390 stores a message including the switching initiation data 85 in the switching control MQ 220. 31 is a flowchart illustrating an example of a procedure for a process restart notification sub-process in the switching control unit 100. The process illustrated in FIG.
[0182] <Step S621> The switching control unit 390 acquires the processing completion notification 86 from the notification MQ 740. The processing completion notification 86 includes the switching time designated in switching the processing system.
[0183] [Step S622] The switching control unit 390 stores in the switching control MQ 220 the processing restart data 87 instructing the processing to be restarted. In this way, the switching control unit 390 starts switching with the specified switching time, and instructs the destination stream processing execution platform to resume processing when the processing up to the switching time is completed. As a result, the source stream processing execution platform and the destination stream processing execution platform work together appropriately, and the processing system is switched without duplication or loss of processing results.
[0184] That is, according to the second embodiment, in the stream processing execution platform of the conversion destination, whether each IoT data is buffered in the buffer unit immediately before the processing unit is controlled depending on whether the timestamp of the IoT data is before or after the switching time. For example, the processing control unit of the stream processing execution platform of the conversion destination stops issuing a watermark after the switching time until it receives an instruction to resume processing, thereby preventing each processing unit from performing processing after that time. That is, each processing unit is set to process IoT data having a timestamp within a predetermined period until the time indicated in the watermark, and when the issuance of the watermark after the switching time is stopped, processing of IoT data after the switching time in each processing unit is stopped. The processing unit buffers IoT data that cannot be processed because the watermark has not arrived, using the buffer unit.
[0185] Furthermore, the processing progress detection unit of the switching source monitors the progress of the Watermark at the most downstream side of the processing unit, and can thereby detect that processing up to the switching time has been completed in all processing units of the switching source. When the processing progress detection unit of the switching source detects the completion of processing up to the switching time, the processing completion is notified to the switching destination stream processing execution platform via the switching control unit 390. In response to this notification, the processing control unit of the switching destination stream processing execution platform resumes issuing watermarks after the switching time, thereby resuming the processing of the switching destination.
[0186] In this way, the Watermark, which flows comprehensively from the processing control unit to the destination of the switch through all routes of all processing units, confirms that there is no data being processed along the route with a timestamp prior to the switch time.
[0187] Note that not all processing units output data of the processing result to the processing progress detection unit, and it is possible that a series of flows may end at a processing unit. For this reason, simply checking the output data at the processing progress detection unit is insufficient, and management using a watermark becomes useful.
[0188] The process control unit can also determine the appropriate timing to issue a watermark by statistically processing the timestamps of messages that flow through it. For example, the process control unit calculates the degree of variation (variance, standard deviation, etc.) of the acquisition time of IoT data with timestamps within a certain period based on past IoT data. Then, from the degree of variation, the process control unit calculates the waiting time until a proportion of IoT data that can be processed with a certain level of accuracy (e.g., 90% or more) arrives. The process control unit outputs a watermark with a time obtained by subtracting the calculated waiting time from the time indicated in the timestamp, for example.
[0189] Through the above process, it is guaranteed that the source stream processing execution platform outputs the processing results of IoT data before the switching time, and does not output the processing results of IoT data after the switching time. It is also guaranteed that the destination stream processing execution platform does not output the processing results of IoT data before the switching time, and outputs the processing results of IoT data after the switching time. As a result, there are no missing or duplicated data in the output data, and the consistency of the processing results is maintained.
[0190] The downtime of stream data processing due to switching is the period from when a notification is output at the source system until when processing starts at the destination system, and is therefore minimized. 5 and 6, when there are multiple source stream processing execution platforms, the switching control unit 390 outputs processing restart data after confirming the processing completion notifications from all the source stream processing execution platforms. This allows multiple-to-multiple processing system switching to be performed appropriately while maintaining the consistency of the processing results.
[0191] In addition, since the destination stream processing execution platform stores the IoT data after the switching time in a buffer without processing it until an instruction to resume processing is received, it is guaranteed that the output order of the processing results will be in timestamp order when the processing system is switched. This makes it possible to prevent adverse effects on downstream processing caused by switching of the processing system, even when downstream processing is performed on the assumption that the output data is in chronological order, such as in the information providing server 800.
[0192] For example, if the output data times are not in order, the information providing server 800 providing downstream services may discard output data with an earlier timestamp than the acquired output data, resulting in a loss of output data at a certain time. As shown in the second embodiment, after confirming that the data processing before the switching time has been completed in the source stream processing execution platform, the destination stream processing execution platform resumes processing after the switching time, thereby making it possible to output the processing results without disrupting the chronological order.
[0193] In the second embodiment, the progress of the process is managed using a watermark. The process control unit 312 that outputs the watermark is at the head of the data flow of the processing system. Therefore, the progress of the event at the source of the IoT data can be statistically and accurately grasped by using the timestamp included in the IoT data periodically transmitted from the device. The process progress detection unit 316 at the most downstream of the stream processing monitors the watermark that flows comprehensively inside the process execution unit 319, so that it can be confirmed that the data before the switching time has flowed through all the processing units even when the data is being executed in a distributed manner. In other words, it is possible to accurately determine that the processing of the IoT data before the switching time has been completed.
[0194] Third embodiment Next, a third embodiment will be described. In the third embodiment, a safety margin until the switching time is introduced. The following describes the differences between the second embodiment and the third embodiment.
[0195] When switching processing systems using the procedure shown in the second embodiment, it is desirable that the switching time specification (processing shown in FIG. 8) is completed before the processing in each processing unit in the stream data progresses to the switching time. In other words, if the current time reaches the switching time before the processing control unit at the time of switching time specification notifies the buffer unit in the processing unit, the processing progress detection unit, and the output destination switching unit in the data output unit of the switching time, there is a possibility that the switching of the data output destination according to the timestamp will not be performed normally. If the switching is not performed normally, there is a possibility that unnecessary downtime will occur.
[0196] To prevent the above inconveniences from occurring, each stream processing execution platform checks in the processing control unit whether there is a sufficient margin (grace time) until the switch time is specified. If the margin is insufficient, the processing control unit fails the switch time specification and cancels the output destination switching process itself.
[0197] Fig. 32 is a diagram showing an example of a process for checking a safety margin for a switching time designation. For example, the switching control unit 390 transmits a control message 41 designating a switching time. In the example of Fig. 32, the designated switching time is "12:00".
[0198] The process control units 312, 512 of the respective stream processing execution platforms 310, 510 acquire a control message 41 specifying a switching time via the switching control MQ 220. The process control unit 312 judges whether or not the margin from the current time to the switching time (the value obtained by subtracting the current time from the switching time) is equal to or greater than a predetermined value. If the process control unit 312 judges that the margin is equal to or greater than the predetermined value, it transmits a switching time specification instruction to the output destination switching unit 317a (see FIG. 7) in the data output unit 317, the buffer units 313a, 314a, 315a, and the process progress detection unit 316.
[0199] If the margin is less than a predetermined value, the process control unit 312 outputs a control message 91 notifying the failure of time designation to the notification MQ 740. Similarly, if the margin is less than a predetermined value, the process control unit 512 outputs a control message 92 notifying the failure of time designation to the notification MQ 740.
[0200] The control message 92 of the time designation failure notification is sent to the switching control unit 390 via the notification MQ 740. By receiving the time designation failure notification, the switching control unit 390 recognizes that the switching of the processing system has failed, and notifies, for example, the user who instructed the switching of the failure of the switching.
[0201] As shown in Figure 32, if there is a possibility that the switch time specification may fail, there is also a possibility that the switch time specification may fail on only one of the switch destination or switch source. If only one of them fails, and processing continues up to the switch time, inconsistencies may occur in the processing results of the stream data.
[0202] Therefore, if the switching time specification for either the switching source or the switching destination fails, the switching control unit 390 cancels the entire destination switching process to prevent inconsistencies from occurring in the stream data processing results.
[0203] Fig. 33 is a diagram showing an example in which the switching time specification has failed in some stream processing execution platforms. In the example of Fig. 33, the switching time specification has failed in the stream processing execution platform 310, but has been successful in the stream processing execution platform 510. In this case, a control message 91 indicating a processing failure notification is output only from the processing control unit 312 of the stream processing execution platform 310.
[0204] The switching control unit 390, which has received the control message 91 notifying the processing failure, instructs, for example, all the stream processing execution platforms 310 and 510 to cancel the switching of the processing systems. 34 is a diagram showing an example of a switch cancel instruction when the switch time designation has failed. The switch control unit 390, which has received a switch time designation failure notification, outputs a control message 93 indicating a switch cancel instruction to the MQ 220 for switch control.
[0205] When the processing control unit 512 of the stream processing execution platform 510, which has successfully specified the switching time, receives a switching cancellation instruction, it transmits the switching cancellation instruction to the output destination switching unit in the data output unit 517, the buffer units in the processing units 513 to 515, and the processing progress detection unit 516. The output destination switching unit, buffer unit, and processing progress detection unit 516 that received the switching cancellation instruction delete information such as the switching time from their internal states because the switching time specification was successful. The data output unit 517 confirms that deletion of information such as the switching time has been completed, and stores a control message 95 notifying cancellation completion in the notification MQ 740.
[0206] The stream processing execution platform 310 that has failed to specify the switching time does not have information such as the switching time. Therefore, when the process control unit 312 of the stream processing execution platform 310 receives a switching cancellation instruction, it stores a control message 94 notifying the completion of cancellation in the notification MQ 740.
[0207] The switching control unit 390 acquires the control messages 94 and 95 of the cancellation completion notification via the notification MQ 740. Then, the switching control unit 390 recognizes from the control messages 94 and 95 that the switching of the processing system has been correctly canceled.
[0208] The processing in the third embodiment that differs from the second embodiment will be described in detail below. First, the process of the process control unit 312 in the third embodiment will be described in detail. The process control unit 312 in the third embodiment differs from the second embodiment in the process of the switching related data reception sub-process shown in Fig. 20 among the processes of the process control unit 312 shown in Fig. 17 to Fig. 20.
[0209] 35 is a flowchart showing an example of a sub-process for receiving switching-related data in a process control unit capable of canceling switching, the first half of which is a flowchart showing an example of a process for receiving switching-related data in a process control unit capable of canceling switching. The process shown in FIG.
[0210] [Step S241] The process control unit 312 receives switching-related data from the switching control MQ 220. The switching-related data is the switching time designation data 57 or the switching cancellation data 96. The switching cancellation data 96 includes a switching time and a switching cancellation instruction.
[0211] [Step S242] The process control unit 312 determines whether the received switching-related data is switching time designation data 57. If the switching-related data is switching time designation data 57, the process control unit 312 proceeds to step S243. If the switching-related data is switching cancellation data 96, the process control unit 312 proceeds to step S244.
[0212] [Step S243] The process control unit 312 judges whether there is a sufficient margin until the switching time. For example, the process control unit 312 judges that there is a sufficient margin if the value obtained by subtracting the current time from the switching time is equal to or greater than a predetermined value. If there is a sufficient margin, the process control unit 312 advances the process to step S251 (see FIG. 36). If there is an insufficient margin, the process control unit 312 advances the process to step S245.
[0213] <Step S244> The process control unit 312 transmits a switching cancellation instruction to the output destination switching unit 317a, the buffer units 313a, 314a, and 315a, and the process progress detection unit 316. Thereafter, the process control unit 312 ends the switching-related data reception sub-process.
[0214] [Step S245] The process control unit 312 stores the switch time designation failure data 97 in the notification MQ 740. The switch time designation failure data 97 includes, for example, the switch time and information indicating that the switch time designation has failed. Thereafter, the process control unit 312 ends the switch-related data reception sub-process.
[0215] 36 is a flowchart showing an example of a sub-process when switching related data is received in a process control unit capable of canceling switching, the latter half of which is a flowchart showing an example of a processing procedure of the sub-process when switching related data is received in a process control unit capable of canceling switching. The processing of steps S251 to S256 shown in FIG. 36 is similar to steps S232 to S237 in the second embodiment shown in FIG.
[0216] Next, the process of the data output unit 317 in the third embodiment will be described in detail. 37 is a flowchart showing an example of a procedure for stream data processing in a data output unit capable of canceling switching. The process shown in FIG. 37 will be described below in order of step numbers.
[0217] [Step S331] Every time external output data or switching time designation data is received, the data output unit 317 calls a sub-process by executing steps S332 to S336.
[0218] [Step S332] The data output unit 317 determines whether the received data is data for external output. If the received data is data for external output, the data output unit 317 proceeds to step S333. If the received data is not data for external output, the data output unit 317 proceeds to step S334.
[0219] [Step S333] The data output unit 317 executes an external output sub-process. Details of the external output sub-process are as shown in Fig. 22. After that, the data output unit 317 proceeds to step S337.
[0220] [Step S334] The data output unit 317 determines whether the received data is switch time designation data. If the received data is switch time designation data, the data output unit 317 proceeds to step S335. If the received data is switch cancel data, the data output unit 317 proceeds to step S336.
[0221] [Step S335] The data output unit 317 executes a switching time designation sub-process. The details of the switching time designation sub-process are as shown in Fig. 23. After that, the data output unit 317 advances the process to step S337.
[0222] <Step S336> The data output unit 317 executes a switching cancellation sub-process, which will be described in detail later (see FIG. 38). [Step S337] The data output unit 317 repeats the process of steps S332 to S336 every time it receives data for external output or switching time designation data until the stream data processing is completed.
[0223] 38 is a flowchart showing an example of a processing procedure of a switching cancellation sub-process in the data output unit 200. The processing shown in FIG. 38 will be described below in the order of step numbers. <Step S341> The output destination switching section 317a in the data output section 317 receives the switching cancellation data 96.
[0224] [Step S342] The output destination switching unit 317a deletes the internal state switching information 73 (see FIG. 23). In this manner, the instruction to switch the processing system in the data output unit 317 is cancelled.
[0225] Next, the process of the buffer unit 313a in the third embodiment will be described in detail. The buffer unit 313a in the third embodiment differs from the second embodiment in the process of the data buffer switching related data reception sub-process shown in Fig. 26 among the processes of the buffer unit 313a shown in Fig. 24 to Fig. 26.
[0226] 39 is a flowchart showing an example of a processing procedure of a data buffer switching related data receiving sub-process in a buffer section where switching can be cancelled. The processing shown in FIG. 39 will be described below in order of step numbers.
[0227] [Step S431] The buffer unit 313a acquires switching-related data (switching time designation data 57, processing restart data 59, or switching cancellation data 96) from the upstream process control unit 312.
[0228] [Step S432] The buffer unit 313a reads the switching information 75 from the internal state. [Step S433] The buffer unit 313a determines whether the acquired switching related data is switching time designation data 57. If the switching related data is switching time designation data 57, the buffer unit 313a proceeds to step S434. If the switching related data is not switching time designation data 57, the buffer unit 313a proceeds to step S435.
[0229] [Step S434] The buffer unit 313a updates the switching information and saves it in the internal state. In the updated switching information 76, the information indicating whether switching is in progress is set to information indicating that switching is in progress (switching is in progress: True). Thereafter, the buffer unit 313a ends the data buffer switching related data reception sub-process.
[0230] [Step S435] The buffer unit 313a determines whether the acquired switching-related data is processing restart data 59. If the acquired switching-related data is processing restart data 59, the buffer unit 313a proceeds to step S436. If the acquired switching-related data is switching cancel data 96, the buffer unit 313a proceeds to step S437.
[0231] [Step S436] The buffer unit 313a updates the switching information and saves it in the internal state. In the updated switching information 77, the information indicating whether switching is in progress is set to information indicating that switching is not in progress (switching is in progress: False). After that, the buffer unit 313a proceeds to step S438.
[0232] <Step S437> The buffer unit 313a deletes the internal state switching information. <Step S438> The buffer unit 313a reads out all the received data from the data buffer in the internal state.
[0233] <Step S439> The buffer unit 313a transmits the received data read from the data buffer to the processing unit 313. In this manner, the instruction to switch the processing system is cancelled in the buffer unit 313a.
[0234] Next, a detailed description will be given of the processing of the processing progress detection unit 316 in the third embodiment. The processing progress detection unit 316 in the third embodiment differs from that in the second embodiment in the processing of the processing progress detection sub-process shown in Fig. 28 among the processing of the processing progress detection unit 316 shown in Fig. 27 to Fig. 28.
[0235] 40 is a flowchart showing an example of a processing procedure of a processing progress detection sub-process in a processing progress detection unit capable of canceling switching. The processing shown in FIG. 40 will be described below in order of step numbers.
[0236] [Step S521] The processing progress detection unit 316 reads out the acquired data (the Watermark 56, the switching time designation data 57, or the switching cancellation data 96). [Step S522] The processing progress detection unit 316 determines whether the type of data is Watermark 56. If the type of data is Watermark 56, the processing progress detection unit 316 proceeds to step S523. If the type of data is not Watermark 56, the processing progress detection unit 316 proceeds to step S527.
[0237] <Step S523> The process progress detection unit 316 reads the switching information 82 (see FIG. 28) from the internal state. [Step S524] The processing progress detection unit 316 determines whether the following conditions are met: switching is in progress, the current processing platform is the source of switching, and Watermark 56 is after the switching time. If the conditions are met, the processing progress detection unit 316 proceeds to step S525. If the conditions are not met, the processing progress detection unit 316 ends the processing progress detection sub-process.
[0238] <Step S525> The processing progress detection unit 316 outputs a processing completion message to the notification MQ 740. <Step S526> The process progress detection unit 316 updates the switching information and stores it in the internal state. After the update, the switching information 83 is set to information indicating that switching is not in progress.
[0239] [Step S527] The processing progress detection unit 316 determines whether the type of data is switch time designation data 57. If the type of data is switch time designation data 57, the processing proceeds to step S528. If the type of data is switch cancel data 96, the processing proceeds to step S529.
[0240] [Step S528] The processing progress detection unit 316 updates the switching information based on the switching time designation data 57, and saves it in the internal state. The updated switching information 81 (see FIG. 28) contains information indicating that switching is in progress, information indicating whether this processing platform is the switching source or switching destination, and the switching time. The processing progress detection unit 316 then ends the processing progress detection sub-process.
[0241] <Step S529> The processing progress detection unit 316 deletes the internal state switching information. In this manner, the processing progress detection unit 316 cancels the instruction to switch the processing system.
[0242] Next, the process of the switching control unit 390 in the third embodiment will be described in detail. 41 is a flowchart showing an example of a procedure for an output destination switching process in a switching control unit that is capable of canceling switching. The process shown in FIG. 41 will be described below in order of step numbers.
[0243] [Step S631] The switching control unit 390 executes a switching start sub-process, the details of which are shown in FIG. [Step S632] The switching control unit 390 determines whether or not a switch time designation failure notification has been received from the switch source or switch destination. For example, when a control message indicating a switch time designation failure is stored in the notification MQ 740, the switching control unit 390 obtains a switch time designation failure notification from the notification MQ 740. When the switching control unit 390 obtains a switch time designation failure notification, the processing proceeds to step S633. When the switching control unit 390 has not obtained a switch time designation failure notification, the processing proceeds to step S634.
[0244] [Step S633] The switching control unit 390 executes a switching cancellation sub-process. The details of this sub-process will be described later (see FIG. 42). After executing the switching cancellation sub-process, the switching control unit 390 ends the output destination switching process.
[0245] [Step S634] The switching control unit 390 determines whether or not a processing completion notice has been received from the switching source. If the switching control unit 390 receives the processing completion notice, the process proceeds to step S635. If the switching control unit 390 does not receive the processing completion notice, the process proceeds to step S632, and the switching control unit 390 waits for the arrival of a switching time designation failure notice or a processing completion notice.
[0246] <Step S635> The switching control unit 390 executes a process restart notification sub-process, the details of which are shown in FIG. 42 is a flowchart showing an example of a procedure for the switch cancel sub-process. The process shown in FIG. 42 will be described below in order of step number.
[0247] [Step S641] The switching control unit 390 acquires the switching time specification failure notification 98 from the notification MQ 740. The switching time specification failure notification 98 includes the switching time and information indicating whether the processing system that failed to specify the switching time is the switching destination or the switching source.
[0248] [Step S642] The switching control unit 390 stores a switching cancellation instruction 99 in the switching control MQ 220. The switching cancellation instruction 99 includes the switching time and information indicating whether the processing system to be switched to is the switching destination or the switching source.
[0249] In this way, if the switching time specification fails, the entire switching of the processing systems is cancelled, thereby making it possible to prevent inconsistencies in processing between the processing systems. [Fourth embodiment] Next, a fourth embodiment will be described. In the fourth embodiment, the processing system is switched in consideration of the occurrence of a failure.
[0250] If a fault occurs in stream data processing, the fault can be recovered by re-reading and re-processing messages that were already processed before the fault occurred from the data MQ 210. However, as shown in the third embodiment, when specifying a switching time including margin judgment, the result of margin judgment may change before and after fault recovery.
[0251] For example, even if the switch time specification was successful before the failure, it may fail after the failure, and the switch may be canceled. In particular, if a failure occurs after the procedure has progressed to the point where processing is resumed at the switch destination, and the switch time is specified again and the margin judgment fails, an inconsistency will occur in the output message. In other words, if a failure occurs at the switch destination while the switch source is outputting to the MQ for debugging as if switching has been performed, and the margin judgment after recovery fails, the processing system at the switch destination will also output the processing result to the MQ for debugging. In this case, a state will occur in which neither processing system is outputting to the MQ 710 for operation.
[0252] In order to prevent the above inconsistency, in the fourth embodiment, the processing state of the stream processing execution platform of the switching destination is saved as a snapshot when the switching time specification is completed. After confirming that the snapshot has been saved in the switching destination, the switching control unit 390 proceeds to the next step of the switching of the processing system. The snapshot is also called a checkpoint.
[0253] FIG. 43 is a diagram (1 / 3) showing an example of switching time designation processing that takes into consideration the occurrence of a failure. The switching control unit 390 transmits a control message 41a designating a switching time to the destination stream processing execution platform 510 only. The processing control unit 512 of the switching destination stream processing execution platform 510 receives the control message 41a via the switching control MQ 220. If the margin is equal to or greater than a predetermined value, the switching control unit 512 transmits a switching time designation instruction to the output destination switching unit in the data output unit 517, the buffer units of the processing units 513 to 515, and the processing progress detection unit 516. The output destination switching unit, the buffer unit, and the processing progress detection unit 516 store the switching information in their internal states, and then save a snapshot 900 of the internal states in a storage device.
[0254] After confirming that the snapshot 900 has been saved, the data output unit 517 stores a control message 901 notifying completion of switch time designation in the notification MQ 740 . FIG. 44 is a diagram (2 / 3) showing an example of switching time designation processing that takes into consideration the occurrence of a failure. The switching control unit 390 acquires a switching time designation completion notification via the notification MQ 740. When the switching control unit 390 acquires the switching time designation completion notification from the switching destination, it transmits a control message 41b designating the switching time to the switching source stream processing execution platform 310 only as a destination. The processing control unit 312 of the switching source stream processing execution platform 310 receives the control message 41b via the switching control MQ 220. If the margin is equal to or greater than a predetermined value, the processing control unit 312 transmits a switching time designation instruction to the output destination switching unit in the data output unit 317, the buffer units of the processing units 313 to 315, and the processing progress detection unit 316.
[0255] Fig. 45 is a diagram (3 / 3) showing an example of switching time designation processing that takes into consideration the occurrence of a failure. The output destination switching unit, the buffer unit, and the processing progress detection unit 316 store the switching information in the internal state, and then save a snapshot 905 of the internal state in the storage device. After confirming that the snapshot 905 has been saved, the data output unit 317 stores a control message 906 notifying completion of switching time designation in the notification MQ 740. Subsequent processing is the same as in the third embodiment.
[0256] In this way, the state of the destination stream processing execution platform after the switching time is specified can be saved as a snapshot 900. By saving the state as the snapshot 900, even if a failure occurs later, it is possible to restore the state to the state at the time the snapshot 900 was acquired.
[0257] Fig. 46 is a diagram showing an example of failure recovery processing using a snapshot. The stream processing execution platform 510 performs stream data processing in a stateful manner. In stateful stream data processing, failure recovery is performed as shown in Fig. 46.
[0258] Messages including IoT data are stored in the data MQ 210 in the order in which they were received. When it is time to create a snapshot 900 in the stream processing execution platform 510, the snapshot 900 is stored in a storage device in association with the read position of the data MQ 210 at that time. By creating the snapshot 900 after performing a switching designation process, switching information 911 including the switching time and information indicating that the watermark is to be stopped is stored as part of the internal state 910.
[0259] Thereafter, when a failure such as the stop of the stream processing execution server 500 occurs, after removing the cause of the failure, the stream processing execution server 500 restores the internal state 910 from the latest snapshot 900 in the stream processing execution platform 510. Then, the stream processing execution platform 510 reads the IoT data from the read position in the data MQ 210 and executes the processing.
[0260] After recovery, the stream processing execution platform 510 is returned to the state after the switching information specification is completed. That is, the switching destination stream processing execution platform is prevented from returning to a state in which the switching time is not specified due to the occurrence of a failure. As a result, even if a failure occurs after the switching time is set, the IoT data having a timestamp after the switching time is correctly buffered by the buffer unit in the stream processing execution platform 510. In other words, the processing result of the IoT data having a timestamp after the switching time is prevented from being output in the switching destination processing system before the processing up to the switching time is completed in the switching source processing system. Then, when the stream processing execution platform 510 receives a processing resumption notification, it processes all the IoT data having a timestamp after the switching time without omission, and outputs the processing result to the operational MQ 710. As a result, the occurrence of missing processing results is prevented.
[0261] Next, the procedure for switching the processing system will be described in chronological order with reference to FIGS. 47 is the first half of a sequence diagram showing a switching process procedure for a processing system in consideration of the occurrence of a failure. The switching control unit 390, which has received a switching start instruction, determines the switching time (step S41). Next, the switching control unit 390 notifies the switching time to the processing control unit 512 of the switching destination (step S42).
[0262] The process control unit 512 of the switching destination notifies at least the buffer unit of the most upstream processing unit 513 in the process execution unit 519 and the output destination switching unit in the data output unit 517 of the start of switching and the switching time (step S43).
[0263] The process execution unit 519 of the switching destination executes the process for the stream data before the switching time (step S44). The data output unit 517 outputs the process result of the stream data before the switching time to the debugging MQ 730 of the switching destination (step S45). The buffer unit of the most upstream processing unit 513 holds each IoT data of the stream data after the switching time in a buffer (step S46).
[0264] The data output unit 517 persists the current processing state by saving a snapshot of the internal state (step S47). The buffer units of each processing unit in the process execution unit 519 also persist the current processing state by saving a snapshot of the internal state (step S48). The data output unit 517 notifies the switching control unit 390 that the time designation has been completed (step S49). The buffer units of each processing unit in the process execution unit 519 also notify the switching control unit 390 that the time designation has been completed (step S50).
[0265] 48 is the latter half of a sequence diagram showing a switching process procedure taking into consideration the occurrence of a failure. The switching control unit 390, which has acquired a time specification completion notification from the switching destination, notifies the switching time to the processing control unit 312 of the switching source (step S62).
[0266] The process control unit 312 of the switching source notifies the buffer units of each processing unit in the process execution unit 519, the process progress detection unit 316, and the output destination switching unit 317a (see FIG. 7) in the data output unit 317 of the start of switching and the switching time (step S63). The process execution unit 319 of the switching source executes processing on the stream data (step S64).
[0267] The data output unit 317 persists the current processing state by saving a snapshot of the internal state (step S65). The buffer units of each processing unit in the process execution unit 319 also persist the current processing state by saving a snapshot of the internal state (step S66). The data output unit 317 notifies the switching control unit 390 that the time designation has been completed (step S67). The buffer units of each processing unit in the process execution unit 519 also notify the switching control unit 390 that the time designation has been completed (step S68).
[0268] The data output unit 317 outputs the processing result of the stream data before the switching time to the operation MQ 710 (step S69). The data output unit 317 also outputs the processing result of the stream data after the switching time to the pre-switching debug MQ 720 (step S70). The processing from this point onwards is the same as that of the second embodiment shown in FIG.
[0269] Next, the process of the switching control unit 390 taking into consideration the occurrence of a failure will be described in detail. 49 is a flowchart showing an example of a procedure for an output destination switching process in a switching control unit in consideration of the occurrence of a failure. The process shown in FIG. 49 will be described below in order of step numbers.
[0270] [Step S651] The switching control unit 390 executes a switching destination switching start sub-process, which will be described in detail later (see FIG. 50). [Step S652] The switching control unit 390 determines whether or not a switch time designation failure notice has been received from the switch destination. If the switch control unit 390 receives a switch time designation failure notice, the process proceeds to step S653. If the switch control unit 390 does not receive a switch time designation failure notice, the process proceeds to step S654.
[0271] [Step S653] The switching control unit 390 executes a switching cancellation sub-process. The details of this sub-process are as shown in Fig. 42. After executing the switching cancellation sub-process, the switching control unit 390 ends the output destination switching process.
[0272] [Step S654] The switching control unit 390 determines whether or not a switch time designation completion notification has been received from the switching destination. If the switching control unit 390 has received a switch time designation completion notification, the process proceeds to step S655. If the switching control unit 390 has not received a switch time designation completion notification, the process proceeds to step S652, and the switching control unit 390 waits for a switch time designation failure notification or a switch time designation completion notification.
[0273] [Step S655] The switching control unit 390 executes a source switching start sub-process, which will be described later in detail with reference to FIG. [Step S656] The switching control unit 390 determines whether or not a switch time designation failure notice has been received from the switch source. If the switch control unit 390 has received a switch time designation failure notice, the process proceeds to step S653. If the switch control unit 390 has not received a switch time designation failure notice, the process proceeds to step S657.
[0274] [Step S657] The switching control unit 390 determines whether or not a processing completion notice has been received from the switching source. If the switching control unit 390 receives the processing completion notice, the process proceeds to step S658. If the switching control unit 390 does not receive the processing completion notice, the process proceeds to step S656, and the switching control unit 390 waits for the arrival of a switching time designation failure notice or a processing completion notice.
[0275] <Step S658> The switching control unit 390 executes a process restart notification sub-process, the details of which are shown in FIG. Next, the processing of the destination switching initiation sub-process (step S651) and the source switching initiation sub-process (step S655) will be described.
[0276] 50 is a flowchart showing an example of a processing procedure of a sub-process for starting switching of a switching destination in a switching control unit in consideration of the occurrence of a failure. The processing shown in FIG. 50 will be described below in the order of step numbers.
[0277] [Step S661] The switching control unit 390 determines the switching time. [Step S662] The switching control unit 390 stores the switching time in its internal state. [Step S663] The switching control unit 390 stores switching start data 902 targeting the switching destination processing system in the switching control MQ 220. The switching start data 902 includes the switching time and information specifying the switching destination stream processing execution platform as the target system.
[0278] 51 is a flowchart showing an example of a processing procedure of a switch source switching initiation sub-process in a switching control unit in consideration of the occurrence of a failure. The processing shown in FIG. 51 will be described below in the order of step numbers.
[0279] [Step S671] The switching control unit 390 reads out the switching time of the internal state. [Step S672] The switching control unit 390 stores switching start data 903 targeting the source processing system in the switching control MQ 220. The switching start data 903 includes the switching time and information specifying the source stream processing execution platform as the target system.
[0280] In this way, by saving a snapshot in the destination stream processing execution platform immediately after the switchover time is specified, the consistency of the stream data processing results can be maintained even if a failure occurs thereafter.
[0281] [Other embodiments] The destination stream processing execution platform buffers the IoT data before processing is performed, but for example, it may buffer the processing results of the IoT data after the switching time, and output the buffered processing results to the operational MQ710 after a processing restart instruction is issued.
[0282] Although the embodiments have been described above, the configurations of the parts shown in the embodiments can be replaced with other configurations having similar functions. Any other components or steps may be added. Furthermore, any two or more configurations (features) of the above-described embodiments may be combined. [Explanation of symbols]
[0283] 1a,1b,... IoT devices 2. Stream Data 2a, 2b, 2c, 2d, 2e, 2f,... Data 3. First Processing System 3a, 4a Processing control section 3b, 4b Processing execution unit 3c Processing progress detection unit 3d,4d data output section 4. Second Processing System 4c Buffer section 5 Control Data 10 Data Processing System 11 Storage section 12 Processing section
Claims
1. On the computer, Each time data including time information is received, the received data is input to a first processing system as a switching source and a second processing system as a switching destination, In the first processing system, the time information of the data is compared with a switching time set as a time for switching the processing system, and if the time indicated by the time information is earlier than the switching time, a processing result of the processing using the data is output from the first processing system; the second processing system compares the time information of the data with the switching time, and if the time indicated by the time information is after the switching time, outputs a processing result of the processing using the data from the second processing system. A data processing program that causes processing to be performed.
2. when a determination condition is satisfied in the first processing system that the first data including the time information indicating a time earlier than the switching time will not be received thereafter and processing of each of the received first data is completed, outputting a processing completion notice from the first processing system; in the second processing system, until the processing completion notification is output from the first processing system, output of a processing result of the processing using the second data including the time information indicating a time after the switching time is stopped, and after the processing completion notification is output from the first processing system, output of the processing result of the processing using the second data from the second processing system is started.
2. The data processing program according to claim 1.
3. in the second processing system, the second data received before the processing completion notification is output is stored in a storage unit, and after the processing completion notification is output, the second data is read from the storage unit and a processing using the second data is executed.
3. The data processing program according to claim 2.
4. in the first processing system, when the time information of the received data satisfies a determination condition that the first data will not be received thereafter, control data indicating that the first data will not be received thereafter is transmitted to a processing path of the data, and when the control data is detected on an output side of a processing result of the data, the first processing system outputs the processing completion notification.
4. The data processing program according to claim 2 or 3.
5. In the first processing system, when the time information of the received data is a time that is a predetermined time later than the switching time, the first processing system transmits the control data.
5. The data processing program according to claim 4.
6. The computer further comprises: in each of the first processing system and the second processing system, in response to an input specifying the switching time, a grace period from a current time to the switching time is calculated, and if the grace period is equal to or greater than a predetermined value, the specified switching time is set as a time for switching the processing systems, and if the grace period is less than the predetermined value, the switching time is not set and a setting failure notice is output.
6. The data processing program according to claim 1, which causes a process to be executed.
7. The computer further comprises: When the setting failure notification is output from one of the first processing system and the second processing system, a switching cancellation instruction is sent to the other processing system; when the first processing system and the second processing system receive the switch cancel instruction after setting the switch time, the first processing system and the second processing system delete the set switch time.
7. The data processing program according to claim 6, which causes processing to be executed.
8. The computer further comprises: instructing the second processing system to set the switching time; After the setting of the switching time is completed in the second processing system, a first snapshot including the switching time is stored; after confirming that the first snapshot has been saved in the second processing system, instructing the first processing system to set the switching time; After the setting of the switching time is completed in the first processing system, a second snapshot including the switching time is stored; outputting a message indicating completion of setting of the switching time after confirming that the second snapshot has been saved in the first processing system; 8. The data processing program according to claim 6, which causes a process to be executed.
9. The computer Each time data including time information is received, the received data is input to a first processing system as a switching source and a second processing system as a switching destination, In the first processing system, the time information of the data is compared with a switching time set as a time for switching the processing system, and if the time indicated by the time information is earlier than the switching time, a processing result of the processing using the data is output from the first processing system; the second processing system compares the time information of the data with the switching time, and if the time indicated by the time information is after the switching time, outputs a processing result of the processing using the data from the second processing system. Data processing methods.
10. a processing unit which, each time data including time information is received, inputs the received data into a first processing system which is a source of switching and a second processing system which is a destination of switching, compares in the first processing system the time information of the data with a switching time which is set as the time at which the processing systems are switched, and outputs a processing result of the processing using the data from the first processing system if the time indicated in the time information is before the switching time, and compares in the second processing system the time information of the data with the switching time, and outputs a processing result of the processing using the data from the second processing system if the time indicated in the time information is after the switching time; A data processing system having:
Citation Information
Patent Citations
Routing control method, router unit, and terminal device
JP2004336726A
Stream transfer apparatus, stream transfer method, stream transfer program, and display time correcting apparatus
JP2004350237A
Terminal apparatus for seamlessly switching streaming sessions between terminals, terminal switching method, computer readable storage medium, and terminal switching system
JP2007228573A
Receiving apparatus and receiving method
JP2009239775A
Information processing system and data processing method
JP2019097037A
