Mode switching method and device of autonomous driving system and electronic equipment
By introducing mode switching monitoring components and service components into the autonomous driving system, the problem of mode switching in the distributed autonomous driving system is solved, efficient and reliable mode switching is achieved, and component status monitoring and communication efficiency are ensured.
Patent Information
- Application Number
- CN202210214309.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-03-04
AI Technical Summary
The mode switching solution in the existing technology is not suitable for distributed autonomous driving systems and cannot effectively manage functional components distributed in different processes.
By introducing mode switching monitoring components and mode switching service components into the autonomous driving system, mode switching requests and control of components of the target process can be realized, supporting lightweight switching and deep switching, and ensuring component status monitoring and communication efficiency.
It realizes the mode switching of the distributed autonomous driving system, improves the efficiency and reliability of mode switching, and avoids component conflicts and long waiting times.
Smart Images

Figure CN114633752B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to unmanned driving technology in the field of artificial intelligence technology, and in particular to a mode switching method, device, and electronic equipment for an automatic driving system. Background Art
[0002] In actual operation, autonomous driving systems have various operating scenarios. Different scenarios require different functional components to run, which correspond to different modes of the autonomous driving system. Therefore, autonomous driving systems often need to switch modes during operation.
[0003] Mode switching in related technologies mostly adopts a single-process mode switching solution. However, current autonomous driving systems often adopt a distributed structure. There are many functional components in the autonomous driving system. Different functional components may run in different processes. These processes may run on the same host or different hosts. Therefore, this mode switching solution is not suitable for distributed autonomous driving systems. Summary of the Invention
[0004] The present disclosure provides a mode switching method, device, and electronic device for an autonomous driving system applicable to a distributed autonomous driving system.
[0005] According to a first aspect of the present disclosure, a mode switching method of an autonomous driving system is provided, comprising:
[0006] Obtain mode switching instructions through the mode switching monitoring component;
[0007] According to the mode switching instruction, a mode switching request is sent to a mode switching service component of a target process in at least two processes through a mode switching monitoring component, wherein the mode switching request includes a target mode;
[0008] The mode switching service component controls the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode.
[0009] According to a second aspect of the present disclosure, a mode switching device for an autonomous driving system is provided, comprising:
[0010] An acquisition module is used to acquire a mode switching instruction through a mode switching monitoring component;
[0011] a sending module, configured to send a mode switching request to a mode switching service component of a target process among the at least two processes through a mode switching monitoring component according to the mode switching instruction, wherein the mode switching request includes a target mode;
[0012] The switching module is used to control the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode through the mode switching service component.
[0013] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0017] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0018] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising: a computer program, wherein the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device executes the method described in the first aspect.
[0019] According to the technical solution disclosed in the present invention, mode switching of a distributed autonomous driving system is achieved.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0022] Figure 1 is a schematic diagram of an autonomous driving system provided according to an embodiment of the present disclosure;
[0023] Figure 2 is a flow chart of a mode switching method of an autonomous driving system provided according to an embodiment of the present disclosure;
[0024] Figure 3 is a schematic structural diagram of a mode switching device for an autonomous driving system according to an embodiment of the present disclosure;
[0025] Figure 4 It is a schematic block diagram of an electronic device for implementing the method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0027] Figure 1 Schematic diagram of an autonomous driving system according to an embodiment of the present disclosure. It illustrates the multi-process and cross-machine process scenarios in a distributed mode system. Figure 1 As shown in the figure, the process A (Process A), process B (Process B) and process C (Process C) included in the autonomous driving system are illustrated. Among them, process A and process B are deployed on machine 1 (Machine1), and process C is deployed on machine 2 (Machine2). The three processes all support two modes, namely mode 1 (Model) and mode 2 (Mode2). Each mode contains several functional components. For example, mode 1 of process A includes component 1 (Component1) and component 2 (Component2), and mode 2 includes component 3 (Component3) and component 4 (Component4). In addition, the autonomous driving system can also include processes that do not require mode switching, such as process D (Process D) in the figure. Regardless of the mode in which the autonomous driving system runs, components 13 and 14 are running in process D. Figure 1 Only two modes are used for illustration. In actual applications, a process can support multiple modes, and different processes may correspond to different modes. For example, in addition to the above examples, the autonomous driving system may also include other processes corresponding to mode 3, mode 4, etc.
[0028] In addition to the above functional components, in order to achieve mode switching, the process of the embodiment of the present disclosure also includes a mode switching monitoring component (Mode switch) and a mode switching service component (Mode service). Among them, any process can include a mode switching monitoring component, Figure 1In this example, we take processes A and C as examples, where the mode switching monitoring component is included. In actual applications, the mode switching monitoring component can be set up in each process as needed. The mode switching service component can be set up in all processes that support two or more modes. For example, the three processes A, B, and C mentioned above all include the mode switching service component, while process D does not. Figure 1 Process A also includes a human-machine interface (HMI) component.
[0029] The mode switch monitoring component is used to obtain mode switch commands triggered by the user through the human-machine interface, or from other signals, such as automatic triggering due to a scene change during vehicle operation. The mode switch service module is used to receive mode switch requests from the mode switch monitoring module. If a mode switch command request is received, it will perform a mode switch on the component in the process in which it is located.
[0030] Based on the above architecture, the present disclosure provides a mode switching method, device and electronic equipment for an autonomous driving system, which are applied to the unmanned driving field in the field of artificial intelligence technology. Specifically, it can be applied in the process of switching operating scenarios of autonomous driving vehicles to achieve mode switching for distributed autonomous driving systems.
[0031] The following describes in detail the mode switching method of the autonomous driving system provided by the present disclosure through specific embodiments. It is understood that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0032] Figure 2 This is a flow chart of a mode switching method for an autonomous driving system according to an embodiment of the present disclosure. The execution subject of this method is a mode switching device for an autonomous driving system, which can be implemented in software and / or hardware. Figure 2 As shown, the method includes:
[0033] S201. Obtain a mode switching instruction through a mode switching monitoring component.
[0034] The mode switch command can be triggered by a user through a human-machine interface, such as by a user clicking a mode switch button on the human-machine interface. Alternatively, the mode switch command can be triggered automatically by the autonomous vehicle during driving, such as when a scene changes during driving, such as switching from a normal driving scene to an automatic parking scene, thereby triggering a mode switch. The mode switch monitoring component can be a mode switch monitoring component in any process in the autonomous driving system.
[0035] S202: According to the mode switching instruction, a mode switching request is sent to a mode switching service component of a target process in at least two processes through a mode switching monitoring component.
[0036] The mode switching request includes the target mode.
[0037] The at least two processes in this step refer to all processes included in the distributed autonomous driving system. The target process refers to a process involved in mode switching, that is, a process that supports two or more modes. Based on the mode switching instruction, the mode switching monitoring component sends a mode switching request to the mode switching service component in the target process. The target process can include one or more. For example, the mode switching monitoring component in process A sends a mode switching request to the mode switching service components in processes A, B, and C, respectively.
[0038] S203: Control the component running in the target process to switch from a first component corresponding to the current mode to a second component corresponding to the target mode through the mode switching service component.
[0039] After receiving the mode switching request, the mode switching service component in the target process switches the components running in the process according to the target mode in the mode switching request, switching the running components from the first component corresponding to the current mode to the second component corresponding to the target mode. For example, for process A, the components running therein are switched from components 1 and 2 corresponding to mode 1 to components 3 and 4 corresponding to mode 2.
[0040] It should be noted that for a target process, if its corresponding mode does not include the target mode, then it does not need to be switched. For example, if a target process corresponds to mode 3 and mode 4, if the target mode is mode 2, then the target process does not need to be switched.
[0041] In the disclosed embodiment, a mode switching monitoring component and a mode switching service component are set in a process, and a mode switching request is sent to the mode switching service component of other processes through a mode switching monitoring component, thereby realizing the mode switching of a distributed autonomous driving system.
[0042] Based on the above embodiments, the following describes the scenarios and methods for mode switching. The above embodiments focus on mode switching, that is, switching all components corresponding to the mode. Switching operations may include loading, unloading, enabling, disabling, and resetting. In actual use, in addition to the above-mentioned mode switching, there are also component switching scenarios, that is, loading, unloading, enabling, disabling, and resetting components.
[0043] In addition, when switching modes, the switching methods can also be divided into two types, one is lightweight switching and the other is deep switching. Among them, lightweight switching is to first disable the current mode and then enable the target mode; deep switching is to first disable the current mode, then uninstall the current mode, then load the target mode, and then enable the target mode. In actual use, lightweight switching or deep switching can be used as needed. For example, some switching scenarios have high time requirements, so lightweight switching is used to achieve fast switching. In some switching scenarios, there is a conflict between the current mode and the target mode. For example, some components cannot run at the same time, so deep switching is required.
[0044] Optionally, the switching mode is determined based on the current mode and the target mode, and the switching mode is one of a lightweight switching mode and a deep switching mode; according to the switching mode, the mode switching service component controls the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode.
[0045] Optionally, the switching method is a lightweight switching method. According to the lightweight switching method, the mode switching service component disables the first component and enables the second component. For example, for process A in the above example, according to the lightweight switching method, components 1 and 2 are first disabled, and then components 3 and 4 are enabled. This achieves a fast switching.
[0046] Optionally, the switching method is a deep switching method. According to the deep switching method, the mode switching service component disables and uninstalls the first component, and loads and enables the second component. For example, for process A in the above example, the deep switching method first disables components 1 and 2, then uninstalls them, then loads components 3 and 4, and then enables them. This ensures a successful mode switch and avoids component conflicts.
[0047] The following further describes the communication mechanism between components.
[0048] In the autonomous driving system of the disclosed embodiment, each process includes a discovery component that monitors the status of all components in the process, that is, the status of components going online or offline. Optionally, the discovery component monitors the status of all components in the process where the discovery component is located; the component status is broadcasted so that the mode switch monitoring component sends a mode switch request to the mode switch service component of the target process in at least two processes based on the mode switch instruction and the component status, thereby ensuring that the mode switch request is correctly sent.
[0049] When each component in the autonomous driving system goes online or offline, the discovery component in its own process can obtain the component's status and broadcast it, allowing the discovery components of other processes to also obtain the status of these components. In other words, any process in the autonomous driving system can obtain the status of all components in other processes. The discovery component can also obtain the status of the mode switching service component.
[0050] For target processes involving mode switching—that is, processes that support two or more modes—a mode switching service component is included. Upon receiving a mode switching instruction, the mode switching monitoring component sends a mode switching request to the target process's mode switching service component based on the state of the target process's mode switching service component obtained by the discovery component. This enables cross-process mode switching.
[0051] Because processes in an autonomous driving system may be deployed on the same machine (also known as a host or device) or on different machines, different communication methods can be used between components. For example, different components in the same process or components in different processes on the same machine can communicate through shared memory. Components on different machines can communicate using distributed real-time communication methods, such as the Data Distribution Service (DDS).
[0052] Optionally, the mode switching monitoring component and the target process are deployed in the same device; the mode switching monitoring component sends a mode switching request to the mode switching service component of the target process using a shared memory method, thereby improving communication efficiency.
[0053] Optionally, the mode switching monitoring component and the target process are deployed on different devices. The mode switching monitoring component uses distributed real-time communication to send a mode switching request to the mode switching service component of the target process, thereby ensuring normal communication across machines.
[0054] Furthermore, because the autonomous driving system may experience switching failures during mode switching, the disclosed embodiments incorporate exception handling functionality to address this issue. When the mode switching monitoring component sends a mode switching request to the mode switching service component, a timeout parameter can be included in the request. If the mode switching service component fails to complete the switch within the timeout period, an alarm is triggered and the reason for the switch failure is provided, thereby preventing the autonomous driving system from being stuck in a long wait in the event of a switch failure.
[0055] Figure 3 Schematic diagram of a mode switching device for an automatic driving system according to an embodiment of the present disclosure. Figure 3As shown, the mode switching device 500 of the automatic driving system includes:
[0056] An acquisition module 301 is configured to acquire a mode switching instruction through a mode switching monitoring component;
[0057] A sending module 302 is configured to send a mode switching request to a mode switching service component of a target process among at least two processes through a mode switching monitoring component according to a mode switching instruction, wherein the mode switching request includes a target mode;
[0058] The switching module 303 is configured to control the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode through the mode switching service component.
[0059] In one embodiment, the switching module 303 includes:
[0060] a determination unit, configured to determine a switching mode according to a current mode and a target mode, wherein the switching mode is one of a lightweight switching mode and a deep switching mode;
[0061] The control unit is used to control the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode through the mode switching service component according to the switching method.
[0062] In one embodiment, the switching mode is a lightweight switching mode; the control unit includes:
[0063] The first control subunit is configured to disable the first component and enable the second component through the mode switching service component according to a lightweight switching manner.
[0064] In one embodiment, the switching mode is a deep switching mode; the control unit includes:
[0065] The second control subunit is configured to disable and uninstall the first component and load and enable the second component through the mode switching service component according to the deep switching method.
[0066] In one embodiment, the sending module 302 includes:
[0067] The discovery unit is used to monitor the status of all components in the process where the discovery component is located through the discovery component;
[0068] Broadcast unit, used to broadcast the status of the component;
[0069] The first sending unit is configured to send a mode switching request to a mode switching service component of a target process in at least two processes according to a mode switching instruction and a state of the component through a mode switching monitoring component.
[0070] In one embodiment, the mode switching monitoring component and the target process are deployed in the same device; the sending module 302 includes:
[0071] The second sending unit is used to send a mode switching request to the mode switching service component of the target process in a shared memory manner through the mode switching monitoring component.
[0072] In one embodiment, the mode switching monitoring component and the target process are deployed in different devices; the sending module 302 includes:
[0073] The third sending unit is used to send a mode switching request to the mode switching service component of the target process by using the mode switching monitoring component in a distributed real-time communication manner.
[0074] The device of the embodiment of the present disclosure can be used to execute the mode switching method of the automatic driving system in the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0075] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a non-transitory computer-readable storage medium storing computer instructions.
[0076] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0077] Figure 4 Schematic block diagram of an electronic device for implementing the method of an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0078] like Figure 4As shown, electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. Various programs and data required for the operation of device 400 can also be stored in RAM 403. Computing unit 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0079] Multiple components in electronic device 400 are connected to I / O interface 405, including: an input unit 406, such as a keyboard, mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409, such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0080] Computing unit 401 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 401 performs the various methods and processes described above, such as the mode switching method of the autonomous driving system. For example, in some embodiments, the mode switching method of the autonomous driving system can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by computing unit 401, one or more steps of the mode switching method of the autonomous driving system described above can be performed. Alternatively, in other embodiments, computing unit 401 can be configured to perform the mode switching method of the autonomous driving system by any other suitable means (e.g., via firmware).
[0081] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0082] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0083] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0085] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0086] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.
[0087] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0088] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A mode switching method for an autonomous driving system, comprising: Obtain mode switching instructions through the mode switching monitoring component; According to the mode switching instruction, a mode switching request is sent to a mode switching service component of a target process in at least two processes through a mode switching monitoring component, wherein the mode switching request includes a target mode; Controlling, by the mode switching service component, the component running in the target process to switch from a first component corresponding to the current mode to a second component corresponding to the target mode; There are multiple target processes, including process A and process B, and both process A and process B support mode 1 and mode 2; Mode 1 of process A includes components 1 and 2, and mode 2 includes components 3 and 4; Mode 1 of process B includes components 5 and 6, and mode 2 includes components 7 and 8; The controlling the component running in the target process to switch from a first component corresponding to the current mode to a second component corresponding to the target mode includes: Control the components running in process A to switch from component 1 and component 2 corresponding to mode 1 to component 3 and component 4 corresponding to mode 2; The components running in the process B are controlled to switch from components 5 and 6 corresponding to mode 1 to components 7 and 8 corresponding to mode 2.
2. The method according to claim 1, wherein The controlling, by the mode switching service component, of the component running in the target process to switch from a first component corresponding to the current mode to a second component corresponding to the target mode includes: Determining a switching mode according to the current mode and the target mode, wherein the switching mode is one of a lightweight switching mode and a deep switching mode; According to the switching method, the mode switching service component controls the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode.
3. The method according to claim 2, wherein: The switching mode is a lightweight switching mode; According to the switching mode, controlling the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode through the mode switching service component includes: According to the lightweight switching method, the first component is disabled and the second component is enabled through the mode switching service component.
4. The method according to claim 2, wherein: The switching mode is a deep switching mode; According to the switching mode, controlling the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode through the mode switching service component includes: According to the deep switching method, the mode switching service component disables and uninstalls the first component, and loads and enables the second component.
5. The method according to claim 1, wherein The step of sending a mode switching request to a mode switching service component of a target process in at least two processes through a mode switching monitoring component according to the mode switching instruction includes: Monitor the status of all components in the process where the discovery component is located through the discovery component; The state of the component is broadcasted, so that the mode switching monitoring component sends a mode switching request to the mode switching service component of the target process in at least two processes according to the mode switching instruction and the state of the component.
6. The method according to any one of claims 1 to 5, wherein: The mode switching monitoring component and the target process are deployed in the same device; The sending of a mode switching request to a mode switching service component of a target process in at least two processes by a mode switching monitoring component includes: A mode switching request is sent to the mode switching service component of the target process in a shared memory manner through the mode switching monitoring component.
7. The method according to any one of claims 1 to 5, wherein: The mode switching monitoring component and the target process are deployed in different devices; The sending of a mode switching request to a mode switching service component of a target process in at least two processes by a mode switching monitoring component includes: A mode switching request is sent to the mode switching service component of the target process by using a distributed real-time communication method through a mode switching monitoring component.
8. A mode switching device for an automatic driving system, comprising: An acquisition module is used to acquire a mode switching instruction through a mode switching monitoring component; a sending module, configured to send a mode switching request to a mode switching service component of a target process among the at least two processes through a mode switching monitoring component according to the mode switching instruction, wherein the mode switching request includes a target mode; A switching module, configured to control, through the mode switching service component, the component running in the target process to switch from a first component corresponding to the current mode to a second component corresponding to the target mode; There are multiple target processes, including process A and process B, and both process A and process B support mode 1 and mode 2; Mode 1 of process A includes components 1 and 2, and mode 2 includes components 3 and 4; Mode 1 of process B includes components 5 and 6, and mode 2 includes components 7 and 8; The switching module is specifically used to: Control the components running in process A to switch from component 1 and component 2 corresponding to mode 1 to component 3 and component 4 corresponding to mode 2; The components running in the process B are controlled to switch from components 5 and 6 corresponding to mode 1 to components 7 and 8 corresponding to mode 2.
9. The device according to claim 8, wherein The switching module includes: a determining unit, configured to determine a switching mode according to the current mode and the target mode, wherein the switching mode is one of a lightweight switching mode and a deep switching mode; A control unit is used to control the component running in the target process to switch from the first component corresponding to the current mode to the second component corresponding to the target mode through the mode switching service component according to the switching method.
10. The device according to claim 9, wherein The switching mode is a lightweight switching mode; the control unit includes: The first control subunit is configured to disable the first component and enable the second component through the mode switching service component according to the lightweight switching manner.
11. The device according to claim 9, wherein The switching mode is a deep switching mode; the control unit includes: The second control subunit is configured to disable and uninstall the first component and load and enable the second component through the mode switching service component according to the deep switching method.
12. The device according to claim 8, wherein The sending module includes: A discovery unit, configured to monitor the status of all components in the process where the discovery component is located through the discovery component; A broadcast unit, configured to broadcast the status of the component; The first sending unit is configured to send a mode switching request to a mode switching service component of a target process in at least two processes according to the mode switching instruction and the state of the component through the mode switching monitoring component.
13. The device according to any one of claims 8 to 12, wherein: The mode switching monitoring component and the target process are deployed in the same device; The sending module includes: The second sending unit is used to send a mode switching request to the mode switching service component of the target process in a shared memory manner through the mode switching monitoring component.
14. The device according to any one of claims 8 to 12, wherein: The mode switching monitoring component and the target process are deployed in different devices; The sending module includes: The third sending unit is used to send a mode switching request to the mode switching service component of the target process in a distributed real-time communication manner through the mode switching monitoring component.
15. An electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to cause the computer to execute the method according to any one of claims 1 to 7.
17. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for switching modes on terminal
CN102799481A
Task scheduling method for automatic driving vehicle, equipment and storage medium
CN111694647A
Unmanned vehicle driving mode switching method and device, vehicle and cloud server
CN113391627A