WO2023082819A1 - 一种数据处理方法、装置、设备及存储介质 - Google Patents
一种数据处理方法、装置、设备及存储介质 Download PDFInfo
- Publication number
- WO2023082819A1 WO2023082819A1 PCT/CN2022/118690 CN2022118690W WO2023082819A1 WO 2023082819 A1 WO2023082819 A1 WO 2023082819A1 CN 2022118690 W CN2022118690 W CN 2022118690W WO 2023082819 A1 WO2023082819 A1 WO 2023082819A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data processing
- user process
- synchronization
- data
- processing result
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1479—Generic software techniques for error detection or fault masking
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1497—Time redundant execution of software on a single processing unit
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/1629—Error detection by comparing the output of redundant processing systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
Definitions
- the present application relates to the field of computer technology, and in particular to a data processing method, device, equipment and storage medium.
- each service program node in the automatic driving system will be equipped with a corresponding redundant node to ensure driving safety.
- the present application provides a data processing method, device, device, and storage medium, which can improve the data processing time and consistency of data processing results of user processes and their redundant processes, thereby improving the reliability and safety of automatic driving system functions , the technical scheme of the present application is as follows:
- a data processing method comprising:
- the synchronization service sends a first synchronization processing request to the synchronization service, so that the synchronization service responds to the first synchronization processing request and the received second synchronization processing request sent by the second user process, respectively sending the first user process and the
- the second user process feeds back request response information, the request response information carries the synchronization processing cycle of the data to be processed and the activation time stamp of the synchronization processing cycle, and the second user process is the first user process redundant process;
- the synchronization service compares the first data processing result with the received second data processing result sent by the second user process to obtain a comparison results, and when the comparison result is that the first data processing result is consistent with the second data processing result, the first data processing result, the second data processing result and the comparison result sent to the consumer process.
- a data processing method comprising:
- the first synchronous processing request is used to request the first user process to synchronously process the pending request sent by the producer process Processing data
- the second synchronous processing request is used to request the second user process to synchronously process the data to be processed sent by the producer process
- the second user process is the redundancy of the first user process process
- the request response information carrying the data to be processed
- the synchronous processing cycle and the activation time stamp of the synchronous processing cycle so that the first user process and the second user process process the data to be processed in the synchronous processing cycle based on the activation time stamp respectively obtaining a first data processing result corresponding to the first user process and a second data processing result corresponding to the second user process;
- comparison result is that the first data processing result and the second data processing result are consistent, send the first data processing result, the second data processing result and the comparison result to the consumer or process.
- a data processing device runs a first user process, a second user process and a synchronization service, the second user process is a redundant process of the first user process, wherein:
- the first user process is configured to obtain the data to be processed sent by the producer process; send a first synchronization processing request to the synchronization service; receive request response information sent by the synchronization service, and the request response information carries all
- the synchronous processing period of the data to be processed and the activation time stamp of the synchronous processing period based on the activation time stamp, process the data to be processed in the synchronous processing period to obtain a first data processing result;
- the service sends the first data processing result;
- the second user process is configured to obtain the data to be processed sent by the producer process; send a second synchronization processing request to the synchronization service; receive the request response information sent by the synchronization service; based on the The activation time stamp processes the data to be processed within the synchronization processing period to obtain a second data processing result; sends the second data processing result to the synchronization service;
- the synchronization service is configured to respectively receive the first synchronization processing request sent by the first user process and the second synchronization processing request sent by the second user process; respond to the first synchronization processing request and the second synchronous processing request, respectively feeding back the request response information to the first user process and the second user process; respectively receiving the first data processing result and the first data processing result sent by the first user process
- the second data processing result sent by the second user process compare the first data processing result with the second data processing result to obtain a comparison result; if the comparison result is the first data processing result If the result is consistent with the second data processing result, the first data processing result, the second data processing result and the comparison result are sent to the consumer process.
- a data processing device comprising:
- the pending data acquisition module is used to obtain the pending data sent by the producer process
- a first synchronization processing request sending module configured to send a first synchronization processing request to a synchronization service, so that the synchronization service responds to the first synchronization processing request and the received second synchronization processing request sent by the second user process , feeding back request response information to the first user process and the second user process respectively, the request response information carrying the synchronization processing cycle of the data to be processed and the activation timestamp of the synchronization processing cycle, the second The user process is a redundant process of the first user process;
- a data processing module configured to process the data to be processed in the synchronization processing cycle based on the activation time stamp to obtain a first data processing result
- a first data processing result sending module configured to send the first data processing result to the synchronization service, so that the synchronization service combines the first data processing result with the received data sent by the second user process
- the second data processing result is compared to obtain a comparison result, and when the comparison result is that the first data processing result is consistent with the second data processing result, the first data processing result, the The second data processing result and the comparison result are sent to the consumer process.
- a data processing device comprising:
- a synchronous processing request receiving module configured to respectively receive a first synchronous processing request sent by a first user process and a second synchronous processing request sent by a second user process, the first synchronous processing request is used to request the first user process Synchronously process the pending data sent by the producer process, the second synchronous processing request is used to request the second user process to synchronously process the pending data sent by the producer process, the second user process is the a redundant process for the first user process;
- a synchronous processing request response module configured to feed back request response information to the first user process and the second user process respectively in response to the first synchronous processing request and the second synchronous processing request, and the request response
- the information carries the synchronous processing period of the data to be processed and the activation time stamp of the synchronous processing period, so that the first user process and the second user process are respectively based on the activation time stamp in the synchronous processing Processing the data to be processed within a period to obtain a first data processing result corresponding to the first user process and a second data processing result corresponding to the second user process;
- a data processing result receiving module configured to respectively receive the first data processing result sent by the first user process and the second data processing result sent by the second user process;
- a data processing result comparison module configured to compare the first data processing result with the second data processing result to obtain a comparison result
- a comparison result sending module configured to send the first data processing result, the second data processing result, and the The comparison result is sent to the consumer process.
- a data processing device in another aspect, includes a processor and a memory, at least one instruction or at least one section of program is stored in the memory, and the at least one instruction or the at least one section of program is processed by the loaded and executed by the controller to realize the above-mentioned data processing method.
- a computer-readable storage medium is provided, and at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to realize the above-mentioned data processing method.
- the data processing method, device, equipment and storage medium provided by this application have the following technical effects:
- the synchronization service can respond to the synchronization processing requests sent by the user process and its redundant process respectively, and feed back the synchronization processing period and activation timestamp to the user process and its redundant process respectively, so as to Make the two processes process the data to be processed synchronously in the synchronous processing cycle based on the activation timestamp, which ensures the consistency of the data processing time of the two processes and improves the stability and accuracy of the deterministic time execution control; on the other hand , the synchronization service receives the data processing results of the two processes respectively, and when the comparison result of the two data processing results is the same as the two data processing results, the two data processing results and the comparison results are sent to the consumer process for further processing.
- the follow-up processing of the data realizes the functional safety requirements of executing two processes with different paths to produce the same output under the same input and internal state, and ensures the consistency of the data processing results of the two processes and accuracy, which improves the stability and accuracy of deterministic data execution control; on the other hand, it improves the reliability and safety of the automatic driving system function, thereby improving the driving safety of automatic driving vehicles.
- FIG. 1 is a schematic flow diagram of a data processing method provided in an embodiment of the present application
- Fig. 2 is a schematic flow chart of another data processing method provided by the embodiment of the present application.
- Fig. 3 is a schematic flow chart of another data processing method provided by the embodiment of the present application.
- Fig. 4 is a schematic flow chart of another data processing method provided by the embodiment of the present application.
- Fig. 5 is a schematic diagram of a data processing device provided by an embodiment of the present application.
- FIG. 6 is a schematic diagram of another data processing device provided by an embodiment of the present application.
- Fig. 7 is a schematic diagram of a data processing device provided by an embodiment of the present application.
- Fig. 8 is a schematic diagram of another data processing device provided by an embodiment of the present application.
- FIG. 1 is a schematic flowchart of a data processing method provided in the embodiment of the present application.
- this specification provides the operation steps of the method described in the embodiments or flow charts, but more or less operation steps may be included based on routine or non-creative efforts.
- the order of steps listed in the embodiments is only one way of execution order of many steps, and does not represent the only execution order.
- the methods shown in the embodiments or drawings may be executed sequentially or in parallel (for example, in a parallel processor or multi-thread processing environment).
- the above method may include:
- the first user process and the second user process respectively acquire the data to be processed sent by the producer process, where the second user process is a redundant process of the first user process.
- the redundant process may be a process obtained by backing up the target user process for processing data, therefore, the second user process may be the same backup process as the first user process.
- the producer process may be a process that generates data to be processed.
- the producer process may be any one of multiple service nodes serving data processing of the automatic driving system .
- the first user process and the second user process respectively send a first synchronization processing request and a second synchronization processing request to the synchronization service.
- the synchronization service may be a service process for controlling the first user process and the second user process to process synchronous data.
- the above-mentioned first user process sending the first synchronization processing request to the synchronization service may include:
- the first user process calls the waiting synchronization processing interface in the synchronization slave process corresponding to the first user process, so that the corresponding synchronization slave process sends the first synchronization processing request.
- the above-mentioned synchronous process can include multiple APIs (Application Programming Interface, application program interface), and the above-mentioned multiple APIs can include but are not limited to: Init () interface (initialization interface), WaitForNextActivation () interface (waiting for the next activation interface of the current service), RunWorkerPool() interface (executing the work pool interface), GetActivationTime() interface (returning the activation time interface of the current service) and GetNextActivationTime() interface (returning the next activation time interface of the current service ).
- the first user process calls the WaitForNextActivation() interface in the synchronization slave process, so that the corresponding synchronization slave process sends the first synchronization processing request.
- the refinement steps of the embodiment in which the second user process sends the second synchronization processing request to the synchronization service are similar to the refinement steps in the above-mentioned embodiment in which the first user process sends the first synchronization processing request to the synchronization service, and are not described herein. Let me repeat.
- the synchronization service feeds back request response information to the first user process and the second user process respectively in response to the first synchronization processing request and the second synchronization processing request, the request response information carrying the data to be processed The synchronization processing cycle and the activation timestamp of the above synchronization processing cycle.
- the synchronization service evaluates the time for the first user process and the second user process to synchronously process the data to be processed, and obtains the aforementioned synchronous processing cycle and the aforementioned synchronous processing The activation time stamp of the period; and send the request response information carrying the request response time of the synchronization processing period and the activation time stamp to the synchronization slave process corresponding to the first user process and the synchronization slave process corresponding to the second user process, so that the first A synchronous slave process corresponding to a user process feeds back request response information to the first user process, and a synchronous slave process corresponding to a second user process feeds back request response information to the second user process.
- the first user process can obtain the request response information by calling the GetActivationTime() interface in the synchronization process corresponding to the first user process
- the second user process can obtain the request response information by calling the GetActivationTime() interface in the synchronization process corresponding to the second user process. () interface to get request response information.
- the activation control mechanism and activation time for data processing are provided from the process to the user process through the synchronization corresponding to the user process, which improves the stability and accuracy of the deterministic time execution control, thereby ensuring the data of the two processes Synchronous execution of processing.
- the above-mentioned first user process and the above-mentioned second user process respectively process the above-mentioned data to be processed in the above-mentioned synchronous processing period based on the above-mentioned activation time stamp, and obtain the first data processing result corresponding to the above-mentioned first user process and the above-mentioned second user process The corresponding second data processing result.
- the above-mentioned first user process processes the above-mentioned data to be processed in the above-mentioned synchronous processing cycle based on the above-mentioned activation timestamp, and obtaining the first data processing result corresponding to the above-mentioned first user process may include:
- the above-mentioned first user process calls the work pool interface in the synchronization slave process corresponding to the above-mentioned first user process based on the above-mentioned activation timestamp, so that multiple worker threads in the work pool can perform parallel processing based on the container iterator in the above-mentioned synchronization processing cycle
- the data to be processed is obtained by obtaining the first data processing result, wherein the plurality of worker threads execute the same processing task.
- the container iterator can be an access tool for implementing a traversal operation on all elements in the container, and the container can be a tool for storing elements, and an element is each data in the data to be processed.
- Calling the RunWorkerPool() interface by the first user process can distribute the data to be processed to each worker thread through the container iterator, so that multiple worker threads can process the allocated data to be processed in parallel.
- the second user process processes the data to be processed in the synchronous processing cycle based on the activation timestamp, and obtains the refinement steps of the embodiment of the first data processing and the first user process in the synchronous processing cycle based on the activation timestamp
- the refinement steps of the embodiment of processing the above-mentioned data to be processed to obtain the first data processing result corresponding to the above-mentioned first user process are similar and will not be repeated here.
- the synchronization service respectively receives the first data processing result sent by the first user process and the second data processing result sent by the second user process.
- the synchronization service compares the first data processing result with the second data processing result to obtain a comparison result.
- the synchronization service when the comparison result is that the first data processing result and the second data processing result are consistent, sends the first data processing result, the second data processing result and the comparison result to the consumer process.
- the consumer process can be a process that consumes data processing results downstream of the producer process.
- the consumer process can be one of multiple service nodes serving the data processing of the automatic driving system any service node.
- the synchronization service compares the first data processing result with the second data processing result, and when the comparison results are consistent, sends the first data processing result, the second data processing result, and the comparison result to the consumer process, thereby ensuring that the first Consistency of data processing results between a user process and a second user process.
- the data exchange between various processes and services and the outside is realized through the communication management module.
- the communication management module can be used to provide communication between applications in the automatic driving system environment, that is, the distributed real-time embedded environment. All communication functions.
- the above method may further include:
- the above-mentioned synchronization service sets the running time corresponding to the above-mentioned synchronization service based on the GPS clock or the main board time of the hardware device where the above-mentioned synchronization service is located.
- the synchronization service sends a time synchronization instruction to the first user process and the second user process respectively, and the time synchronization instruction carries the running time corresponding to the synchronization service.
- the above-mentioned first user process and the above-mentioned second user process respectively set the running time corresponding to the above-mentioned synchronization service as the running time corresponding to the above-mentioned first user process and the running time corresponding to the above-mentioned second user process in response to the above-mentioned time synchronization instruction .
- the running time of the first user process, the second user process and the synchronization service are synchronized to realize the time synchronization of the internal application program environment, so that the time synchronization of the internal application program environment is realized, so that the time synchronization of the hardware devices located in different hardware devices
- the first user process and the second user process execute the data to be processed synchronously based on the synchronous processing period and the activation time stamp.
- the user process and its redundant process can realize data synchronization processing even if they are in different hardware devices, which improves the multi-ECU (Electronic Control Unit, electronic control unit) of the automatic driving system. Data processing capability of equipment redundancy.
- the synchronization service can respond to the synchronization processing requests sent by the user process and its redundant process respectively, through the synchronization slave process corresponding to the user process
- the synchronization slave process corresponding to its redundant process provides the user process and its redundant process with an activation control mechanism and activation time for data processing, so that the two processes can be processed synchronously within the synchronization processing cycle based on the activation timestamp.
- Data which ensures the consistency of the data processing time of the two processes, improves the stability and accuracy of the deterministic time execution control, thereby ensuring the synchronous execution of the data processing process of the two processes; on the other hand, through the working pool mechanism , guarantee the ability of multiple working processes to process the same task in parallel, and do not allow user processes to create threads by themselves, thereby improving the security and stability of the data processing process and avoiding risks caused by uncertain behaviors; on the synchronization services are respectively Receive the respective data processing results of the two processes, and send the two data processing results and comparison results to the consumer process for subsequent processing of the data when the comparison results of the two data processing results are consistent with the two data processing results , in the case of the same input and internal state, the functional safety requirements of executing two processes with different paths for calculation can produce the same output, ensuring the consistency and accuracy of the data processing results of the two processes, Improve the stability and accuracy of deterministic data execution control; on the other hand, through the time synchronization mechanism, the two processes can realize the synchronous
- FIG. 3 is a schematic flowchart of another data processing method provided by the embodiment of the present application.
- this specification provides the operation steps of the method described in the embodiments or flow charts, but more or less operation steps may be included based on routine or non-creative efforts.
- the order of steps enumerated in the embodiments is only one way in the execution order of many steps, and does not represent the only execution order.
- the methods shown in the embodiments or drawings may be executed sequentially or in parallel (for example, in a parallel processor or multi-thread processing environment).
- the above method may include:
- the above-mentioned sending of the first synchronization processing request to the synchronization service may include:
- the processing of the above-mentioned data to be processed in the above-mentioned synchronous processing period based on the above-mentioned activation time stamp, and obtaining the first data processing result may include:
- the above-mentioned method may also include:
- the above-mentioned time synchronization command carries the running time corresponding to the above-mentioned synchronization service.
- the running time corresponding to the above-mentioned synchronization service is obtained after setting the time based on the GPS clock or the motherboard time of the hardware device where the above-mentioned synchronization service is located of.
- the data processing method written from the first user process unilaterally is similar to the data processing method written from the first user process unilaterally above, and will not be repeated here.
- FIG. 4 is a schematic flowchart of another data processing method provided by the embodiment of the present application.
- this specification provides the operation steps of the method described in the embodiments or flow charts, but more or less operation steps may be included based on routine or non-creative efforts.
- the sequence of steps enumerated in the embodiments is only one of the execution sequences of many steps, and does not represent the only execution sequence.
- the methods shown in the embodiments or drawings may be executed sequentially or in parallel (for example, in a parallel processor or multi-thread processing environment).
- the above method may include:
- S401 Respectively receive a first synchronous processing request sent by a first user process and a second synchronous processing request sent by a second user process, the first synchronous processing request is used to request the first user process to synchronously process a process sent by a producer process The data to be processed, the second synchronous processing request is used to request the second user process to synchronously process the data to be processed sent by the producer process, the second user process is the first user process Redundant process.
- S405. Receive respectively the first data processing result sent by the first user process and the second data processing result sent by the second user process.
- the above-mentioned first data sent by the above-mentioned first user process are respectively received before the processing result and the second data processing result sent by the second user process
- the above method may further include:
- the embodiment of the present application also provides a data processing device, which is used to implement the method shown in FIG. 1 .
- This device embodiment corresponds to the foregoing method embodiments, and can realize all the content in the foregoing method embodiments. For ease of reading, this device embodiment only briefly describes the content of the foregoing method embodiments, and does not repeat the details of the method embodiments one by one.
- the above-mentioned device runs a first user process, a second user process and a synchronization service, and the above-mentioned second user process is a redundant process of the above-mentioned first user process, wherein:
- the above-mentioned first user process is used to obtain the data to be processed sent by the producer process; send a first synchronization processing request to the above-mentioned synchronization service; receive the request response information sent by the above-mentioned synchronization service, and the above-mentioned request response information carries the above-mentioned data to be processed Synchronizing the processing cycle and the activation time stamp of the synchronization processing cycle; processing the data to be processed in the synchronization processing cycle based on the activation time stamp to obtain a first data processing result; sending the first data processing result to the synchronization service;
- the above-mentioned second user process is used to obtain the above-mentioned data to be processed sent by the above-mentioned producer process; send a second synchronization processing request to the above-mentioned synchronization service; receive the above-mentioned request response information sent by the above-mentioned synchronization service; Processing the data to be processed within the processing cycle to obtain a second data processing result; sending the second data processing result to the synchronization service;
- the synchronization service is configured to respectively receive the first synchronization processing request sent by the first user process and the second synchronization processing request sent by the second user process; respond to the first synchronization processing request and the second synchronization processing request request, feed back the request response information to the first user process and the second user process respectively; respectively receive the first data processing result sent by the first user process and the second data processing result sent by the second user process ; Comparing the above-mentioned first data processing result with the above-mentioned second data processing result to obtain a comparison result; The processing result, the above-mentioned second data processing result and the above-mentioned comparison result are sent to the consumer process.
- the above device also runs a synchronization slave process corresponding to the first user process and a synchronization slave process corresponding to the second user process, wherein:
- the above-mentioned first user process is also used to call the waiting synchronization processing interface in the synchronization slave process corresponding to the above-mentioned first user process;
- the synchronization slave process corresponding to the above-mentioned first user process is further configured to send the above-mentioned first synchronization processing request to the above-mentioned synchronization service;
- the above-mentioned second user process is also used to call the waiting synchronization processing interface in the synchronization slave process corresponding to the above-mentioned second user process;
- the synchronization slave process corresponding to the above-mentioned second user process is further configured to send the above-mentioned second synchronization processing request to the above-mentioned synchronization service.
- the above-mentioned first user process is further configured to call the work pool interface in the synchronization slave process corresponding to the above-mentioned first user process based on the above-mentioned activation timestamp, so that multiple worker threads in the work pool Processing the data to be processed in parallel based on the container iterator in the synchronous processing cycle to obtain the first data processing result, wherein the plurality of worker threads execute the same processing task;
- the above-mentioned second user process is also used to call the work pool interface in the synchronization slave process corresponding to the above-mentioned second user process based on the above-mentioned activation timestamp, so that multiple worker threads in the work pool can be based on the container in the above-mentioned synchronization processing cycle
- the iterator processes the data to be processed in parallel to obtain the second data processing result, wherein the plurality of worker threads perform the same processing task.
- the first user process and the second user process may also run on different devices. Since the first user process and the second user process run on different devices, it is necessary to synchronize the time of different devices to ensure the consistency of the data processing time of the first user process and the second user process. Specifically, as shown in FIG. 6, a first user process and a synchronization service run on the first device, and a second user process runs on the second device, wherein:
- the above-mentioned synchronization service is also used to set the running time corresponding to the above-mentioned synchronization service based on the GPS clock or the motherboard time of the hardware device where the above-mentioned synchronization service is located; send time synchronization instructions to the above-mentioned first user process and the above-mentioned second user process respectively, and the above-mentioned time synchronization
- the command carries the running time corresponding to the above synchronization service;
- the above-mentioned first user process is further configured to set the running time corresponding to the above-mentioned synchronization service as the running time corresponding to the above-mentioned first user process in response to the above-mentioned time synchronization instruction;
- the second user process is further configured to set the running time corresponding to the synchronization service as the running time corresponding to the second user process in response to the time synchronization instruction.
- the embodiment of the present application provides a data processing device with the first user process as the execution subject.
- the above-mentioned device may include:
- Data to be processed acquisition module 710 configured to acquire the data to be processed sent by the producer process
- the first synchronization processing request sending module 720 is configured to send the first synchronization processing request to the synchronization service, so that the above synchronization service responds to the above first synchronization processing request and the received second synchronization processing request sent by the second user process, Feedback request response information to the first user process and the above-mentioned second user process, the above-mentioned request response information carries the synchronization processing cycle of the data to be processed and the activation time stamp of the above-mentioned synchronization processing cycle, and the above-mentioned second user process is the above-mentioned first Redundant processes for user processes;
- a data processing module 730 configured to process the data to be processed within the synchronization processing period based on the activation time stamp to obtain a first data processing result
- the first data processing result sending module 740 is configured to send the above-mentioned first data processing result to the above-mentioned synchronization service, so that the above-mentioned synchronization service combines the above-mentioned first data processing result with the received second data processing sent by the above-mentioned second user process
- the results are compared to obtain the comparison result, and when the above-mentioned comparison result is that the above-mentioned first data processing result is consistent with the above-mentioned second data processing result, the above-mentioned first data processing result, the above-mentioned second data processing result and the above-mentioned comparison result sent to the consumer process.
- the above-mentioned first synchronization processing request sending module 720 may include:
- the waiting synchronous processing interface calling unit is configured to call the waiting synchronous processing interface in the synchronous slave process corresponding to the first user process, so that the corresponding synchronous slave process sends the first synchronous processing request.
- the above-mentioned data processing module 730 may include:
- a work pool interface calling unit configured to call the work pool interface in the synchronization slave process corresponding to the first user process based on the activation time stamp, so that multiple work threads in the work pool iterate based on the container in the synchronization processing cycle
- the processor processes the data to be processed in parallel to obtain the first data processing result, wherein the plurality of worker threads perform the same processing task.
- the above-mentioned apparatus may further include:
- the time synchronization command receiving module is used to receive the time synchronization command sent by the above synchronization service.
- the above time synchronization command carries the running time corresponding to the above synchronization service.
- the running time corresponding to the above synchronization service is based on the GPS clock or the hardware device where the above synchronization service is located Obtained after the motherboard time is set;
- the time synchronization module is configured to set the running time corresponding to the synchronization service as the running time corresponding to the first user process in response to the time synchronization instruction.
- the above device and method embodiments in the device embodiment using the first user process as the execution subject are based on the same inventive concept, and will not be repeated here. Furthermore, the device embodiment using the second user process as the execution body is similar to the above-mentioned device embodiment using the first user process as the execution body, so details will not be repeated here.
- the embodiment of the present application provides another data processing device with synchronization service as the execution subject.
- the above-mentioned device may include:
- the synchronization processing request receiving module 810 is configured to respectively receive the first synchronization processing request sent by the first user process and the second synchronization processing request sent by the second user process, the above-mentioned first synchronization processing request is used to request the above-mentioned first user process to synchronize Processing the data to be processed sent by the producer process, the second synchronous processing request is used to request the second user process to synchronously process the data to be processed sent by the producer process, and the second user process is the redundancy of the first user process remaining process;
- the synchronous processing request response module 820 is configured to, in response to the first synchronous processing request and the second synchronous processing request, feed back request response information to the first user process and the second user process respectively, the request response information carrying the above The synchronous processing cycle of the data to be processed and the activation time stamp of the synchronous processing cycle, so that the first user process and the second user process process the data to be processed within the synchronous processing cycle based on the activation time stamp respectively to obtain the first A first data processing result corresponding to a user process and a second data processing result corresponding to the second user process;
- a data processing result receiving module 830 configured to respectively receive the first data processing result sent by the first user process and the second data processing result sent by the second user process;
- a data processing result comparison module 840 configured to compare the first data processing result with the second data processing result to obtain a comparison result
- the comparison result sending module 850 configured to send the first data processing result, the second data processing result, and the comparison result when the comparison result is the same as the first data processing result and the second data processing result to the consumer process.
- the above device may further include:
- the running time setting module is used to set the running time corresponding to the above-mentioned synchronization service based on the GPS clock or the motherboard time of the hardware device where the above-mentioned synchronization service is located;
- a time synchronization command sending module configured to send a time synchronization command to the first user process and the second user process respectively, the time synchronization command carrying the running time corresponding to the synchronization service, so that the first user process responds to the above A time synchronization instruction, setting the running time corresponding to the above-mentioned synchronization service to the running time corresponding to the above-mentioned first user process, and the above-mentioned second user process responding to the above-mentioned time synchronization instruction, setting the running time corresponding to the above-mentioned synchronization service to the above-mentioned second The running time corresponding to the user process.
- An embodiment of the present application provides a data processing device, the data processing device includes a processor and a memory, at least one instruction or at least one program is stored in the memory, the at least one instruction or the at least one program is loaded by the processor and Execute to realize the data processing method provided by the above method embodiment.
- the memory can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory.
- the memory can mainly include a program storage area and a data storage area, wherein the program storage area can store operating systems, application programs required by functions, etc.; the data storage area can store data created according to the use of the above-mentioned devices, etc.
- the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
- the memory may also include a memory controller to provide processor access to the memory.
- the method embodiments provided in the embodiments of this application can be executed in the operating system of a vehicle-mounted terminal or a similar computing device, that is, the above-mentioned computer equipment can include a vehicle-mounted terminal or a similar computing device.
- An embodiment of the present application also provides a storage medium, which can be set in a server to store at least one instruction or at least one program related to implementing one of the data processing methods in the method embodiment.
- the at least one instruction Or the at least one segment of program is loaded and executed by the processor to implement the data processing method provided by the above method embodiment.
- the foregoing storage medium may be located in at least one network server among multiple network servers of the computer network.
- the above-mentioned storage medium may include but not limited to: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk Various media that can store program codes such as discs or optical discs.
- the synchronization service can respond to the data sent by the user process and its redundant process respectively.
- Synchronous processing requests through the synchronization slave process corresponding to the user process and the synchronization slave process corresponding to the redundant process, respectively provide the activation control mechanism and activation time for data processing to the user process and its redundant process, so that the two processes are based on Activation timestamps synchronously process pending data within the synchronous processing cycle, ensuring the consistency of the data processing time of the two processes, improving the stability and accuracy of deterministic time execution control, thereby ensuring the data processing of the two processes
- the work pool mechanism the ability of multiple work processes to process the same task in parallel is guaranteed, and user processes are not allowed to create threads by themselves, thereby improving the security and stability of the data processing process and avoiding uncertainty Risks caused by behavior;
- the synchronization service receives the data processing results of the two processes respectively, and compares the two data processing results with The result is sent to the consumer process for subsequent processing of the data, which realizes the functional safety requirements of executing two processes with different paths to produce the same output under the same
- each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments.
- the description is relatively simple, and for relevant parts, please refer to the part of the description of the method embodiments.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Hardware Redundancy (AREA)
- Multi Processors (AREA)
Abstract
本申请公开了一种数据处理方法、装置、设备及存储介质,所述方法包括:获取待处理数据;向同步服务发送第一同步处理请求,以使同步服务响应于第一同步处理请求与第二用户进程发送的第二同步处理请求,分别向第一用户进程和第二用户进程反馈请求响应信息;基于激活时间戳在同步处理周期内处理待处理数据,得到第一数据处理结果;向同步服务发送第一数据处理结果,以使同步服务将第一数据处理结果与第二用户进程发送的第二数据处理结果进行对比,并在对比结果为第一数据处理结果和第二数据处理结果一致的情况下,将第一数据处理结果、第二数据处理结果和对比结果发送到消费者进程。利用本申请的方案可以提升自动驾驶系统功能的可靠性与安全性。
Description
本申请涉及计算机技术领域,具体涉及一种数据处理方法、装置、设备及存储介质。
随着自动驾驶的发展,人们对自动驾驶领域的安全设计要求越来越高。根据现有的自动驾驶功能安全机制,通常自动驾驶系统中的每个服务程序节点都会设置有相应的冗余节点来保障行车安全。
然而,在自动驾驶系统的数据处理过程中,缺乏相应的保障机制来保证每个服务程序节点与对应冗余节点的数据处理结果的一致性和正确性,从而难以真正实现自动驾驶系统的安全性和稳定性。因此,需要提供更加安全有效的技术方案。
发明内容
本申请提供了一种数据处理方法、装置、设备及存储介质,可以提升用户进程及其冗余进程的数据处理时间和数据处理结果的一致性,从而提升自动驾驶系统功能的可靠性与安全性,本申请技术方案如下:
一方面,提供了一种数据处理方法,所述方法包括:
获取生产者进程发送的待处理数据;
向同步服务发送第一同步处理请求,以使所述同步服务响应于所述第一同步处理请求与接收到的第二用户进程发送的第二同步处理请求,分别向第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,所述第二用户 进程为所述第一用户进程的冗余进程;
基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第一数据处理结果;
向所述同步服务发送所述第一数据处理结果,以使所述同步服务将所述第一数据处理结果与接收到的所述第二用户进程发送的第二数据处理结果进行对比,得到对比结果,并在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
另一方面,提供了一种数据处理方法,所述方法包括:
分别接收第一用户进程发送的第一同步处理请求和第二用户进程发送的第二同步处理请求,所述第一同步处理请求用于请求所述第一用户进程同步处理生产者进程发送的待处理数据,所述第二同步处理请求用于请求所述第二用户进程同步处理所述生产者进程发送的所述待处理数据,所述第二用户进程为所述第一用户进程的冗余进程;
响应于所述第一同步处理请求和所述第二同步处理请求,分别向所述第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,以使所述第一用户进程和所述第二用户进程分别基于所述激活时间戳在所述同步处理周期内处理所述待处理数据得到所述第一用户进程对应的第一数据处理结果和所述第二用户进程对应的第二数据处理结果;
分别接收所述第一用户进程发送的所述第一数据处理结果和所述第二用户进程发送的所述第二数据处理结果;
将所述第一数据处理结果和所述第二数据处理结果进行对比,得到对比结果;
在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
另一方面,提供了一种数据处理设备,所述设备运行有第一用户进程、第二用户进程和同步服务,所述第二用户进程为所述第一用户进程的冗余进程,其中:
所述第一用户进程,用于获取生产者进程发送的待处理数据;向所述同步服务发送第一同步处理请求;接收所述同步服务发送的请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳;基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第一数据处理结果;向所述同步服务发送所述第一数据处理结果;
所述第二用户进程,用于获取所述生产者进程发送的所述待处理数据;向所述同步服务发送第二同步处理请求;接收所述同步服务发送的所述请求响应信息;基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第二数据处理结果;向所述同步服务发送所述第二数据处理结果;
所述同步服务,用于分别接收所述第一用户进程发送的所述第一同步处理请求和所述第二用户进程发送的所述第二同步处理请求;响应于所述第一同步处理请求和所述第二同步处理请求,分别向所述第一用户进程和所述第二用户进程反馈所述请求响应信息;分别接收所述第一用户进程发送的所述第一数据处理结果和所述第二用户进程发送的所述第二数据处理结果;将所述第一数据处理结果和所述第二数据处理结果进行对比,得到对比结果;在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
另一方面,提供了一种数据处理装置,所述装置包括:
待处理数据获取模块,用于获取生产者进程发送的待处理数据;
第一同步处理请求发送模块,用于向同步服务发送第一同步处理请求,以使所述同步服务响应于所述第一同步处理请求与接收到的第二用户进程发送的第二同步处理请求,分别向第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,所述第二用户进程为所述第一用户进程的冗余进程;
数据处理模块,用于基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第一数据处理结果;
第一数据处理结果发送模块,用于向所述同步服务发送所述第一数据处理结果,以使所述同步服务将所述第一数据处理结果与接收到的所述第二用户进程发送的第二数据处理结果进行对比,得到对比结果,并在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
另一方面,提供了一种数据处理装置,所述装置包括:
同步处理请求接收模块,用于分别接收第一用户进程发送的第一同步处理请求和第二用户进程发送的第二同步处理请求,所述第一同步处理请求用于请求所述第一用户进程同步处理生产者进程发送的待处理数据,所述第二同步处理请求用于请求所述第二用户进程同步处理所述生产者进程发送的所述待处理数据,所述第二用户进程为所述第一用户进程的冗余进程;
同步处理请求响应模块,用于响应于所述第一同步处理请求和所述第二同步处理请求,分别向所述第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,以使所述第一用户进程和所述第二用户进程分别基于所述激活时间戳在所述同步处理周期内处理所述待处理数据得到所述第一用户进程对应的第一数据处理结果和所述第二用户进程对应的第二数据处理结果;
数据处理结果接收模块,用于分别接收所述第一用户进程发送的所述第一数据处理结果和所述第二用户进程发送的所述第二数据处理结果;
数据处理结果对比模块,用于将所述第一数据处理结果和所述第二数据处理结果进行对比,得到对比结果;
对比结果发送模块,用于在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
另一方面,提供了一种数据处理设备,所述设备包括处理器和存储器,所 述存储器中存储有至少一条指令或至少一段程序,所述至少一条指令或所述至少一段程序由所述处理器加载并执行以实现如上述的数据处理方法。
另一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令或至少一段程序,所述至少一条指令或所述至少一段程序由处理器加载并执行以实现如上述的数据处理方法。
本申请提供的数据处理方法、装置、设备及存储介质,具有如下技术效果:
利用本申请提供的技术方案,一方面,同步服务能够分别响应于用户进程及其冗余进程各自发送的同步处理请求,分别向用户进程及其冗余进程反馈同步处理周期和激活时间戳,以使两个进程分别基于激活时间戳在同步处理周期内同步处理待处理数据,保证了两个进程的数据处理时间的一致性,提升了确定性时间执行控制的稳定性与精准性;另一方面,同步服务分别接收两个进程各自的数据处理结果,在两个数据处理结果的对比结果为两个数据处理结果一致的情况下,将两个数据处理结果和对比结果发送到消费者进程以进行数据的后续处理,实现了在相同的输入和内部状态的情况下,执行两个不同路径的进程进行计算能够产生相同的输出的功能安全的需求,保证了两个进程的数据处理结果的一致性和准确性,提升了确定性数据执行控制的稳定性与精准性;另一方面,提升了自动驾驶系统功能的可靠性与安全性,从而提升了自动驾驶车辆的行车安全。
为了更清楚地说明本申请实施例或现有技术中的技术方案和优点,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。
图1是本申请实施例提供的一种数据处理方法的流程示意图;
图2是本申请实施例提供的另一种数据处理方法的流程示意图;
图3是本申请实施例提供的另一种数据处理方法的流程示意图;
图4是本申请实施例提供的另一种数据处理方法的流程示意图;
图5是本申请实施例提供的一种数据处理设备的示意图;
图6是本申请实施例提供的另一种数据处理设备的示意图;
图7是本申请实施例提供的一种数据处理装置示意图;
图8是本申请实施例提供的另一种数据处理装置示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或服务器不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
在自动驾驶系统中,数据的处理是连续多段的,在跨越多个服务程序节点的数据处理之后最终输出计算结果。在这整个数据处理过程中,基于时间确定性的基础之上,需要有一套完整的数据处理机制来保障数据计算结果的正确性与安全性,以提高整车自动驾驶系统的稳定性与安全性。
以下介绍本申请实施例提供的一种数据处理方法,图1为本申请实施例提供的一种数据处理方法的流程示意图。需要说明的是,本说明书提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的劳动可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中 的一种方式,不代表唯一的执行顺序。在实际中的系统或产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境)。具体的如图1所示,上述方法可以包括:
S101,第一用户进程和第二用户进程分别获取生产者进程发送的待处理数据,上述第二用户进程为上述第一用户进程的冗余进程。
在本说明书实施例中,冗余进程可以为对用于处理数据的目标用户进程进行备份得到的进程,因此,第二用户进程可以为与第一用户进程相同的备份进程。
在本说明书实施例中,生产者进程可以为生成待处理数据的进程,在一个具体的实施例中,生产者进程可以为自动驾驶系统的数据处理服务的多个服务节点中的任一服务节点。
S103,上述第一用户进程和上述第二用户进程分别向同步服务发送第一同步处理请求和第二同步处理请求。
具体的,同步服务可以为用于控制第一用户进程和第二用户进程进行同步数据处理的服务进程。
在本说明书实施例中,上述第一用户进程向同步服务发送第一同步处理请求可以包括:
上述第一用户进程调用上述第一用户进程对应的同步从进程中的等待同步处理接口,以使上述对应的同步从进程发送上述第一同步处理请求。
在一个具体的实施例中,上述同步从进程可以包括多种API(Application Programming Interface,应用程序接口),上述多个API可以包括但不限于:Init()接口(初始化接口)、WaitForNextActivation()接口(等待当前服务的下一次激活接口)、RunWorkerPool()接口(执行工作池接口)、GetActivationTime()接口(返回当前服务的激活时间接口)和GetNextActivationTime()接口(返回当前服务的下一次激活时间接口)。具体的,第一用户进程通过调用同步从进程中的WaitForNextActivation()接口,以使对应的同步从进程发送第一同步处理请求。
具体的,第二用户进程向同步服务发送第二同步处理请求的实施例的细化 步骤与上述第一用户进程向同步服务发送第一同步处理请求的实施例的细化步骤相似,在此不再赘述。
S105,上述同步服务响应于上述第一同步处理请求和上述第二同步处理请求,分别向上述第一用户进程和上述第二用户进程反馈请求响应信息,上述请求响应信息携带有上述待处理数据的同步处理周期和上述同步处理周期的激活时间戳。
具体的,同步服务在接收到第一同步处理请求和第二同步处理请求后,对第一用户进程和第二用户进程同步处理待处理数据的时间进行评估,得到上述同步处理周期和上述同步处理周期的激活时间戳;并分别向第一用户进程对应的同步从进程与第二用户进程对应的同步从进程发送携带有同步处理周期和激活时间戳的请求响应时间的请求响应信息,以使第一用户进程对应的同步从进程向第一用户进程反馈请求响应信息,以及第二用户进程对应的同步从进程向第二用户进程反馈请求响应信息。具体的,第一用户进程能够通过调用第一用户进程对应的同步从进程中的GetActivationTime()接口得到请求响应信息,以及第二用户进程能够通过调用第二用户进程对应的同步从进程中的GetActivationTime()接口得到请求响应信息。
由以上实施例可见,通过用户进程对应的同步从进程向用户进程提供对数据处理的激活控制机制和激活时间,提升了确定性时间执行控制的稳定性与精准性,从而保障两个进程的数据处理过程的同步执行。
S107,上述第一用户进程和上述第二用户进程分别基于上述激活时间戳在上述同步处理周期内处理上述待处理数据,得到上述第一用户进程对应的第一数据处理结果和上述第二用户进程对应的第二数据处理结果。
在本说明书实施例中,上述第一用户进程基于上述激活时间戳在上述同步处理周期内处理上述待处理数据,得到上述第一用户进程对应的第一数据处理结果可以包括:
上述第一用户进程基于上述激活时间戳,调用上述第一用户进程对应的同 步从进程中的工作池接口,以使工作池中的多个工作线程在上述同步处理周期内基于容器迭代器并行处理上述待处理数据,得到上述第一数据处理结果,其中,上述多个工作线程执行相同的处理任务。
具体的,容器迭代器可以为对容器中的所有元素实现遍历操作的访问工具,容器可以为用于存储元素的工具,元素即为待处理数据中的每个数据。第一用户进程调用RunWorkerPool()接口能够通过容器迭代器将待处理数据分配给每个工作线程,从而使得多个工作线程能够并行循环处理分配到的待处理数据。
在实际应用中,工作池中的多个工作线程仅能够用于并行处理多个相同的任务,不能用于并行处理多个不同的任务;并且用户进程不能够自行创建线程以避免不确定行为导致的风险。
具体的,第二用户进程基于激活时间戳在同步处理周期内处理待处理数据,得到第一数据处理的实施例的细化步骤与上述第一用户进程基于上述激活时间戳在上述同步处理周期内处理上述待处理数据,得到上述第一用户进程对应的第一数据处理结果的实施例的细化步骤相似,在此不再赘述。
由以上实施例可见,通过工作池机制,保障多个工作进程并行处理相同任务的能力,且不允许用户进程自行创建线程,从而提升了数据处理过程的安全性和稳定性,避免不确定行为导致的风险。
S109,上述同步服务分别接收上述第一用户进程发送的第一数据处理结果和上述第二用户进程发送的第二数据处理结果。
S111,上述同步服务将上述第一数据处理结果和上述第二数据处理结果进行对比,得到对比结果。
S113,在上述对比结果为上述第一数据处理结果和上述第二数据处理结果一致的情况下,上述同步服务将上述第一数据处理结果、上述第二数据处理结果和上述对比结果发送到消费者进程。
在本说明书实施例中,消费者进程可以为生产者进程下游的消费数据处理结果的进程,在一个具体的实施例中,消费者进程可以为自动驾驶系统的数据 处理服务的多个服务节点中的任一服务节点。
具体的,同步服务对第一数据处理结果和第二数据处理结果进行对比,当对比结果一致时,将第一数据处理结果、第二数据处理结果和对比结果发送到消费者进程,从而保证第一用户进程和第二用户进程的数据处理结果的一致性。
由以上实施例可见,实现了在相同的输入和内部状态的情况下,执行两个不同路径的进程进行计算能够产生相同的输出的功能安全的需求,保证了两个进程的数据处理结果的一致性和准确性,提升了确定性数据执行控制的稳定性与精准性。
在本说明实施例中,各个进程及服务与外部的数据交换通过通信管理模块来实现,具体的,通信管理模块可以用于提供自动驾驶系统环境即分布式实时嵌入式环境中应用程序之间的所有通信功能。
在一个可选的实施例中,在上述第一用户进程、上述第二用户进程与同步服务运行在不同的硬件设备上的情况下,如图2所示,在上述分别接收上述第一用户进程发送的上述第一数据处理结果和上述第二用户进程发送的上述第二数据处理结果之前,上述方法还可以包括:
S201,上述同步服务基于GPS时钟或上述同步服务所在硬件设备的主板时间设置上述同步服务对应的运行时间。
S203,上述同步服务向上述第一用户进程和上述第二用户进程分别发送时间同步指令,上述时间同步指令携带有上述同步服务对应的运行时间。
S205,上述第一用户进程和上述第二用户进程响应于上述时间同步指令,分别将上述同步服务对应的运行时间设置为上述第一用户进程对应的运行时间和上述第二用户进程对应的运行时间。
具体的,基于GPS时钟或/和同步服务所在硬件设备的主板时间来同步第一用户进程、第二用户进程与同步服务的运行时间,实现内部应用程序环境时间同步,从而使得位于不同硬件设备的第一用户进程和第二用户进程在时间同步的情况下,基于同步处理周期和激活时间戳来同步执行待处理数据。
由以上实施例可见,通过时间同步机制,使得用户进程及其冗余进程即使处于不同的硬件设备也能够实现数据的同步处理,提升了自动驾驶系统跨ECU(Electronic Control Unit,电子控制单元)多设备冗余的数据处理能力。
由以上本申请书实施例可见,利用本申请实施例提供的技术方案,一方面,同步服务能够分别响应于用户进程及其冗余进程各自发送的同步处理请求,通过用户进程对应的同步从进程及其冗余进程对应的同步从进程分别向用户进程及其冗余进程提供对数据处理的激活控制机制和激活时间,以使两个进程分别基于激活时间戳在同步处理周期内同步处理待处理数据,保证了两个进程的数据处理时间的一致性,提升了确定性时间执行控制的稳定性与精准性,从而保障两个进程的数据处理过程的同步执行;另一方面,通过工作池机制,保障多个工作进程并行处理相同任务的能力,且不允许用户进程自行创建线程,从而提升了数据处理过程的安全性和稳定性,避免不确定行为导致的风险;另一方面,同步服务分别接收两个进程各自的数据处理结果,在两个数据处理结果的对比结果为两个数据处理结果一致的情况下,将两个数据处理结果和对比结果发送到消费者进程以进行数据的后续处理,实现了在相同的输入和内部状态的情况下,执行两个不同路径的进程进行计算能够产生相同的输出的功能安全的需求,保证了两个进程的数据处理结果的一致性和准确性,提升了确定性数据执行控制的稳定性与精准性;另一方面,通过时间同步机制,使得两个进程即使处于不同的硬件设备也能够实现数据的同步处理,提升了自动驾驶系统跨ECU多设备冗余的数据处理能力;另一方面,提升了自动驾驶系统功能的可靠性与安全性,从而提升了自动驾驶车辆的行车安全。
以下以第一用户进程为执行主体介绍本申请实施例提供的另一种数据处理方法,图3为本申请实施例提供的另一种数据处理方法的流程示意图。需要说明的是,本说明书提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的劳动可以包括更多或者更少的操作步骤。实施例中列举的步骤 顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的系统或产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境)。具体的如图3所示,上述方法可以包括:
S301,获取生产者进程发送的待处理数据。
S303,向同步服务发送第一同步处理请求,以使上述同步服务响应于上述第一同步处理请求与接收到的第二用户进程发送的第二同步处理请求,分别向第一用户进程和上述第二用户进程反馈请求响应信息,上述请求响应信息携带有上述待处理数据的同步处理周期和上述同步处理周期的激活时间戳,上述第二用户进程为上述第一用户进程的冗余进程。
在本说明书实施例中,上述向同步服务发送第一同步处理请求可以包括:
调用上述第一用户进程对应的同步从进程中的等待同步处理接口,以使上述对应的同步从进程发送上述第一同步处理请求。
S305,基于上述激活时间戳在上述同步处理周期内处理上述待处理数据,得到第一数据处理结果。
在本说明书实施例中,上述基于上述激活时间戳在上述同步处理周期内处理上述待处理数据,得到第一数据处理结果可以包括:
基于上述激活时间戳,调用上述第一用户进程对应的同步从进程中的工作池接口,以使工作池中的多个工作线程在上述同步处理周期内基于容器迭代器并行处理上述待处理数据,得到上述第一数据处理结果,其中,上述多个工作线程执行相同的处理任务。
S307,向上述同步服务发送上述第一数据处理结果,以使上述同步服务将上述第一数据处理结果与接收到的上述第二用户进程发送的第二数据处理结果进行对比,得到对比结果,并在上述对比结果为上述第一数据处理结果和上述第二数据处理结果一致的情况下,将上述第一数据处理结果、上述第二数据处理结果和上述对比结果发送到消费者进程。
在一个可选的实施例中,在上述第一用户进程、上述第二用户进程与上述 同步服务运行在不同的硬件设备上的情况下,上述方法还可以包括:
1)接收上述同步服务发送的时间同步指令,上述时间同步指令携带有上述同步服务对应的运行时间,上述同步服务对应的运行时间是基于GPS时钟或上述同步服务所在硬件设备的主板时间设置后得到的。
2)响应于上述时间同步指令,将上述同步服务对应的运行时间设置为上述第一用户进程对应的运行时间。
上述从第一用户进程单侧撰写的数据处理方法的实施例的具体细化步骤可以参见上述交互侧数据处理方法的实施例,在此不再赘述。且从第二用户进程单侧撰写的数据处理方法与上述从第一用户进程单侧撰写的数据处理方法相似,在此不再赘述。
以下以同步服务为执行主体介绍本申请实施例提供的另一种数据处理方法,图4为本申请实施例提供的另一种数据处理方法的流程示意图。需要说明的是,本说明书提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的劳动可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的系统或产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境)。具体的如图7所示,上述方法可以包括:
S401,分别接收第一用户进程发送的第一同步处理请求和第二用户进程发送的第二同步处理请求,所述第一同步处理请求用于请求所述第一用户进程同步处理生产者进程发送的待处理数据,所述第二同步处理请求用于请求所述第二用户进程同步处理所述生产者进程发送的所述待处理数据,所述第二用户进程为所述第一用户进程的冗余进程。
S403,响应于所述第一同步处理请求和所述第二同步处理请求,分别向所述第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,以使 所述第一用户进程和所述第二用户进程分别基于所述激活时间戳在所述同步处理周期内处理所述待处理数据得到所述第一用户进程对应的第一数据处理结果和所述第二用户进程对应的第二数据处理结果。
S405,分别接收所述第一用户进程发送的所述第一数据处理结果和所述第二用户进程发送的所述第二数据处理结果。
S407,将所述第一数据处理结果和所述第二数据处理结果进行对比,得到对比结果。
S409,在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
在一个可选的实施例中,在上述第一用户进程、上述第二用户进程与同步服务运行在不同的硬件设备上的情况下,在上述分别接收上述第一用户进程发送的上述第一数据处理结果和上述第二用户进程发送的上述第二数据处理结果之前,上述方法还可以包括:
1)基于GPS时钟或上述同步服务所在硬件设备的主板时间设置上述同步服务对应的运行时间。
2)向上述第一用户进程和上述第二用户进程分别发送时间同步指令,上述时间同步指令携带有上述同步服务对应的运行时间,以使上述第一用户进程响应于上述时间同步指令,将上述同步服务对应的运行时间设置为上述第一用户进程对应的运行时间,以及上述第二用户进程响应于上述时间同步指令,将上述同步服务对应的运行时间设置为上述第二用户进程对应的运行时间。
上述从同步服务单侧撰写的数据处理方法的实施例的具体细化步骤可以参见上述交互侧数据处理方法的实施例,在此不再赘述。
本申请实施例还提供了一种数据处理设备,用以实现图1所示的方法。本设备实施例与前述方法实施例对应,能够实现前述方法实施例中的全部内容。为便于阅读,本设备实施例仅对前述方法实施例中的内容进行概要性描述,不 对方法实施例中的细节内容进行逐一赘述。如图5所示,上述设备运行有第一用户进程、第二用户进程和同步服务,上述第二用户进程为上述第一用户进程的冗余进程,其中:
上述第一用户进程,用于获取生产者进程发送的待处理数据;向上述同步服务发送第一同步处理请求;接收上述同步服务发送的请求响应信息,上述请求响应信息携带有上述待处理数据的同步处理周期和上述同步处理周期的激活时间戳;基于上述激活时间戳在上述同步处理周期内处理上述待处理数据,得到第一数据处理结果;向上述同步服务发送上述第一数据处理结果;
上述第二用户进程,用于获取上述生产者进程发送的上述待处理数据;向上述同步服务发送第二同步处理请求;接收上述同步服务发送的上述请求响应信息;基于上述激活时间戳在上述同步处理周期内处理上述待处理数据,得到第二数据处理结果;向上述同步服务发送上述第二数据处理结果;
上述同步服务,用于分别接收上述第一用户进程发送的上述第一同步处理请求和上述第二用户进程发送的上述第二同步处理请求;响应于上述第一同步处理请求和上述第二同步处理请求,分别向上述第一用户进程和上述第二用户进程反馈上述请求响应信息;分别接收上述第一用户进程发送的上述第一数据处理结果和上述第二用户进程发送的上述第二数据处理结果;将上述第一数据处理结果和上述第二数据处理结果进行对比,得到对比结果;在上述对比结果为上述第一数据处理结果和上述第二数据处理结果一致的情况下,将上述第一数据处理结果、上述第二数据处理结果和上述对比结果发送到消费者进程。
在本说明书实施例中,上述设备还运行有第一用户进程对应的同步从进程和第二用户进程对应的同步从进程,其中:
上述第一用户进程,还用于调用上述第一用户进程对应的同步从进程中的等待同步处理接口;
上述第一用户进程对应的同步从进程,还用于向上述同步服务发送上述第一同步处理请求;
上述第二用户进程,还用于调用上述第二用户进程对应的同步从进程中的 等待同步处理接口;
上述第二用户进程对应的同步从进程,还用于向上述同步服务发送上述第二同步处理请求。
在本说明书实施例中,上述第一用户进程,还用于基于上述激活时间戳,调用上述第一用户进程对应的同步从进程中的工作池接口,以使工作池中的多个工作线程在上述同步处理周期内基于容器迭代器并行处理上述待处理数据,得到上述第一数据处理结果,其中,上述多个工作线程执行相同的处理任务;
上述第二用户进程,还用于基于上述激活时间戳,调用上述第二用户进程对应的同步从进程中的工作池接口,以使工作池中的多个工作线程在上述同步处理周期内基于容器迭代器并行处理上述待处理数据,得到上述第二数据处理结果,其中,上述多个工作线程执行相同的处理任务。
在一个可选的实施例中,第一用户进程与第二用户进程还可以运行于不同设备。由于第一用户进程与第二用户进程运行于不同设备,因此,需要对不同设备进行时间同步,以保证第一用户进程与第二用户进程数据处理时间的一致性。具体的,如图6所示,第一设备上运行有第一用户进程和同步服务,第二设备上运行有第二用户进程,其中:
上述同步服务,还用于基于GPS时钟或上述同步服务所在硬件设备的主板时间设置上述同步服务对应的运行时间;向上述第一用户进程和上述第二用户进程分别发送时间同步指令,上述时间同步指令携带有上述同步服务对应的运行时间;
上述第一用户进程,还用于响应于上述时间同步指令,将上述同步服务对应的运行时间设置为上述第一用户进程对应的运行时间;
上述第二用户进程,还用于响应于上述时间同步指令,将上述同步服务对应的运行时间设置为上述第二用户进程对应的运行时间。
本申请实施例提供了以第一用户进程为执行主体的一种数据处理装置,如图7所示,上述装置可以包括:
待处理数据获取模块710,用于获取生产者进程发送的待处理数据;
第一同步处理请求发送模块720,用于向同步服务发送第一同步处理请求,以使上述同步服务响应于上述第一同步处理请求与接收到的第二用户进程发送的第二同步处理请求,分别向第一用户进程和上述第二用户进程反馈请求响应信息,上述请求响应信息携带有上述待处理数据的同步处理周期和上述同步处理周期的激活时间戳,上述第二用户进程为上述第一用户进程的冗余进程;
数据处理模块730,用于基于上述激活时间戳在上述同步处理周期内处理上述待处理数据,得到第一数据处理结果;
第一数据处理结果发送模块740,用于向上述同步服务发送上述第一数据处理结果,以使上述同步服务将上述第一数据处理结果与接收到的上述第二用户进程发送的第二数据处理结果进行对比,得到对比结果,并在上述对比结果为上述第一数据处理结果和上述第二数据处理结果一致的情况下,将上述第一数据处理结果、上述第二数据处理结果和上述对比结果发送到消费者进程。
在本说明书实施例中,上述第一同步处理请求发送模块720可以包括:
等待同步处理接口调用单元,用于调用上述第一用户进程对应的同步从进程中的等待同步处理接口,以使上述对应的同步从进程发送上述第一同步处理请求。
在本说明书实施例中,上述数据处理模块730可以包括:
工作池接口调用单元,用于基于上述激活时间戳,调用上述第一用户进程对应的同步从进程中的工作池接口,以使工作池中的多个工作线程在上述同步处理周期内基于容器迭代器并行处理上述待处理数据,得到上述第一数据处理结果,其中,上述多个工作线程执行相同的处理任务。
在一个可选的实施例中,在上述第一用户进程、上述第二用户进程与上述同步服务运行在不同的硬件设备上的情况下,上述装置还可以包括:
时间同步指令接收模块,用于接收上述同步服务发送的时间同步指令,上述时间同步指令携带有上述同步服务对应的运行时间,上述同步服务对应的运行时间是基于GPS时钟或上述同步服务所在硬件设备的主板时间设置后得到 的;
时间同步模块,用于响应于上述时间同步指令,将上述同步服务对应的运行时间设置为上述第一用户进程对应的运行时间。
上述以第一用户进程为执行主体的装置实施例中的装置与方法实施例基于同样地发明构思,在此不再一一赘述。且以第二用户进程为执行主体的装置实施例与上述以第一用户进程为执行主体的装置实施例相似,在此不再一一赘述。
本申请实施例提供了以同步服务为执行主体的另一种数据处理装置,如图8所示,上述装置可以包括:
同步处理请求接收模块810,用于分别接收第一用户进程发送的第一同步处理请求和第二用户进程发送的第二同步处理请求,上述第一同步处理请求用于请求上述第一用户进程同步处理生产者进程发送的待处理数据,上述第二同步处理请求用于请求上述第二用户进程同步处理上述生产者进程发送的上述待处理数据,上述第二用户进程为上述第一用户进程的冗余进程;
同步处理请求响应模块820,用于响应于上述第一同步处理请求和上述第二同步处理请求,分别向上述第一用户进程和上述第二用户进程反馈请求响应信息,上述请求响应信息携带有上述待处理数据的同步处理周期和上述同步处理周期的激活时间戳,以使上述第一用户进程和上述第二用户进程分别基于上述激活时间戳在上述同步处理周期内处理上述待处理数据得到上述第一用户进程对应的第一数据处理结果和上述第二用户进程对应的第二数据处理结果;
数据处理结果接收模块830,用于分别接收上述第一用户进程发送的上述第一数据处理结果和上述第二用户进程发送的上述第二数据处理结果;
数据处理结果对比模块840,用于将上述第一数据处理结果和上述第二数据处理结果进行对比,得到对比结果;
对比结果发送模块850,用于在上述对比结果为上述第一数据处理结果和上述第二数据处理结果一致的情况下,将上述第一数据处理结果、上述第二数据处理结果和上述对比结果发送到消费者进程。
在一个可选的实施例中,在上述第一用户进程、上述第二用户进程与同步服务运行在不同的硬件设备上的情况下,在上述分别接收上述第一用户进程发送的上述第一数据处理结果和上述第二用户进程发送的上述第二数据处理结果之前,上述装置还可以包括:
运行时间设置模块,用于基于GPS时钟或上述同步服务所在硬件设备的主板时间设置上述同步服务对应的运行时间;
时间同步指令发送模块,用于向上述第一用户进程和上述第二用户进程分别发送时间同步指令,上述时间同步指令携带有上述同步服务对应的运行时间,以使上述第一用户进程响应于上述时间同步指令,将上述同步服务对应的运行时间设置为上述第一用户进程对应的运行时间,以及上述第二用户进程响应于上述时间同步指令,将上述同步服务对应的运行时间设置为上述第二用户进程对应的运行时间。
上述以同步服务为执行主体的装置实施例中的装置与方法实施例基于同样地发明构思,在此不再一一赘述。
本申请实施例提供了一种数据处理设备,该数据处理设备包括处理器和存储器,该存储器中存储有至少一条指令或至少一段程序,该至少一条指令或该至少一段程序由该处理器加载并执行以实现如上述方法实施例所提供的数据处理方法。
存储器可用于存储软件程序以及模块,处理器通过运行存储在存储器的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、功能所需的应用程序等;存储数据区可存储根据上述设备的使用所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器还可以包括存储器控制器,以提供处理器对存储器的访问。
本申请实施例所提供的方法实施例可以在车载终端或者类似的运算装置的 操作系统中执行,即上述计算机设备可以包括车载终端或者类似的运算装置。
本申请实施例还提供了一种存储介质,上述存储介质可设置于服务器之中以保存用于实现方法实施例中一种的数据处理方法相关的至少一条指令或至少一段程序,该至少一条指令或该至少一段程序由该处理器加载并执行以实现上述方法实施例提供的数据处理方法。
可选地,在本实施例中,上述存储介质可以位于计算机网络的多个网络服务器中的至少一个网络服务器。可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
由上述本申请提供的数据处理方法、装置、设备或存储介质的实施例可见,利用本申请实施例提供的技术方案,一方面,同步服务能够分别响应于用户进程及其冗余进程各自发送的同步处理请求,通过用户进程对应的同步从进程及其冗余进程对应的同步从进程分别向用户进程及其冗余进程提供对数据处理的激活控制机制和激活时间,以使两个进程分别基于激活时间戳在同步处理周期内同步处理待处理数据,保证了两个进程的数据处理时间的一致性,提升了确定性时间执行控制的稳定性与精准性,从而保障两个进程的数据处理过程的同步执行;另一方面,通过工作池机制,保障多个工作进程并行处理相同任务的能力,且不允许用户进程自行创建线程,从而提升了数据处理过程的安全性和稳定性,避免不确定行为导致的风险;另一方面,同步服务分别接收两个进程各自的数据处理结果,在两个数据处理结果的对比结果为两个数据处理结果一致的情况下,将两个数据处理结果和对比结果发送到消费者进程以进行数据的后续处理,实现了在相同的输入和内部状态的情况下,执行两个不同路径的进程进行计算能够产生相同的输出的功能安全的需求,保证了两个进程的数据处理结果的一致性和准确性,提升了确定性数据执行控制的稳定性与精准性;另一方面,通过时间同步机制,使得两个进程即使处于不同的硬件设备也能够实 现数据的同步处理,提升了自动驾驶系统跨ECU多设备冗余的数据处理能力;另一方面,提升了自动驾驶系统功能的可靠性与安全性,从而提升了自动驾驶车辆的行车安全。
需要说明的是:上述本申请实施例先后顺序仅仅为了描述,不代表实施例的优劣。且上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、设备和存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指示相关的硬件完成,上述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
Claims (11)
- 一种数据处理方法,其特征在于,所述方法包括:获取生产者进程发送的待处理数据;向同步服务发送第一同步处理请求,以使所述同步服务响应于所述第一同步处理请求与接收到的第二用户进程发送的第二同步处理请求,分别向第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,所述第二用户进程为所述第一用户进程的冗余进程;基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第一数据处理结果;向所述同步服务发送所述第一数据处理结果,以使所述同步服务将所述第一数据处理结果与接收到的所述第二用户进程发送的第二数据处理结果进行对比,得到对比结果,并在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
- 根据权利要求1所述的方法,其特征在于,所述向同步服务发送第一同步处理请求包括:调用所述第一用户进程对应的同步从进程中的等待同步处理接口,以使所述对应的同步从进程发送所述第一同步处理请求。
- 根据权利要求1所述的方法,其特征在于,所述基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第一数据处理结果包括:基于所述激活时间戳,调用所述第一用户进程对应的同步从进程中的工作池接口,以使工作池中的多个工作线程在所述同步处理周期内基于容器迭代器并行处理所述待处理数据,得到所述第一数据处理结果,其中,所述多个工作线程执行相同的处理任务。
- 根据权利要求1至3任一所述的方法,其特征在于,在所述第一用户进程、所述第二用户进程与所述同步服务运行在不同的硬件设备上的情况下,所述方法还包括:接收所述同步服务发送的时间同步指令,所述时间同步指令携带有所述同步服务对应的运行时间,所述同步服务对应的运行时间是基于GPS时钟或所述同步服务所在硬件设备的主板时间设置后得到的;响应于所述时间同步指令,将所述同步服务对应的运行时间设置为所述第一用户进程对应的运行时间。
- 一种数据处理方法,其特征在于,所述方法包括:分别接收第一用户进程发送的第一同步处理请求和第二用户进程发送的第二同步处理请求,所述第一同步处理请求用于请求所述第一用户进程同步处理生产者进程发送的待处理数据,所述第二同步处理请求用于请求所述第二用户进程同步处理所述生产者进程发送的所述待处理数据,所述第二用户进程为所述第一用户进程的冗余进程;响应于所述第一同步处理请求和所述第二同步处理请求,分别向所述第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,以使所述第一用户进程和所述第二用户进程分别基于所述激活时间戳在所述同步处理周期内处理所述待处理数据得到所述第一用户进程对应的第一数据处理结果和所述第二用户进程对应的第二数据处理结果;分别接收所述第一用户进程发送的所述第一数据处理结果和所述第二用户进程发送的所述第二数据处理结果;将所述第一数据处理结果和所述第二数据处理结果进行对比,得到对比结果;在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的 情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
- 根据权利要求5所述的方法,其特征在于,在所述第一用户进程、所述第二用户进程与同步服务运行在不同的硬件设备上的情况下,在所述分别接收所述第一用户进程发送的所述第一数据处理结果和所述第二用户进程发送的所述第二数据处理结果之前,所述方法还包括:基于GPS时钟或所述同步服务所在硬件设备的主板时间设置所述同步服务对应的运行时间;向所述第一用户进程和所述第二用户进程分别发送时间同步指令,所述时间同步指令携带有所述同步服务对应的运行时间,以使所述第一用户进程响应于所述时间同步指令,将所述同步服务对应的运行时间设置为所述第一用户进程对应的运行时间,以及所述第二用户进程响应于所述时间同步指令,将所述同步服务对应的运行时间设置为所述第二用户进程对应的运行时间。
- 一种数据处理设备,其特征在于,所述设备运行有第一用户进程、第二用户进程和同步服务,所述第二用户进程为所述第一用户进程的冗余进程,其中:所述第一用户进程,用于获取生产者进程发送的待处理数据;向所述同步服务发送第一同步处理请求;接收所述同步服务发送的请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳;基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第一数据处理结果;向所述同步服务发送所述第一数据处理结果;所述第二用户进程,用于获取所述生产者进程发送的所述待处理数据;向所述同步服务发送第二同步处理请求;接收所述同步服务发送的所述请求响应信息;基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第二数据处理结果;向所述同步服务发送所述第二数据处理结果;所述同步服务,用于分别接收所述第一用户进程发送的所述第一同步处理请求和所述第二用户进程发送的所述第二同步处理请求;响应于所述第一同步处理请求和所述第二同步处理请求,分别向所述第一用户进程和所述第二用户进程反馈所述请求响应信息;分别接收所述第一用户进程发送的所述第一数据处理结果和所述第二用户进程发送的所述第二数据处理结果;将所述第一数据处理结果和所述第二数据处理结果进行对比,得到对比结果;在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
- 一种数据处理装置,特征在于,所述装置包括:待处理数据获取模块,用于获取生产者进程发送的待处理数据;第一同步处理请求发送模块,用于向同步服务发送第一同步处理请求,以使所述同步服务响应于所述第一同步处理请求与接收到的第二用户进程发送的第二同步处理请求,分别向第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,所述第二用户进程为所述第一用户进程的冗余进程;数据处理模块,用于基于所述激活时间戳在所述同步处理周期内处理所述待处理数据,得到第一数据处理结果;第一数据处理结果发送模块,用于向所述同步服务发送所述第一数据处理结果,以使所述同步服务将所述第一数据处理结果与接收到的所述第二用户进程发送的第二数据处理结果进行对比,得到对比结果,并在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
- 一种数据处理装置,特征在于,所述装置包括:同步处理请求接收模块,用于分别接收第一用户进程发送的第一同步处理请求和第二用户进程发送的第二同步处理请求,所述第一同步处理请求用于请 求所述第一用户进程同步处理生产者进程发送的待处理数据,所述第二同步处理请求用于请求所述第二用户进程同步处理所述生产者进程发送的所述待处理数据,所述第二用户进程为所述第一用户进程的冗余进程;同步处理请求响应模块,用于响应于所述第一同步处理请求和所述第二同步处理请求,分别向所述第一用户进程和所述第二用户进程反馈请求响应信息,所述请求响应信息携带有所述待处理数据的同步处理周期和所述同步处理周期的激活时间戳,以使所述第一用户进程和所述第二用户进程分别基于所述激活时间戳在所述同步处理周期内处理所述待处理数据得到所述第一用户进程对应的第一数据处理结果和所述第二用户进程对应的第二数据处理结果;数据处理结果接收模块,用于分别接收所述第一用户进程发送的所述第一数据处理结果和所述第二用户进程发送的所述第二数据处理结果;数据处理结果对比模块,用于将所述第一数据处理结果和所述第二数据处理结果进行对比,得到对比结果;对比结果发送模块,用于在所述对比结果为所述第一数据处理结果和所述第二数据处理结果一致的情况下,将所述第一数据处理结果、所述第二数据处理结果和所述对比结果发送到消费者进程。
- 一种数据处理设备,其特征在于,所述设备包括处理器和存储器,所述存储器中存储有至少一条指令或至少一段程序,所述至少一条指令或所述至少一段程序由所述处理器加载并执行以实现如权利要求1至7任一所述的数据处理方法。
- 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令或至少一段程序,所述至少一条指令或所述至少一段程序由处理器加载并执行以实现如权利要求1至7任一所述的数据处理方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22891624.3A EP4432081A4 (en) | 2021-11-10 | 2022-09-14 | DATA PROCESSING METHOD AND APPARATUS, STORAGE DEVICE AND MEDIA |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111330055.5 | 2021-11-10 | ||
| CN202111330055.5A CN114253680A (zh) | 2021-11-10 | 2021-11-10 | 一种数据处理方法、装置、设备及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023082819A1 true WO2023082819A1 (zh) | 2023-05-19 |
Family
ID=80790735
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/118690 Ceased WO2023082819A1 (zh) | 2021-11-10 | 2022-09-14 | 一种数据处理方法、装置、设备及存储介质 |
Country Status (3)
| Country | Link |
|---|---|
| EP (1) | EP4432081A4 (zh) |
| CN (1) | CN114253680A (zh) |
| WO (1) | WO2023082819A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114253680A (zh) * | 2021-11-10 | 2022-03-29 | 武汉路特斯汽车有限公司 | 一种数据处理方法、装置、设备及存储介质 |
| CN114771556A (zh) * | 2022-04-25 | 2022-07-22 | 国汽智控(北京)科技有限公司 | 基于分布式冗余的车辆控制方法及装置、电子装置和介质 |
| CN119902898A (zh) * | 2025-02-27 | 2025-04-29 | 华为技术有限公司 | 基于模型的数据处理方法、装置、设备、系统及介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103593251A (zh) * | 2013-11-07 | 2014-02-19 | 浪潮电子信息产业股份有限公司 | 一种基于进程冗余的容错系统及其设计方法 |
| CN111897878A (zh) * | 2020-08-25 | 2020-11-06 | 中国工商银行股份有限公司 | 主辅数据同步方法及系统 |
| CN113342574A (zh) * | 2021-06-16 | 2021-09-03 | 苏州挚途科技有限公司 | 数据处理方法、装置和电子设备 |
| US20210312073A1 (en) * | 2020-09-04 | 2021-10-07 | Alipay (Hangzhou) Information Technology Co., Ltd. | Data processing methods, apparatuses, and devices |
| CN114253680A (zh) * | 2021-11-10 | 2022-03-29 | 武汉路特斯汽车有限公司 | 一种数据处理方法、装置、设备及存储介质 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101741701B (zh) * | 2008-11-12 | 2012-01-11 | 中兴通讯股份有限公司 | 同步调度方法和装置 |
| US11645178B2 (en) * | 2018-07-27 | 2023-05-09 | MIPS Tech, LLC | Fail-safe semi-autonomous or autonomous vehicle processor array redundancy which permits an agent to perform a function based on comparing valid output from sets of redundant processors |
| CN111831054B (zh) * | 2019-04-19 | 2022-07-19 | 北京猎户星空科技有限公司 | 一种异步系统时钟同步方法、装置、系统和存储介质 |
-
2021
- 2021-11-10 CN CN202111330055.5A patent/CN114253680A/zh active Pending
-
2022
- 2022-09-14 WO PCT/CN2022/118690 patent/WO2023082819A1/zh not_active Ceased
- 2022-09-14 EP EP22891624.3A patent/EP4432081A4/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103593251A (zh) * | 2013-11-07 | 2014-02-19 | 浪潮电子信息产业股份有限公司 | 一种基于进程冗余的容错系统及其设计方法 |
| CN111897878A (zh) * | 2020-08-25 | 2020-11-06 | 中国工商银行股份有限公司 | 主辅数据同步方法及系统 |
| US20210312073A1 (en) * | 2020-09-04 | 2021-10-07 | Alipay (Hangzhou) Information Technology Co., Ltd. | Data processing methods, apparatuses, and devices |
| CN113342574A (zh) * | 2021-06-16 | 2021-09-03 | 苏州挚途科技有限公司 | 数据处理方法、装置和电子设备 |
| CN114253680A (zh) * | 2021-11-10 | 2022-03-29 | 武汉路特斯汽车有限公司 | 一种数据处理方法、装置、设备及存储介质 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4432081A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4432081A4 (en) | 2025-11-12 |
| EP4432081A1 (en) | 2024-09-18 |
| CN114253680A (zh) | 2022-03-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP4432081A1 (en) | Data processing method and apparatus, device, and storage medium | |
| Tămaş-Selicean et al. | Design optimization of mixed-criticality real-time embedded systems | |
| CN104583960B (zh) | 在线服务的事务级健康监控 | |
| CN111176801B (zh) | 一种多进程管理方法、装置、设备及存储介质 | |
| US8453151B2 (en) | Method and system for coordinating hypervisor scheduling | |
| US20080030764A1 (en) | Server parallel aggregation | |
| US9239739B2 (en) | Methods and apparatus for controlling affinity for execution entities | |
| Tamas–Selicean et al. | Design optimization of mixed-criticality real-time applications on cost-constrained partitioned architectures | |
| US12346733B2 (en) | Batch processing and error resolution management | |
| CN112612988A (zh) | 页面处理方法、装置、计算机设备及存储介质 | |
| CN114528104B (zh) | 任务处理方法及装置 | |
| CN111966530A (zh) | 应用系统灾备切换方法、装置、计算机设备和存储介质 | |
| CN113467873A (zh) | 虚拟机的调度方法、装置、电子设备及存储介质 | |
| Davydov et al. | SERVICE ROBOTS INTEGRATING SOFTWARE AND REMOTE REPROGRAMMING. | |
| WO2025256261A1 (zh) | 任务处理方法、装置和设备及计算机存储介质 | |
| CN112148420A (zh) | 基于容器技术的异常任务处理方法、服务器及云平台 | |
| CN113253978A (zh) | 嵌入式软件开发方法、模型、电子设备和介质 | |
| US10394729B2 (en) | Speculative and iterative execution of delayed data flow graphs | |
| CN110908644A (zh) | 状态节点的配置方法、装置、计算机设备和存储介质 | |
| CN115271662A (zh) | 会议日程设置方法、装置、计算机设备及存储介质 | |
| WO2018188959A1 (en) | Method and apparatus for managing events in a network that adopts event-driven programming framework | |
| CN112003930A (zh) | 任务分配方法、装置、设备及存储介质 | |
| US9348667B2 (en) | Apparatus for managing application program and method therefor | |
| KR20170126665A (ko) | 복수 단말의 상태 정보를 동기화하는 방법 및 그 장치 | |
| CN114896636B (zh) | 一种数据处理方法、装置、电子设备和存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22891624 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2022891624 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2022891624 Country of ref document: EP Effective date: 20240610 |