Data processing method and device based on heterogeneous core architecture, storage medium and electronic equipment
By using inter-core communication to process data processing requests in a heterogeneous core architecture, the problem of variable calibration and observation on heterogeneous multi-core processors is solved, and efficient data processing and calibration are achieved.
Patent Information
- Application Number
- CN202411440251.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art cannot effectively solve the technical problems of data processing based on heterogeneous nuclear architectures, especially in terms of variable calibration and observation.
The data processing request is received through the first processing process, the variable positioning information is parsed, the process type of the target process is determined, and the request is forwarded to the target process through the inter-core communication path to implement data processing.
It realizes the calibration and observation of variables on heterogeneous multi-core processors and solves the problem that the existing technology cannot generate a unified calibration file.
Smart Images

Figure CN119336693A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving, and more specifically, to a data processing method, device, storage medium and electronic device based on a heterogeneous core architecture. Background Art
[0002] As the level of automobile intelligence increases, the business logic and algorithms running on the on-board controller become more complex. In autonomous driving solutions below L3 level, the control algorithm mainly runs on the MCU (microcontroller unit). The development environment of these MCUs is relatively simple, and usually uses homogeneous cores and single processes for calibration and monitoring. However, with the development of autonomous driving technology, especially at L3 level and above, higher requirements are placed on data processing and real-time performance, so more advanced data processing and calibration methods are needed.
[0003] With the development of the automotive industry, more and more Soc heterogeneous multi-cores are being used. For example, the TAD4VM processor has 2 A72, 6 R5F, two C66, and 1 C7X cores. Therefore, the calibration and monitoring functions need to consider the matching of the calibration address and the process. That is, the existing technology cannot solve the technical problems of data processing based on heterogeneous core architecture, specifically, variable calibration and variable observation. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, device, storage medium and electronic device based on a heterogeneous core architecture, so as to at least solve the technical problem that the related technology cannot perform data processing based on a heterogeneous core architecture.
[0005] According to one aspect of an embodiment of the present application, a data processing method based on a heterogeneous core architecture is provided, including: receiving a data processing request associated with a variable to be processed through a first processing process, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle-mounted processor, the data processing request carries variable location information matching the variable to be processed, the data processing request includes a data observation request and / or a data calibration request; determining a process type of a target process matching the variable to be processed based on a parsing result of the variable location information; forwarding the data processing request to the target process through an inter-core communication path when the process type of the target process indicates that the target process is a task process running on a second processing unit, wherein the second processing unit is a processing unit integrated on the target vehicle-mounted processor; obtaining a target processing result returned by the target process, wherein the target processing result is obtained by performing target data processing on the variable to be processed according to the data processing request.
[0006] According to another aspect of an embodiment of the present application, a data processing device based on a heterogeneous core architecture is also provided, including: a receiving unit, which receives a data processing request associated with a variable to be processed through a first processing process, wherein the first processing process is a task process running on a first processing unit, and the first processing unit is integrated on a target vehicle-mounted processor, and the data processing request carries variable location information matching the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request; a determination unit, which determines the process type of a target process matching the variable to be processed based on a parsing result of the variable location information; a forwarding unit, which forwards the data processing request to the target process through an inter-core communication path when the process type of the target process indicates that the target process is a task process running on a second processing unit, wherein the second processing unit is a processing unit integrated on a target vehicle-mounted processor; an execution unit, which obtains a target processing result returned by the target process, wherein the target processing result is obtained by performing target data processing on the variable to be processed according to the data processing request.
[0007] As an optional solution, the above-mentioned data processing device based on heterogeneous core architecture also includes: a first receiving unit, used to receive processing response information returned by the above-mentioned target process through the above-mentioned inter-core communication path; parsing the above-mentioned processing response information to obtain the above-mentioned target processing result, wherein the above-mentioned target processing result is the processing result of the above-mentioned target process running on the above-mentioned second processing unit, performing target data processing according to associated data information, the above-mentioned associated data information is obtained by the above-mentioned target process by parsing the above-mentioned data processing request, and is used to indicate the data information for executing the above-mentioned target data processing, and the above-mentioned associated data information includes: variable address information, variable parameter information, system environment parameter information and sensor configuration information.
[0008] As an optional scheme, the above-mentioned determination unit includes: an acquisition unit, which is used to forward the above-mentioned data processing request to the above-mentioned target process through an inter-process communication path when the above-mentioned process type of the above-mentioned target process indicates that the above-mentioned target process is a task subprocess running on the above-mentioned first processing unit; determine the library file dependency information matching the above-mentioned variable to be processed through the above-mentioned target process; when the above-mentioned library file dependency information indicates that there is a dependency relationship between the above-mentioned target process and the dynamic library, obtain the base address matching the above-mentioned dynamic library; determine the real variable address of the above-mentioned variable to be processed according to the above-mentioned base address; when the above-mentioned library file dependency information indicates that there is a dependency relationship between the above-mentioned target process and the static library, obtain the above-mentioned real variable address of the above-mentioned variable to be processed.
[0009] As an optional solution, the acquisition unit includes: a first acquisition module, used to acquire a relative offset address matching the variable to be processed; determine the sum of the base address and the relative offset address as the real variable address matching the variable to be processed; and perform the target data processing on the variable to be processed indicated by the real variable address according to the data processing request.
[0010] As an optional solution, the above-mentioned acquisition unit includes: a second acquisition module, which is used to obtain the above-mentioned real variable address according to the link file matching the above-mentioned variable to be processed when the above-mentioned library file dependency information indicates that there is a dependency relationship between the above-mentioned target process and the static library; and perform the above-mentioned target data processing on the above-mentioned variable to be processed indicated by the above-mentioned real variable address according to the above-mentioned data processing request.
[0011] As an optional solution, the above-mentioned acquisition unit also includes a third acquisition module, which is used to obtain the calibration processing result returned by the above-mentioned target process when the above-mentioned target data processing is variable calibration processing, wherein the above-mentioned calibration processing result is used to indicate that the parameter value of the above-mentioned variable to be processed is updated from the first parameter value to the second parameter value, and the above-mentioned second parameter value is the parameter value carried in the above-mentioned data processing request for completing the variable calibration task; when the above-mentioned target data processing is variable observation processing, the variable parameter value read from the real variable address matching the above-mentioned variable to be processed is obtained.
[0012] As an optional scheme, the above-mentioned device also includes a receiving module, which is used to receive the above-mentioned target processing result sent by the above-mentioned target process through the above-mentioned inter-core communication path when the above-mentioned target process is the above-mentioned task process running on the above-mentioned second processing unit; and receive the above-mentioned target processing result sent by the above-mentioned target process through the inter-process communication path when the above-mentioned target process is the above-mentioned task subprocess running on the above-mentioned first processing unit.
[0013] As an optional solution, the above-mentioned device also includes: a parsing module, used to parse the above-mentioned data processing request through the above-mentioned first processing process, wherein the field structure of the above-mentioned data processing request matches the target communication protocol; obtain the above-mentioned variable location information matching the above-mentioned variable to be processed from the extended field of the above-mentioned data processing request, wherein the above-mentioned field structure includes the above-mentioned extended field.
[0014] As an optional solution, the above-mentioned device also includes: a first determination unit, used to obtain the load performance of each of the multiple processing units integrated on the above-mentioned target vehicle-mounted processor, wherein the above-mentioned load performance is used to indicate the task processing capability of the above-mentioned processing unit; according to the above-mentioned load performance, the above-mentioned processing unit that meets the processing load condition is the above-mentioned first processing unit; obtaining the historical calibration record integrated on the above-mentioned target vehicle-mounted processor, wherein the above-mentioned historical calibration record is used to indicate the above-mentioned processing unit with the historical optimal processing performance; according to the above-mentioned historical calibration record, the above-mentioned processing unit that meets the historical calibration condition is the above-mentioned first processing unit; according to the strategy selection algorithm, determine the above-mentioned first processing unit from the multiple processing units integrated on the above-mentioned target vehicle-mounted processor.
[0015] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above data processing method based on a heterogeneous core architecture.
[0016] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data processing method based on a heterogeneous core architecture through the computer program.
[0017] In the above-mentioned embodiment of the present application, a data processing request associated with a variable to be processed is received through a first processing process, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle-mounted processor, and the data processing request carries variable location information matching the variable to be processed, the data processing request includes a data observation request and / or a data calibration request; based on the parsing result of the variable location information, the process type of the target process matching the variable to be processed is determined; when the process type of the target process indicates that the target process is a task process running on a second processing unit, the data processing request is forwarded to the target process through an inter-core communication path, wherein the second processing unit is a processing unit integrated on a target vehicle-mounted processor; and a target processing result of the target data processing performed by the target process on the variable to be processed according to the data processing request is obtained.
[0018] Through the above-mentioned implementation mode of the present application, a data processing request associated with a variable to be processed is received through a first processing process, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle-mounted processor, and the data processing request carries variable location information matching the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request; then, based on the parsing result of the variable location information, the process type of the target process matching the variable to be processed is determined, and then when the process type of the target process indicates that the target process is a task process running on a second processing unit, the data processing request is forwarded to the target process through an inter-core communication path, wherein the second processing unit is a processing unit integrated on a target vehicle-mounted processor; and a target processing result returned by the target process is obtained, wherein the target processing result is obtained by performing target data processing on the variable to be processed according to the data processing request, thereby solving the technical problem that the related technology cannot generate a unified calibration file for heterogeneous multi-core processors. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a schematic diagram of an application environment of an optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0021] Figure 2 is a flowchart of an optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of an optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of another optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0024] Figure 5 is a flowchart of another optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of another optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0026] Figure 7 is a schematic diagram of another optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0027] Figure 8 is a flowchart of another optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0028] Fig. 9 is a flowchart of another optional data processing method based on a heterogeneous core architecture according to an embodiment of the present application;
[0029] Fig.10 is a schematic diagram of a data processing device based on a heterogeneous core architecture according to an embodiment of the present application;
[0030] Fig.11 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] According to one aspect of an embodiment of the present application, a data processing method based on a heterogeneous core architecture is provided. Optionally, the data processing method based on a heterogeneous core architecture can be applied to, but is not limited to, Figure 1 In the hardware environment shown. Optionally, the above data processing method based on heterogeneous core architecture provided by the present application can be applied to a vehicle terminal. Figure 1A side view of a vehicle terminal 101 is shown, and the vehicle terminal 101 can travel on a travel surface 113. The vehicle terminal 101 includes an onboard navigation system 103, a memory 102 storing a digitized road map 104, a space monitoring system 117, a vehicle controller 109, a GPS (Global Positioning System) sensor 110, an HMI (Human / Machine Interface) device 111, and also includes an autonomous controller 112 and a telematics controller 114.
[0034] In one embodiment, the space monitoring system 117 includes one or more space sensors and systems, which are used to monitor the visible area 105 in front of the vehicle terminal 101. The space monitoring system 117 also includes a space monitoring controller 118; the space sensors used to monitor the visible area 105 include a laser radar sensor 106, a radar sensor 107, a camera 108, etc. The space monitoring controller 118 can be used to generate data related to the visible area 105 based on the data input from the space sensor. The space monitoring controller 118 can determine the linear range, relative speed and trajectory of the vehicle terminal 101 based on the input from the space sensor, for example, determine the current speed of the vehicle and the relative speed compared to the front vehicle. The space sensor of the vehicle terminal space monitoring system 117 may include an object positioning sensing device, and the object positioning sensing device may include a range sensor, which can be used to locate the front object.
[0035] The camera 108 is advantageously mounted and positioned on the vehicle terminal 101 in a position that allows capturing an image of the visible area 105, wherein at least a portion of the visible area 105 includes a portion of the travel surface 113 in front of the vehicle terminal 101 and including the trajectory of the vehicle terminal 101. The visible area 105 may also include the surrounding environment. Other cameras may also be used, for example, including a second camera disposed on the rear or side portion of the vehicle terminal 101 to monitor the rear of the vehicle terminal 101 and one of the right or left sides of the vehicle terminal 101.
[0036] The autonomous controller 112 is configured to implement autonomous driving or advanced driver assistance system (ADAS) vehicle terminal functionality. Such functionality may include a vehicle terminal onboard control system capable of providing a certain level of driving automation. Driving automation may include a series of dynamic driving and vehicle terminal operations. Driving automation may include a certain level of automatic control or intervention involving a single vehicle terminal function (e.g., steering, acceleration, and / or braking). For example, the above-mentioned autonomous controller can be used to generate a vehicle calibration / observation scenario for a vehicle control unit by performing the following steps:
[0037] S102, receiving a data processing request associated with a variable to be processed through a first processing process, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle processor, the data processing request carries variable location information matched by the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request;
[0038] S104, determining the process type of the target process matching the variable to be processed according to the parsing result of the variable location information;
[0039] S106, when the process type of the target process indicates that the target process is a task process running on a second processing unit, forwarding the data processing request to the target process through an inter-core communication path, wherein the second processing unit is a processing unit integrated on a target vehicle-mounted processor;
[0040] S108, obtaining a target processing result returned by the target process, wherein the target processing result is obtained by performing target data processing on the variables to be processed according to the data processing request.
[0041] The HMI device 111 provides human-machine interaction for the purpose of guiding the operation of the infotainment system, GPS (Global Positioning System) sensor 110, onboard navigation system 103 and the like, and includes a controller. The HMI device 111 monitors operator requests and provides the operator with status, service and maintenance information of the vehicle terminal system. The HMI device 111 communicates with multiple operator interface devices and / or controls the operation of multiple operator interface devices. The HMI device 111 may also communicate with one or more devices that monitor biometric data associated with the vehicle terminal operator. For simplicity of description, the HMI device 111 is depicted as a single device, but in the embodiments of the system described herein, it may be configured as multiple controllers and associated sensing devices.
[0042] Operator controls may be included in the passenger compartment of the vehicle terminal 101, and may include, by way of non-limiting example, a steering wheel, an accelerator pedal, a brake pedal, and an operator input device, which is an element of the HMI device 111. The operator controls enable a vehicle terminal operator to interact with the operating vehicle terminal 101 and direct the operation of the vehicle terminal 101 to provide passenger transportation.
[0043] The onboard navigation system 103 uses the digitized road map 104 for the purpose of providing navigation support and information to the vehicle terminal operator. The autonomous controller 112 uses the digitized road map 104 for the purpose of controlling the autonomous vehicle terminal operation or ADAS vehicle terminal functions.
[0044] The vehicle terminal 101 may include a telematics controller 114, which includes a wireless telematics communication system capable of communicating outside the vehicle terminal (including communicating with a communication network 115 having wireless and wired communication capabilities). The wireless telematics communication system includes an off-board server 116 capable of short-range wireless communication with a mobile terminal.
[0045] As an optional implementation, Figure 2 As shown, the data processing method based on the heterogeneous core architecture can be executed by an electronic device, such as Figure 1 The autonomous controller shown includes the following steps:
[0046] S202, receiving a data processing request associated with a variable to be processed through a first processing process, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle-mounted processor, the data processing request carries variable location information matched by the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request;
[0047] S204, determining the process type of the target process matching the variable to be processed according to the parsing result of the variable location information;
[0048] S206, when the process type of the target process indicates that the target process is a task process running on a second processing unit, forwarding the data processing request to the target process through an inter-core communication path, wherein the second processing unit is a processing unit integrated on a target vehicle-mounted processor;
[0049] S208, obtaining a target processing result returned by the target process, wherein the target processing result is obtained by performing target data processing on the variables to be processed according to the data processing request.
[0050] In S202 of the above embodiment, a data processing request associated with a variable to be processed is received through a first processing process, wherein the first processing process is a task process running on a first processing unit, and the first processing unit is integrated on a target vehicle processor. The data processing request carries variable location information matching the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request.
[0051] The above-mentioned first processing process can specifically be the main process on the main core in a heterogeneous multi-core processor, and the above-mentioned first processing unit can specifically be the main core on the processor. It should be noted that the main core usually has higher performance, such as faster clock speed and more execution units, etc., and can be used to process tasks that require high computing power. The main process of the main core can be but is not limited to the initialization process of the operating system, critical system services or high-priority applications specified by the user.
[0052] The above-mentioned data processing request can be transmitted as a carrier through, but not limited to, network communication protocols, message queues, and file transfers; the above-mentioned variable location information includes location information describing the core, process, library file to which the variable belongs, and the real address information of the variable in the file; the above-mentioned data observation request is used to indicate the execution of observation operations, and the above-mentioned data calibration request is used to indicate the execution of data calibration operations.
[0053] Further executing S204, according to the parsing result of the variable location information, determining the process type of the target process matching the variable to be processed.
[0054] As an optional implementation, for example, in this solution, two bytes of 6 bits are used as extended addresses to distinguish scenarios; the highest bit (15) is a reserved bit, which is 0 by default and is not configured; the second highest bit (14), 0 indicates a small core, and 1 indicates a main core; from bit (13) to bit (5), a total of 9 bits, indicate the process running on the main core / small core; from bit (4) to bit (0), a total of 5 bits, indicate the library file that the process depends on;
[0055] For example, the variable location information obtained is "0000000001000001", and according to the above rules, it is determined that the first value matched by the core identifier is "0", the second value matched by the process identifier is "000000010", and the third value matched by the library file identifier is "00001";
[0056] Furthermore, the process type of the target process matching the variable to be processed can be determined based on the analysis result of the variable location information. For example, the process type of the target process matching the variable to be processed is determined to be a small core based on the second numerical value matching the process representation. No specific limitation is made here.
[0057] In the above step S206, when the process type of the target process indicates that the target process is a task process running on the second processing unit, the data processing request is forwarded to the target process through the inter-core communication path, wherein the second processing unit is a processing unit integrated on the target vehicle processor;
[0058] In some optional embodiments, the second processing unit may be other small cores on a heterogeneous multi-core processor, may be a low-power processor core, has lower performance, can run at lower energy consumption, and is suitable for processing less computationally intensive tasks; the task process of the second processing unit, such as a small core process, refers to a process running on a small core, which may be a background service, a low-priority application, or tasks that do not require a high-performance core.
[0059] like Figure 3As shown, the task process running on the first processing unit can be the main core main process 320 in the main core 318, and the main core 318 also includes the main core first sub-process 322, the main core second sub-process 324, etc. The second processing unit can be the small core A302 or the small core B310 in the heterogeneous multi-core processing, and the task process running on the second processing unit can be the small core first process 304 or the small core second process 306 or the small core third process 308 in the small core A302, etc., and can also be the small core first process 312 or the small core second process 314 or the small core third process 316 in the small core B310, etc.
[0060] It should be noted that the above-mentioned method of forwarding the data processing request to the target process through the inter-core communication path can be but is not limited to: realizing the inter-core communication through shared memory, realizing the inter-core communication through message queues, notifying other cores of the occurrence of reference events through interrupts, and realizing the inter-core communication through synchronization using semaphores, etc.
[0061] In the above step S208, a target processing result returned by the target process is obtained, wherein the target processing result is obtained by performing target data processing on the to-be-processed variable according to the data processing request;
[0062] As an optional implementation, taking the data processing request indicating the execution of the data calibration operation as an example, firstly, a variable address reading command for the above-mentioned variable to be processed is sent to the target process (for example, it can be implemented by a fetch address command), and the current variable value of the calibration variable stored in the variable address is recorded; the vehicle system tests the current variable value pair to obtain the vehicle performance test result, that is, the above-mentioned target processing result;
[0063] It is understandable that if the test results do not meet expectations, the variable parameters are adjusted according to the analysis results; specifically, in the calibration software, select the variable address corresponding to the calibration variable, modify the variable parameter value stored in the corresponding variable address, and after sending the write command, re-read the variable parameter value stored in the variable address to confirm whether the change is successful; test the vehicle system again to analyze whether the vehicle performance has achieved the target effect.
[0064] Through the above-mentioned implementation mode of the present application, in a heterogeneous multi-core processor, a data processing request associated with a variable to be processed is received through a first processing process, the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle-mounted processor, the data processing request carries variable location information matching the variable to be processed, the data processing request includes a data observation request and / or a data calibration request; according to the parsing result of the variable location information, the process type of the target process matching the variable to be processed is determined; when the process type of the target process indicates that the target process is a task process running on a second processing unit, the data processing request is forwarded to the target process through an inter-core communication path, the second processing unit is a processing unit integrated on a target vehicle-mounted processor; that is, it is realized that the corresponding communication mode is selected according to the relationship between the first processing unit and the second processing unit for data transmission and communication, and then the target processing result returned by the target process can be obtained, wherein the target processing result is obtained by performing target data processing on the variable to be processed according to the data processing request, and variable calibration and variable observation based on a heterogeneous core architecture are realized.
[0065] In an optional implementation, obtaining a target processing result returned by a target process includes:
[0066] S1, receiving the processing response information returned by the target process through the inter-core communication path;
[0067] S2, parse and process the response information to obtain the target processing result, wherein the target processing result is the processing result of the target process running on the second processing unit, and the target data processing is executed according to the associated data information. The associated data information is obtained by the target process by parsing the data processing request, and is used to indicate the data information for executing the target data processing. The associated data information includes: variable address information, variable parameter information, system environment parameter information and sensor configuration information.
[0068] In the above steps S1-S2, the processing response information returned by the target process through the inter-core communication path is received; the processing response information is parsed to obtain the target processing result;
[0069] It should be noted that the above-mentioned processing response information can be but is not limited to a data message returned through inter-core communication. The data message includes processing result information of target data processing on the processed variable. The above-mentioned target processing result is the processing result of the target data processing executed by the target process running on the second processing unit according to the associated data information. The associated data information is obtained by the target process by parsing the data processing request, and is used to indicate the data information for executing the target data processing. The associated data information includes: variable address information, variable parameter information, system environment parameter information and sensor configuration information.
[0070] As an optional implementation, in the target process of the second processing unit, for example Figure 3 In the small core first process 304 of the small core A302 on the heterogeneous multi-core processing shown, the above data processing request is parsed to determine the relevant data information for performing the target data operation on the variable to be processed. Specifically, for example, to calibrate the fuel consumption, it is necessary to obtain the variable address where the variable is located, and then read the variable parameter value in the variable address. According to the variable parameter value and the road slope, environmental wind speed and other data of the environment in which the vehicle system is located, the fuel consumption performance data of the sensor is collected under the target working condition, and then the processing result of performing the data calibration processing according to the above associated data information is obtained;
[0071] Furthermore, the target process of the second processing unit sends the data processing result to the first processing process located in the first processing unit through inter-core communication.
[0072] Through the above-mentioned implementation mode of the present application, the processing response information returned by the target process through the inter-core communication path is received; the processing response information is parsed to obtain the target processing result, which is the processing result of the target process running on the second processing unit, executing the target data processing according to the associated data information. The associated data information is obtained by the target process through parsing the data processing request, and is used to indicate the data information for executing the target data processing. The associated data information includes: variable address information, variable parameter information, system environment parameter information and sensor configuration information. The target data processing is executed by the target process running on the second processing unit according to the associated data information obtained by parsing the transmission of the first processing unit, and the processing result is returned through the inter-core communication path, thereby realizing variable calibration and variable observation based on the heterogeneous core architecture.
[0073] In an optional implementation, after determining the process type of the target process matching the variable to be processed according to the parsing result of the variable location information, the method further includes:
[0074] S1, forwarding a data processing request to the target process through an inter-process communication path when the process type of the target process indicates that the target process is a task subprocess running on the first processing unit;
[0075] S2, determining the library file dependency information matching the variable to be processed through the target process;
[0076] S3, when the library file dependency information indicates that there is a dependency relationship between the target process and the dynamic library, obtaining a base address that matches the dynamic library; determining a real variable address of the variable to be processed according to the base address;
[0077] S4, when the library file dependency information indicates that there is a dependency relationship between the target process and the static library, obtain the real variable address of the variable to be processed.
[0078] In the above step S1, when the process type of the target process indicates that the target process is a task subprocess running on the first processing unit, the data processing request is forwarded to the target process through the inter-process communication path;
[0079] Specifically, the task subprocess of the first processing unit may be other subprocesses in the main core of the heterogeneous multi-core processor that are different from the main process. The main core subprocess may inherit some properties of the main process, but may have different tasks and priorities.
[0080] The above-mentioned forwarding of the data processing request to the target process through the inter-process communication path can be, but is not limited to, forwarding the data processing request to the target process by creating a pipe to achieve the inter-process communication, by using a socket to achieve the inter-process communication, by file mapping, etc.
[0081] In some optional embodiments, in steps S2-S4, library file dependency information matching the variable to be processed is determined through the target process; when the library file dependency information indicates that there is a dependency relationship between the target process and the dynamic library, a base address matching the dynamic library is obtained; the real variable address of the variable to be processed is determined according to the base address; when the library file dependency information indicates that there is a dependency relationship between the target process and the static library, the real variable address of the variable to be processed is obtained.
[0082] It should be noted that library files allow multiple processes to share the same code, which can reduce memory usage; dynamic libraries are loaded when the program is running, which allows the program to use updated library versions without restarting, making it easier to update and maintain the library; library files can help programs achieve cross-platform compatibility, because the library implementation can be adapted to different operating systems and hardware platforms; that is, for reasons such as reducing memory, facilitating the maintenance of project files, and achieving cross-platform compatibility, there will be situations where processes depend on library files;
[0083] Optionally, but not limited to, by obtaining the file associated with the target process, the file extension can be checked. For example, dynamic library files have specific extensions, such as .so in Linux systems and .dll in Windows systems. Static libraries usually have an extension of .a in Linux systems and may be .lib in Windows systems. The file extension can be used to preliminarily determine whether the process to which the variable belongs has a dependency relationship with the library file, and the type of the library file can be preliminarily determined.
[0084] Since the loading base address of the dynamic library in the process is dynamically allocated, it may be different each time the process is started. When the library file dependency information indicates that there is a dependency relationship between the target process and the dynamic library, to obtain the loading base address of the dynamic library and calculate the actual virtual address, you can take the following steps:
[0085] S1, obtain the loading base address of the dynamic library;
[0086] Specifically, on Windows, you can use the WinAPI function to obtain the handle of the dynamic library, and then use the GetModuleInformation function to obtain the loading base address of the dynamic library. On Linux / Unix, you can use the / proc / [pid] / maps file or the pmap command to view the memory map of the process, which contains the loading base address of the dynamic library.
[0087] S2, resolve the symbol address in the dynamic library; specifically, the symbol (such as function or variable) in the dynamic library will be assigned an offset relative to the base address of the library during compilation, and the above offset is fixed when the library is loaded into the memory.
[0088] S3, calculate the actual virtual address; specifically, the actual virtual address = the loading base address + the symbol offset.
[0089] When the library file dependency information indicates that there is a dependency relationship between the target process and the static library, since the static library will generate a corresponding link file during the link process, the link file records the address of the variable, and then the real variable address can be directly obtained according to the link file, or the A2L file can be obtained. The A2L file contains device parameter information, interface data information and ECU parameter information. Among them, the CHARACTERISTIC part of the A2L file defines the calibration variable, including the variable name, address, length, calculation formula, precision, maximum and minimum values and other information; the real address of the variable can also be directly obtained according to the XCP protocol that stores the variable information, such as Figure 4As shown, the XCP protocol composition (XCP Message (Frame)) includes: XCP Header, XCP Packet and XCP Tail. Specifically, the XCP Packet consists of PID, FILL, DAQ, TIMESTAMP and DATA. For example, the real address information of the variable is stored in the DATA of the XCP protocol. No specific limitation is made here. It should be noted that PID (Packet Identifier) is used to identify the type of XCP data packet, such as command, response, etc.; FILL is used to fill the data packet to ensure that the data packet length meets the requirements, and is sometimes also used for error detection; DAQ is data acquisition, which is used to store the actual data value; TIMESTAMP is a timestamp, which is used to record the time information of the data packet to ensure data synchronization and timing control; DATA is the data content actually transmitted.
[0090] Through the above-mentioned implementation mode of the present application, when the process type of the target process indicates that the target process is a task subprocess running on the first processing unit, the data processing request is forwarded to the target process through the inter-process communication path; the library file dependency information matching the variable to be processed is determined through the target process; when the library file dependency information indicates that there is a dependency relationship between the target process and the dynamic library, the base address matching the dynamic library is obtained; the real variable address of the variable to be processed is determined according to the base address; when the library file dependency information indicates that there is a dependency relationship between the target process and the static library, the real variable address of the variable to be processed is obtained, thereby solving the problem that the actual address of the variable cannot be obtained when the process depends on the dynamic library file, and thus the calibration and observation operations cannot be performed.
[0091] In an optional implementation, after obtaining the base address matching the dynamic library, the method further includes:
[0092] S1, obtain the relative offset address matching the variable to be processed;
[0093] S2, determining the sum of the base address and the relative offset address as the real variable address matching the variable to be processed;
[0094] S3, executing target data processing on the variable to be processed indicated by the real variable address according to the data processing request.
[0095] It can be understood that in the above steps S1-S3, a relative offset address matching the variable to be processed is obtained; the sum of the base address and the relative offset address is determined as the real variable address matching the variable to be processed; and target data processing is performed on the variable to be processed indicated by the real variable address according to the data processing request.
[0096] It should be noted that the relative offset address can be obtained directly from the symbol table, but is not limited to it. In a dynamic link library, each symbol (such as a function or variable) has an offset relative to the base address of the library. This offset is determined at compile time and stored in the symbol table of the library; or it can be determined according to the alignment of the reference variable. The alignment of the reference variable can be the alignment of the variable that has appeared above, or the alignment of a manually selected variable. For example, the members of the structure MyStruct are aligned as follows: char a occupies 1 byte, but in order to meet the 4-byte alignment requirement of int b, a will be padded with 3 bytes of padding; int b occupies 4 bytes and is located on a 4-byte aligned boundary; char c occupies 1 byte, but in order to meet the next 4-byte aligned boundary, c will be padded with 3 bytes of padding;
[0097] It can be obtained that the address of a is 0 (because it is the first member of the structure), the address of b is 4 (because a occupies 1 byte and there are 3 padding bytes behind it), and the address of c is 12 (because member b occupies 4 bytes, so the end address of b is 4+4=8, member c occupies 1 byte, but in order to meet the 4-byte alignment requirement, the compiler will pad 3 bytes after c, making the address of c a multiple of 4. Therefore, the address of c is 8+4=12). .
[0098] The above base address may be, but is not limited to, a loading base address of a dynamic library that the process depends on, that is, a starting address allocated in memory by the operating system for a dynamic link library (DLL), and then the real variable address of the variable to be processed is determined according to the sum of the base address and the relative offset address;
[0099] According to the above data processing request, for example, a data observation request, the corresponding target data processing is variable observation processing, and the target data processing is performed on the variable to be processed indicated by the real variable address, that is, the parameter value under the real address corresponding to the variable to be processed is obtained for observation.
[0100] Through the above implementation of the present application, a relative offset address matching the variable to be processed is obtained; the sum of the base address and the relative offset address is determined as the real variable address matching the variable to be processed, and then the real address of the variable can be dynamically determined to obtain the corresponding variable parameter value; and then according to the data processing request, target data processing is performed on the variable to be processed indicated by the real variable address, thereby realizing calibration and observation processing of variables on different or the same cores on a heterogeneous multi-core processor.
[0101] In an optional implementation, after determining the library file dependency information matching the variable to be processed through the target process, the method further includes:
[0102] S1, when the library file dependency information indicates that there is a dependency relationship between the target process and the static library, obtaining the real variable address according to the link file matching the variable to be processed;
[0103] S2, executing target data processing on the variable to be processed indicated by the real variable address according to the data processing request.
[0104] In the above steps S1-S2, when the library file dependency information indicates that there is a dependency relationship between the target process and the static library, the real variable address is obtained according to the link file matching the variable to be processed; and the target data processing is performed on the variable to be processed indicated by the real variable address according to the data processing request;
[0105] As an optional implementation, when the library file dependency information indicates that there is a dependency relationship between the target process and the static library, since the static library will generate a corresponding link file during the linking process, the link file records the address of the variable, and then the real variable address can be directly obtained according to the link file, or the A2L file can be obtained. The A2L file contains device parameter information, interface data information and ECU parameter information. Among them, the CHARACTERISTIC part of the A2L file defines the calibration variables, including the variable name, address, length, calculation formula, precision, maximum and minimum values and other information; the real address of the variable can also be directly obtained according to the XCP protocol that stores the variable information, and no specific restrictions are made here.
[0106] According to the above data processing request, for example, a data observation request, the corresponding target data processing is variable observation processing, and the target data processing is performed on the variable to be processed indicated by the real variable address, that is, the parameter value under the real address corresponding to the variable to be processed is obtained for observation.
[0107] Through the above-mentioned implementation mode of the present application, when the library file dependency information indicates that there is a dependency relationship between the target process and the static library, the real variable address is obtained according to the link file matching the variable to be processed; according to the data processing request, the target data processing is performed on the variable to be processed indicated by the real variable address, which solves the problem that the process depends on different library files and corresponds to different methods of obtaining the real address of the variable, and then calibration and observation operations can be performed according to the variable parameters under the real address.
[0108] In an optional implementation, obtaining a target processing result returned by a target process includes:
[0109] S1, when the target data processing is a variable calibration processing, obtaining a calibration processing result returned by the target process, wherein the calibration processing result is used to indicate that a parameter value of the variable to be processed is updated from a first parameter value to a second parameter value, and the second parameter value is a parameter value carried in the data processing request for completing the variable calibration task;
[0110] S2, when the target data processing is variable observation processing, obtain the variable parameter value read from the real variable address matching the variable to be processed.
[0111] As an optional implementation, when the target data processing is variable calibration processing, the calibration processing result returned by the target process is obtained, wherein the calibration processing result is used to indicate that the parameter value of the variable to be processed is updated from the first parameter value to the second parameter value, and the second parameter value is the parameter value carried in the data processing request for completing the variable calibration task.
[0112] Specifically, Figure 5 As shown, S502, the user selects the variable data to be calibrated through the host computer (calibration tool), and further performs a variable parameter value modification operation on the calibrated variable (variable to be processed), for example, the initial variable parameter under the real variable address matching the variable to be processed in the target process is modified to an intermediate variable parameter value; the host computer constructs an XCP request data packet according to the calibration parameters selected by the user, and the data packet contains necessary identification information, command type, data, and any required timestamp or verification data.
[0113] S504, the upper computer transmits the intermediate variable parameter value to the lower computer. Specifically, the upper computer sends an XCP request packet to the network connected to the vehicle through the CAN communication interface.
[0114] The XCP Slave interface of the lower computer (such as ECU, which uses a heterogeneous core processor architecture) monitors the data packets on the network, receives the XCP request from the upper computer, and performs the operation of modifying the variable parameter value according to the received intermediate variable parameter value. Further tests are performed in the vehicle system according to the intermediate variable parameter value to obtain test results that match the variables to be processed;
[0115] After the calibration operation is completed, the lower computer ECU constructs an XCP response data packet, including the test results, possible new calibration values, and any status information or error codes, etc., executes S506, and returns the result to the upper computer.
[0116] The host computer receives the XCP response from the ECU and parses the data packet to confirm the result of the calibration operation. If the calibration is successful, the host computer updates the parameter values on the interface and the test results of the corresponding parameter values, and executes S508 to feedback the results to the user.
[0117] If an error occurs or further adjustment is required, the host computer will prompt the user to perform the corresponding operation.
[0118] As an optional implementation, when the test results do not meet the target vehicle performance test results, the intermediate variable parameter value under the actual variable address is modified to the target variable parameter value in the target process. Specifically, S502-S508 can be repeatedly executed, and the test is repeated until the feedback results received by the user meet the target vehicle performance test results. It can be understood that the test results are used to indicate the performance status of the variable to be processed under the current test conditions.
[0119] In another optional implementation, when the target data processing is variable observation processing, the variable parameter value read from the real variable address matching the variable to be processed is obtained.
[0120] Specifically, Figure 5 As shown, when the target data processing is variable observation processing, S502, the user selects the variable data to be observed through the host computer (calibration tool).
[0121] The upper computer constructs an XCP request data packet according to the observation variable selected by the user, and the data packet contains necessary identification information, command type, requested observation data identifier and any required timestamp or verification data, and executes S504 to transmit data to the lower computer. Specifically, the upper computer can send the XCP request data packet to the Soc end through the vehicle communication network (such as CAN, LIN, FlexRay, etc.).
[0122] The lower computer obtains the variable parameter value for observation according to the information of the variable to be processed in the identified data packet and the real variable address matching the variable to be processed in the target process. For example, if the variable parameter value is the fuel consumption parameter value of the test vehicle system under wind and snow conditions, the corresponding observation parameter value (such as fuel consumption per kilometer) of the fuel consumption (variable to be processed) under the condition is obtained for observation to judge the fuel consumption and other performance of the vehicle system;
[0123] S506, the lower computer returns the result to the upper computer. S508, the upper computer feeds back the result to the user.
[0124] Optionally, variable observation processing can also be performed to obtain the observed value of the variable, determine whether the observed value is reasonable, and then test the variable parameter value in the vehicle system based on the observed value to obtain an observation result that matches the variable to be processed. It can be understood that the observation result can be used to indicate the performance status of the variable to be processed under the current test conditions.
[0125] Through the above-mentioned implementation mode of the present application, when the target data processing is variable calibration processing, the calibration processing result returned by the target process is obtained, wherein the calibration processing result is used to indicate that the parameter value of the variable to be processed is updated from the first parameter value to the second parameter value, and the second parameter value is the parameter value carried in the data processing request for completing the variable calibration task; when the target data processing is variable observation processing, the variable parameter value read from the real variable address matching the variable to be processed is obtained, and the second processing unit receives the data processing request sent by the first processing unit to perform the target data processing, thereby realizing the calibration and observation operations of the variables under the heterogeneous multi-core architecture.
[0126] In an optional implementation, after obtaining the target processing result of the target data operation performed by the target process on the to-be-processed variable according to the data processing request, the method further includes:
[0127] S1, when the target process is a task process running on the second processing unit, receiving a target processing result sent by the target process through an inter-core communication path;
[0128] S2, when the target process is a task subprocess running on the first processing unit, receiving a target processing result sent by the target process through an inter-process communication path;
[0129] In the above step S1, when the target process is a task process running on the second processing unit, the first processing process receives the target processing result sent by the target process through the inter-core communication path. It should be noted that, for example, the first processing unit is the main core, and the above second processing unit is a small core (other cores different from the main core). Since the first processing unit and the second processing unit are different cores, they may run on different operating systems respectively. Therefore, in order to realize resource sharing between different cores, data transmission can be carried out through the inter-core communication path, which can be specifically an inter-core communication method, including but not limited to sharing memory, setting hardware interrupts or flags, etc.
[0130] In the above step S2, when the target process is a task subprocess running on the first processing unit, the first processing process receives the target processing result sent by the target process through the inter-process communication path; it should be noted that, for example, the first processing unit is the main core, the task process of the first processing unit is the main core main task, and the task subprocess of the above-mentioned first processing unit is the main core subtask, that is, data is transmitted between different processes of the same core. Therefore, in order to realize resource sharing between different processes of the same core, data transmission can be carried out through the inter-process communication path, specifically, it can be a process communication method, including but not limited to through pipes, message queues, semaphores, sockets and the like.
[0131] Through the above-mentioned implementation mode of the present application, when the target process is a task process running on the second processing unit, the target processing result sent by the target process is received through the inter-core communication path; when the target process is a task sub-process running on the first processing unit, the target processing result sent by the target process is received through the inter-process communication path, thereby realizing the processing of data by heterogeneous multi-core processors.
[0132] When the target process is a task process running on the second processing unit or a subtask process of the first processing unit, the target processing result of the target data processing is returned to the first processing process through different communication paths, thereby realizing data calibration and observation processing under a heterogeneous multi-core processor.
[0133] In an optional implementation, after receiving the data processing request associated with the variable to be processed by the first processing process, the method further includes:
[0134] S1, parsing a data processing request through a first processing process, wherein a field structure of the data processing request matches a target communication protocol;
[0135] S2, obtaining variable location information matching the variable to be processed from the extended field of the data processing request, wherein the field structure includes the extended field. In the above step S1, the data processing request is parsed by the first processing process, wherein the field structure of the data processing request matches the target communication protocol, and the field structure of the above data processing request can be as follows Figure 4 shown.
[0136] In step S2, variable location information matching the variable to be processed is obtained from an extended field of the data processing request, wherein the field structure includes the extended field;
[0137] As an optional implementation, this application takes the XCP protocol as an example of the communication protocol of the electronic control unit (ECU), which is mainly used for data measurement and calibration. It supports multiple transport layers, such as CAN, Ethernet, USB, etc., and defines command transfer objects (CTO) and data transfer objects (DTO) to process control commands and synchronization data.
[0138] You can add extension fields to the communication protocol by following the steps below:
[0139] S1, define a new extension field: define a new extension field in the XCP data packet structure, which can be used to indicate the variable location information of the variable to be processed. This field can be Figure 4 A portion of the XCP protocol field structure shown, such as a portion of the "DATA" field, or a completely new data packet type, such as Figure 6As shown, an "extension field" is added to the "XCP Packet". It should be noted that the XCP protocol composition (XCP Message (Frame)) also includes: XCP Header, XCP Packet and XCP Tail. Specifically, the XCP Packet consists of PID, FILL, DAQ, TIMESTAMP, DATA, and can also be an identifier pointing to a variable location information.
[0140] S2, modify XCP: add processing logic for this new extension field, including adding the identification of core, process and other location information when sending data packets, and parsing this identification when receiving data packets.
[0141] S3, Update XCP configuration file: If XCP uses configuration files (such as A2L files) to describe measurement and calibration parameters, these files need to be updated to include information about the new extended fields.
[0142] It is also necessary to ensure that all ECUs and measurement / calibration tools using the XCP protocol support this new field and can handle it correctly during communication, as well as test the validity and correctness of the new field in an actual communication environment to ensure that it does not interfere with existing XCP protocol functions.
[0143] The present application parses a data processing request through a first processing process, wherein the field structure of the data processing request matches the target communication protocol; variable location information matching the variable to be processed is obtained from an extended field of the data processing request, wherein the field structure includes an extended field, and then the task process of the first processing unit can parse the XCP protocol to determine the core and process to which the variable to be processed belongs, and then transmit the variable data to the target process through a corresponding path for data processing, thereby realizing data processing of a heterogeneous multi-core processor.
[0144] By adding an extended field to the communication protocol, the first processing process can parse the communication protocol and obtain the location of the core and process to which the variable to be processed belongs. The first processing process then selects the corresponding communication path for data transmission based on the relationship with the target process, thereby realizing the calibration and observation of variable data in a heterogeneous multi-core processor scenario.
[0145] In an optional implementation, before receiving the data processing request associated with the variable to be processed by the first processing process, at least one of the following is further included:
[0146] Method 1: obtaining the load performance of each of the plurality of processing units integrated on the target vehicle-mounted processor, wherein the load performance is used to indicate the task processing capability of the processing unit; and according to the load performance, the processing unit that meets the processing load condition is defined as the first processing unit;
[0147] Method 2: obtaining a historical calibration record integrated on the target vehicle-mounted processor, wherein the historical calibration record is used to indicate the processing unit with the historical best processing performance; and according to the historical calibration record, the processing unit that meets the historical calibration condition is defined as the first processing unit;
[0148] Method three: determining the first processing unit from a plurality of processing units integrated on the target vehicle-mounted processor according to a strategy selection algorithm.
[0149] In the case where multiple processing units are integrated on the target vehicle-mounted processor, the load performance of the multiple processing units is monitored. It should be noted that the above load performance includes but is not limited to: CPU usage, memory resource occupancy rate and the number of running task processes, etc.; and then the processing unit that meets the target load performance is determined to be the first processing unit. For example, when a processing unit with a low resource occupancy rate is required to perform target data processing, the processing unit with the lowest resource occupancy rate is determined to be the first processing unit;
[0150] As an optional implementation, assume that there are four cores in the SoC: two Cortex-A72 cores, one Cortex-R5F core and one Cortex-M3 core. By monitoring the resource usage, it is determined that the Cortex-M3 core is mainly used for low-power sensor data collection and has the lowest resource usage. Therefore, the image data processing task in the vehicle system can be assigned to the Cortex-M3 core.
[0151] In the case where multiple processing units are integrated on the target vehicle-mounted processor, a historical calibration record is obtained. Optionally, the historical calibration record records include but is not limited to: historical core processing unit distribution, historical optimal data transmission speed, historical key variable-to-processing unit, and historical key task operation processing unit; the first processing unit can be determined in the historical calibration record according to the target requirements;
[0152] For example, it records the probability distribution of the first processing unit selected for use in historical task processing requests, the transmission speed of each processing unit when it is the first processing unit to process the task process, the distribution of the first processing unit corresponding to the key variables when processing key variables, and the distribution of the first processing unit corresponding to the key tasks when processing key tasks;
[0153] As an optional implementation, if the importance of the current task processing speed is greater than the importance of resource occupancy, a processing unit with a better task processing speed in the historical calibration record can be selected. Furthermore, for example, if the historical calibration condition is that the processing speed is greater than 1 Hz, the processing unit that meets the historical calibration condition is selected as the first processing unit.
[0154] In the case where multiple processing units are integrated on the target vehicle processor, the first processing unit is determined according to the strategy selection algorithm. It can be understood that the strategy selection algorithm includes but is not limited to: a priority algorithm, that is, each processor is configured with a corresponding priority in advance, and the corresponding processing unit is selected as the first processing unit each time in the order of the highest priority; a polling algorithm, that is, the first processing unit is selected in turn in sequence; a shortest job first algorithm selects the processor unit with the least current processing tasks as the first processing unit; a multi-level feedback queue algorithm, that is, if the task is not completed within a limited time slice, switch to another processing unit to continue processing, etc.
[0155] As an optional implementation, for example, the priority corresponding to core A is level 2, the priority corresponding to core B is level 1, and the priority corresponding to core C is level 3. When the resources of core A and core C are configured and idle, core A with the highest priority is selected as the first processing unit.
[0156] The above implementation manner adds a method for selecting the first processing unit to run the first processing process, so that the first processing unit can be flexibly selected according to demand.
[0157] The following is an explanation of the use of this solution in a complete implementation method;
[0158] like Figure 7 As shown, CAN APE702 is a calibration tool (host computer). The user operates the CAN APE702 tool to select calibration and observation data. The tool sends the information to the Soc end through the XCP protocol. Soc704 is a heterogeneous multi-core processor, including a main core 706 and multiple small cores 708. Multiple processes are run on each core. For example, the main core 706 includes a main core main process 710 and multiple main core sub-processes 712, and the small core 708 includes multiple small core processes 714. Soc completes data calibration and reporting of observation values;
[0159] Specifically, S1, CAN APE transmits the data that needs to be calibrated and observed to the main core main process of Soc through the XCP protocol; it can be understood that an extension field is added to the XCP protocol, and the extension field is used to indicate the core and process to which the calibration / observation data variable belongs.
[0160] S2, the main core main process 710 deploys Server 716, which is used to parse the address parameter and determine whether the extended address in the XCP protocol extension field indicates that the address of the variable to be processed is a small core address or a main core process address;
[0161] S3, if the resolved address is a small core address, the server sends the real variable address of the variable to be processed to the client 718 of the small core process 714 through inter-core communication;
[0162] S4, if the resolved address is the address of the main core process, the server sends the real variable address of the variable to be processed to the client 720 of the main core process 712 through inter-process communication, obtains the variable parameter value under the real variable address, and completes calibration and observation.
[0163] The following is the calibration flow chart Figure 8 The calibration process of this scheme is described as follows:
[0164] S802, the user operates CAN APE to send calibration parameters, for example, the variable name of the variable to be processed to be calibrated.
[0165] S804, the server of the main core main process parses the XCP protocol to obtain the calibration parameter content; specifically, the obtained content includes the core to which the variable to be processed belongs, the process address, the variable data type, size and other information.
[0166] S806, parse the extended field in the XCP protocol to determine whether the marked address is the address of the small core?
[0167] If it is a small core address, execute S808 to send the calibration data to the small core through inter-core communication; further execute S810 to complete the calibration function by operating the address; specifically, the variable parameter value under the address can be modified, and the test can be performed according to the updated variable parameter value.
[0168] If it is not the address of other cores, that is, it is determined to be the address of the main core, then S812 is executed to send the calibration data to the main core process through inter-process communication;
[0169] S814, determine whether the symbol corresponding to the address belongs to a process file, not a dynamic library?
[0170] If it is determined that the variable belongs to a process file and does not depend on a dynamic library, S814-1 is executed to complete the calibration through address operation; specifically, the variable parameter value under the address can be modified, and the test is performed according to the updated variable parameter value.
[0171] If it is determined that the variable belongs to a process file and depends on a dynamic library, S814-2 is executed to obtain the loading base address of the dynamic library, calculate the actual virtual address, and complete the calibration by operating the address;
[0172] Specifically, the loading base address of the dynamic library is obtained, and the symbol address in the dynamic library is resolved. The symbols in the dynamic library (such as functions or variables) will be assigned an offset relative to the base address of the library during compilation. The actual virtual address = loading base address + symbol offset.
[0173] S816, reply the calibration result to the Server; end the calibration process; it can be understood that different communication methods can be selected according to the relationship between the target process and the core where the first processing process is located, such as inter-core communication or inter-process communication, to transmit the calibration result.
[0174] The following is the calibration flow chart Fig. 9 The observation process of this scheme is described as follows:
[0175] S902, the user operates CAN APE to send observation parameters; for example, the parameters may be the variable names of the variables to be processed that are to be calibrated.
[0176] S904, the server of the main core main process parses the XCP protocol to obtain the observation parameter content; specifically, the obtained content includes the core to which the variable to be processed belongs, the process address, the variable data type, size and other information.
[0177] S906, parse the extended field in the XCP protocol to determine whether the observed address is the address of the small core?
[0178] If the resolved observation address is a small core address, S908 is executed to send the observation data to the small core through inter-core communication; S910 is further executed in the small core to complete the acquisition of the observation value through address operation, for example, directly read the variable parameter value under the address through "get address operation (&)"; S912 is further executed to send the observation value to the server through inter-core communication;
[0179] If the parsed observation address is not the address of the small core, that is, the observation address is the main core, S914 is executed to send the observation data to the main core process through inter-process communication;
[0180] Execute S916 to determine whether the symbol corresponding to the address belongs to the process file, not the dynamic library; if it is determined that the variable belongs to the process file and does not depend on the dynamic library, further execute S916-1 to complete the acquisition of the observation value through address operation; for example, directly read the variable parameter value under the address through the "get address operation (&)".
[0181] If it is determined that the variable belongs to a process file and depends on a dynamic library, S916-2 is executed to obtain the loading base address of the dynamic library, calculate the actual virtual address, and complete the acquisition of the observed value by operating the address;
[0182] Specifically, the loading base address of the dynamic library is obtained, and the symbol address in the dynamic library is resolved. The symbols in the dynamic library (such as functions or variables) will be assigned an offset relative to the base address of the library during compilation. The actual virtual address = loading base address + symbol offset. The variable observation parameter value at the address is obtained based on the calculated actual virtual address.
[0183] S918, sending the observed value to the Server through inter-process communication; ending the observation process.
[0184] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0185] According to another aspect of the embodiment of the present application, a data processing device based on a heterogeneous core architecture for implementing the above-mentioned data processing method based on a heterogeneous core architecture is also provided. Fig.10 As shown, the device comprises:
[0186] The receiving unit 1002 receives a data processing request associated with a variable to be processed through a first processing process, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle-mounted processor, the data processing request carries variable location information matched by the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request;
[0187] The determining unit 1004 determines the process type of the target process matching the variable to be processed according to the parsing result of the variable location information;
[0188] A forwarding unit 1006, forwarding the data processing request to the target process through an inter-core communication path when the process type of the target process indicates that the target process is a task process running on a second processing unit, wherein the second processing unit is a processing unit integrated on a target vehicle processor;
[0189] The execution unit 1008 obtains a target processing result returned by the target process, wherein the target processing result is obtained by performing target data processing on the to-be-processed variable according to the data processing request.
[0190] As an optional solution, the above-mentioned data processing device based on heterogeneous core architecture also includes: a first receiving unit, used to receive processing response information returned by the above-mentioned target process through the above-mentioned inter-core communication path; parsing the above-mentioned processing response information to obtain the above-mentioned target processing result, wherein the above-mentioned target processing result is the processing result of the above-mentioned target process running on the above-mentioned second processing unit, performing target data processing according to associated data information, the above-mentioned associated data information is obtained by the above-mentioned target process by parsing the above-mentioned data processing request, and is used to indicate the data information for executing the above-mentioned target data processing, and the above-mentioned associated data information includes: variable address information, variable parameter information, system environment parameter information and sensor configuration information.
[0191] As an optional scheme, the above-mentioned determination unit includes: an acquisition unit, which is used to forward the above-mentioned data processing request to the above-mentioned target process through an inter-process communication path when the above-mentioned process type of the above-mentioned target process indicates that the above-mentioned target process is a task subprocess running on the above-mentioned first processing unit; determine the library file dependency information matching the above-mentioned variable to be processed through the above-mentioned target process; when the above-mentioned library file dependency information indicates that there is a dependency relationship between the above-mentioned target process and the dynamic library, obtain the base address matching the above-mentioned dynamic library; determine the real variable address of the above-mentioned variable to be processed according to the above-mentioned base address; when the above-mentioned library file dependency information indicates that there is a dependency relationship between the above-mentioned target process and the static library, obtain the above-mentioned real variable address of the above-mentioned variable to be processed.
[0192] As an optional solution, the acquisition unit includes: a first acquisition module, used to acquire a relative offset address matching the variable to be processed; determine the sum of the base address and the relative offset address as the real variable address matching the variable to be processed; and perform the target data processing on the variable to be processed indicated by the real variable address according to the data processing request.
[0193] As an optional solution, the above-mentioned acquisition unit includes: a second acquisition module, which is used to obtain the above-mentioned real variable address according to the link file matching the above-mentioned variable to be processed when the above-mentioned library file dependency information indicates that there is a dependency relationship between the above-mentioned target process and the static library; and perform the above-mentioned target data processing on the above-mentioned variable to be processed indicated by the above-mentioned real variable address according to the above-mentioned data processing request.
[0194] As an optional solution, the above-mentioned acquisition unit also includes a third acquisition module, which is used to obtain the calibration processing result returned by the above-mentioned target process when the above-mentioned target data processing is variable calibration processing, wherein the above-mentioned calibration processing result is used to indicate that the parameter value of the above-mentioned variable to be processed is updated from the first parameter value to the second parameter value, and the above-mentioned second parameter value is the parameter value carried in the above-mentioned data processing request for completing the variable calibration task; when the above-mentioned target data processing is variable observation processing, the variable parameter value read from the real variable address matching the above-mentioned variable to be processed is obtained.
[0195] As an optional scheme, the above-mentioned device also includes a receiving module, which is used to receive the above-mentioned target processing result sent by the above-mentioned target process through the above-mentioned inter-core communication path when the above-mentioned target process is the above-mentioned task process running on the above-mentioned second processing unit; and receive the above-mentioned target processing result sent by the above-mentioned target process through the inter-process communication path when the above-mentioned target process is the above-mentioned task subprocess running on the above-mentioned first processing unit.
[0196] As an optional solution, the above-mentioned device also includes: a parsing module, used to parse the above-mentioned data processing request through the above-mentioned first processing process, wherein the field structure of the above-mentioned data processing request matches the target communication protocol; obtain the above-mentioned variable location information matching the above-mentioned variable to be processed from the extended field of the above-mentioned data processing request, wherein the above-mentioned field structure includes the above-mentioned extended field.
[0197] As an optional solution, the above-mentioned device also includes: a first determination unit, used to obtain the load performance of each of the multiple processing units integrated on the above-mentioned target vehicle-mounted processor, wherein the above-mentioned load performance is used to indicate the task processing capability of the above-mentioned processing unit; according to the above-mentioned load performance, the above-mentioned processing unit that meets the processing load condition is the above-mentioned first processing unit; obtaining the historical calibration record integrated on the above-mentioned target vehicle-mounted processor, wherein the above-mentioned historical calibration record is used to indicate the above-mentioned processing unit with the historical optimal processing performance; according to the above-mentioned historical calibration record, the above-mentioned processing unit that meets the historical calibration condition is the above-mentioned first processing unit; according to the strategy selection algorithm, determine the above-mentioned first processing unit from the multiple processing units integrated on the above-mentioned target vehicle-mounted processor.
[0198] For specific embodiments, reference may be made to the examples shown in the above-mentioned data processing method based on heterogeneous core architecture, which will not be described in detail in this example.
[0199] Among them, the memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data processing method and device based on the heterogeneous core architecture in the embodiment of the present invention. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, realizing the above-mentioned data processing method based on the heterogeneous core architecture. The memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1102 may further include a memory remotely arranged relative to the processor 1104, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. Among them, the memory 1102 can be specifically but not limited to being used to store file information such as target files. As an example, such as Fig.11 As shown, the memory 1102 may include, but is not limited to, the receiving unit 1002, the determining unit 1004, the forwarding unit 1006, and the executing unit 1008 in the data processing device based on the heterogeneous core architecture. In addition, other module units in the data processing device based on the heterogeneous core architecture may also be included but are not limited to, which will not be described in detail in this example.
[0200] Optionally, the transmission device 1106 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0201] In addition, the electronic device mentioned above further includes: a display 1108, and a connection bus 1110, which is used to connect various module components in the electronic device mentioned above.
[0202] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.
[0203] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0204] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0205] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0206] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0207] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0208] S1, receiving a data processing request associated with a variable to be processed through a first processing process, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle processor, the data processing request carries variable location information matched by the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request;
[0209] S2, determining the process type of the target process matching the variable to be processed according to the parsing result of the variable location information;
[0210] S3, when the process type of the target process indicates that the target process is a task process running on a second processing unit, forwarding the data processing request to the target process through an inter-core communication path, wherein the second processing unit is a processing unit integrated on a target vehicle-mounted processor;
[0211] S4, obtaining a target processing result returned by the target process, wherein the target processing result is obtained by performing target data processing on the variable to be processed according to the data processing request.
[0212] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the electronic device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0213] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0214] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0215] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0216] In the several embodiments provided in the present application, it should be understood that the disclosed user equipment can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, 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 units or modules, which can be electrical or other forms.
[0217] 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.
[0218] 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.
[0219] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data processing method based on a heterogeneous core architecture, characterized in that: include: Receiving, through a first processing process, a data processing request associated with a variable to be processed, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle-mounted processor, the data processing request carries variable location information matched by the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request; Determining, according to the parsing result of the variable location information, a process type of a target process matching the variable to be processed; forwarding the data processing request to the target process through an inter-core communication path when the process type of the target process indicates that the target process is a task process running on a second processing unit, wherein the second processing unit is a processing unit integrated on the target vehicle processor; Obtain a target processing result returned by the target process, wherein the target processing result is obtained by performing target data processing on the variable to be processed according to the data processing request.
2. The method according to claim 1, characterized in that The obtaining of the target processing result returned by the target process includes: Receiving processing response information returned by the target process through the inter-core communication path; Parse the processing response information to obtain the target processing result, wherein the target processing result is the processing result of the target process running on the second processing unit, and the target data processing is executed according to the associated data information. The associated data information is obtained by the target process by parsing the data processing request, and is used to indicate the data information for executing the target data processing. The associated data information includes: variable address information, variable parameter information, system environment parameter information and sensor configuration information.
3. The method according to claim 1, characterized in that After determining the process type of the target process matching the variable to be processed according to the parsing result of the variable location information, the method further includes: forwarding the data processing request to the target process through an inter-process communication path when the process type of the target process indicates that the target process is a task subprocess running on the first processing unit; Determine, through the target process, library file dependency information matching the variable to be processed; When the library file dependency information indicates that there is a dependency relationship between the target process and the dynamic library, obtaining a base address matching the dynamic library; and determining a real variable address of the variable to be processed according to the base address; When the library file dependency information indicates that there is a dependency relationship between the target process and the static library, the real variable address of the variable to be processed is obtained.
4. The method according to claim 3, characterized in that After obtaining the base address matching the dynamic library, the method further includes: Obtaining a relative offset address matching the variable to be processed; Determine the sum of the base address and the relative offset address as the real variable address matching the variable to be processed; The target data processing is performed on the variable to be processed indicated by the real variable address according to the data processing request.
5. The method according to claim 3, characterized in that: After determining the library file dependency information matching the variable to be processed through the target process, the method further includes: When the library file dependency information indicates that there is a dependency relationship between the target process and the static library, obtaining the real variable address according to the link file matching the variable to be processed; The target data processing is performed on the variable to be processed indicated by the real variable address according to the data processing request.
6. The method according to any one of claims 1 to 5, characterized in that The obtaining of the target processing result returned by the target process includes: In the case where the target data processing is a variable calibration processing, obtaining a calibration processing result returned by the target process, wherein the calibration processing result is used to indicate that the parameter value of the variable to be processed is updated from the first parameter value to the second parameter value, and the second parameter value is the parameter value carried in the data processing request for completing the variable calibration task; In the case where the target data processing is variable observation processing, the variable parameter value read by the target process is obtained, wherein the variable parameter value is read from the real variable address matching the variable to be processed.
7. The method according to any one of claims 1 to 5, characterized in that After determining the process type of the target process matching the variable to be processed according to the parsing result of the variable location information, the method further includes: In a case where the target process is the task process running on the second processing unit, receiving the target processing result sent by the target process through the inter-core communication path; In a case where the target process is a task subprocess running on the first processing unit, the target processing result sent by the target process is received through an inter-process communication path.
8. The method according to any one of claims 1 to 5, characterized in that After receiving the data processing request associated with the variable to be processed through the first processing process, the method further includes: parsing the data processing request by the first processing process, wherein a field structure of the data processing request matches a target communication protocol; The variable location information matching the variable to be processed is acquired from an extended field of the data processing request, wherein the field structure includes the extended field.
9. The method according to any one of claims 1 to 5, characterized in that Before receiving the data processing request associated with the variable to be processed by the first processing process, the method further includes at least one of the following: Obtaining the load performance of each of the plurality of processing units integrated on the target vehicle-mounted processor, wherein the load performance is used to indicate the task processing capability of the processing unit; and determining the processing unit that meets the processing load condition as the first processing unit according to the load performance; Acquire a historical calibration record integrated on the target vehicle-mounted processor, wherein the historical calibration record is used to indicate the processing unit with the best historical processing performance; and according to the historical calibration record, the processing unit that meets the historical calibration condition is defined as the first processing unit; According to a strategy selection algorithm, the first processing unit is determined from a plurality of the processing units integrated on the target vehicle-mounted processor.
10. A data processing device based on a heterogeneous core architecture, characterized in that: include: A receiving unit receives a data processing request associated with a variable to be processed through a first processing process, wherein the first processing process is a task process running on a first processing unit, the first processing unit is integrated on a target vehicle-mounted processor, the data processing request carries variable location information matched by the variable to be processed, and the data processing request includes a data observation request and / or a data calibration request; A determination unit, which determines a process type of a target process matching the variable to be processed according to a parsing result of the variable location information; a forwarding unit, which forwards the data processing request to the target process through an inter-core communication path when the process type of the target process indicates that the target process is a task process running on a second processing unit, wherein the second processing unit is a processing unit integrated on the target vehicle processor; An execution unit obtains a target processing result returned by the target process, wherein the target processing result is obtained by performing target data processing on the to-be-processed variable according to the data processing request.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 9 when executed by an electronic device.
12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 9 through the computer program.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Equipment management method, equipment management system, upper computer and computer readable medium
CN121143221A