Data processing device and update system
The data processing device and system synchronize and switch between first and second processed data using sequence numbers, enabling uninterrupted updates in data processing systems.
Patent Information
- Application Number
- JP2021020615
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-12
- Publication Date
- 2024-08-14
- Estimated Expiration
- 2041-02-12
AI Technical Summary
Existing data processing systems, such as monitoring systems for production lines, require uninterrupted updates to continue data processing without interruption, as stopping data processing can disrupt monitoring. However, existing technologies like Patent Document 1 do not address uninterrupted switching for data processing in packet transmission systems.
A data processing device and system that includes an operating first data processing unit, a second data processing unit for updating, a receiving unit, a transfer unit, and a switching unit, which assigns sequence numbers to data and synchronizes the output of first and second processed data before switching to the second data processing unit, allowing seamless transition without interruption.
Enables uninterrupted updating of data processing systems by synchronizing and switching between first and second processed data based on sequence numbers, ensuring continuous operation during updates.
Smart Images

Figure 0007533264000011 
Figure 0007533264000005 
Figure 0007533264000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a data processing device and an update system. [Background technology]
[0002] Patent Document 1 discloses a hitless switching technique for a redundant system in a packet transmission system having at least two routes, a working route and a backup route, between a transmission device on the sending side and a transmission device on the receiving side. In the packet transmission system disclosed in Patent Document 1, the transmission device on the sending side has a sequential number assignment unit and a copy branch unit that copies a packet and branches it into a working route and a backup route. The transmission device on the receiving side has a delay measurement unit that measures the amount of delay with packets of the same number on the working route and the backup route, a delay insertion unit that inserts a delay into the route on the early arrival side, and a frame selection unit that switches to either the working route or the backup route. When a switching command is received from the outside, the copy branch unit outputs packets to both the working route and the backup route, the delay insertion unit inserts a delay equivalent to the amount of delay measured by the delay measurement unit into the early arrival side, and the frame selection unit switches from the working route to the backup route. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2013-005210 A Summary of the Invention [Problem to be solved by the invention]
[0004] For example, there are systems that continuously observe an object, such as a monitoring system for a manufacturing line in a factory. In such an observation system, it may be necessary to process data output from devices such as cameras and sensors. When updating a data processing device that executes such data processing, if the data processing stops due to the update, it is not possible to continue monitoring the object, so it is necessary to execute the update without interruption. However, the uninterrupted switching technology disclosed in Patent Document 1 does not take into consideration the processing of data transmitted in packets, and cannot be used in a system involving data processing. [Means for solving the problem]
[0005] A data processing device according to one embodiment of the present disclosure includes a first data processing unit in operation that processes pre-processed data related to information output from an apparatus that acquires information about a target and generates first processed data; a second data processing unit for updating that processes the pre-processed data and generates second processed data; a receiving unit that sequentially receives a plurality of the pre-processed data from the apparatus; a transfer unit that assigns a sequence number to each of the plurality of pre-processed data received by the receiving unit and transfers the plurality of pre-processed data assigned the sequence numbers to the first data processing unit and the second data processing unit, respectively; and a switching unit that accepts the first processed data and the second processed data from the first data processing unit and the second data processing unit, respectively, and is capable of switching an output target between the first processed data and the second processed data, wherein the switching unit synchronizes and selects each of the first processed data and the second processed data based on the sequence numbers assigned to the first processed data and the second processed data, and switches the output target from the first processed data to the second processed data after synchronization is completed.
[0006] An update system according to one aspect of the present disclosure includes a data processing device that processes pre-processed data relating to information output from a device that acquires information about a target, and a server that provides update data for updating the processing of the pre-processed data to the data processing device, wherein the data processing device includes a first data processing unit in operation that processes the pre-processed data to generate first processed data, a second data processing unit for update configured based on the update data that processes the pre-processed data to generate second processed data, a receiving unit that sequentially receives a plurality of the pre-processed data from the device, and assigns a sequence number to each of the plurality of pre-processed data received by the receiving unit, the data processing system includes a transfer unit that transfers the plurality of unprocessed data to which the sequence numbers have been assigned to each of the first data processing unit and the second data processing unit; and a switching unit that receives the first processed data and the second processed data from each of the first data processing unit and the second data processing unit, and is capable of switching an output target between the first processed data and the second processed data, wherein the switching unit synchronizes and selects each of the first processed data and the second processed data based on the sequence numbers assigned to each of the first processed data and the second processed data, and switches the output target from the first processed data to the second processed data after synchronization is completed.
[0007] The present disclosure can be realized not only as a data processing device having the above-mentioned characteristic configuration, but also as a method having steps corresponding to characteristic processes in the data processing device, or as a computer program causing a computer to function as the data processing device. Furthermore, the present disclosure can be realized as a semiconductor integrated circuit as a part or the whole of the data processing device, or as an update system including the data processing device. Effect of the Invention
[0008] According to the present disclosure, the data processing unit can be updated without interruption. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a schematic diagram for explaining an example of an update system according to an embodiment. [Diagram 2] 1 is a block diagram showing an example of a configuration of a data processing device according to an embodiment; [Figure 3A] 4 is a functional block diagram showing an example of functions of the data processing device according to the embodiment before a second data processing program is installed. FIG. [Figure 3B] 10 is a functional block diagram showing an example of functions of the data processing device according to the embodiment after a second data processing program is installed. FIG. [Figure 4] 1 is a sequence diagram showing a procedure of a data processing update operation by an update system according to an embodiment. FIG. [Diagram 5] FIG. 2 is a functional block diagram showing an example of detailed functions of the data processing device according to the embodiment. [Figure 6] 10 is a flowchart showing an example of a processing procedure by a switching unit in the data processing device according to the embodiment. [Figure 7A] 11 is a schematic diagram illustrating an operation of a switching unit when first processed data arrives at the switching unit prior to second processed data. FIG. [Figure 7B] 11 is a schematic diagram illustrating an operation of a switching unit for synchronizing first processed data and second processed data. FIG. [Figure 8A] 13 is a schematic diagram illustrating an operation of a switching unit when second processed data arrives at the switching unit prior to the first processed data. FIG. [Figure 8B] 11 is a schematic diagram illustrating an operation of a switching unit for synchronizing first processed data and second processed data. FIG. [Figure 9A] 13 is a schematic diagram illustrating the operation of a switching unit when synchronization between first processed data and second processed data is completed. FIG. [Figure 9B] 13A and 13B are schematic diagrams illustrating the operation of a switching unit for switching an output target from first processed data to second processed data. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] <Overview of the embodiment of the present disclosure> Below, an overview of the embodiments of the present disclosure will be listed and described.
[0011] (1) A data processing device according to this embodiment includes a first data processing unit in operation that processes pre-processed data related to information output from an apparatus that acquires information about a target and generates first processed data; a second data processing unit for updating that processes the pre-processed data and generates second processed data; a receiving unit that sequentially receives a plurality of the pre-processed data from the apparatus; a transferring unit that assigns a sequence number to each of the plurality of pre-processed data received by the receiving unit and transfers the plurality of pre-processed data assigned the sequence numbers to the first data processing unit and the second data processing unit, respectively; and a switching unit that receives the first processed data and the second processed data from the first data processing unit and the second data processing unit, respectively, and is capable of switching an output target between the first processed data and the second processed data, wherein the switching unit selects each of the first processed data and the second processed data in synchronization with each other based on the sequence numbers assigned to the first processed data and the second processed data, and switches the output target from the first processed data to the second processed data after synchronization is completed. This makes it possible to synchronize the selection of the first processed data and the second processed data based on the sequence number assigned to each pre-processed data, and to switch the output target from the first processed data to the second processed data without interruption. Therefore, the data processing unit can be updated without interruption. Note that, here, when processed data generated by one data processing unit (for example, the first data processing unit) is output from the data processing device, the data processing unit is said to be "operating". Even if the data processing unit is started, when the processed data generated by the data processing device is not output from the data processing device, the data processing unit is "non-operating". In other words, when the output target is switched from the first processed data to the second processed data, the first data processing unit switches from an operating state to a non-operating state, and the second data processing unit switches from a non-operating state to an operating state.
[0012] (2) The switching unit may adjust the timing of selecting the first processed data and the second processed data, and determine that synchronization is completed when the switching unit selects the first processed data and the second processed data having the same sequence number. This makes it possible to synchronize the selection timing of the first processed data and the second processed data based on the sequence number.
[0013] (3) The switching unit may include a first buffer that stores the first processed data and a second buffer that stores the second processed data, and may adjust the timing by comparing the sequence number assigned to the first processed data read from the first buffer with the sequence number assigned to the second processed data read from the second buffer, stopping reading of data from the first buffer or the second buffer, whichever has the larger sequence number, and continuing reading of data from the buffer, which has the smaller sequence number. In this way, the selection timing of the first processed data and the second processed data can be adjusted by using the first buffer and the second buffer.
[0014] (4) The first data processing unit may be realized by a processor executing a first data processing program for processing the pre-processed data, and the second data processing unit may be realized by a processor executing a second data processing program for processing the pre-processed data. By updating the data processing program, data processing can be easily updated.
[0015] (5) The first data processing unit may include a first sequence number buffer that stores the sequence number, the first data processing unit may separate the received pre-processing data from the sequence number assigned to the pre-processing data, store the sequence number in the first sequence number buffer, process the pre-processing data, and then read the sequence number from the first sequence number buffer and combine the pre-processing data and the sequence number, and the second data processing unit may include a second sequence number buffer that stores the sequence number, the second data processing unit may separate the received pre-processing data from the sequence number assigned to the pre-processing data, store the sequence number in the second sequence number buffer, process the pre-processing data, and then read the sequence number from the second sequence number buffer and combine the pre-processing data and the sequence number. By separating the sequence number from the pre-processing data, processing of the pre-processing data is simplified, and the degree of freedom in designing the data processing unit is improved.
[0016] (6) The transfer unit may transfer the pre-processed data to each of the first data processing unit and the second data processing unit by broadcasting the pre-processed data. This eliminates the need to copy the pre-processed data in order to deliver the pre-processed data to the first data processing unit and the second data processing unit, thereby reducing transfer overhead.
[0017] (7) An update system according to this embodiment includes a data processing device that processes pre-processed data related to information output from a device that acquires information about a target, and a server that provides update data for updating the processing of the pre-processed data to the data processing device. The data processing device includes a first data processing unit that processes the pre-processed data to generate first processed data, a second data processing unit for update configured based on the update data that processes the pre-processed data to generate second processed data, a receiving unit that sequentially receives a plurality of the pre-processed data from the device, and a server that assigns a sequence number to each of the plurality of pre-processed data received by the receiving unit and updates the pre-processed data. the data processing system includes a transfer unit that transfers the plurality of unprocessed data to which the sequence numbers have been assigned to the first data processing unit and the second data processing unit, respectively; and a switching unit that receives the first processed data and the second processed data from the first data processing unit and the second data processing unit, respectively, and is capable of switching an output target between the first processed data and the second processed data, wherein the switching unit synchronizes and selects the first processed data and the second processed data based on the sequence numbers assigned to the first processed data and the second processed data, respectively, and switches the output target from the first processed data to the second processed data after synchronization is completed.
[0018] <Details of the embodiment of the present disclosure> Hereinafter, the details of the embodiments of the present invention will be described with reference to the drawings. Note that at least some of the embodiments described below may be combined in any desired manner.
[0019] [1. Update system] The update system according to this embodiment is a system that switches, without interruption, from an operating first data processing unit that processes unprocessed data output from a sensor to a second data processing unit for updating.
[0020] FIG. 1 is a schematic diagram for explaining an example of an update system according to the present embodiment.
[0021] The update system 10 is installed in a factory. The update system 10 includes a data processing device 100 and a server 300. A sensor 200 is connected to the data processing device 100.
[0022] The data processing device 100 is connected to a server 300 via a network 500. The data processing device 100 is further connected to a database 400 via the network 500. The server 300 and the database 400 may be located in a factory or outside the factory (e.g., in a data center).
[0023] The sensor 200 is an example of a device and may be various sensors. For example, the sensor 200 may be a temperature sensor, a pressure sensor, a voltage sensor, a current sensor, an ultrasonic sensor, a photoelectric sensor, a proximity sensor, an acceleration sensor, a speed sensor, a position sensor, a torque sensor, a flow rate sensor, or a vibration sensor. Furthermore, the sensor 200 may be a camera. The sensor 200 has a communication interface conforming to Ethernet (registered trademark) and can communicate with an external device by, for example, UDP / IP (User Datagram Protocol / Internet Protocol) or TCP / IP (Transmission Control Protocol / Internet Protocol). Instead of a communication interface conforming to Ethernet, the sensor 200 may have a serial communication interface such as RS-232C, RS-422, USB (Universal Serial Bus), or CC-Link.
[0024] The sensor 200 acquires information (e.g., temperature, pressure, voltage, current, position, state, acceleration, speed, torque, flow rate, vibration frequency, image) about an object (e.g., a product manufactured in a factory, a semi-finished product, a part used in manufacturing a product, a tool, a manufacturing device, or a conveying device), and outputs pre-processing data about the acquired state. The sensor 200 continuously acquires information about the object, for example, at predetermined intervals, and outputs the pre-processing data continuously or intermittently.
[0025] The data processing device 100 can receive output data (pre-processed data) from the sensor 200 and process the output data. For example, the data processing device 100 can perform statistical processing on output values from a temperature sensor or a vibration sensor to calculate statistical values or thin out the output data. In another example, the data processing device 100 can perform image processing such as resizing, edge enhancement, and mosaic processing on an image output from a camera. In data processing by the data processing device 100, the sizes of pre-processed data and post-processed data (processed data) are changed. The data processing device 100 can register the processed data obtained by data processing in the database 400.
[0026] The server 300 stores update data 310 for a program for data processing (data processing program). The server 300 downloads the update data 310 to the data processing device 100. The server 300 can instruct the data processing device 100 to perform an uninterrupted update from a running data processing program (hereinafter referred to as a "first data processing program") to a data processing program for update (hereinafter referred to as a "second data processing program"). The data processing device 100 can download the update data 310 from the server 300 and install the second data processing program using the update data 310. When the data processing device 100 receives an instruction (switching instruction) for uninterrupted update from the server, it can update from the first data processing program to the second data processing program.
[0027] [2. Configuration of data processing device] 2 is a block diagram showing an example of the configuration of a data processing device according to this embodiment. The data processing device 100 includes a processor 101, a non-volatile memory 102, a volatile memory 103, and communication interfaces (I / F) 104 and 105.
[0028] The volatile memory 103 is, for example, a semiconductor memory such as a static random access memory (SRAM) or a dynamic random access memory (DRAM). The non-volatile memory 102 is, for example, a flash memory, a hard disk, a read only memory (ROM), etc. The non-volatile memory 102 stores a transfer program 111, a first data processing program 112A, a switching program 113, and a management program 114, which are computer programs, and data used to execute these programs. As described above, the data processing device 100 can install the second data processing program 112B in the non-volatile memory 102 by the update data 310 downloaded from the server 300. The data processing device 100 is configured with a computer, and each function of the data processing device 100 is exerted by the processor 101 executing the transfer program 111, the first data processing program 112A, the switching program 113, and the management program 114, which are computer programs stored in a storage device of the computer.
[0029] The first data processing program 112A and the second data processing program 112B are computer programs for processing output data from the sensor 200. The first data processing program 112A is a program in operation and is a program before an update. The second data processing program 112B is a program in operation and is a program for updating (after update).
[0030] The transfer program 111 is a computer program for assigning a sequence number to each of the multiple pre-processed data received from the sensor 200, and transferring the multiple pre-processed data with the sequence numbers to each of a first data processing unit 122A (see Figure 3A) realized by a first data processing program 112A and a second data processing unit 122B (see Figure 3A) realized by a second data processing program 112B.
[0031] The switching program 113 is a computer program for receiving the first processed data and the second processed data from the first data processing unit 122A and the second data processing unit 122B, respectively, and for switching the output target between the first processed data and the second processed data. The switching program 113 synchronizes and selects the first processed data and the second processed data based on the sequence numbers assigned to the first processed data and the second processed data, respectively, and switches the output target from the first processed data to the second processed data after the synchronization is completed.
[0032] The management program 114 is a computer program for managing updates of the data processing program. The management program 114 manages the installation of the second data processing program 112B. That is, the management program 114 downloads update data 310 from the server 300, and installs the second data processing program 112B using the update data 310. The management program 114 communicates with the server 300, and can instruct the switching unit 123 (see FIG. 3A) realized by the switching program to switch the output target.
[0033] The transfer program 111, the first data processing program 112A, the switching program 113, and the management program 114 may each be executed on a virtual machine. That is, the transfer program 111, the first data processing program 112A, the switching program 113, and the management program 114 may each be executed on a guest OS (Operating System) that runs on virtualization software. Furthermore, the transfer program 111, the first data processing program 112A, the switching program 113, and the management program 114 may each be a container.
[0034] The processor 101 is, for example, a CPU (Central Processing Unit). However, the processor 101 is not limited to a CPU. The processor 101 may be a GPU (Graphics Processing Unit). The processor 101 is configured to be able to execute a computer program. However, the processor 101 may include, for example, an ASIC (Application Specific Integrated Circuit) in part, or may include a programmable logic device such as a gate array or an FPGA (Field Programmable Gate Array) in part.
[0035] The communication I / Fs 104 and 105 are, for example, Ethernet interfaces. The communication I / F 104 may be a serial communication interface such as RS-232C, RS-422, USB (Universal Serial Bus), or CC-Link. The communication I / F 104 is an example of a receiving unit, and is connected to the sensor 200. The data processing device 100 can receive pre-processed data from the sensor 200 via the communication I / F 104. The communication I / F 105 is connected to the server 300 and the database 400 via a network 500. The data processing device 100 can communicate with the server 300 and the database 400 via the communication I / F 105.
[0036] [3. Functions of the data processing device] 3A and 3B are functional block diagrams showing an example of the functions of the data processing device according to this embodiment. Fig. 3A shows the functions of the data processing device 100 before the second data processing program 112B is installed in the non-volatile memory 102, and Fig. 3B shows the functions of the data processing device 100 after the second data processing program 112B is installed in the non-volatile memory 102.
[0037] The data processing device 100 has the functions of a transfer unit 121, a first data processing unit 122A, a second data processing unit 122B, a switching unit 123, and a management unit .
[0038] As shown in Fig. 3A, before the second data processing program 112B is installed, the transfer unit 121 transfers each of the plurality of pre-processing data received by the communication I / F 104 to the first data processing unit 122A. As shown in Fig. 3B, after the second data processing program 112B is installed, the transfer unit 121 assigns a sequence number to each of the plurality of pre-processing data received by the communication I / F 104, and transfers the plurality of pre-processing data assigned with the sequence numbers to each of the first data processing unit 122A and the second data processing unit 122B. In a specific example, the transfer unit 121 transfers the pre-processing data to each of the first data processing unit 122A and the second data processing unit 122B by broadcasting the pre-processing data.
[0039] The first data processing unit 122A processes the unprocessed data output from the sensor 200 to generate the first processed data. The second data processing unit 122B processes the unprocessed data output from the sensor 200 to generate the second processed data. The first data processing unit 122A is an operating data processing unit, and the second data processing unit 122B is an update data processing unit. That is, the second data processing unit 122B is a newer version of the data processing unit than the first data processing unit 122A. The first data processing unit 122A and the second data processing unit 122B can perform statistical processing on the output value of the temperature sensor or the vibration sensor, for example, to calculate statistical values or thin out the output data. In another example, the first data processing unit 122A and the second data processing unit 122B can perform image processing such as resizing, edge enhancement, and mosaic processing on the image output from the camera. In the data processing by the first data processing unit 122A and the second data processing unit 122B, the size is changed between the unprocessed data and the first and second processed data.
[0040] The switching unit 123 receives the first processed data and the second processed data from the first data processing unit 122A and the second data processing unit 122B, respectively, and outputs either the first processed data or the second processed data. The first processed data or the second processed data output from the switching unit 123 is transmitted to the database 400 by the communication I / F 105.
[0041] The switching unit 123 can switch the output target between the first processed data and the second processed data. The switching unit 123 selects the first processed data and the second processed data in synchronization with each other based on the sequence numbers assigned to the first processed data and the second processed data, respectively, and switches the output target from the first processed data to the second processed data after the synchronization is completed. In a specific example, the switching unit 123 adjusts the timing of selecting the first processed data and the second processed data, respectively, and determines that the synchronization is completed when the switching unit 123 selects the first processed data and the second processed data having the same sequence number.
[0042] The management unit 124 manages updates of the data processing program. The management unit 124 manages installation of the second data processing program 112B. The management unit 124 downloads update data 310 from the server 300, and installs the second data processing program 112B using the update data 310. The management unit 124 communicates with the server 300, and instructs the switching unit 123 to switch the output target.
[0043] The transfer unit 121 is realized by the processor 101 executing a transfer program 111 (see FIG. 2). The first data processing unit 122A is realized by the processor 101 executing a first data processing program 112A (see FIG. 2). The second data processing unit 122B is realized by the processor 101 executing a second data processing program 112B (see FIG. 2). The switching unit 123 is realized by the processor 101 executing a switching program 113 (see FIG. 2). The management unit 124 is realized by the processor 101 executing a management program 114 (see FIG. 2).
[0044] [4. Data processing update operation of the update system] FIG. 4 is a sequence diagram showing the procedure of a data processing update operation by the update system 10 according to the present embodiment.
[0045] Before the second data processing program 112B is installed in the data processing device 100, the server 300 transmits an instruction to start the second data processing program 112B to the data processing device 100 (step S1). Furthermore, the server 300 downloads the update data 310 to the data processing device 100 in response to a download request from the data processing device 100, for example (step S2).
[0046] The processor 101 of the data processing device 100 installs the second data processing program 112B in the non-volatile memory 102 using the downloaded update data 310 (step S3). The processor 101 then starts the installed second data processing program 112B (step S4) and transmits a start-up completion notification to the server 300 (step S5). By receiving the start-up completion notification, the server 300 confirms the start-up of the second data processing program 112B in the data processing device 100 (step S6).
[0047] The processor 101 executes a synchronization process between the selection of the first processed data output from the first data processing unit 122A and the selection of the second processed data output from the second data processing unit 122B (step S7). The details of the synchronization process will be described later.
[0048] When the synchronization is completed, the processor 101 transmits a synchronization completion notification to the server 300 (step S8). By receiving the synchronization completion notification, the server 300 confirms the synchronization of the selection of the first processed data and the second processed data in the data processing device 100 (step S9).
[0049] The server 300 transmits a switching instruction to the data processing device 100 to instruct switching of the output target from the first processed data to the second processed data (step S10). Upon receiving the switching instruction, the processor 101 switches the output target from the first processed data to the second processed data without interruption in the switching unit 123 (step S11). As a result, the second data processing unit 122B becomes active and the first data processing unit 122A becomes inactive.
[0050] The processor 101 transmits a switching completion notification to the server 300 (step S12). By receiving the switching completion notification, the server 300 confirms the switching of the output target from the first processed data to the second processed data in the data processing device 100 (step S13).
[0051] The server 300 transmits an instruction to stop the first data processing program 112A (step S14). Upon receiving the stop instruction, the processor 101 stops the first data processing program 112A (step S15), and transmits a stop completion notification of the first data processing program 112A to the server 300 (step S16). By receiving the stop completion notification, the server 300 confirms that the first data processing program 112A in the data processing device 100 has been stopped (step S17). This completes the data processing update operation.
[0052] [5. Synchronization processing] Next, a description will be given of the synchronization process in the data processing device 100. Fig. 5 is a functional block diagram showing an example of detailed functions of the data processing device according to this embodiment.
[0053] The transfer unit 121 includes a reading unit 211 , a sequence number assignment unit 212 , and a data transfer unit 213 .
[0054] The reader 211 reads data from the receive buffer of the communication I / F 104. For example, when raw data is transmitted from the sensor 200 by packet communication, if the raw data is large in size and is divided into multiple packets for transmission, the reader 211 performs datagram reconstruction. That is, the reader 211 reads packets, extracts payloads from the read packets, and combines the payloads extracted from each packet to restore raw data (unprocessed data). If the raw data is small in size or if the raw data is transmitted by serial communication, datagram reconstruction is not necessary.
[0055] The sequence number assigning unit 212 assigns sequence numbers in chronological order to each piece of pre-processing data obtained by the reading unit 211. The sequence numbers are added to the pre-processing data.
[0056] The data transfer unit 213 transfers the pre-processing data to which the sequence number has been added to each of the first data processing unit 122A and the second data processing unit 122B. For example, the transfer of the pre-processing data is performed by inter-process communication. In a specific example, the pre-processing data is transmitted by socket communication. In the socket communication, for example, UDP (User Datagram Protocol) is used. For example, the data transfer unit 213 broadcasts the pre-processing data in the socket communication. This eliminates the need to copy the pre-processing data, and can reduce the overhead of transfer. As another example, pipe communication can be used. As yet another example, data can be exchanged between the data transfer unit 213 and the first data processing unit 122A and the second data processing unit 122B using a shared memory.
[0057] The first data processing unit 122A includes an input unit 221A, a processing unit 222A, an output unit 223A, and a first sequence number buffer 224A. The second data processing unit 122B includes an input unit 221B, a processing unit 222B, an output unit 223B, and a second sequence number buffer 224B. Each of the first sequence number buffer 224A and the second sequence number buffer 224B is configured, for example, by a partial area of the volatile memory 103. In the following description, the input unit 221A and the input unit 221B are also collectively referred to as "input unit 221." Similarly, processing unit 222A and processing unit 222B are collectively referred to as "processing unit 222", output unit 223A and output unit 223B are collectively referred to as "output unit 223", and first sequence number buffer 224A and second sequence number buffer 224B are collectively referred to as "sequence number buffer 224".
[0058] The input unit 221 receives the pre-processing data transmitted from the data transfer unit 213. The input unit 221 separates the sequence number from the received pre-processing data and stores the sequence number in the sequence number buffer 224. For example, the sequence number buffer 224 is a First In First Out (FIFO) buffer. The input unit 221 passes the pre-processing data from which the sequence number has been removed to the processing unit 222.
[0059] The processing unit 222 performs a predetermined process on the provided pre-processed data to generate post-processed data (first post-processed data or second post-processed data). The generated post-processed data is provided to the output unit 223. The processing unit only needs to process the pre-processed data from which the sequence numbers have been removed, and does not need to deal with pre-processed data with sequence numbers. Therefore, the processing of the processing unit 222 does not become too complicated, and the degree of freedom in designing the first data processing program 112A and the second data processing program 112B is improved.
[0060] The output unit 223 reads the sequence number from the sequence number buffer 224 and adds the sequence number to the given processed data. Therefore, even if the data size of the processed data has changed from the data before processing, the sequence numbers assigned to the processed data and the pre-processed data match. The output unit 223 outputs the processed data with the sequence number added to the switching unit 123.
[0061] The switching unit 123 includes a first buffer 231, a second buffer 232, a comparison unit 233, and a selection unit 234.
[0062] The first buffer 231 stores the first processed data output from the first data processing unit 122A. For example, the first buffer 231 is a FIFO buffer. It is preferable that the first buffer 231 has a size capable of storing a plurality of first processed data.
[0063] The second buffer 232 stores the second processed data output from the second data processing unit 122B. For example, the second buffer 232 is a FIFO buffer. The second buffer 232 preferably has a size capable of storing a plurality of second processed data.
[0064] The comparison unit 233 can read out the first processed data one by one from the first buffer 231. The comparison unit 233 can read out the second processed data one by one from the second buffer 232. The comparison unit 233 selects the first processed data by reading out the first processed data from the first buffer 231, and selects the second processed data by reading out the second processed data from the second buffer 232. The comparison unit 233 compares the sequence number SN1 of the selected first processed data with the sequence number SN2 of the selected second processed data.
[0065] If SN1-SN2>0, the first processed data arrives at the switching unit 123 prior to the second processed data. In this case, the comparison unit 233 stops reading the first processed data from the first buffer 231 and continues reading the second processed data from the second buffer 232. This reduces the difference between SN1 and SN2.
[0066] If SN1-SN2<0, the second processed data arrives at the switching unit 123 prior to the first processed data. In this case, the comparison unit 233 continues to read the first processed data from the first buffer 231 and stops reading the second processed data from the second buffer 232. This reduces the difference between SN1 and SN2.
[0067] If SN1-SN2=0, the comparison unit 233 determines that synchronization is complete.
[0068] The comparison unit 233 outputs the first processed data and the second processed data after comparing the sequence numbers to the selection unit 234. The selection unit 234 selects one of the first processed data and the second processed data, and outputs the selected one of the processed data. When the first data processing unit 122A is in operation, the selection unit 234 selects the first processed data and outputs the selected first processed data. When the first data processing unit 122A is in operation, the second processed data is not selected. When the synchronization of the selection of the first processed data and the second processed data is completed and a switching instruction is given from the server 300, the selection unit 234 switches the output target from the first processed data to the second processed data. That is, in this case, the selection unit 234 does not select the first processed data, but selects the second processed data, and outputs the selected second processed data. As a result, the first data processing unit 122A is not in operation, and the second data processing unit 122B is in operation. The output processed data is transmitted to the database 400 by the communication I / F 105 .
[0069] FIG. 6 is a flowchart showing an example of a procedure of processing by the switching unit in the data processing device according to the present embodiment.
[0070] The processor 101 reads the first processed data from the first buffer 231, and reads the second processed data from the second buffer 232 (step S101). The processor 101 compares the sequence number SN1 added to the read first processed data with the sequence number SN2 added to the read second processed data, and determines whether SN1-SN2=0 (step S102).
[0071] If SN1-SN2≠0 (NO in step S102), the processor 101 determines whether or not SN1-SN2>0 (step S103).
[0072] If SN1-SN2>0 (YES in step S103), the processor 101 stops reading from the first buffer 231 and reads the second processed data from the second buffer 232 (step S104). After that, the processor 101 returns to step S102.
[0073] The operation of the switching unit 123 when SN1-SN2>0 will be described with reference to the drawings. FIGS. 7A and 7B are schematic diagrams for explaining the operation of the switching unit 123 when the first processed data arrives at the switching unit 123 prior to the second processed data. As shown in FIG. 7A, when the sequence number SN1 of the first processed data read from the first buffer 231 is "3" and the sequence number SN2 of the second processed data read from the second buffer 232 is "1", SN1-SN2>0. In this case, the comparison unit 233 stops reading from the first buffer 231 and reads the second processed data from the second buffer 232. During this time, the first processed data output from the first data processing unit 122A is retained in the first buffer 231. 7B, when the comparator 233 reads out the two pieces of second processed data from the second buffer 232, the sequence number SN1 of the first processed data is "3" and the sequence number SN2 of the second processed data is "3." Therefore, SN1-SN2=0.
[0074] 6 again, if SN1-SN2<0 (NO in step S103), the processor 101 stops reading from the second buffer 232 and reads the first processed data from the first buffer 231 (step S105). After that, the processor 101 returns to step S102.
[0075] The operation of the switching unit 123 when SN1-SN2<0 will be described with reference to the drawings. FIGS. 8A and 8B are schematic diagrams for explaining the operation of the switching unit 123 when the second processed data arrives at the switching unit 123 prior to the first processed data. As shown in FIG. 8A, when the sequence number SN1 of the first processed data read from the first buffer 231 is "3" and the sequence number SN2 of the second processed data read from the second buffer 232 is "5", SN1-SN2<0. In this case, the comparison unit 233 stops reading from the second buffer 232 and reads the first processed data from the first buffer 231. During this time, the second processed data output from the second data processing unit 122B is retained in the second buffer 232. 8B, when the comparison unit 233 reads out the two first processed data from the first buffer 231, the sequence number SN1 of the first processed data is "5" and the sequence number SN2 of the second processed data is "5." Therefore, SN1-SN2=0.
[0076] 6 again. If SN1-SN2=0 (YES in step S102), the processor 101 determines that synchronization is complete. In this case, the processor 101 continuously reads the first processed data and the second processed data from the first buffer 231 and the second buffer 232, and outputs one of them (the first processed data) to the communication I / F 105. The processor 101 determines whether or not an output switching instruction has been received from the server 300 (step S106), and if the output switching instruction has not been received (NO in step S106), the process returns to step S101.
[0077] When an output switching instruction is received from the server 300 (YES in step S106), the processor 101 switches the output target from the first processed data to the second processed data (step S107). As a result, the first data processing unit 122A is deactivated and the second data processing unit 122B is activated.
[0078] The operation of the switching unit 123 in the case where SN1-SN2=0 will be described with reference to the drawings. FIGS. 9A and 9B are schematic diagrams for explaining the operation of the switching unit 123 in the case where synchronization between the first processed data and the second processed data is completed. In the example of FIG. 9A, both the sequence number SN1 and the sequence number SN2 in the comparison unit 233 are "6". Therefore, SN1-SN2=0, and synchronization is completed. The first processed data with the sequence number SN1 of "5" is output from the selection unit 234. Here, as shown in FIG. 8A, when an output switching instruction is given from the server 300, the management unit 124 instructs the selection unit 234 to switch. The selection unit 234 switches the output target from the first processed data to the second processed data. As a result, the second processed data with the sequence number SN2 of "6" is output from the selection unit 234, and switching from the first data processing unit 122A to the second data processing unit 122B is realized without interruption. That is, in this manner, the data processing unit is updated without interruption.
[0079] This is the end of the process of the switching unit 123 in the synchronization process.
[0080] [6. Modification Examples] In the above embodiment, the first data processing unit 122A is realized by the first data processing program 112A, and the second data processing unit 122B is realized by the second data processing program 112B, but this is not limiting. For example, the first data processing unit 122A and the second data processing unit 122B can be realized by an FPGA. In this case, the update data 310 can be configuration data for configuring the second data processing unit 122B.
[0081] In the above embodiment, the first processed data and the second processed data are synchronized by delaying one of the timing of reading the first processed data from the first buffer 231 and the timing of reading the second processed data from the second buffer 232, but the present invention is not limited to this. For example, the first processed data and the second processed data may be synchronized by inserting a delay in one of the first processed data and the second processed data that is output to the switching unit 123 earlier.
[0082] [7. Effects] As described above, the data processing device 100 includes the first data processing unit 122A, the second data processing unit 122B, the communication I / F 104, the transfer unit 121, and the switching unit 123. The first data processing unit 122A processes pre-processed data related to information output from the sensor 200 that acquires information about the target, and generates first processed data. The first data processing unit 122A is an operating data processing unit. The second data processing unit 122B processes pre-processed data related to information output from the sensor 200, and generates second processed data. The second data processing unit 122B is an update data processing unit. The communication I / F 104 communicates with the sensor 200, and sequentially receives a plurality of pre-processed data from the sensor 200. The transfer unit 121 assigns a sequence number to each of the plurality of pre-processed data received by the communication I / F 104. The transfer unit 121 transfers the plurality of pre-processed data to which the sequence numbers have been assigned, to each of the first data processing unit 122A and the second data processing unit 122B. The switching unit 123 receives the first processed data and the second processed data from the first data processing unit 122A and the second data processing unit 122B, respectively. The switching unit 123 can switch the output target between the first processed data and the second processed data. The switching unit 123 selects the first processed data and the second processed data in synchronization with each other based on the sequence numbers assigned to the first processed data and the second processed data, respectively. After the synchronization is completed, the switching unit 123 switches the output target from the first processed data to the second processed data. This makes it possible to synchronize the selection of the first processed data and the second processed data based on the sequence number assigned to each piece of pre-processed data, and to switch the output target from the first processed data to the second processed data without interruption. Therefore, the data processing unit can be updated without interruption.
[0083] The switching unit 123 may adjust the timing of selecting the first processed data and the second processed data, and determine that the synchronization is completed when the first processed data and the second processed data having the same sequence number are selected. This makes it possible to synchronize the selection timing of the first processed data and the second processed data based on the sequence number.
[0084] The switching unit 123 may include a first buffer 231 and a second buffer 232. The first buffer 231 stores the first processed data. The second buffer 232 stores the second processed data. The switching unit 123 may compare a sequence number SN1 assigned to the first processed data read from the first buffer 231 with a sequence number SN2 assigned to the second processed data read from the second buffer 232. The switching unit 123 may adjust the timing by stopping the reading of data from the first buffer 231 or the second buffer 232, whichever has a larger sequence number, and continuing the reading of data from the one with a smaller sequence number. In this way, the selection timing of the first processed data and the second processed data can be adjusted by using the first buffer 231 and the second buffer 232.
[0085] The first data processing unit 122A may be realized by the processor 101 executing a first data processing program 112A for processing the pre-processed data. The second data processing unit 122B may be realized by the processor 101 executing a second data processing program 112B for processing the pre-processed data. By updating the data processing program, the data processing can be easily updated.
[0086] The first data processing unit 122A may include a first sequence number buffer 224A. The first sequence number buffer 224A stores the sequence number. The first data processing unit 122A may separate the received pre-processed data from the sequence number assigned to the pre-processed data, and store the sequence number in the first sequence number buffer 224A. After processing the pre-processed data, the first data processing unit 122A may read the sequence number from the first sequence number buffer 224A, and combine the pre-processed data with the sequence number. The second data processing unit 122B may include a second sequence number buffer 224B. The second sequence number buffer 224B stores the sequence number. The second data processing unit 122B may separate the received pre-processed data from the sequence number assigned to the pre-processed data, and store the sequence number in the second sequence number buffer 224B. After processing the pre-processed data, the second data processing unit 122B may read the sequence number from the second sequence number buffer 224B and combine the pre-processed data with the sequence number. By separating the sequence number from the pre-processed data, processing of the pre-processed data becomes easier, and the degree of freedom in designing the first data processing unit 122A and the second data processing unit 122B is improved.
[0087] The transfer unit 121 may transfer the pre-processed data to each of the first data processing unit 122A and the second data processing unit 122B by broadcasting the pre-processed data. This eliminates the need to copy the pre-processed data in order to deliver the pre-processed data to the first data processing unit 122A and the second data processing unit 122B, making it possible to reduce the overhead of transfer.
[0088] [8. Additional Notes] The embodiments disclosed herein are illustrative in all respects and are not restrictive. The scope of the present invention is defined by the claims rather than the above-described embodiments, and includes the meaning equivalent to the claims and all modifications within the scope thereof. [Explanation of symbols]
[0089] 10 Update System 100 Data processing device 101 Processor 102 Non-volatile memory 103 Volatile Memory 104,105 Communication interface (communication I / F) 111 Transfer Program 112A First Data Processing Program 112B Second Data Processing Program 113 Switching Program 114 Management Program 121 Transfer Department 122A First Data Processing Unit 122B Second data processing section 123 Switching section 124 Management Department 200 Sensors 211 Reading unit 212 Numbering Department 213 Data Transfer Section 221, 221A, 221B Input section 222, 222A, 222B Processing section 223,223A,223B output section 224A 1st sequence number buffer 224B Second sequence number buffer 224 Sequence Number Buffer 231 First Buffer 232 Second Buffer 233 Comparison Section 234 Selection Section 300 Servers 310 Update Data 400 Database 500 Network
Claims
1. a first data processing unit in operation that processes pre-processed data relating to information output from a device that acquires information about a target, and generates first processed data; a second data processing unit for updating that processes the unprocessed data to generate second processed data; a receiving unit that sequentially receives the plurality of pieces of unprocessed data from the device; a transfer unit that assigns a sequence number to each of the plurality of unprocessed data received by the receiving unit, and transfers the plurality of unprocessed data to which the sequence numbers have been assigned, to each of the first data processing unit and the second data processing unit; a switching unit that receives the first processed data and the second processed data from the first data processing unit and the second data processing unit, respectively, and is capable of switching an output target between the first processed data and the second processed data; Equipped with the switching unit selects the first processed data and the second processed data in synchronization with each other based on the sequence numbers assigned to the first processed data and the second processed data, respectively, and switches an output target from the first processed data to the second processed data after the synchronization is completed. Data processing device.
2. the switching unit adjusts a timing for selecting each of the first processed data and the second processed data, and determines that synchronization is completed when the first processed data and the second processed data having the same sequence number are selected.
2. A data processing apparatus according to claim 1.
3. The switching unit is a first buffer for storing the first processed data; a second buffer for storing the second processed data; Including, comparing the sequence number assigned to the first processed data read from the first buffer with the sequence number assigned to the second processed data read from the second buffer, and adjusting the timing by stopping reading of data from one of the first buffer and the second buffer, which has the larger sequence number, and continuing reading of data from the one having the smaller sequence number.
3. A data processing apparatus according to claim 2.
4. the first data processing unit is realized by a processor executing a first data processing program for processing the unprocessed data, The second data processing unit is realized by a processor executing a second data processing program for processing the unprocessed data. The data processing device according to any one of claims 1 to 3.
5. the first data processing unit includes a first sequence number buffer that stores the sequence number; the first data processing unit separates the received unprocessed data from the sequence number assigned to the unprocessed data, stores the sequence number in the first sequence number buffer, processes the unprocessed data, and then reads the sequence number from the first sequence number buffer and combines the unprocessed data with the sequence number; the second data processing unit includes a second sequence number buffer that stores the sequence number; the second data processing unit separates the received unprocessed data from the sequence number assigned to the unprocessed data, stores the sequence number in the second sequence number buffer, processes the unprocessed data, and then reads the sequence number from the second sequence number buffer and combines the unprocessed data with the sequence number. The data processing device according to any one of claims 1 to 4.
6. the transfer unit transfers the unprocessed data to each of the first data processing unit and the second data processing unit by broadcasting the unprocessed data. The data processing device according to any one of claims 1 to 5.
7. A data processing device that processes pre-processed data relating to the information output from a device that acquires information relating to the target; a server that provides the data processing device with update data for updating the processing of the unprocessed data; Equipped with The data processing device includes: a first data processing unit in operation that processes the unprocessed data to generate first processed data; a second data processing unit for updating configured based on the update data, the second data processing unit processing the unprocessed data to generate second processed data; a receiving unit that sequentially receives the plurality of pieces of unprocessed data from the device; a transfer unit that assigns a sequence number to each of the plurality of unprocessed data received by the receiving unit, and transfers the plurality of unprocessed data to which the sequence numbers have been assigned, to each of the first data processing unit and the second data processing unit; a switching unit that receives the first processed data and the second processed data from the first data processing unit and the second data processing unit, respectively, and is capable of switching an output target between the first processed data and the second processed data; Including, the switching unit selects the first processed data and the second processed data in synchronization with each other based on the sequence numbers assigned to the first processed data and the second processed data, respectively, and switches an output target from the first processed data to the second processed data after the synchronization is completed. Update system.
Citation Information
Patent Citations
Packet transmission system, packet transmission device, and uninterruptible switching method
JP2013005210A
Time-series data processing device, time-series data processing method, and medium for storing time-series data processing program
WO2014045556A1
