Moving parking control method, device, equipment and medium
A time-sharing state machine for row and parking control in autonomous vehicles addresses the computational resource limitations by managing state transitions and actions based on vehicle configurations, enhancing safety and efficiency.
Patent Information
- Application Number
- CN202510668926.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-07-15
AI Technical Summary
In the field of intelligent driving, due to the limited computing power of the on-board chip, it is impossible to provide sufficient computing resources for driving algorithms and parking algorithms at the same time, resulting in the performance of both deterioration and safety risks.
Time-sharing multiplexing is realized through the road-door multiplexing state machine, and the state machine is determined based on the vehicle configuration word, and only one algorithm module is activated in different time periods to perform corresponding actions to improve safety.
It has achieved the safety improvement of road control, adapted to different vehicle configurations, and improved the safety and reliability of the vehicle during driving.
Smart Images

Figure CN120308137A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving, and in particular to a parking control method, device, equipment and medium. Background Art
[0002] In the field of intelligent driving, chip computing power is an issue that restricts operation and needs attention. Due to the hard limit of the computing power of the on-board chip, it is impossible to provide sufficient computing resources for the driving algorithm and the parking algorithm at the same time. Forcing them to run in parallel may cause the performance of both algorithms to drop significantly, and even cause safety risks.
[0003] Therefore, how to improve the safety of mooring control is a technical problem that needs to be solved urgently in this field. Summary of the invention
[0004] The purpose of this application is to provide a method, device, equipment and medium for driving and mooring control, which can realize time-sharing multiplexing of driving and mooring through a driving and mooring multiplexing state machine, that is, only one corresponding algorithm module is activated in different time periods to perform corresponding actions, thereby improving the safety of driving and mooring control.
[0005] In a first aspect, a driving and parking control method is provided, comprising: determining a driving and parking multiplexing state machine according to a vehicle configuration word of a current vehicle, the driving and parking multiplexing state machine being a state machine obtained after multiple state jumps in a preset state jump set are valid based on configuration information determined by the vehicle configuration word, the configuration information comprising: multiple states, multiple events, jump relationships between different states corresponding to each of the events, and actions corresponding to each of the states; the multiple states at least comprising: a parking state and a driving state; starting the driving and parking multiplexing state machine, reading a current signal through a communication module; determining a target event according to the current signal; jumping the current state to a target state of the target event according to the jump relationship corresponding to the target event; triggering an action corresponding to the target state of the target event, so as to call a corresponding module to perform related operations based on the action corresponding to the target state of the target event.
[0006] In a preferred example, the present application can be further configured as follows: according to the vehicle configuration word, the driving and parking multiplexing state machine is determined, including: reading the configuration file of the driving and parking multiplexing state machine, and according to the vehicle configuration word, obtaining the configuration information corresponding to the vehicle configuration word; configuring multiple states; reading multiple events; configuring the jump relationship of different states corresponding to each of the events, so that multiple state jumps in the preset state jump set are valid; binding each state to the action corresponding to the state to complete the configuration of the driving and parking multiplexing state machine.
[0007] In a preferred example, the present application may be further configured to include at least one of the following:
[0008] Receive a modification request for a first event to be processed; modify the first event to be processed according to the modification request;
[0009] Receive a new request for a second event to be processed; based on the new request, create a second event to be processed, inherit the event interface, and define the trigger condition for the trigger of the event in the second event to be processed;
[0010] Before starting the line and parking multiplexing state machine, it further includes: determining the communication message for signal transmission corresponding to the vehicle configuration word; opening the communication message.
[0011] In a preferred example, the present application can be further configured as: when adding an event, if the starting state corresponding to the added event is an existing state and the target state is a new state, the method further includes: configuring the new state; configuring the jump relationship corresponding to the added event; binding the new state to the action corresponding to the new state;
[0012] If the starting state corresponding to the added event is a new state and the target state is an existing state, the method further includes: configuring the new state; configuring the jump relationship corresponding to the added event;
[0013] If the starting state and the target state corresponding to the added event are both new states, the method further includes: configuring the new state; configuring the jump relationship corresponding to the added event; binding each new state to the action corresponding to the new state.
[0014] In a preferred example, the present application can be further configured as: before determining the line and parking multiplexing state machine according to the vehicle configuration word of the current vehicle, it further includes: determining the vehicle configuration word according to the vehicle information of the current vehicle.
[0015] In a preferred example, the present application can be further configured as: multiple states further include: a failure state and a recovery state; the driving state at least includes a low-order driving state and a high-order driving state.
[0016] In a preferred example, the present application can be further configured as follows: reading the current signal through the communication module, determining the target event based on the current signal; and jumping the current state to the target state of the target event according to the jump relationship corresponding to the target event, including: if the current signal includes a first signal and a second signal, and the jump relationship corresponding to the target event includes a first jump relationship from the starting state to the intermediate state and a second jump relationship from the intermediate state to the target state, then: reading the first signal through the communication module; determining the first sub-target event according to the first signal; jumping the current state to the intermediate state according to the first jump relationship corresponding to the first sub-target event; reading the second signal through the communication module; determining the second sub-target event according to the second signal; and jumping the intermediate state to the corresponding target state according to the second jump relationship corresponding to the second sub-target event.
[0017] In a second aspect, a line and parking control device is provided, including: a first determination module, configured to determine a line and parking multiplexing state machine according to the vehicle configuration word of the current vehicle, where the line and parking multiplexing state machine is a state machine obtained after making multiple state jumps in a preset state jump set valid based on the configuration information determined by the vehicle configuration word, and the configuration information includes: multiple states, multiple events, jump relationships between different states corresponding to each event, and actions corresponding to each state; the multiple states at least include a parking state and a driving state; a second determination module, configured to start the line and parking multiplexing state machine, read the current signal through the communication module; determine the target event based on the current signal; and jump the current state to the target state of the target event according to the jump relationship corresponding to the target event; a trigger module, configured to trigger the action corresponding to the target state of the target event, so as to call the corresponding module to execute relevant operations based on the action corresponding to the target state of the target event.
[0018] In a third aspect, an electronic device is provided, where the electronic device includes a memory and a processor, and a computer program is stored in the memory, and when the processor runs the computer program, it executes the line and parking control method according to any one of the first aspect.
[0019] In a fourth aspect, a computer-readable storage medium is provided, where at least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by the processor to implement the line and parking control method according to any one of the first aspect.
[0020] In a fifth aspect, a computer program product is provided, including a computer program or instruction, and when the computer program or instruction is executed by the processor, it implements the line and parking control method according to any one of the first aspect.
[0021] In summary, the line and parking control method provided by the present application has the following beneficial technical effects:
[0022] Based on the vehicle configuration word determined according to the vehicle information of the current vehicle, a park-driving multiplexing state machine is determined. This park-driving multiplexing state machine is a state machine obtained after multiple state jumps in the preset state jump set are made effective based on the configuration information determined by the vehicle configuration word. The park-driving multiplexing state machine can be customized according to the configurations of different vehicles, so as to adapt to diverse vehicle requirements. After startup, it can determine the corresponding target event based on the current signal obtained through the communication module, and jump the state to the target state according to the corresponding jump relationship, realizing the state transition. Then, it triggers the action corresponding to the target state to facilitate the invocation of the corresponding module to implement relevant operations. The solution of this application realizes the configuration of the park-driving multiplexing state machine through the vehicle configuration word, enabling the park-driving multiplexing state machine to be behaviorally customizable according to different platforms and vehicle models. By obtaining the signal of the park-driving multiplexing state machine through the communication module, the park-driving control of the vehicle is realized, and the time-sharing multiplexing of park-driving can be achieved through the park-driving multiplexing state machine, that is, only one corresponding algorithm module is activated to execute the corresponding action within different time periods, improving the safety of park-driving control.
[0023] In addition, this application also provides a park-driving control device, equipment, and medium, all of which have the above beneficial technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0025] Figure 1 is a schematic flowchart of a park-driving control method provided by an embodiment of this application;
[0026] Figure 2 is a schematic system architecture diagram of park-driving multiplexing provided by an embodiment of this application;
[0027] Figure 3 is a specific schematic flowchart of a park-driving control method provided by an embodiment of this application;
[0028] Figure 4 is a schematic structural diagram of a park-driving control device provided by an embodiment of this application;
[0029] Figure 5 is a schematic structural diagram of an electronic device provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] This specific embodiment is only an interpretation of the present application and does not limit the present application. After reading this specification, those skilled in the art can make modifications to this embodiment without creative contributions as needed, but as long as it is within the scope of the present application, it is protected by the patent law.
[0031] It should be noted that in the alternative embodiments of the present application, for relevant data such as object information, when the embodiments in the present application are applied to specific products or technologies, object permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions. That is to say, if the embodiments in the present application involve data related to an object, it needs to be obtained under the permission and consent of the object, the permission and consent of relevant departments, and compliance with the relevant laws, regulations, and standards of the country and region. In the embodiments, if personal information is involved, the acquisition of all personal information needs to obtain the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained, and the embodiments also need to be implemented under the permission and consent of the object.
[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without making creative efforts belong to the scope of protection of the present application.
[0033] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after, unless otherwise specified. To better understand and illustrate the solutions of the embodiments of the present application, some technical terms involved in the embodiments of the present application are briefly described below.
[0034] A driving and parking multiplexing state machine is a state machine that realizes the switching and multiplexing of driving and parking. In the present application, the driving and parking multiplexing state machine has different state definitions, different jump rules, and different state transitions in different projects or different vehicle models of the same project. To achieve the platform implementation of the DPT state machine (Driving-Parking-Transition, driving and parking integrated state machine), a set of driving and parking multiplexing state machines based on configuration management needs to be designed and implemented.
[0035] The embodiments of the present application provide a driving and parking control method, such as Figure 1As shown, the method provided in the embodiments of the present application can be executed by an electronic device, which is an in-vehicle terminal. The terminal device and the electronic device can be directly or indirectly connected through wired or wireless communication methods, and the embodiments of the present application do not limit this. The method includes:
[0036] S101. Determine the park-drive integrated state machine according to the vehicle configuration word;
[0037] The park-drive integrated state machine is a state machine obtained after making multiple state jumps in a preset state jump set valid based on the configuration information determined by the vehicle configuration word. The configuration information includes: multiple states, multiple events, the jump relationships of different states corresponding to each event, and the actions corresponding to each state; the multiple states at least include: parking state, driving state.
[0038] Further, before S101, it also includes: determining the vehicle configuration word according to the vehicle information of the current vehicle. Among them, the vehicle information includes but is not limited to: vehicle model, platform. The vehicle model represents the specific model of the current vehicle and is used to distinguish automotive products with different designs; the platform refers to the basic structure of the vehicle, the layout of the power system, etc. adopted during vehicle manufacturing; the vehicle configuration word is an identifier used to represent the specific configuration information of the vehicle, and the specific configuration information of the park-drive integrated state machine of the current vehicle can be determined according to this vehicle configuration word. The form of the vehicle configuration word is not limited in the embodiments of the present application. In the embodiments of the present application, a corresponding relationship between vehicle information and vehicle configuration words is set. For different vehicles, the same vehicle configuration word may be reused, and there are certain differences in the available states, events, etc. in the park-drive integrated state machines corresponding to different vehicle configuration words.
[0039] Furthermore, in the embodiments of the present application, the park-drive integrated state machine is a state management mechanism obtained after making multiple state jumps in a preset state jump set valid based on the configuration information determined by the vehicle configuration word, and is used to manage and control the behavior logic of the vehicle in different states; the configuration information includes multiple states, multiple events, the jump relationships of different states corresponding to each event, and the actions corresponding to each state, so as to define the behavior of the park-drive integrated state machine.
[0040] The states include a parking state and a driving state. The driving state also includes a low-level driving state (such as ACC adaptive cruise, lane keeping) and a high-level driving state (urban NOA, fully autonomous driving taxi).
[0041] An event represents a signal required to jump from a starting state to a target state (the signal type can include but is not limited to: gear signal, obstacle distance value, speed, control data), and the jump between states is triggered by the event.
[0042] The jump rule means that when an event occurs, the state machine for combined driving and parking performs a state jump. Exemplarily, if the signal is signal1 = true, it indicates that event A is triggered, and the corresponding jump relationship for event A is to switch from parking to low-level driving.
[0043] An action refers to the operations or behaviors performed by a vehicle in a certain state, and the corresponding algorithm can be called through this action.
[0044] Exemplarily, if the target state is the parking state, the parking algorithm is called for corresponding processing (such as activating ultrasonic radars for environment perception); if the target state is the driving state, the driving algorithm is called for corresponding processing; if the target state is the recovery state, the recovery algorithm is called for corresponding processing, killing third-party applications (such as corresponding map software / entertainment systems), and restoring the third-party applications.
[0045] It can be understood that when the vehicle starts or performs function initialization, the electronic device can initialize the state machine for combined driving and parking according to the vehicle configuration word, so as to perform state management based on the obtained signals during driving and call the corresponding algorithm modules for processing such as driving / parking.
[0046] Moreover, in the embodiments of the present application, a flexible and configurable state management mechanism can be constructed according to the specific configuration information of the vehicle, so as to perform state management and behavior control according to different events during vehicle operation. Abstract the algorithms into interfaces so that different implementations can be replaced with each other; and, select strategies dynamically at runtime instead of hard-coding at compile time, and each state is a different strategy implementation; through a base class pointer when the state machine runs Call, independent of specific implementations, can enable the state machine for combined driving and parking with configuration management to share multiple configuration words, and can easily adapt to vehicles of different models and configurations, improving versatility and scalability.
[0047] In the state machine for combined driving and parking, there is a preset state jump set, and an event is composed of signals corresponding to the starting state and the target state. For easy understanding, see Figure 2 , Figure 2 is a schematic diagram of the system architecture for combined driving and parking provided by the embodiments of the present application. For different vehicle configuration words, there are corresponding event sets, among which the included states are: parking, low-level driving, high-level driving, recovery, and failure, and the gray boxes represent the intermediate states that can be passed through during state jumps. In the state machine for combined driving and parking, A / B in the line indicates the items available for this state jump (corresponding to the configuration word). Exemplarily, for configuration word A and configuration word B, the states to be switched are different, and the associated switching conditions and actions are different, as shown in Table 1, Table 2, and Table 3 respectively.
[0048] Table 1 State
[0049]
[0050] Table 2 Actions
[0051]
[0052] Table 3 Events
[0053]
[0054] To implement the above behaviors, define the required configuration file as follows:
[0055] state:
[0056] {
[0057] stateA: "Parking",
[0058] stateB: "Low - level driving",
[0059] stateC: "Recovery", ...
[0061] },
[0062] transition:
[0063] {
[0064] transitionA:
[0065] {
[0066] instate: "stateA",
[0067] outstate: "stateB",
[0068] event: "eventA",
[0069] },
[0070] transitionB:
[0071] {
[0072] instate: "stateB",
[0073] outstate: "stateC",
[0074] event: "eventB",
[0075] }, ...
[0077] },
[0078] action:
[0079] {
[0080] actionA:
[0081] {
[0082] state: "stateA",
[0083] action: "Send parking signal",
[0084] },
[0085] actionB:
[0086] {
[0087] state: "stateC",
[0088] action: "Kill third - party application",
[0089] }, ....
[0091] },
[0092] event:
[0093] {
[0094] eventA:
[0095] {
[0096] signal: "signal1",
[0097] value: "true",
[0098] },
[0099] eventB:
[0100] {
[0101] signal: "signal2",
[0102] value: "false",
[0103] }, ....
[0105] },
[0106] debugEnable: "false",
[0107] AppFeedBack:
[0108] {
[0109] "AppA": true,
[0110] "AppB": false, ....
[0112] }。
[0113] That is, define the states: stateA: parking, stateB: low - level driving, stateC: resuming;
[0114] Define the events: eventA: triggered when the value of signal1 is true (such as the gear signal is in D gear). eventB: triggered when the value of signal2 is false (such as the obstacle distance is less than the threshold).
[0115] Define the state transition relationships: transitionA: when eventA is triggered, the system switches from parking (the starting state of the transition) to low - level driving (the target state of the transition). transitionB: when eventB is triggered, the system switches from low - level driving to resuming.
[0116] Define the actions: actionA: when entering the parking state, send a parking signal (such as activating the ultrasonic radar). actionB: when entering the resuming state, terminate the third - party application (such as the entertainment system).
[0117] S102. Start the integrated driving and parking state machine, read the current signal through the communication module; determine the target event based on the current signal; and jump the current state to the target state of the target event according to the corresponding jump relationship;
[0118] S103. Trigger the action corresponding to the target state of the target event, so as to call the corresponding module to execute relevant operations based on the action corresponding to the target state of the target event.
[0119] After configuring the integrated driving and parking state machine available for the current vehicle, read the current signal given externally through the communication module. In the embodiment of the present application, match the current signal with multiple events to determine whether there is a target event corresponding to the current signal. If so, perform subsequent operations; if not, stop the operation and continue to monitor the acquired signal.
[0120] After determining the target event, determine the corresponding jump relationship of the target event, that is, the target state to which it is to jump. Furthermore, trigger the action corresponding to the target state. This action specifically represents the signal to be sent, so as to call the module corresponding to the signal to execute relevant operations.
[0121] Furthermore, the present application can also add a thread management module for scheduling the start and stop of threads in a process. After determining which functional module needs to perform the corresponding operation, it notifies each service corresponding to the functional module and starts the corresponding thread, enabling efficient utilization of resources.
[0122] It can be seen that in the embodiment of the present application, according to the vehicle configuration word determined by the vehicle information of the current vehicle, a parking and driving multiplexing state machine is determined. This parking and driving multiplexing state machine is obtained after multiple state jumps in the preset state jump set become effective based on the configuration information determined by the vehicle configuration word. The parking and driving multiplexing state machine can be customized according to the configurations of different vehicles, thus adapting to diverse vehicle requirements. After startup, it can determine the corresponding target event based on the current signal obtained through the communication module, and jump the state to the target state according to the corresponding jump relationship, realizing the state transition. Then, it triggers the action corresponding to the target state to facilitate the invocation of the corresponding module to implement relevant operations. The solution of the present application realizes the configuration of the parking and driving multiplexing state machine through the vehicle configuration word, enabling the parking and driving multiplexing state machine to be behaviorally customizable according to different platforms and vehicle models. By obtaining the signal of the parking and driving multiplexing state machine through the communication module, the parking and driving control of the vehicle is realized, and the time-sharing multiplexing of parking and driving can be achieved through the parking and driving multiplexing state machine, that is, only one corresponding algorithm module is activated to perform the corresponding action within different time periods, improving the safety of parking and driving control.
[0123] In a possible implementation manner of the embodiment of the present application, after starting the configuration management module, the current vehicle model and platform configuration are obtained to generate a vehicle configuration word.
[0124] Determine the communication message for signal transmission corresponding to the vehicle configuration word; open the communication message. Specifically, start and configure the communication module, and open or close the transmission of the corresponding message (communication message) according to different vehicle configuration words.
[0125] Furthermore, according to the vehicle configuration word, determine the parking and driving multiplexing state machine, including: reading the configuration file of the parking and driving multiplexing state machine, and obtaining the configuration information corresponding to the vehicle configuration word according to the vehicle configuration word; configuring multiple states; reading multiple events; configuring the jump relationships of different states corresponding to each event, making multiple state jumps in the preset state jump set effective; binding each state to the action corresponding to the state to complete the configuration of the parking and driving multiplexing state machine.
[0126] Specifically, according to the read vehicle configuration word, read different state machine configuration files to obtain four definitions: state, transition, action, and event.
[0127] Configure the set of states required to be supported in the in - line and parking reuse state machine according to the state list. Read the event conditions according to the event list. Configure the transition relationships between different states in the in - line and parking reuse state machine and the corresponding required event conditions according to the transition list. Configure the operations to be implemented in different states according to the read action list.
[0128] In an implementable case, for all vehicles, it is based on the same in - line and parking reuse state machine, and then based on the actual vehicle information, configure this in - line and parking reuse state machine. In another implementable case, for different brands, there are different in - line and parking reuse state machines. After determining the in - line and parking reuse state machine according to the brand, then configure this in - line and parking reuse state machine according to the vehicle's detailed information. The specific method to be adopted is not limited in the embodiments of this application, and users can set it according to actual needs.
[0129] It can be seen that in the embodiments of this application, through the configuration file and the vehicle configuration word, the corresponding in - line and parking reuse state machine is dynamically configured for the current vehicle.
[0130] A possible implementation manner of the embodiments of this application further includes: receiving a modification request for a first pending event; modifying the first pending event according to the modification request. It can be seen that in the embodiments of this application, the event can be automatically modified according to the modification request. The modification timing can be after the initial configuration or before the configuration. The embodiments of this application no longer limit it. Through the modification mechanism, it can flexibly adapt to the modification requirements.
[0131] A possible implementation manner of the embodiments of this application is to receive an addition request for a second pending event; create a second pending event based on the addition request, inherit the event interface, and define the trigger condition for the trigger of this event in the second pending event. Specifically, create a second pending event, inherit the unified Event interface of the in - line and parking reuse state machine, and implement the check_condition() method in the second pending event to define the trigger condition of this event. In the embodiments of this application, when adding an event, only need to inherit Event and implement checkCondition(), without modifying the core logic of the state machine.
[0132] Further, when adding a new event, if the starting state corresponding to the new event is an existing state and the target state is a new state, the method further includes: configuring the new state; configuring the jump relationship corresponding to the new event; binding the action corresponding to the new state to the new state. If the starting state corresponding to the new event is a new state and the target state is an existing state, the method further includes: configuring the new state; configuring the jump relationship corresponding to the new event. If the starting state and the target state corresponding to the new event are both new states, the method further includes: configuring the new state; configuring the jump relationship corresponding to the new event; binding the action corresponding to each new state to the new state.
[0133] Exemplarily, for creating a second pending event, there are the following situations: First, a second pending event used to trigger a jump from state 1 (an existing state) to state 2 (an existing state). At this time, it is necessary to configure the event and the jump relationship corresponding to the event. Second, a second pending event used to trigger a jump from state 1 (an existing state) to state 3 (a new state). At this time, it is necessary to configure the event, the new state 3, the jump relationship corresponding to the event, and bind the action corresponding to the new state 3. Third, a second pending event used to trigger a jump from state 3 (a new state) to state 1 (an existing state). At this time, it is necessary to configure the event, the new state 3, and the jump relationship corresponding to the event. Fourth, a second pending event used to trigger a jump from state 3 (a new state) to state 4 (a new state). At this time, it is necessary to configure the event, the new state 3, the new state 4, the jump relationship corresponding to the event, and bind the action corresponding to the new state 4.
[0134] It can be seen that in the embodiments of the present application, relying on the event interface rather than specific event classes, through the inheritance function, the existing code is avoided from being modified. The event type only needs to check its own conditions and can flexibly adapt to the modification requirements.
[0135] A possible implementation manner of the embodiments of the present application, multiple states further include: a failure state and a recovery state; the driving state at least includes a low-level driving state and a high-level driving state.
[0136] Among them, both the recovery state and the failure state are unstable states. By performing a recovery operation on a certain process, the system can have a good state. After determining this state, it is necessary to confirm the next state within a short time to meet the user's needs. For example, when entering the recovery state, the map process can be killed, and then the recovery operation is performed on the map process so that the signal sent by the map can be effectively received. Through recovery, when the current system has an abnormality, it does not directly enter the failure state, but self-adjusts through the recovery state, improving the reliability of the parking and driving control.
[0137] Further, in some possible cases, after entering the recovery state, this state is an unstable state, and a corresponding event needs to be triggered within a preset time to jump to the next state. If the corresponding event is not triggered for a long time, the failure state will be entered.
[0138] A possible implementation manner of the embodiment of the present application is to read the current signal through the communication module and determine the target event based on the current signal; and jump the current state to the target state of the target event according to the jump relationship corresponding to the target event, including:
[0139] If the current signal includes: a first signal and a second signal, and the jump relationship corresponding to the target event includes: a first jump relationship from the starting state to the intermediate state, and a second jump relationship from the intermediate state to the target state, then:
[0140] Read the first signal through the communication module; determine the first sub-target event according to the first signal; and jump the current state to the intermediate state according to the first jump relationship corresponding to the first sub-target event;
[0141] Read the second signal through the communication module; determine the second sub-target event according to the second signal; and jump the intermediate state to the corresponding target state according to the second jump relationship corresponding to the second sub-target event.
[0142] In the embodiment of the present application, the signals that may be obtained are not necessarily continuous, or a complete signal group for jumping from one state to another state is not issued all at the same time. Therefore, the current signal may be multiple signals obtained in stages, and the corresponding determined target event may include multiple sub-events.
[0143] Among them, the first signal and the second signal respectively represent different signals received by the vehicle during the communication process. This signal may come from different sensors, controllers or external devices and is used to trigger specific state jumps; it should be noted that the first signal may be one signal or multiple signals. Similarly, the second signal may be one or multiple signals, and this embodiment does not limit it further. The first sub-target event and the second sub-target event respectively represent specific events determined according to the first signal and the second signal, which are used to represent the trigger conditions for state jumps; the first jump relationship and the second jump relationship respectively represent the state jump logic that the vehicle state machine should execute when the first sub-target event and the second sub-target event occur, that is, jump from the current state or the intermediate state to the intermediate state or the target state. The intermediate state is a transition state, which is used to stay temporarily during the state jump process and is an unstable state. Other signals need to be obtained within a certain time to facilitate jumping to a stable state.
[0144] It can be seen that in the embodiments of the present application, in the case of non - continuous or step - by - step signal distribution. By step - by - step reading of signals, determining sub - target events, and performing state jumps, the vehicle can more accurately respond to external changes and improve driving safety.
[0145] Based on any of the above - mentioned embodiments, refer to Figure 3 , Figure 3 which is a specific flowchart of a driving and parking control method provided by the embodiments of the present application, including:
[0146] Start the configuration management module, obtain the current vehicle model and platform configuration, and generate configuration word information.
[0147] Start and configure the communication module, open or close the transmission of corresponding messages according to different configuration word information, and enable transmission messages.
[0148] Configure the driving - parking multiplexing state machine, and read the current configuration word from the configuration management module.
[0149] According to the configuration word read in step one, read different state machine configuration files, and obtain four definitions: state, transition, action, and event.
[0150] According to the state list, configure the set of states supported in the state machine.
[0151] According to the event list, read the event conditions.
[0152] According to the transition list, configure the jump relationships between different states in the state machine and the corresponding required event conditions.
[0153] According to the read action list, configure the operations to be implemented in different states.
[0154] Start the driving - parking multiplexing state machine, and according to the message read from the communication module, determine whether to trigger an event based on the message, and decide whether to trigger a state jump.
[0155] After the state machine triggers a state change, trigger the corresponding actions in different states, and notify other apps or modules to perform related operations.
[0156] In summary, when the present application runs, it dynamically loads configurations to enable the same set of code to support different projects. Initialization phase: Select a configuration file (configuration-driven) according to the ConfigWord; parse the configuration file to create specific subclasses of State and Event (strategy pattern). Running phase: The state machine calls Event::checkCondition() (strategy interface) to determine whether a jump is triggered; execute State::onEnter() (strategy interface) to complete state-specific operations. The solution in the present application is implemented using the strategy pattern and configuration-driven: abstract the algorithm (or behavior) into an interface so that different implementations can be replaced with each other. Dynamically select the strategy at runtime, and externalize the business rules (such as state transitions) to the configuration file instead of hard-coding at compile time. Each state class (such as ParkingState) is an implementation of a different strategy. When the state machine runs, it is called through the base class pointer State*, and does not depend on the specific implementation. When adding a new event type, only need to inherit Event and implement checkCondition(), without modifying the core logic of the state machine.
[0157] Next, an apparatus provided by an embodiment of the present application will be introduced. The apparatus described below can be correspondingly referred to the method described above. The apparatus of this embodiment is set in an electronic device. Refer to Figure 4 , Figure 4 which is a structural block diagram of the apparatus of one embodiment of the present application, including:
[0158] A first determination module 210, configured to determine a combined parking and driving state machine according to the vehicle configuration word of the current vehicle. The combined parking and driving state machine is a state machine obtained after making multiple state jumps in a preset state jump set valid based on configuration information determined according to the vehicle configuration word. The configuration information includes: multiple states, multiple events, jump relationships between different states corresponding to each event, and actions corresponding to each state; the multiple states at least include: a parking state and a driving state;
[0159] A second determination module 220, configured to start the combined parking and driving state machine, read the current signal through the communication module; determine a target event according to the current signal; and jump the current state to the target state of the target event according to the jump relationship corresponding to the target event;
[0160] A trigger module 230, configured to trigger the action corresponding to the target state of the target event, so as to call the corresponding module to execute related operations based on the action corresponding to the target state of the target event.
[0161] In an implementable manner, the first determination module 210 is specifically configured to:
[0162] Read the configuration file of the combined parking and driving state machine, and obtain the configuration information corresponding to the vehicle configuration word according to the vehicle configuration word;
[0163] Configure multiple states; read multiple events; configure the jump relationships of different states corresponding to each event, so that multiple state jumps in the preset state jump set are valid; bind the actions corresponding to each state to the state to configure the line parking multiplexing state machine.
[0164] In an implementable manner, the first determination module 210 is further configured to: receive a modification request for a first to-be-processed event; modify the first to-be-processed event according to the modification request.
[0165] The first determination module 210 is further configured to: receive an addition request for a second to-be-processed event; create a second to-be-processed event based on the addition request, inherit the event interface, and define the trigger condition triggered by the event in the second to-be-processed event.
[0166] The device further includes: an enabling module, configured to determine a communication message for signal transmission corresponding to the vehicle configuration word; open the communication message.
[0167] In an implementable manner, when adding an event, if the starting state corresponding to the added event is an existing state and the target state is a newly added state, the first determination module 210 is further configured to: configure the newly added state; configure the jump relationship corresponding to the added event; bind the newly added state to the action corresponding to the newly added state.
[0168] If the starting state corresponding to the added event is a newly added state and the target state is an existing state, the first determination module 210 is further configured to: configure the newly added state; configure the jump relationship corresponding to the added event.
[0169] If the starting state and the target state corresponding to the added event are both newly added states, the first determination module 210 is further configured to: configure the newly added state; configure the jump relationship corresponding to the added event; bind each newly added state to the action corresponding to the newly added state.
[0170] In an implementable manner, it further includes
[0171] A third determination module, configured to: determine the vehicle configuration word according to the vehicle information of the current vehicle.
[0172] In an implementable manner, the multiple states further include: a failure state and a recovery state; the driving states at least include a low-order driving state and a high-order driving state.
[0173] In an implementable manner, the second determination module 220 is specifically configured to, if the current signal includes: a first signal and a second signal, and the jump relationship corresponding to the target event includes: a first jump relationship from the starting state to the intermediate state and a second jump relationship from the intermediate state to the target state, then:
[0174] Read the first signal through the communication module; determine the first sub-goal event according to the first signal; and jump the current state to the intermediate state according to the first jump relationship corresponding to the first sub-goal event.
[0175] Read the second signal through the communication module; determine the second sub-goal event according to the second signal; and jump the intermediate state to the corresponding target state according to the second jump relationship corresponding to the second sub-goal event.
[0176] An embodiment of the present application provides an electronic device, such as Figure 5 shown. Figure 5 The electronic device 300 shown includes: at least one processor 301 ( Figure 5 one is shown in
[0177] and a memory 303. Among them, the processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may further include a transceiver 304. It should be noted that in practical applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation to the embodiments of the present application.
[0178] The bus 302 may include a path for transmitting information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 5 only a thick line is used to represent it in
[0179] The memory 303 can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0180] The memory 303 is used to store the application program code for executing the solution of this application, and is controlled by the processor 301 to execute. The processor 301 is used to execute the application program code stored in the memory 303 to implement the content shown in the foregoing method embodiments.
[0181] Figure 5 The illustrated electronic device is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.
[0182] The embodiments of this application provide a computer-readable storage medium, in which at least one program code is stored. When it runs on a computer, it enables the computer to execute the corresponding content in the foregoing method embodiments.
[0183] The embodiments of this application provide a computer program product, including a computer program or instructions. When the computer program or instructions are executed by a processor, they implement the corresponding content in the foregoing method embodiments.
[0184] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps does not have a strict order limit, and they can be executed in other orders. Moreover, at least some of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments. Their execution order does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0185] The above are only some embodiments of the present application. It should be noted that for those of ordinary skill in the art, several improvements and refinements can be made without departing from the principle of the present application, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A lane-changing and parking control method, characterized in that, Including: Determine a combined driving and parking state machine according to the vehicle configuration word of the current vehicle. The combined driving and parking state machine is a state machine obtained after making multiple state jumps in a preset state jump set valid based on configuration information determined by the vehicle configuration word. The configuration information includes: multiple states, multiple events, jump relationships between different states corresponding to each event, and actions corresponding to each state; the multiple states at least include: a parking state and a driving state. Start the combined driving and parking state machine, read the current signal through the communication module; determine a target event based on the current signal; jump the current state to the target state of the target event according to the jump relationship corresponding to the target event. Trigger the action corresponding to the target state of the target event, so as to call the corresponding module to execute relevant operations based on the action corresponding to the target state of the target event.
2. The line parking control method according to claim 1, wherein Determine a combined driving and parking state machine according to the vehicle configuration word, including: Read the configuration file of the combined driving and parking state machine, and obtain configuration information corresponding to the vehicle configuration word according to the vehicle configuration word. Configure multiple states; read multiple events; configure jump relationships between different states corresponding to each event, so that multiple state jumps in the preset state jump set are valid; bind an action corresponding to each state to configure the combined driving and parking state machine.
3. The lane parking control method according to claim 2, characterized in that It further includes at least one of the following: Receive a modification request for a first pending event; modify the first pending event according to the modification request. Receive a new request for a second pending event. Based on the new request, create a second pending event, inherit the event interface, and define a trigger condition for the event to be triggered in the second pending event. Before starting the combined driving and parking state machine, it further includes: determining a communication message for signal transmission corresponding to the vehicle configuration word. Open the communication message.
4. The method according to claim 3, wherein When adding an event, if the starting state corresponding to the added event is an existing state and the target state is a new state, the method further includes: configuring the new state; configuring the jump relationship corresponding to the added event; binding an action corresponding to the new state to the new state. If the starting state corresponding to the added event is a new state and the target state is an existing state, the method further includes: configuring the new state; configuring the jump relationship corresponding to the added event. If the starting state and the target state corresponding to the added event are both new states, the method further includes: configuring the new states; configuring the jump relationship corresponding to the added event; binding an action corresponding to each new state to the new state.
5. The line parking control method according to claim 1, characterized in that Before determining a combined driving and parking state machine according to the vehicle configuration word of the current vehicle, it further includes: Determine the vehicle configuration word according to the vehicle information of the current vehicle.
6. The line parking control method according to claim 1, wherein, The multiple states further include: a failure state and a recovery state; the driving state at least includes a low-level driving state and a high-level driving state.
7. The lane-changing and parking control method according to any one of claims 1 to 6, characterized in that Read the current signal through the communication module, and determine a target event based on the current signal. Jumping the current state to the target state of the target event according to the jump relationship corresponding to the target event includes: If the current signal includes: a first signal and a second signal, and the jump relationships corresponding to the target event include: a first jump relationship from the starting state to the intermediate state, and a second jump relationship from the intermediate state to the target state, then: Read the first signal through the communication module; determine the first sub-target event according to the first signal; and jump the current state to the intermediate state according to the first jump relationship corresponding to the first sub-target event; Read the second signal through the communication module; determine the second sub-target event according to the second signal; and jump the intermediate state to the corresponding target state according to the second jump relationship corresponding to the second sub-target event.
8. A line parking control device, characterized in that, Comprising: A first determination module, configured to determine a parking and driving multiplexing state machine according to the vehicle configuration word of the current vehicle. The parking and driving multiplexing state machine is a state machine obtained after making multiple state jumps in the preset state jump set valid by the configuration information determined based on the vehicle configuration word. The configuration information includes: multiple states, multiple events, the jump relationships of different states corresponding to each event, and the actions corresponding to each state; the multiple states at least include: a parking state and a driving state; A second determination module, configured to start the parking and driving multiplexing state machine, read the current signal through the communication module; determine the target event according to the current signal; and jump the current state to the target state of the target event according to the jump relationship corresponding to the target event; A trigger module, configured to trigger the action corresponding to the target state of the target event, so as to call the corresponding module to execute relevant operations based on the action corresponding to the target state of the target event.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the parking control method according to any one of claims 1 to 7 when running the computer program.
10. A computer-readable storage medium, characterized in that, At least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by the processor to implement the parking control method according to any one of claims 1 to 7.