Data processing method and device, computer program product and electronic equipment
By encapsulating the data processing process into an independent data processing unit and decoupling the data source and processing logic, the problem of low development efficiency caused by the high coupling of the data processing process and input data in the prior art is solved, and more efficient data processing and maintenance are achieved.
Patent Information
- Application Number
- CN202411902427.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-28
AI Technical Summary
The data processing methods in the prior art are highly coupled with the input data, resulting in low development efficiency.
The data source and processing logic are decoupled by encapsulating the data processing process into different independent data processing units and assigning each input data to the corresponding data processing unit.
It realizes easier maintenance and management of the data processing process and improves overall development efficiency.
Smart Images

Figure CN119718665A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a data processing method, device, computer program product and electronic device. Background Art
[0002] With the rapid development of automobile technology, the intelligence level of vehicles is constantly improving, which not only greatly enhances driving safety, but also significantly improves the driving experience. By integrating various advanced sensors, vehicles can achieve a series of functions, such as using sensors and augmented reality technology to realize augmented reality head-up display (AR-HUD); using human machine interface (HMI) to interact with the vehicle in a variety of ways; analyzing data from various sensors in real time to monitor and diagnose the status of the vehicle; and using sensors and detection technology to achieve assisted driving.
[0003] To achieve the above functions, the amount of data that the vehicle needs to process increases exponentially, and the existing data processing process is mixed with various input data, which is difficult to manage and maintain, resulting in low development efficiency. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a data processing method, device, computer program product and electronic device to solve the problem that the data processing process of the data processing method in the prior art is highly coupled with the input data, resulting in low development efficiency.
[0005] A first aspect of an embodiment of the present application provides a data processing method, which may include:
[0006] Acquire one or more target input data, where the multiple target input data are of different types;
[0007] Using one or more target data processing units corresponding to each target input data, each target input data is processed to obtain target processed data corresponding to each target data processing unit; different data processing units are used to implement different data processing processes;
[0008] Output the target processing data corresponding to each of the target data processing units.
[0009] A second aspect of an embodiment of the present application provides a data processing device, which may include:
[0010] An acquisition module, used for acquiring one or more target input data, wherein the types of the multiple target input data are different;
[0011] A processing module, used to process each of the target input data using one or more of the target data processing units corresponding to each of the target input data, to obtain target processed data corresponding to each of the target data processing units; different data processing units are used to implement different data processing processes;
[0012] The output module is used to output the target processing data corresponding to each of the target data processing units.
[0013] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned data processing methods are implemented.
[0014] The fourth aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the steps of any one of the above-mentioned data processing methods.
[0015] A fifth aspect of an embodiment of the present application provides a computer program product, including a computer program, which enables any of the above-mentioned data processing methods to be executed when the computer program is run.
[0016] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain one or more target input data, and the types of the multiple target input data are different; the one or more target data processing units corresponding to each of the target input data are used to process each of the target input data, and obtain the target processing data corresponding to each of the target data processing units; different data processing units are used to implement different data processing processes; and the target processing data corresponding to each of the target data processing units are output. Through the embodiments of the present application, different data processing processes can be encapsulated into different independent data processing units, and each input data can be assigned to the corresponding data processing unit, so that the data source and the processing logic can be decoupled, making the data processing process easier to maintain, which helps to improve the overall development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a pipeline mode in an embodiment of the present application;
[0019] Figure 2 This is a flow chart of an embodiment of a data processing method in an embodiment of the present application;
[0020] Figure 3 Schematic diagram of a source module in an embodiment of the present application;
[0021] Figure 4 Schematic diagram of a filter module in an embodiment of the present application;
[0022] Figure 5 A schematic diagram of data processing for target input data in an embodiment of the present application;
[0023] Figure 6 Another schematic diagram of performing data processing on target input data in an embodiment of the present application;
[0024] Figure 7 This is a schematic diagram of a sink module in an embodiment of the present application;
[0025] Figure 8 This is a schematic diagram of outputting target processing data in an embodiment of the present application;
[0026] Fig. 9 A schematic diagram of a data processing process in an embodiment of the present application;
[0027] Fig.10 This is a structural diagram of an embodiment of a data processing device in an embodiment of the present application;
[0028] Fig.11 This is a schematic block diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0031] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0032] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0033] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0034] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0035] With the rapid development of automobile technology, the intelligence level of vehicles continues to improve, which not only greatly enhances driving safety, but also significantly improves the driving experience.
[0036] By integrating various advanced sensors, vehicles can achieve a series of functions that were unimaginable before. For example, using navigation data, cameras, assisted driving data and augmented reality technology to project navigation, vehicle speed, warning information and other data onto the windshield to achieve augmented reality head-up display (AR-HUD); for example, using technologies such as voice recognition and gesture recognition to interact with the vehicle in a variety of ways at the human-machine interface (HMI); for example, real-time analysis of data from various sensors to monitor and diagnose the status of the vehicle; for example, using sensors and detection technology to achieve assisted driving.
[0037] To achieve the above functions, the amount of data that the vehicle needs to process increases exponentially, and the existing data processing process is mixed with various input data, which is difficult to manage and maintain, resulting in low development efficiency.
[0038] In view of this, the embodiments of the present application provide a data processing method, device, computer program product and electronic device to solve the problem that the data processing process of the data processing method in the prior art is highly coupled with the input data, resulting in low development efficiency.
[0039] It should be noted that the executor of the method of the present application is an electronic device. Specifically, the electronic device can be a vehicle-mounted terminal, a mobile terminal, a cloud server, a desktop computer, a notebook, a PDA, a workstation, a smart phone and other computing devices.
[0040] In the embodiment of the present application, various data processing functions can be implemented through the pipeline mode / pipeline mode. Specifically, the entire process can be divided into three modules: source, filter, and sink according to the order of processing. Figure 1 As shown in the figure, the output of each module can be used as the input of the next module; the Source module can access the data uniformly and send the input data to the Filter module; the Filter module can receive the input data from the Source module and process and fuse the input data to obtain the processing result; then, the Filter module can send the processing result to the Sink module; the Sink module can output the processing result. Based on this, the three processes of data input, data processing, and data output can be decoupled, thereby improving the flexibility and maintainability of the data processing process.
[0041] The following is a detailed description of the data processing process of the embodiment of the present application; specifically, please refer to Figure 2 In the embodiment of the present application, an embodiment of a data processing method may include steps S201 to S203:
[0042] Step S201: Obtain one or more target input data.
[0043] In the embodiment of the present application, one or more target input data can be obtained through the Source module. The target input data can be any input data such as image data, audio data, text data, sensor data, geographic location data, vehicle information data, user interaction data or biometric data, or other input data; different target input data in the embodiment of the present application have different types.
[0044] In actual data processing applications, it is usually necessary to obtain data from multiple data sources (such as sensors, network services, user input, etc.), and different data sources may use different communication protocols. In order to be compatible and integrate different data sources, the process of obtaining data from each data source can be adapted and set separately, and each data input can be abstracted and simplified to decouple data acquisition from subsequent processing.
[0045] Specifically, the embodiment of the present application can implement each data acquisition process by the Source module; wherein the Source module can be composed of various data channels (Channel), such as Figure 3 As shown, each data channel can be used to read one type of input data or input data corresponding to one access method; different data channels can be used to read target input data of different types or different access methods. Here, the number of data channels and the specific input data to be read can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0046] For example, each input data may be data inputted by any one or more access methods such as a controller area network (CAN), a local interconnect network (LIN), an inter-integrated circuit (IIC), Ethernet, a unified diagnostic service (UDS), and a scalable service-oriented middleware over IP (SOME / IP). For the input data corresponding to each access method, the input data may be read by using a corresponding data channel.
[0047] For another example, in the application scenario of augmented reality head-up display, the input data may be navigation data (such as route guidance, destination information, real-time traffic conditions, etc.), vehicle sensor data (such as speed, acceleration, direction, vehicle posture, etc.), environmental perception data (radar, lidar, camera images, etc.), traffic sign recognition data (such as speed limit, turn instructions, etc.), and any one or more types of input data. For each type of input data, a corresponding data channel may be used to read the input data.
[0048] For another example, in a human-computer interaction application scenario, the input data may be user input data (such as touch screen operations, physical button presses, voice commands, gesture recognition results, etc.), vehicle status information (such as vehicle speed, fuel level, engine status, etc.), external communication data (such as mobile phones, communication data from other vehicles or transportation infrastructure), entertainment system data (such as music playlists, radio frequencies, volume settings, etc.), ambient light sensor data, and any one or more types of input data. For each type of input data, the input data can be read using a corresponding data channel.
[0049] For another example, in the application scenario of vehicle diagnosis, the input data may be engine performance data (such as speed, fuel pressure, ignition timing, intake pipe pressure, etc.), emission control data (such as oxygen sensor, emission temperature sensor, etc.), electrical system status data (such as battery voltage, current, electrical load, etc.), sensor data (such as anti-lock braking system, electronic stability, tire pressure monitoring system, etc.), vehicle dynamic data (such as vehicle speed, acceleration, braking force, steering angle, etc.), cooling system status data (such as coolant temperature, cooling system pressure, etc.), fuel system data (such as fuel flow, injector status, fuel pump performance, etc.), transmission system data (such as transmission oil temperature, gear ratio, clutch wear, etc.), safety system status data (such as seat belts, airbags, pretensioners, etc.), environmental data (such as external temperature, humidity, atmospheric pressure, etc.), and any one or more types of input data. For each type of input data, the input data may be read using a corresponding data channel.
[0050] For another example, in the application scenario of assisted driving, the input data can be any one or more types of input data, such as sensor fusion data (such as radar and camera data), map and positioning data (such as high-precision map data and positioning data), driving behavior data (such as speed, braking force, steering angle, etc.), vehicle control system data (such as electronic stability program, adaptive cruise control, etc.). For each type of input data, a corresponding data channel can be used to read the input data.
[0051] In an embodiment of the present application, one or more target data channels may be used to acquire target input data; wherein the target data channel is a data channel for reading target input data, and different target data channels may be used to read different types of target input data.
[0052] For example, data channel 1 can be used to read input data of data type 1, data channel 2 can be used to read input data of data type 2, and data channel 3 can be used to read input data of data type 3; when it is necessary to read target input data of type 1 and target input data of type 3, data channel 1 and data channel 2 can be determined as target data channels, and data channel 1 can be used to read target input data 1 of data type 1, and data channel 2 can be used to read target input data 2 of data type 2; when it is necessary to read target input data of type 2 and target input data of type 3, data channel 2 and data channel 3 can be determined as target data channels, and data channel 2 can be used to read target input data 2 of data type 2, and data channel 3 can be used to read target input data 3 of data type 3.
[0053] In a specific implementation of an embodiment of the present application, in order to better perform the data processing process later, after the target data channel reads the corresponding target input data, the target input data can be subjected to necessary data preprocessing to obtain the target input data after data preprocessing (referred to as processed target input data); here, data preprocessing may include but is not limited to one or more processes such as data cleaning, data encapsulation and data conversion; for example, the target input data can be cleaned, denoised or formatted to obtain the corresponding processed target input data; for another example, the target input data can be data encapsulated to encapsulate the target input data into target input data of a unified format to obtain the corresponding processed target input data; for another example, the target input data can be data converted to convert the target input data into a data format applicable to the data processing process to obtain the corresponding processed target input data. It should be understood that if the target input data is subjected to data preprocessing after the target input data is read, then, unless otherwise specified, the target input data referred to in the subsequent process are all processed target input data.
[0054] As an example, the target input data read by the target data channel is a byte stream, then the target data channel can encapsulate the target input data into a higher-level data structure, such as an object or a list, to obtain the corresponding encapsulated target input data (ie, processed target input data).
[0055] As an example, if the target input data read by the target data channel is an analog signal, the target data channel can convert the target input data into a digital signal to obtain the corresponding converted target input data (ie, processed target input data).
[0056] In the embodiment of the present application, each target input data can also be received through a preset interactive interface (Interface). The interactive interface is an interface provided to other components or software modules. Specifically, the interactive interface can be used to receive data or output data; for example, the interactive interface is an interface provided to a user interface (UI) rendering engine; through the interactive interface, data sent by the user interface rendering engine can be received, or data can be sent to the user interface rendering engine.
[0057] It should be understood that the target input data in the embodiments of the present application may include input data read through the target data channel and / or input data received through the interactive interface. For example, the target input data may only include input data read through the target data channel; for another example, the target input data may only include input data received through the interactive interface; for another example, the target input data may include input data read through the target data channel and input data received through the interactive interface.
[0058] Step S202: using one or more target data processing units corresponding to each target input data, perform data processing on each target input data to obtain target processed data corresponding to each target data processing unit.
[0059] After receiving each target input data, each target input data can be processed. In the embodiment of the present application, one or more data processing units (Processors) corresponding to each target input data in the Filter module can be used to process each target input data to obtain target processed data corresponding to each target data processing unit; through each data processing unit, each target input data can be processed or fused to convert each target input data into useful information, perform calculations or make decision support, etc.
[0060] The filter in the embodiment of the present application may include various data processing units, such as Figure 4 As shown, a data processing unit can receive one or more input data and can implement a data processing process; different data processing units can be used to implement different data processing processes.
[0061] For example, one data processing unit can be used to perform an image processing process, and the data processing unit can specifically perform compression, enhancement, feature extraction, and other processing on the input image; another data processing unit can be used to perform a signal processing process, and the data processing unit can specifically perform filtering, spectrum analysis, and other processing on the input signal.
[0062] For example, in the application scenario of augmented reality head-up display, one data processing unit can be used to implement the navigation process, and the data processing unit can specifically process positioning data and sensor data, and generate navigation instructions based on the processing results; another data processing unit can be used to implement the environmental perception process, and the data processing unit can specifically analyze camera data, and identify road signs and obstacles based on the analysis results to provide safety warnings.
[0063] For example, in the application scenario of vehicle interaction, one data processing unit can be used to implement the interaction process, and the data processing unit can specifically process the user input (such as voice, touch, gesture, etc.) and convert it into system commands; another data processing unit can be used to implement the display process, and the data processing unit can specifically adjust the display brightness and contrast based on user settings and ambient light changes.
[0064] For example, in the application scenario of assisted driving, one data processing unit can be used to implement the driving assistance process. Specifically, the data processing unit can be based on the data of the integrated radar and camera, and can perform functions such as lane keeping and adaptive cruise control based on the integrated data; another data processing unit can be used to implement the collision prevention process. Specifically, the data processing unit can monitor potential collision risks and perform emergency braking when a collision risk is detected.
[0065] For example, in the application scenario of vehicle diagnosis, one data processing unit can be used to implement the health monitoring process, and the data processing unit can be specifically used to analyze the data from the vehicle sensors to predict potential failures and performance problems; another data processing unit can implement the emission control process, and the data processing unit can be specifically used to monitor emission levels to ensure that the vehicle meets environmental protection standards.
[0066] The number of data processing units included in the Filter module and the data processing process specifically implemented by each data processing unit can be set according to actual needs, and the embodiments of the present application do not limit this.
[0067] In the embodiment of the present application, one or more target data processing units corresponding to each target input data can be determined, and then the corresponding one or more target data processing units can be used to perform data processing on the target input data.
[0068] For example, data channel 1 corresponds to data processing unit 1 and data processing unit 2. When data channel 1 reads input data 1, data processing unit 1 and data processing unit 2 can be used to process input data 1; for another example, data channel 2 corresponds to data processing unit 1 and data channel 3 corresponds to data processing unit 1. Then, data channel 2 can be used to read input data 2, and data channel 3 can be used to read input data 3; then, data processing unit 1 can be used to process input data 2 and input data 3; for another example, the interactive interface corresponds to data processing unit 1 and data processing unit 3. After that, data processing unit 1 can be used to process input data 2 and input data 3.
[0069] In a specific implementation method of an embodiment of the present application, in order to improve the efficiency of data processing, a first mapping relationship can be constructed based on each data channel and the corresponding data processing unit; when it is necessary to process the target input data obtained by the data channel, the data processing unit corresponding to the data channel can be directly queried from the first mapping relationship, and the queried data processing unit can be used to process the input data obtained by the data channel.
[0070] For example, the data processing unit corresponding to data channel 1 is data processing unit 1, the data processing unit corresponding to data channel 2 is data processing unit 1, the data processing units corresponding to data channel 3 are data processing unit 2 and data processing unit 3, the data processing unit corresponding to data channel 4 is data processing unit 4, and the data processing unit corresponding to data channel 5 is data processing unit 4; according to the above-mentioned data channels and the corresponding data processing units, a first mapping relationship can be constructed, which can be specifically shown in the following table:
[0071] Data Channel Data processing unit Data channel 1 Data processing unit 1 Data Channel 2 Data processing unit 1 Data channel 3 Data processing unit 2, data processing unit 3 Data channel 4 Data processing unit 4 Data channel 5 Data processing unit 4
[0072] In this example, if the target data channels are data channel 2 and data channel 3 respectively, it can be determined from the first mapping relationship (the above table) that the target data processing unit corresponding to data channel 2 is data processing unit 1, and the target data processing units corresponding to data channel 3 are data processing unit 2 and data processing unit 3.
[0073] After each target data processing unit is determined, each target data processing unit can be used to process the corresponding target input data to obtain target processed data corresponding to each target data processing unit.
[0074] For example, see Figure 5, the target data processing units corresponding to the target input data 1 read by data channel 1 are data processing unit 1, data processing unit 2 and data processing unit 3. After the target input data 1 is read, the target input data 1 can be processed by using data processing unit 1, data processing unit 2 and data processing unit 3; the target data processing units corresponding to the target input data 2 read by data channel 2 are data processing unit 2 and data processing unit 3. After that, the target processed data 1 output by data processing unit 1, the target processed data 2 output by data processing unit 2 and the target processed data 3 output by data processing unit 3 can be obtained.
[0075] For another example, see Figure 6 , the target data processing units corresponding to the target input data 1 read by data channel 1 are data processing unit 1 and data processing unit 2, then data processing unit 1 and data processing unit 2 can be used to process the target input data 1; the target data processing units corresponding to the target input data 2 read by data channel 2 are data processing unit 2 and data processing unit 3, then data processing unit 2 and data processing unit 3 can be used to process the target input data 2; the target data processing unit corresponding to the target input data 3 accessed by the interactive interface is data processing unit 1, then data processing unit 1 can be used to process the target input data 3; thereafter, the target processed data 1 output by data processing unit 1, the target processed data 2 output by data processing unit 2, and the target processed data 3 output by data processing unit 3 can be obtained.
[0076] By encapsulating data reading and data processing into different modules, business implementation can be decoupled from data input. The Source module and the Filter module can be developed and maintained independently. When a module needs to be updated or repaired, you only need to focus on the module itself, thereby enhancing system stability and flexibility.
[0077] Step S203: output the target processing data corresponding to each target data processing unit.
[0078] After completing the data processing of each target input data, the target processing data corresponding to each target data processing unit can be obtained, and then the target processing data corresponding to each target data processing unit can be output. Since different target processing data need to be output to different targets, in order to avoid the management inconvenience caused by the mixing of the data output process and the data processing process, the embodiment of the present application can encapsulate the data output process into an independent module to isolate the data output process from the data processing process.
[0079] In the embodiment of the present application, each target processing data can be output through a Sink module; wherein the Sink module may include various data output units, such as Figure 7 As shown; here, the data output unit may include a data channel, and one data channel may correspond to a data receiving object. Through the data channel, the processed data can be output to the data receiving object corresponding to the data channel; or, the data output unit may include a callback function (Callbacks), and the corresponding function processing can be executed through the data output unit.
[0080] In an embodiment of the present application, the target processing data obtained by any target data processing unit can be output to the data output unit corresponding to any target data processing unit in the Sink module; then, any data output unit can be used to perform corresponding processing on the received target processing data.
[0081] Among them, the data receiving object corresponding to the data channel in the data output unit can specifically be an external object (such as other modules or other devices). Through the data channel of the data output unit, the processed data can be output to the data receiving object corresponding to the data output unit.
[0082] For example, see Figure 8 The data output unit of the Sink module includes a data output unit 1 and a data output unit 2, wherein the data output unit 1 specifically includes a data channel 1 and the data output unit 2 specifically includes a data channel 2; if the data receiving object corresponding to the data output unit 1 is a database, the data channel 1 included in the data output unit 1 can be used to output the corresponding target processed data to the database for storage; and if the data receiving object corresponding to the data output unit 2 is a mobile device (such as a mobile phone), the data channel 2 included in the data output unit 2 can be used to output the corresponding target processed data to the mobile device.
[0083] In the embodiment of the present application, the data output units (referred to as target data output units) corresponding to the respective target data processing units may be determined; thereafter, the respective target data output units may be used to perform corresponding processing on the received target processing data.
[0084] For example, if the target data output unit corresponding to the target data processing unit 1 is data output unit 1, then the target processed data 1 processed by the target data processing unit 1 can be output to the data output unit 1, and then the data output unit 1 can be used to perform corresponding processing on the received target processed data 1; if the target data output unit corresponding to the target data processing unit 2 is data output unit 3, then the target processed data 2 processed by the target data processing unit 2 can be output to the data output unit 3, and then the data output unit 3 can be used to perform corresponding processing on the received target processed data 2.
[0085] In a specific implementation method of an embodiment of the present application, in order to improve the efficiency of data output, a second mapping relationship can be constructed based on each data processing unit and the corresponding data output unit. When output processing is required, the data output unit corresponding to the data processing unit can be directly queried from the second mapping relationship, and the queried data output unit can be used to output the processed data corresponding to the data processing unit.
[0086] For example, the data output unit corresponding to the data processing unit 1 is the data output unit 4, the data output unit corresponding to the data processing unit 2 is the data output unit 3, the data output unit corresponding to the data processing unit 3 is the data output unit 2, and the data output unit corresponding to the data processing unit 4 is the data output unit 1; according to the above-mentioned data processing units and the corresponding data output units, a second mapping relationship can be constructed, which can be specifically shown in the following table:
[0087] Data processing unit Data output unit Data processing unit 1 Data output unit 4 Data processing unit 2 Data output unit 3 Data processing unit 3 Data output unit 2 Data processing unit 4 Data output unit 1
[0088] In this example, if the target data processing units for data processing are data processing unit 2 and data processing unit 3 respectively, it can be determined from the second mapping relationship (the above table) that the target data output unit corresponding to data processing unit 2 is data output unit 3, and the target data output unit corresponding to data processing unit 3 is data output unit 2; thereafter, data output unit 3 can be used to output processed data 2 obtained by data processing unit 2, and data output unit 2 can be used to output processed data 3 obtained by outputting data processing unit 3.
[0089] In a specific implementation method of an embodiment of the present application, if the target data output unit includes a data channel, the target processed data can be input into the target data output unit so that the data channel of the target data output unit performs data restoration on the target processed data to obtain target restored data corresponding to the target processed data; thereafter, the target restored data can be output through the data channel.
[0090] For example, when the target data output unit includes a data channel, the target data output unit may also be connected to a data receiving object, so that the target restored data may be output to the data receiving object through the data channel.
[0091] As an example, data restoration may include, but is not limited to, one or more processes such as format conversion and data structure analysis.
[0092] For example, the format of the target processed data can be converted into a format receivable by the data receiving object through the data channel in the target data output unit to obtain the corresponding target restored data. Afterwards, the target restored data can be output to the corresponding data receiving object.
[0093] For another example, the target processed data may be parsed into a data structure understandable to the data receiving object through the data channel in the target data output unit to obtain the corresponding target restored data, and then the target restored data may be output to the corresponding data receiving object.
[0094] In another specific implementation of the embodiment of the present application, if the target data output unit includes a callback function, the callback function in the target data output unit can be used to perform function processing on the target processing data to obtain the target function processing result corresponding to the target processing data.
[0095] For example, if the callback function corresponding to the target data output unit is a log corresponding to the recorded data, the target processing data can be input into the target data output unit so that the callback function in the target data output unit can log the target processing data and obtain the corresponding log (i.e., the target function processing result corresponding to the target processing data).
[0096] For another example, if the callback function corresponding to the target data output unit is to trigger a security system, the callback function in the target data output unit can be used to trigger the security system based on the target processing data (ie, the target function processing result corresponding to the target processing data).
[0097] Optionally, in the case where the target data output unit includes a callback function, the target data output unit may also be connected to an interactive interface; after obtaining the target function processing result, the target function processing result may also be output to the interactive interface, so that the target function processing result is transmitted to an object connected to the interactive interface. For example, if the object connected to the interactive interface is a user interface rendering engine, the target function processing result may be transmitted to the user interface rendering engine through the interactive interface, so that the user interface rendering engine performs rendering based on the target function processing result.
[0098] In another specific implementation of the embodiment of the present application, a preset callback function registration (Callbacks Registry) module can also be used to manage each callback function; as an example, the callback function registration module can implement one or more functions such as defining a callback function, creating a callback function, registering a callback function, triggering a callback function, and managing the life cycle of a callback function. For example, the callback function registration module can be used to implement the function of defining a callback function; specifically, the callback function registration module can be used to define the type of parameters and return values that the callback function should receive. For another example, the callback function registration module can be used to implement the function of creating a callback function; specifically, the callback function registration module can be used to create a data structure to store a reference or pointer to the callback function. For another example, the callback function registration module can be used to implement the function of registering a callback function, specifically, the callback function can be associated with a specific event or identifier so that the external code registers the callback function in the registry. For another example, the callback function registration module can be used to implement the function of triggering a callback function; specifically, the callback function registration module can be used to find the callback function in the registry according to the event type and execute it. For another example, the callback function registration module can be used to implement the function of managing the life cycle of the callback function; specifically, the callback function registration module can provide a mechanism to deregister callback functions that are no longer used, and can clean up the registry when the program ends.
[0099] By encapsulating the data processing process and the data output process into different modules, the business implementation and output processing processes such as the user interface can be decoupled. The Filter module and the Source module can be developed and maintained independently. When a module needs to be updated or repaired, you only need to focus on the module itself, which reduces maintenance costs and reduces the complexity and risk of system upgrades.
[0100] By adopting the channel mode, each module can be developed independently and connected freely. When new business needs or business changes arise, it is only necessary to add new connection relationships between modules to realize the process of data input, data processing and data output, which greatly improves development efficiency and allows data processing methods to adapt to various businesses to a greater extent.
[0101] The data processing method of the embodiment of the present application will be described below with reference to the accompanying drawings and specific examples.
[0102] See also Fig. 9In this example, the source module of the pipeline mode may include multiple data channels, namely, analog-to-digital conversion (Analog-to-Digital) data channel (also recorded as AD Channel), navigation data channel (also recorded as Navi Channel), unified diagnostic service (Unified Diagnostic Services, UDS) data channel (also recorded as UDS Channel), sensor data channel (also recorded as Sensors Channel), and vehicle information data channel (also recorded as Car Info Channel).
[0103] Among them, different data channels can be used to receive different input data. For example, the analog-to-digital conversion data channel can be used to receive input analog data and convert the analog data into a digital format. For another example, the navigation data channel can be used to receive relevant data of the navigation system, such as positioning signal data, map information, route planning and traffic condition data, etc. For another example, the unified diagnostic service data channel can be used to receive input vehicle diagnostic data, such as fault codes. For another example, the sensor data channel can be used to receive input sensor data, such as temperature sensor data, pressure sensor data, speed sensor data, etc. For another example, the vehicle information data channel can be used to receive basic information of the vehicle, such as vehicle identification code, vehicle configuration, usage status and maintenance records, etc.
[0104] In this example, the filter module of the pipeline mode may include various data processing units, namely data processing unit A (also denoted as Processor A), data processing unit B (also denoted as Processor B), data processing unit C (also denoted as Processor C), data processing unit D (also denoted as Processor D) and data processing unit E (also denoted as Processor E).
[0105] Among them, Fig. 9 As shown, the analog-to-digital conversion data channel corresponds to data processing unit A, data processing unit B and data processing unit C; the navigation data channel corresponds to data processing unit A, data processing unit B and data processing unit C; the unified diagnostic service data channel corresponds to data processing unit B; the sensor data channel corresponds to data processing unit E; and the vehicle information data channel corresponds to data processing unit D.
[0106] In this example, the sink module of the pipeline mode may include various data output units, and the data output units may include data channels or callback functions. Specifically, the data output units are data output unit 1 (specifically including callback function 1, and data output unit 1 can also be recorded as Callbacks 1), data output unit 2 (specifically including callback function 2, and data output unit 2 can also be recorded as Callbacks 2), data output unit 3 (specifically including data channel A, and data output unit 3 can also be recorded as Channel A), data output unit 4 (specifically including callback function 3, and data output unit 4 can also be recorded as Callbacks 3), and data output unit 5 (specifically including data channel B, and data output unit 5 can also be recorded as Channel B).
[0107] In this example, each data channel of the Source module can be used to read data to obtain corresponding target input data; then, each target input data can be input into the corresponding one or more data processing units to process the target input data.
[0108] Specifically, the target input data read by the analog-to-digital conversion data channel can be input into the data processing unit A, the data processing unit B and the data processing unit C, the target input data read by the navigation data channel can be input into the data processing unit A, the data processing unit B and the data processing unit C, the target input data read by the unified diagnostic service data channel can be input into the data processing unit B, the target input data read by the sensor data channel can be input into the data processing unit D, and the target input data read by the vehicle information data channel can be input into the data processing unit E. In addition, the Filter module can also receive target input data from other components or software modules (the user interface rendering engine in this example) through the interactive interface.
[0109] After the data processing unit processes the input data, target processed data corresponding to each target data processing unit can be obtained. Afterwards, each target processed data can be input into the corresponding target data processing unit for corresponding processing.
[0110] In this example, the target processing data output by the data processing unit A is input to the data output unit 1 for function processing corresponding to the callback function 1, and the corresponding target function processing result is obtained. The target processing data output by the data processing unit B is input to the data output unit 2 for function processing corresponding to the callback function 2, and the corresponding target function processing result is obtained. The target processing data output by the data processing unit C is input to the data output unit 3, and is output to the preset data receiving object through the data output unit 3; the target processing data output by the data processing unit D is input to the data output unit 4 for function processing corresponding to the callback function 3, and the corresponding target function processing result is obtained; thereafter, the target function processing result is output to the interactive interface so that the target function processing result is transmitted to the user interface rendering engine, and the target processing data output by the data processing unit E is input to the data output unit 5, and is output to the preset data receiving object through the data output unit 5.
[0111] In this example, the callback function registration module can also be used to manage each callback function.
[0112] In summary, the embodiments of the present application obtain one or more target input data, and the types of the multiple target input data are different; use one or more target data processing units corresponding to each target input data to process each target input data, and obtain target processing data corresponding to each target data processing unit; different data processing units are used to implement different data processing processes; and output the target processing data corresponding to each of the target data processing units. Through the embodiments of the present application, different data processing processes can be encapsulated into different independent data processing units, and each input data can be assigned to the corresponding data processing unit, so that the data source and the processing logic can be decoupled, making the data processing process easier to maintain, which helps to improve the overall development efficiency.
[0113] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0114] Corresponding to a data processing method described in the above embodiment, Fig.10 A structural diagram of an embodiment of a data processing device provided in an embodiment of the present application is shown.
[0115] In an embodiment of the present application, a data processing device may include:
[0116] An acquisition module 1001 is used to acquire one or more target input data, where the types of the multiple target input data are different;
[0117] The processing module 1002 is used to process each target input data using one or more target data processing units corresponding to each target input data to obtain target processed data corresponding to each target data processing unit; different data processing units are used to implement different data processing processes;
[0118] The output module 1003 is used to output the target processing data corresponding to each of the target data processing units.
[0119] In a specific implementation of the embodiment of the present application, the acquisition module includes:
[0120] a reading submodule, configured to obtain the target input data by using each of the one or more target data channels; one target data channel corresponds to one or more data processing units; different target data channels are used to read different types of target input data;
[0121] The receiving submodule is used to receive one or more target input data using the interactive interface.
[0122] In a specific implementation of the embodiment of the present application, the acquisition module further includes:
[0123] A preprocessing submodule, used for performing data preprocessing on the target input data by using any of the target data channels to obtain processed target input data;
[0124] Furthermore, the processing module is also used to: use one or more target data processing units corresponding to any target data channel to process the target input data output by any target data channel to obtain target processed data corresponding to each target data processing unit.
[0125] In a specific implementation of the embodiment of the present application, the output module includes:
[0126] An output submodule, used for outputting the target processed data obtained by any of the target data processing units to a data output unit corresponding to any of the target data processing units;
[0127] The processing submodule is used to use any of the data output units to perform corresponding processing on the received target processing data.
[0128] In a specific implementation of the embodiment of the present application, the data output unit corresponding to any of the target data processing units includes a data channel;
[0129] The processing submodule comprises:
[0130] A data restoration unit, configured to restore the received target processed data by using the data channel corresponding to any of the target data processing units to obtain target restored data;
[0131] An output unit is used to output each of the target restored data using the data channel.
[0132] In a specific implementation of the embodiment of the present application, the data output unit corresponding to any of the target data processing units includes a callback function;
[0133] The processing submodule comprises:
[0134] The function processing unit is used to use the callback function corresponding to any of the target data processing units to perform function processing on the received target processing data to obtain a target function processing result.
[0135] In a specific implementation of the embodiment of the present application, the processing submodule further includes:
[0136] The output subunit is used to output the target function processing result corresponding to any of the target data processing units to the interactive interface.
[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0138] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0139] Fig.11 A schematic block diagram of an electronic device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0140] like Fig.11 As shown, the electronic device 11 of this embodiment includes: a processor 110, a memory 111, and a computer program 112 stored in the memory 111 and executable on the processor 110. When the processor 110 executes the computer program 112, the steps in the above-mentioned data processing method embodiments are implemented, for example Figure 2 Alternatively, when the processor 110 executes the computer program 112, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Fig.10 The functions of modules 1001 to 1003 are shown.
[0141] Exemplarily, the computer program 112 may be divided into one or more modules / units, which are stored in the memory 111 and executed by the processor 110 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 112 in the electronic device 11.
[0142] Those skilled in the art will understand that Fig.11 It is only an example of the electronic device 11 and does not constitute a limitation of the electronic device 11. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 11 may also include input and output devices, network access devices, buses, etc.
[0143] The processor 110 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0144] The memory 111 may be an internal storage unit of the electronic device 11, such as a hard disk or memory of the electronic device 11. The memory 111 may also be an external storage device of the electronic device 11, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 11. Further, the memory 111 may also include both an internal storage unit of the electronic device 11 and an external storage device. The memory 111 is used to store the computer program and other programs and data required by the electronic device 11. The memory 111 may also be used to temporarily store data that has been output or is to be output.
[0145] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0146] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0147] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0148] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0151] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0152] The relevant user personal information that may be involved in each embodiment of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purpose of the business scenario, to process the personal information that the user actively provides during the use of the product / service or generated by the use of the product / service, as well as the personal information obtained with the user's authorization. The user personal information processed by the applicant will vary depending on the specific product / service scenario and must be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other relevant information. The applicant will treat the user's personal information and its processing with a high degree of diligence. The applicant attaches great importance to the security of user personal information, and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being unauthorized access, public disclosure, use, modification, damage or loss.
[0153] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: include: Acquire one or more target input data, where the multiple target input data are of different types; Using one or more target data processing units corresponding to each of the target input data, data processing is performed on each of the target input data to obtain target processed data corresponding to each of the target data processing units; different data processing units are used to implement different data processing processes; Output the target processing data corresponding to each of the target data processing units.
2. The data processing method according to claim 1, characterized in that: The obtaining of one or more target input data comprises: Utilize each of the one or more target data channels to acquire the target input data; one target data channel corresponds to one or more data processing units; different target data channels are used to read different types of target input data; and / or, One or more of the target input data is received using an interactive interface.
3. The data processing method according to claim 2, characterized in that: After acquiring the target input data by using each of the one or more target data channels, the method further includes: Using any of the target data channels to perform data preprocessing on the target input data to obtain processed target input data; The one or more target data processing units corresponding to each target input data are used to process each target input data to obtain target processed data corresponding to each target data processing unit, which is: The processed target input data output by any target data channel is processed by using one or more target data processing units corresponding to any target data channel to obtain target processed data corresponding to each target data processing unit.
4. The data processing method according to any one of claims 1 to 3, characterized in that: The outputting the target processing data respectively corresponding to each of the target data processing units comprises: Outputting the target processed data obtained by any of the target data processing units to a data output unit corresponding to any of the target data processing units; The received target processing data is processed accordingly using any of the data output units.
5. The data processing method according to claim 4, characterized in that: The data output unit corresponding to any of the target data processing units includes a data channel; The using any of the data output units to perform corresponding processing on the received target processing data includes: Using the data channel corresponding to any one of the target data processing units, restore the received target processed data to obtain target restored data; The target restored data is outputted using the data channel.
6. The data processing method according to claim 4, characterized in that: The data output unit corresponding to any of the target data processing units includes a callback function; The using any of the data output units to perform corresponding processing on the received target processing data includes: The callback function corresponding to any one of the target data processing units is used to perform function processing on the received target processing data to obtain a target function processing result.
7. The data processing method according to claim 6, characterized in that: After performing function processing on the received target processing data using the callback function corresponding to any of the target data processing units to obtain a target function processing result, the method further includes: The target function processing result corresponding to any of the target data processing units is output to the interactive interface.
8. A data processing device, characterized in that: include: An acquisition module, used for acquiring one or more target input data, wherein the multiple target input data are of different types; A processing module, used to process each of the target input data using one or more of the target data processing units corresponding to each of the target input data, to obtain target processed data corresponding to each of the target data processing units; different data processing units are used to implement different data processing processes; The output module is used to output the target processing data corresponding to each of the target data processing units.
9. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, enables the data processing method according to any one of claims 1 to 7 to be executed.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the electronic device implements the steps of the data processing method according to any one of claims 1 to 7.