Software deployment method, apparatus, device, and storage medium
By selecting the appropriate core type and scheduling shared resources in a multi-core processor based on the software system's functional type, the problem of software system deployment mismatch in SoC is solved, achieving flexible software system deployment and a stable operating experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING CHANGAN AUTOMOBILE CO LTD
- Filing Date
- 2023-03-22
- Publication Date
- 2026-07-07
AI Technical Summary
In existing technologies, system-on-chips (SoCs) lack flexibility in software system deployment, making it difficult to meet the different functional requirements of multiple software systems in autonomous driving, resulting in deployment mismatch issues.
By obtaining the functional type of the target software system, the appropriate core type (large core or small core) in the multi-core processor is determined, and the software system is deployed on the system core of the target core type. Shared resources are scheduled, abnormal situations are handled, and communication channels are switched to ensure stable operation.
It enables flexible deployment of software systems on multi-core processors, adapts to different functional requirements, improves resource scheduling efficiency, ensures normal operation of application processes, and enhances user experience.
Smart Images

Figure CN116339758B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more particularly to the field of embedded application software development technology for autonomous driving, specifically to a software deployment method, apparatus, device, and storage medium. Background Technology
[0002] With the development of autonomous driving technology, the requirements for system-on-chip (SoC) are becoming increasingly stringent in terms of software deployment, development complexity, and precision. Typically, software systems are automatically loaded by fixed logic after the underlying hardware boots up, making changes and upgrades inflexible and costly.
[0003] In practical applications, the various software systems in autonomous driving technology have different functions and corresponding requirements. For example, the control module requires high real-time performance, while the data analysis module requires significant computing resources. Therefore, how to flexibly deploy multiple software systems within a single SoC to enable each system to be applied in specific scenarios is a problem that needs to be solved during the development process. Summary of the Invention
[0004] This application provides a software deployment method, apparatus, device, and storage medium to at least solve the technical problem of mismatch between software system deployment and requirements in related technologies. The technical solution of this application is as follows:
[0005] According to a first aspect of this application, a software deployment method is provided, applied to a multi-core processor, wherein the multi-core processor includes multiple system cores of different core types. The method includes: obtaining the functional type of a target software system; determining a target core type corresponding to the target software system based on the functional type; the target core type being any one of multiple core types; and deploying the target software system on a system core of the target core type.
[0006] Based on the above technical means, this application can determine the system core in a multi-core processor to deploy the target software system based on the functional type of the target software system, so that each system core can adapt to the corresponding functional requirements and realize the flexible deployment of multiple software systems on a multi-core processor.
[0007] In one possible implementation, the multiple core types include large cores and small cores; the method for determining the target core type corresponding to the target software system based on the function type includes: when the function type indicates that the resource consumption of the target software system is greater than a preset value, the target core type is determined to be a large core; when the function type indicates that the response time of the target software system is less than a preset time, the target core type is determined to be a small core.
[0008] Based on the aforementioned technical methods, large cores have a larger processing capacity, correspondingly consuming more computing power and memory resources. Conversely, small cores have a smaller processing capacity but faster processing speed. Therefore, this application can match the corresponding core type to the target software system based on resource consumption and response time, so that the system core can adapt to the corresponding functional requirements.
[0009] In one possible implementation, the method further includes: obtaining target configuration information of the application process of the target software system; scheduling the shared resources of the multi-core processor and running the application process according to the target configuration information.
[0010] Based on the above technical means, this application can schedule shared resources of multi-core processors, and avoid the resource copying process when running application processes, thereby reducing copying time and improving the efficiency of resource scheduling.
[0011] In one possible implementation, the method for obtaining target configuration information of the application process of the target software system specifically includes: running the application process according to the preset initial configuration information of the application process, and obtaining the running information of the application process; when the running information indicates that the application process is running abnormally, determining the target abnormality type of the application process according to the running information; sending an abnormality notification message to the debugging terminal; the abnormality notification message includes: running information and target abnormality type; receiving a configuration update message sent by the debugging terminal in response to the abnormality notification message; the configuration update message is used to indicate updating the initial configuration information.
[0012] Based on the above technical means, this application can provide information on the running process and the target exception type when the application process is running abnormally, so that the debugging terminal can instruct the initial configuration information to be updated, thereby realizing the debugging of the configuration information and enabling the application process to run normally in a multi-core processor.
[0013] In one possible implementation, the above method further includes: when the running information indicates that the application process is running abnormally at runtime, obtaining a set of running information of the application process within a preset time period; the preset time period includes the runtime; and storing the set of running information in non-volatile memory.
[0014] Based on the above technical means, this application can store the set of operational information, including abnormal moments, in a non-volatile memory, which facilitates subsequent data viewing and fault analysis.
[0015] In one possible implementation, the method further includes: when the occupied resources of the shared resources exceed a preset normal range, updating the initial resource quantity of the shared resources to the target resource quantity; and when the occupied resources return to the normal range, updating the target resource quantity to the initial resource quantity.
[0016] Based on the aforementioned technical means, this application can determine an adjustment strategy for the quantity of shared resources based on whether the occupied resources exceed a preset normal range, so as to adjust the quantity of shared resources according to the adjustment strategy, thereby automatically and quickly realizing the dynamic adjustment of shared resources.
[0017] In one possible implementation, the communication channels of the multi-core processor include a primary channel and a backup channel; the method further includes: transmitting data through the primary channel and obtaining transmission status information; when the transmission status information indicates that the primary channel transmission is abnormal, switching to the backup channel to transmit data.
[0018] Based on the above technical means, this application can switch to a backup channel for transmission when the primary channel is abnormal, without affecting the continuity of data transmission, thereby improving the user experience.
[0019] According to a second aspect provided in this application, a software deployment apparatus is provided, applied to a multi-core processor; the multi-core processor includes multiple system cores of different core types; the apparatus includes: an acquisition unit and a processing unit; the acquisition unit is used to acquire the function type of a target software system; the processing unit is used to determine the target core type corresponding to the target software system based on the function type; the target core type is any one of the multiple core types; the processing unit is further used to deploy the target software system on the system core of the target core type.
[0020] In one possible implementation, the multiple core types include large cores and small cores; the aforementioned processing unit is specifically used to determine the target core type as a large core when the resource consumption corresponding to the target software system represented by the function type is greater than a preset value; and to determine the target core type as a small core when the response time corresponding to the target software system represented by the function type is less than a preset time.
[0021] In one possible implementation, the above apparatus further includes a scheduling unit; the scheduling unit is used to obtain target configuration information of the application process of the target software system; according to the target configuration information, schedule the shared resources of the multi-core processor and run the application process.
[0022] In one possible implementation, the scheduling unit is specifically configured to: run the application process according to the initial configuration information preset by the application process, and obtain the running information of the application process; when the running information indicates that the application process is running abnormally, determine the target abnormality type of the application process according to the running information; send an abnormality notification message to the debugging terminal; the abnormality notification message includes: running information and target abnormality type; receive a configuration update message sent by the debugging terminal in response to the abnormality notification message; the configuration update message is used to indicate updating the initial configuration information.
[0023] In one possible implementation, the above-described apparatus further includes a storage unit, which is used to: when the running information indicates that the application process is running abnormally at runtime, obtain a set of running information of the application process within a preset time period; the preset time period includes the runtime; and store the set of running information in a non-volatile memory.
[0024] In one possible implementation, the scheduling unit is further configured to update the initial resource quantity of the shared resource to the target resource quantity when the occupied resources of the shared resource exceed a preset normal range; and to update the target resource quantity to the initial resource quantity when the occupied resources return to the normal range.
[0025] In one possible implementation, the communication channel of the multi-core processor includes a primary channel and a backup channel; the device further includes a communication unit, which is used to: transmit data through the primary channel and obtain transmission status information; when the transmission status information indicates that the primary channel transmission is abnormal, switch to the backup channel to transmit data.
[0026] According to a third aspect provided in this application, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method of the first aspect described above and any possible implementation thereof.
[0027] According to a fourth aspect provided in this application, a computer-readable storage medium is provided that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the methods described in the first aspect and any possible implementation thereof.
[0028] According to the fifth aspect provided in this application, a computer program product is provided, the computer program product including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0029] According to a sixth aspect provided in this application, a vehicle is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method of the first aspect described above and any possible implementation thereof.
[0030] Therefore, the above-mentioned technical features of this application have the following beneficial effects:
[0031] (1) Based on the functional type of the target software system, the system cores in the multi-core processor where the target software system is deployed can be determined, so that each system core can adapt to the corresponding functional requirements and realize the flexible deployment of multiple software systems on the multi-core processor.
[0032] (2) Because large cores have a large processing capacity, they consume more computing power and memory resources. In contrast, small cores have a smaller processing capacity but faster processing speed. Therefore, the corresponding core type can be matched to the target software system based on resource consumption and response time, so that the system core can adapt to the corresponding functional requirements.
[0033] (3) It can schedule shared resources of multi-core processors. When running application processes, it can avoid the resource copying process, thereby reducing copying time and improving the efficiency of resource scheduling.
[0034] (4) When the application process is running abnormally, the running information and the target abnormality type can be notified so that the debugging terminal can instruct the initial configuration information to be updated, so as to realize the debugging of the configuration information and enable the application process to run normally in a multi-core processor.
[0035] (5) The set of operational information, including abnormal moments, can be stored in non-volatile memory, which facilitates subsequent data viewing and fault analysis.
[0036] (6) Based on whether the occupied resources exceed the preset normal range, the resource quantity adjustment strategy of the shared resources can be determined so that the resource quantity of the shared resources can be adjusted according to the adjustment strategy, and the dynamic adjustment of the shared resources can be realized automatically and quickly.
[0037] (7) When the primary channel is abnormal, the system can switch to the backup channel for transmission without affecting the continuity of data transmission, thereby improving the user experience.
[0038] It should be noted that the technical effects of any of the implementation methods in aspects two through six can be found in the technical effects of the corresponding implementation methods in aspect one, and will not be repeated here.
[0039] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.
[0041] Figure 1 This is a schematic diagram illustrating a software deployment method according to an exemplary embodiment;
[0042] Figure 2 This is a schematic diagram of the structure of a multi-core processor according to an exemplary embodiment;
[0043] Figure 3This is a schematic diagram illustrating a method for scheduling shared resources according to an exemplary embodiment;
[0044] Figure 4 This is a schematic diagram illustrating yet another software deployment method according to an exemplary embodiment;
[0045] Figure 5 This is a flowchart illustrating a configuration information debugging process according to an exemplary embodiment;
[0046] Figure 6 This is a schematic diagram illustrating a redundant communication structure according to an exemplary embodiment;
[0047] Figure 7 This is a block diagram illustrating a software deployment apparatus according to an exemplary embodiment;
[0048] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0049] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0050] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0051] For ease of understanding, the software deployment method provided in this application will be described in detail below with reference to the accompanying drawings.
[0052] Figure 1 This is a flowchart illustrating a software deployment method according to an exemplary embodiment, such as... Figure 1 As shown, the software deployment method includes the following steps:
[0053] S101, Multi-core processor obtains the function type of the target software system.
[0054] Optionally, the function type can include logic control type and pure algorithm type.
[0055] Pure algorithm-based software systems include applications with high computational requirements, such as environmental perception, visual perception, sensor fusion, and planning and decision-making. They also include applications with high memory requirements, such as data logging, diagnostics, sensors, and internal communication.
[0056] Pure algorithm-based software systems include applications with high real-time requirements, such as external communication, security management, real-time control, and redundant communication.
[0057] In one possible approach, the method for obtaining the function type of a target software system on a multi-core processor may include: when the target software system is initially deployed on a multi-core processor, the developers may manually identify and input the function type of the target software system.
[0058] S102. The multi-core processor determines the target core type corresponding to the target software system based on the function type.
[0059] A multi-core processor includes system cores of multiple core types, and the target core type can be any one of the multiple core types.
[0060] Optionally, multiple kernel types are available, including big kernels and little kernels.
[0061] S103, a multi-core processor, deploys the target software system on the target core type system core.
[0062] In some embodiments, in order to determine the target core type corresponding to the target software system, the method for determining the target core type corresponding to the target software system based on the function type in S102 provided in this application embodiment specifically includes the following steps:
[0063] S201. When the resource consumption corresponding to the target software system is greater than the preset value, the multi-core processor determines the target core type as a large core.
[0064] S202. When the function type indicates that the response time of the target software system is less than the preset time, the multi-core processor determines the target core type as a small core.
[0065] Among them, the large cores have a larger processing capacity, which corresponds to a greater consumption of computing power and memory resources, while the small cores have a smaller processing capacity but a faster processing speed.
[0066] Therefore, applications with high real-time requirements can be deployed on small cores, while applications with high computing power and memory requirements can be deployed on large cores.
[0067] For example, such as Figure 2As shown, the software system deployed by the multi-core processor includes visual perception 1, sensor 2, environmental perception 3, vehicle signal 4, sensor fusion 5, planning and decision 6, data logging 7, diagnostics 8, status management 9, and internal communication 10, deployed on two large cores. It also includes external communication 11, safety management 12, real-time control 13, and redundant communication 14, deployed on four small cores respectively.
[0068] Visual perception 1 is used to capture images of the vehicle's front view, panoramic view, and surrounding view.
[0069] Sensor 2 includes lidar, microwave radar, and front and rear angle radar.
[0070] Environmental perception 3 is used to collect data on vehicle interior and exterior temperatures, weather conditions, and targets around the vehicle.
[0071] Vehicle signal 4 indicates the vehicle body signal.
[0072] Sensor fusion 5 is used to integrate and analyze the local data resources provided by visual perception 1, sensor 2 and environmental perception 3.
[0073] Planning and Decision 6 is used to realize lateral and longitudinal control planning and decision-making, automatic driving and automatic parking path planning and decision-making, vehicle on-ramps and off-ramps planning and decision-making, parking space planning and decision-making, etc.
[0074] Data record 7 is used to record the data generated in each scenario and its communication and data transmission with the cloud platform.
[0075] Diagnostics 8 includes diagnostic messages for customers, and diagnostics for development, debugging, and maintenance.
[0076] Status Management 9 is used to manage and schedule various states of the vehicle.
[0077] Internal communication 10 includes electronic fences and communication between large and small core chips.
[0078] External communication 11 includes high, medium and low level controller area network (CAN) bus, vehicle Ethernet communication, and wireless communication.
[0079] Security Management 12 is used to implement information security management, irreversible fault management, and fault data recording management.
[0080] Real-time control 13 includes lateral and longitudinal control, vehicle control, and safety braking.
[0081] Redundant communication 14 is used to switch between primary and backup channels.
[0082] In some embodiments, in order to enable the target software system to run normally on a multi-core processor, the method provided in this application embodiment further includes the following steps:
[0083] S301, the multi-core processor obtains the target configuration information of the application process of the target software system.
[0084] S302: The multi-core processor schedules the shared resources of the multi-core processor and runs application processes according to the target configuration information.
[0085] Optionally, shared resources may include memory and computing resources.
[0086] like Figure 3 As shown, based on the commonalities of multiple application processes 01, shared resources 02 can be pre-configured for use by application processes of multiple software systems. Furthermore, to resolve the conflict and contention issues among multiple application processes 01, this application embodiment provides unified resource management 03 to address these issues.
[0087] In one feasible approach, pure algorithm programs can utilize the hardware acceleration provided by the SOC, using the interfaces provided by neon technology to perform addition, subtraction, multiplication, and division, while supplementing with matrix operations to reduce resource consumption. This, combined with the flexible deployment of the target software system, achieves the effect of rational resource utilization.
[0088] In some embodiments, in order to obtain target configuration information of the application process of the target software system, such as Figure 4 As shown, the method for a multi-core processor to obtain target configuration information of the application process of the target software system in S301 provided in this application embodiment specifically includes the following steps:
[0089] S401: The multi-core processor runs the application process based on the initial configuration information preset by the application process and obtains the running information of the application process at the running time.
[0090] S402. When the runtime information indicates that the application process is running abnormally, the multi-core processor determines the target exception type of the application process based on the runtime information.
[0091] Optionally, the target anomaly type can include multiple levels, represented by pre-created corresponding identifiers.
[0092] For example, as shown in Table 1, the target anomaly type can include five anomaly types: application logic failure, radar sensor failure, vision sensor failure, communication failure, and domain controller failure. The anomaly type identifier can be represented as a 32-bit wide classification code, with each classification code representing one anomaly type. As shown in Table 2, each anomaly type includes specific fault content, which can be represented as a 16-bit wide fault code.
[0093] Table 1 Classification Codes
[0094] Table 2 Fault Codes
[0095]
[0096]
[0097] During the design phase, the correspondence between classification codes and exception types, as well as the correspondence between fault codes and fault content, for each software system is incorporated into the source code. When a runtime exception occurs, the classification code is written into the process along with the fault code, facilitating the identification of exception types and fault content by debugging personnel. This application does not limit the format and bit width of the classification codes and fault codes; Tables 1 and 2 are merely illustrative examples. This application also does not limit the format of the codes written into the process; Table 1 uses a txt format as an example.
[0098] S403, the multi-core processor sends an exception notification message to the debugging terminal.
[0099] The exception notification message includes: runtime information and the target exception type.
[0100] In one feasible approach, developers can instruct the debugging terminal to subscribe to exception notification messages by inputting configuration items via the vehicle's infotainment display, mobile application, or cloud platform. When the debugging terminal receives an exception notification message, it can authenticate the object viewing the message. If the object is an authorized user, the debugging terminal can display the exception notification message.
[0101] In one feasible approach, administrators can grant different levels of permissions to objects, allowing them to view and respond to different message contents. Administrators can configure these permissions; by default, only basic permissions are granted.
[0102] The S404 multi-core processor receives the configuration update message sent by the debug terminal in response to the exception notification message.
[0103] Configuration update messages are used to indicate that the initial configuration information has been updated.
[0104] In one feasible approach, the debugging terminal can determine the target exception type of the application process based on runtime information. The debugging terminal can then determine the target handling strategy corresponding to the target exception type based on a pre-defined mapping between exception types and handling strategies, and finally generate a configuration update message based on the target handling strategy.
[0105] In some embodiments, in order to archive runtime data during abnormal runtime events, such as Figure 4 As shown, the method provided in this application embodiment further includes the following steps:
[0106] S405. When the running information indicates that the application process is running abnormally at runtime, the multi-core processor obtains a set of running information of the application process within a preset time period.
[0107] The preset time period includes the running time, such as the time period within 30 seconds before and after the running time.
[0108] The S406 multi-core processor stores a set of runtime information in non-volatile memory.
[0109] Specifically, in combination Figure 5 The process of debugging configuration information is described. After the multi-core processor obtains the debugging information of the application process, it can read the application process's configuration file to determine the debugging parameters to be debugged. Then, the application process is loaded and run according to the initial configuration information of the debugging parameters.
[0110] When an application process fails to start normally, a multi-core processor can send an error message and close the application process's launcher.
[0111] If the application process starts normally and there are no irreversible or functional failures, the application process will continue to run.
[0112] When an application process experiences an irreversible or functionally impactful failure, the multi-core processor acquires a set of runtime information for the application process within a 30-second period before and after the current runtime and stores it in non-volatile memory. Simultaneously, it sends an exception notification message to the debugging terminal so that the terminal can display the notification.
[0113] In some embodiments, in order to achieve dynamic adjustment of the capacity of shared resources, the method provided in this application further includes the following steps:
[0114] S501. When the occupied resources of the shared resources exceed the preset normal range, the multi-core processor updates the initial resource quantity of the shared resources to the target resource quantity.
[0115] S502. When the occupied resources are restored to the normal range, the multi-core processor updates the target resource quantity to the initial resource quantity.
[0116] In one possible implementation, Resource Management 03 can provide resource alerts. If the occupied resources of shared resources exceed the preset normal range, for example, if the remaining shared resources are less than 20%, and depending on the program's running status, such as in automatic parking or automatic driving, Resource Management 03 will temporarily update the initial resource quantity of shared resources to the target resource quantity to solve the problem of resource shortage during full-speed operation and ensure the normal operation of all application processes.
[0117] When the occupied resources are within a normal range, some memory reclamation mechanisms can meet the requirements for normal operation, so the initial resource quantity of shared resources is not updated.
[0118] In some embodiments, the communication channels of a multi-core processor include a primary channel and a backup channel. The method provided in this application embodiment further includes the following steps:
[0119] The S601 multi-core processor transmits data through the primary channel and obtains transmission status information.
[0120] Optionally, transmission status information includes transmission delay, packet loss rate, transmission rate, etc.
[0121] In one possible approach, data is transmitted using a fixed frame format, and cyclic redundancy check (CRC32) is used to verify the data. Alternatively, a binary data encryption method based on 64 printable characters (BASE64) can be used to improve data security.
[0122] S602. When the transmission status information indicates that the primary channel transmission is abnormal, the multi-core processor switches to the backup channel to transmit data.
[0123] Specifically, multi-core processor communication adopts a redundant design pattern, including a primary channel and a backup channel.
[0124] Combination Figure 6 The SoC chip 001 transmits data through the Ethernet switch chip 002, the primary port 003, and the backup port 004. The SoC chip 001 establishes a primary channel and a backup channel with the Ethernet switch chip 002 through two network ports. The primary port 003 and the backup port 004 correspond to the primary channel and the backup channel, respectively.
[0125] When the primary channel is operating normally, the backup channel can communicate additional non-essential services. When transmission status information indicates an anomaly in the primary channel transmission, for example, if three frames of data loss are detected, the SoC chip 001 generates a fault notification. The Ethernet switch chip 002, within a switching period after receiving the primary channel fault notification (e.g., within 20 milliseconds), switches to the backup channel to transmit data. Once the faulty channel is repaired, the Ethernet switch chip 002 switches back to the primary channel within a preset time (e.g., after one minute).
[0126] In one possible implementation, the multi-core processor can also notify the visual interface, cloud platform, and mobile device of the current communication channel type.
[0127] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the aforementioned functions, the software deployment apparatus or electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0128] This application embodiment can, based on the above method, exemplarily divide a software deployment device or electronic device into functional modules. For example, the software deployment device or electronic device may include functional modules corresponding to each functional division, or two or more functions may be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.
[0129] Figure 7 This is a block diagram illustrating a software deployment apparatus according to an exemplary embodiment. (Refer to...) Figure 7 The software deployment device 700 includes an acquisition unit 701 and a processing unit 702.
[0130] The acquisition unit 701 is used to acquire the function type of the target software system.
[0131] The processing unit 702 is used to determine the target kernel type corresponding to the target software system based on the function type; the target kernel type can be any one of multiple kernel types.
[0132] The processing unit 702 is also used to deploy the target software system on the system core of the target core type.
[0133] In one possible implementation, the multiple core types include large cores and small cores; the processing unit 702 is specifically used to determine the target core type as a large core when the resource consumption corresponding to the target software system represented by the function type is greater than a preset value; and to determine the target core type as a small core when the response time corresponding to the target software system represented by the function type is less than a preset time.
[0134] In one possible implementation, the above-described apparatus further includes a scheduling unit 703.
[0135] The scheduling unit 703 is used to obtain the target configuration information of the application process of the target software system; according to the target configuration information, it schedules the shared resources of the multi-core processor and runs the application process.
[0136] In one possible implementation, the scheduling unit 703 is specifically configured to: run the application process according to the initial configuration information preset by the application process, and obtain the running information of the application process; when the running information indicates that the application process is running abnormally, determine the target abnormality type of the application process according to the running information; send an abnormality notification message to the debugging terminal; the abnormality notification message includes: running information and target abnormality type; receive a configuration update message sent by the debugging terminal in response to the abnormality notification message; the configuration update message is used to indicate updating the initial configuration information.
[0137] In one possible implementation, the above-described device further includes a storage unit 704.
[0138] Storage unit 704 is used to: when the running information indicates that the application process is running abnormally at runtime, obtain the set of running information of the application process within a preset time period; the preset time period includes the runtime; and store the set of running information in non-volatile memory.
[0139] In one possible implementation, the scheduling unit 703 is further configured to update the initial resource quantity of the shared resource to the target resource quantity when the occupied resources of the shared resource exceed a preset normal range; and to update the target resource quantity to the initial resource quantity when the occupied resources return to the normal range.
[0140] In one possible implementation, the communication channels of the multi-core processor include a primary channel and a backup channel; the above-described device also includes a communication unit 705.
[0141] The communication unit 705 is used to: transmit data through the primary channel and obtain transmission status information; when the transmission status information indicates that the primary channel transmission is abnormal, switch to the backup channel to transmit data.
[0142] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0143] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Figure 8 As shown, the electronic device includes, but is not limited to, a processor 801 and a memory 802.
[0144] The memory 802 described above is used to store the executable instructions of the processor 801. It is understood that the processor 801 is configured to execute instructions to implement the methods in the above embodiments.
[0145] It should be noted that those skilled in the art will understand that Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device; the electronic device may include, but is not limited to, other electronic devices. Figure 8 This may indicate more or fewer components, or combinations of certain components, or different component arrangements.
[0146] The processor 801 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 802, and by calling data stored in the memory 802, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 801 may include one or more processing units. Optionally, the processor 801 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 801.
[0147] The memory 802 can be used to store software programs and various data. The memory 802 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, application programs required by at least one functional module (such as a determination unit, processing unit, etc.), etc. Furthermore, the memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0148] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 802 including instructions, which can be executed by a processor 801 of an electronic device to implement the methods in the above embodiments.
[0149] In actual implementation, Figure 7 The functions of the acquisition unit 701, processing unit 702, scheduling unit 703, storage unit 704, and communication unit 705 can all be derived from... Figure 8 The processor 801 calls the computer program stored in the memory 802 to implement the process. The specific execution process can be found in the description of the method section in the previous embodiment, and will not be repeated here.
[0150] Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0151] In an exemplary embodiment, this application also provides a computer program product including one or more instructions, which can be executed by a processor 801 of an electronic device to perform the methods described above.
[0152] It should be noted that when one or more instructions in the computer-readable storage medium or computer program product are executed by the processor of an electronic device, they implement the various processes of the above method embodiments and achieve the same technical effect as the above method. To avoid repetition, they will not be described again here.
[0153] In an exemplary embodiment, a vehicle including instructions is also provided, such as a memory 802 including instructions, which can be executed by a processor 801 of an electronic device to implement the methods in the above embodiments.
[0154] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0155] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0156] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the classified units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0157] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0158] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, essentially, or the part that contributes to the prior art, or a complete or partial classification of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0159] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A software deployment method, characterized in that, Multi-core processors used in embedded systems for autonomous driving; The multi-core processor includes multiple system cores of different core types; the method includes: Obtain the functional type of the target software system; the functional type includes logic control type and pure algorithm type. Based on the functional type, determine the target core type corresponding to the target software system; the target core type is any one of the plurality of core types; the plurality of core types includes large cores and small cores; The target software system is deployed on the system core of the target core type; The step of determining the target kernel type corresponding to the target software system based on the function type includes: When the function type indicates that the resource consumption of the target software system is greater than a preset value, the target core type is determined to be the large core; When the function type indicates that the response time of the target software system is less than the preset time, the target core type is determined to be the small core; Obtain the target configuration information of the application processes of the target software system; Based on the target configuration information, the shared resources of the multi-core processor are scheduled, and the application process is run; When the occupied resources of the shared resources exceed the preset normal range, the initial resource quantity of the shared resources is updated to the target resource quantity; The step of obtaining the target configuration information of the application process of the target software system includes: According to the initial configuration information preset by the application process, the application process is run, and the running information of the application process is obtained; When the running information indicates that the application process is running abnormally, the target abnormality type of the application process is determined based on the running information; wherein, the target abnormality type includes: application logic failure, radar sensor failure, vision sensor failure, communication failure, or domain controller failure. Send an anomaly notification message to the debugging terminal; the anomaly notification message includes: the running information and the target anomaly type; The debugging terminal receives a configuration update message in response to the exception notification message; the configuration update message is used to indicate the update of the initial configuration information.
2. The method according to claim 1, characterized in that, Also includes: When the running information indicates that the application process is running abnormally at runtime, obtain the set of running information of the application process within a preset time period; The preset time period includes the running time; The set of operational information is stored in non-volatile memory.
3. The method according to claim 1, characterized in that, Also includes: When the occupied resources are restored to the normal range, the target resource quantity will be updated to the initial resource quantity.
4. The method according to any one of claims 1-3, characterized in that, The communication channels of the multi-core processor include a primary channel and a backup channel; the method further includes: Data is transmitted through the primary channel, and transmission status information is obtained; When the transmission status information indicates that the primary channel is experiencing a transmission error, the system switches to the backup channel to transmit data.
5. A software deployment apparatus, characterized in that, Multi-core processors used in embedded systems for autonomous driving; The multi-core processor includes multiple system cores of different core types; the device includes: an acquisition unit and a processing unit; The acquisition unit is used to acquire the functional type of the target software system; the functional type includes logic control type and pure algorithm type. The processing unit is configured to determine the target core type corresponding to the target software system based on the function type; the target core type is any one of the plurality of core types; the plurality of core types includes large cores and small cores; The processing unit is also configured to deploy the target software system on the system core of the target core type; The processing unit is configured to determine the target core type as the large core when the function type indicates that the resource consumption corresponding to the target software system is greater than a preset value; and to determine the target core type as the small core when the function type indicates that the response time corresponding to the target software system is less than a preset time. The processing unit is further configured to acquire target configuration information of the application process of the target software system; schedule the shared resources of the multi-core processor and run the application process according to the target configuration information; when the occupied resources of the shared resources exceed a preset normal range, update the initial resource quantity of the shared resources to the target resource quantity. The processing unit is configured to run the application process according to the preset initial configuration information of the application process, obtain the running information of the application process; when the running information indicates that the application process is running abnormally, determine the target abnormality type of the application process according to the running information; send an abnormality notification message to the debugging terminal; the abnormality notification message includes: the running information and the target abnormality type; receive a configuration update message sent by the debugging terminal in response to the abnormality notification message; the configuration update message is used to indicate updating the initial configuration information.
6. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, When the computer-executable instructions stored in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is capable of performing the method as described in any one of claims 1 to 4.
8. A vehicle, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 4.