Power gear switching service invocation method and device, vehicle and storage medium
By adopting a service-oriented invocation method for power level switching based on SOA architecture, the problems of poor applicability and long development cycle of power level switching scenarios in existing technologies are solved, enabling flexible and efficient power level switching in multiple scenarios and improving user experience.
Patent Information
- Application Number
- CN202211505055.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-11-28
AI Technical Summary
Existing technologies do not design power level switching based on SOA architecture, resulting in poor applicability to various scenarios and long development cycles.
Based on the SOA architecture, a service-oriented method for power level switching is designed. The scenario service judges the conditions, calls the enhanced service to determine whether the power level control parameters meet the preset valid conditions, and controls the power interface according to the parameters, and calls the atomic service to pass the control command.
It improves the applicability and flexibility of the power level switching service, shortens the development cycle, enhances user experience and information sending efficiency, and avoids repetitive function execution.
Smart Images

Figure CN116166325B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle body control technology, and in particular to a power level switching service invocation method, device, vehicle and storage medium. Background Technology
[0002] With the development of intelligent technology, traditional transportation tools can no longer meet people's needs. From a technological perspective, traditional automotive electronics technology has become quite sophisticated, hardware differentiation is increasingly diminishing, and differentiation among automotive products will gradually be reflected in in-vehicle software. Software will redefine the automobile. Service-oriented software architecture has emerged in the automotive industry. This architecture can independently encapsulate the functions of various systems within the vehicle for developers or users. When facing complex requirements, service-oriented software architecture can significantly reduce software modification points compared to traditional architectures. Furthermore, traditional automotive electronic architecture is primarily signal-oriented, with various electronic units communicating point-to-point. However, as automotive functions become increasingly sophisticated, the number of controllers and sensors increases, signals multiply, and the coupling between controllers and even different domains becomes increasingly high, making the development of complex functions increasingly difficult.
[0003] Currently, the relevant technology can control the power supply level to switch between the power off and power on positions based on the pedal pedal input signal and the power start signal. In the power on position, the power supply level can be switched to the power off position based on the power start signal. In addition, the relevant technology can also control the vehicle's power supply system to switch between power supply levels in various ways based on the power supply level, the vehicle's operating status information, and preset conditions.
[0004] However, the relevant technologies are not designed for power level switching based on SOA architecture, resulting in poor applicability to various scenarios and a long development cycle, which urgently needs to be addressed. Summary of the Invention
[0005] This application provides a power level switching service-oriented invocation method, device, vehicle, and storage medium to solve the problems of related technologies not being designed based on SOA architecture for power level switching, poor scenario applicability, and long development cycle.
[0006] The first aspect of this application provides a power gear switching service invocation method, including the following steps: based on a scenario service, determining whether the current vehicle's scenario conditions meet preset gear switching conditions;
[0007] If the preset gear switching conditions are met, the enhanced service is invoked to determine whether the power gear control parameters meet the preset valid conditions; and if the power gear control parameters meet the preset valid conditions, the power interface control parameters are assigned values according to the power gear control parameters to set the corresponding control interface to closed or open, and the atomic service is invoked to pass the power interface control parameters to the atomic service to invoke the corresponding IO abstract service and pass the corresponding control command.
[0008] Based on the above technical means, the embodiments of this application design a power level switching service based on SOA architecture, which can realize the invocation of power level switching in multiple scenarios, greatly improving the applicability and flexibility of the power level switching service, shortening the development cycle, and improving the user experience.
[0009] Optionally, in one embodiment of this application, while transmitting the power interface control parameters to the atomic service, the method further includes: updating the power level status interface based on the power interface control parameters to notify at least one preset service of the latest power level information.
[0010] Based on the above technical means, this application embodiment updates the power level status interface to notify the service of the latest power level information, thereby enabling power level switching to be achieved by calling it in various scenarios, avoiding repeated execution of the power level switching function in its own scenario, and effectively improving the applicability of the scenario.
[0011] Optionally, in one embodiment of this application, the step of calling the enhanced service to determine whether the power level control parameter meets the preset valid condition includes: determining whether the parameter value of the power level control parameter is within a preset range; if it is within the preset range, determining whether the enhanced service is occupied; if the enhanced service is not occupied, determining that the preset valid condition is met.
[0012] Based on the above technical means, the embodiments of this application can effectively improve the efficiency of power level switching service by setting appropriate effective conditions, and provide a reliable basis and guidance for the subsequent implementation of power level switching.
[0013] Optionally, in one embodiment of this application, during the operation of the enhanced service, the process further includes: obtaining service operation information of the enhanced service; and sending the service operation information to the scene service.
[0014] Based on the above technical means, this application embodiment improves the efficiency of information sending and processing by acquiring and sending the service operation information of the enhanced service to the scene service in real time, and effectively ensures the efficient execution of power level switching.
[0015] Optionally, in one embodiment of this application, during the operation of the enhanced service, the following further steps are included:
[0016] When the enhanced service is running, the service status in the service operation information is set to running, and the request ID in the service operation information is set to the request ID sent by the requester. When the previous request is interrupted due to a high-priority scenario service call, the service status is set to interrupted, and the high-priority request of the high-priority scenario is responded to again. The service status and request ID in the service operation information are updated in the next cycle. After the enhanced service is completed, the service status is set to completed, and the service status and request ID of the service operation information are initialized after a preset cycle.
[0017] Based on the above technical means, in the process of enhancing service operation, the scenario service provider can know in real time whether the request it sent has been executed or interrupted by updating the service operation information. According to the operation status, the operation of re-initiating the request after being interrupted can be designed, which effectively improves the efficiency of information sending and improves the user experience.
[0018] A second aspect of this application provides a power gear switching service-oriented invocation device, comprising: a judgment module, configured to determine, based on a scenario service, whether the current vehicle's scenario conditions meet preset gear switching conditions; a first invocation module, configured to, if the preset gear switching conditions are met, invoke an enhanced service to determine whether the power gear control parameters meet preset valid conditions; and a second invocation module, configured to, if the power gear control parameters meet the preset valid conditions, assign values to power interface control parameters according to the power gear control parameters to set the corresponding control interface to closed or open, and invoke an atomic service to pass the power interface control parameters to the atomic service to invoke the corresponding IO abstraction service and pass the corresponding control command.
[0019] Optionally, in one embodiment of this application, it further includes:
[0020] The notification module is used to transmit the power interface control parameters to the atomic service and update the power level status interface based on the power interface control parameters, so as to notify at least one preset service of the latest power level information.
[0021] Optionally, in one embodiment of this application, the first calling module includes: a comparison unit, used to determine whether the parameter value of the power level control parameter is within a preset range; an occupancy unit, used to determine whether the enhanced service is occupied if it is within the preset range; and an unoccupied unit, used to determine that the preset valid condition is met if the enhanced service is not occupied.
[0022] Optionally, in one embodiment of this application, it further includes: an acquisition module, configured to acquire service operation information of the enhanced service during the operation of the enhanced service; and a sending module, configured to send the service operation information to the scene service.
[0023] Optionally, in one embodiment of this application, it further includes: a setting module, configured to set the service status in the service operation information to a running state and set the request ID in the service operation information to the request ID sent by the requester during the operation of the enhanced service; an updating module, configured to set the service status to an interrupted state and re-respond to the high-priority request of the high-priority scenario when the previous request is interrupted by a high-priority scenario service call, and update the service status and request ID in the service operation information in the next cycle; and an initialization module, configured to set the service status to a completed state after the enhanced service operation is completed, and initialize the service status and request ID of the service operation information after a preset cycle.
[0024] A third aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the power level switching service invocation method as described in the above embodiments.
[0025] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the power level switching service invocation method described above.
[0026] Therefore, the embodiments of this application have the following beneficial effects:
[0027] (1) The embodiments of this application are based on SOA architecture to design power level switching service, so that power level switching can be called in multiple scenarios, which greatly improves the applicability and flexibility of power level switching service, shortens the development cycle, and improves the user experience.
[0028] (2) This application embodiment updates the power level status interface to notify the service of the latest power level information, so that various scenarios can realize the power level switching by calling it, avoiding the repeated execution of the power level switching function in its own scenario, and effectively improving the applicability of the scenario.
[0029] (3) By setting appropriate effective conditions, the efficiency of power level switching service can be effectively improved, providing a reliable basis and guidance for the subsequent implementation of power level switching.
[0030] (4) This application embodiment improves the efficiency of information sending and processing by acquiring and sending the service operation information of the enhanced service to the scene service in real time, and effectively ensures the efficient execution of power level switching.
[0031] (5) In the process of enhancing service operation, the scenario service provider can know in real time whether the request it sent has been executed or interrupted by updating the service operation information. Based on the operation status, the operation of re-initiating the request after being interrupted can be designed, which effectively improves the efficiency of information sending and improves the user experience.
[0032] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0033] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0034] Figure 1 This is a flowchart of a power level switching service invocation method provided according to an embodiment of this application;
[0035] Figure 2 A schematic diagram of a power level switching service-oriented software architecture based on SOA architecture is provided for one embodiment of this application;
[0036] Figure 3 A schematic diagram illustrating the execution logic of a power level switching service invocation method provided in one embodiment of this application;
[0037] Figure 4 This is an example diagram of a power level switching service invocation device according to an embodiment of this application;
[0038] Figure 5 This is a schematic diagram of the vehicle structure provided in an embodiment of this application.
[0039] Among them, 10-power level switching service-oriented calling device, 100-judgment module, 200-first calling module, 300-second calling module, 501-memory, 502-processor, and 503-communication interface. Detailed Implementation
[0040] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0041] The following describes a power gear switching service-oriented invocation method, apparatus, vehicle, and storage medium according to embodiments of this application, with reference to the accompanying drawings. Addressing the problems mentioned in the background art, this application provides a power gear switching service-oriented invocation method. In this method, based on a scenario service, it is determined whether the current vehicle's scenario conditions meet preset gear switching conditions. If the preset gear switching conditions are met, an enhanced service is invoked to determine whether the power gear control parameters meet preset valid conditions. If the power gear control parameters meet the preset valid conditions, the power interface control parameters are assigned values according to the power gear control parameters to set the corresponding control interface to closed or open. An atomic service is then invoked to pass the power interface control parameters to the atomic service, which in turn invokes the corresponding IO abstract service to transmit the corresponding control command. This application designs the power gear switching service based on an SOA architecture, enabling gear switching invocation in multiple scenarios, greatly improving the applicability and flexibility of the gear switching service, shortening the development cycle, and enhancing the user experience. This solves the problems of related technologies not being designed based on an SOA architecture for power gear switching, resulting in poor scenario applicability and long development cycles.
[0042] Specifically, Figure 1 This is a flowchart illustrating a power level switching service invocation method provided in an embodiment of this application.
[0043] like Figure 1 As shown, the power level switching service invocation method includes the following steps:
[0044] In step S101, based on the scene service, it is determined whether the scene conditions of the current vehicle meet the preset gear switching conditions.
[0045] It should be noted that the embodiments of this application are based on SOA architecture, which consists of four layers: an IO (Input / Output) abstraction layer, an atomic layer, an enhancement service layer, and a scenario service layer. These four layers are independent of each other, and the services within each layer are also independent, resulting in low coupling. Scenario services implement corresponding functions by calling enhancement services, and enhancement services send corresponding instructions to the hardware for control by calling atomic services. Its logical architecture is as follows: Figure 2 As shown.
[0046] In this application, embodiments can be based on scenario services to determine whether the current vehicle scenario conditions meet the gear shifting conditions. For example, it can determine whether the current power gear information provided by the enhanced service is in the OFF position, and determine whether the unlocking request is valid through other interfaces, thereby providing guidance and basis for subsequent system service calls.
[0047] In step S102, if the preset gear switching conditions are met, the enhanced service is invoked to determine whether the power gear control parameters meet the preset valid conditions.
[0048] If the current power level information provided by the enhancement service is in the OFF position, and the unlock request is valid through other interfaces, then the current vehicle's scenario conditions meet the gear switching conditions. Furthermore, in the embodiments of this application, the power level control parameters and the service request ID (Identification) of the scenario service can be passed to the power level switching enhancement service. When the power level switching enhancement service recognizes that its method has been called, it judges the validity of the passed parameters, thereby ensuring reasonable control of the power level.
[0049] Optionally, in one embodiment of this application, calling the enhanced service to determine whether the power level control parameter meets the preset valid conditions includes: determining whether the parameter value of the power level control parameter is within a preset range; if it is within the preset range, determining whether the enhanced service is occupied; if the enhanced service is not occupied, determining that the preset valid conditions are met.
[0050] It should be noted that, in the embodiments of this application, the effective conditions for the power level control parameters are as follows:
[0051] 1. If the parameter value exceeds the valid range, the service response status will be "Parameter out of range";
[0052] 2. If the parameter value is within the range, determine whether the enhanced service is currently occupied by executing other high-priority service requests. If it is occupied, the service response status is returned as "high priority busy".
[0053] 3. If the service response is normal, the feedback status will be "success".
[0054] Therefore, the embodiments of this application can effectively improve the efficiency of power level switching service by setting appropriate effective conditions, providing a reliable basis and guidance for the subsequent implementation of power level switching.
[0055] Optionally, in one embodiment of this application, during the operation of the enhanced service, the method further includes: setting the service status in the service operation information to a running state and setting the request ID in the service operation information to the request ID sent by the requester; when the previous request is interrupted due to a high-priority scenario service call, setting the service status to an interrupted state, re-responding to the high-priority request of the high-priority scenario, and updating the service status and request ID in the service operation information in the next cycle; after the enhanced service operation is completed, setting the service status to a completed state and initializing the service status and request ID of the service operation information after a preset cycle.
[0056] It should be noted that the embodiments of this application update the service operation information at different stages of the enhanced service operation process, as described below:
[0057] 1. At runtime, set the service status in the service runtime information to "Running" and set the request ID in the service runtime information to the request ID sent by the requester;
[0058] 2. If a previous request is interrupted by a high-priority scenario service call during operation, the service status will be set to "interrupted", and the service will respond to the high-priority request again. The service status and request ID in the service operation information will be updated in the next cycle.
[0059] 3. After the service is completed, set the service status to "completed". After one cycle, initialize the service status and request ID of the service running information.
[0060] Therefore, in the process of enhancing service operation, the embodiments of this application update the service operation information so that the scenario service provider can know in real time whether the request it sent has been executed or interrupted. Based on the operation status, the operation of re-initiating the request after being interrupted can be designed, which effectively improves the efficiency of information sending and improves the user experience.
[0061] Optionally, in one embodiment of this application, during the operation of the enhanced service, the process further includes: obtaining service operation information of the enhanced service; and sending the service operation information to the scenario service.
[0062] In the embodiments of this application, the service operation information can be sent out in real time during the operation of the enhanced service. Thus, by acquiring and sending the service operation information of the enhanced service to the scene service in real time, the embodiments of this application improve the efficiency of information sending and processing, and effectively ensure the efficient execution of power level switching.
[0063] In step S103, if the power level control parameters meet the preset valid conditions, the power interface control parameters are assigned values according to the power level control parameters to set the corresponding control interface to closed or open, and the atomic service is called to pass the power interface control parameters to the atomic service to call the corresponding IO abstract service and pass the corresponding control command.
[0064] After the power level switching enhancement service determines that the parameters are valid, the embodiments of this application can assign values to the power interface control parameters according to the power level control parameters, set the corresponding interface to be closed or open, and then call the atomic service to pass the power interface control parameters to the atomic service. The atomic service isolates the IO abstract service from its upper-layer service and calls the corresponding IO abstract service according to the power interface control parameters to pass the corresponding control commands, thereby improving the robustness of power level switching and reducing the degree of restriction by the underlying hardware.
[0065] Optionally, in one embodiment of this application, while transmitting the power interface control parameters to the atomic service, the method further includes: updating the power level status interface based on the power interface control parameters to notify at least one preset service of the latest power level information.
[0066] While transmitting power interface control parameters to the atomic service, embodiments of this application can also update its power level status interface and notify other services of the latest level information.
[0067] Therefore, the embodiments of this application update the power level status interface to notify the service of the latest power level information, thereby enabling power level switching to be achieved in various scenarios by calling the interface, avoiding repeated execution of the power level switching function in its own scenario, and effectively improving the applicability of the scenario.
[0068] The following section will describe the power level switching service invocation method of this application in conjunction with the accompanying drawings.
[0069] Figure 3 This is a diagram illustrating the execution logic of a service-oriented method call based on power level switching. For example... Figure 3 As shown, the execution process of the power level switching service invocation method in this application embodiment is as follows:
[0070] S301: The scenario service determines whether the gear shifting conditions are met. If they are met, proceed to S302; otherwise, execution ends.
[0071] S302: Invoke the enhanced service power level switching method;
[0072] S303: Enhance the service to determine the validity of parameters. If valid, proceed to S304; otherwise, execution ends.
[0073] S304: Enhance the service to determine the service running status. If a determination is required, proceed to S305; otherwise, execution ends.
[0074] S305: Run the enhanced service, switch power levels and notify the power level status;
[0075] S306: Call the atomic service to pass the power interface control command to the corresponding IO abstraction service.
[0076] According to the power gear switching service-oriented invocation method proposed in this application, based on a scenario service, it determines whether the current vehicle scenario conditions meet preset gear switching conditions. If the preset gear switching conditions are met, an enhanced service is invoked to determine whether the power gear control parameters meet preset valid conditions. If the power gear control parameters meet the preset valid conditions, the power interface control parameters are assigned values according to the power gear control parameters to set the corresponding control interface to closed or open, and an atomic service is invoked to pass the power interface control parameters to the atomic service, thereby invoking the corresponding IO abstract service and transmitting the corresponding control command. This application designs the power gear switching service based on SOA architecture, which enables gear switching invocation in multiple scenarios, greatly improving the applicability and flexibility of the gear switching service, shortening the development cycle, and enhancing the user experience.
[0077] Next, with reference to the accompanying drawings, a power level switching service invocation device according to an embodiment of this application is described.
[0078] Figure 4 This is a block diagram of a power level switching service-based invocation device according to an embodiment of this application.
[0079] like Figure 4 As shown, the power level switching service invocation device 10 includes: a judgment module 100, a first invocation module 200, and a second invocation module 300.
[0080] The judgment module 100 is used to determine whether the current vehicle's scene conditions meet the preset gear switching conditions based on the scene service.
[0081] The first calling module 200 is used to call the enhanced service to determine whether the power level control parameters meet the preset valid conditions if the preset gear switching conditions are met.
[0082] The second calling module 300 is used to assign values to the power interface control parameters according to the power level control parameters if the power level control parameters meet the preset valid conditions, so as to set the corresponding control interface to be closed or open, and to call the atomic service to pass the power interface control parameters to the atomic service, so as to call the corresponding IO abstract service and pass the corresponding control command.
[0083] Optionally, in one embodiment of this application, the power level switching service invocation device 10 of this application embodiment further includes: a notification module, used to transmit power interface control parameters to atomic services and update the power level status interface based on the power interface control parameters, so as to notify at least one preset service of the latest power level information.
[0084] Optionally, in one embodiment of this application, the first calling module 200 includes: a comparison unit, an occupied unit, and an unoccupied unit.
[0085] The comparison unit is used to determine whether the parameter value of the power level control parameter is within the preset range.
[0086] The occupancy unit is used to determine whether the enhanced service is occupied if it is within a preset range.
[0087] An unoccupied unit is used to determine if the enhanced service is not occupied, thus satisfying the preset valid conditions.
[0088] Optionally, in one embodiment of this application, the power level switching service invocation device 10 of this application embodiment further includes: an acquisition module and a sending module.
[0089] The acquisition module is used to acquire service operation information of the enhanced service during the operation of the enhanced service.
[0090] The sending module is used to send service operation information to the scenario service.
[0091] Optionally, in one embodiment of this application, the power level switching service invocation device 10 of this application embodiment further includes: a setting module, an update module, and an initialization module.
[0092] The setting module is used to set the service status in the service operation information to "running" and the request ID in the service operation information to the request ID sent by the requester during the operation of the enhanced service.
[0093] The update module is used to set the service status to the interrupted state when the previous request is interrupted by a high-priority scenario service call, and to re-respond to the high-priority request of the high-priority scenario. In the next cycle, the service status and request ID in the service operation information are updated.
[0094] The initialization module is used to set the service status to "complete" after the enhanced service has finished running, and to initialize the service status and request ID of the service running information after a preset period.
[0095] It should be noted that the foregoing explanation of the power level switching service invocation method embodiment also applies to the power level switching service invocation device of this embodiment, and will not be repeated here.
[0096] The power gear switching service-oriented invocation device proposed in this application, based on a scenario service, determines whether the current vehicle scenario conditions meet preset gear switching conditions. If the preset gear switching conditions are met, an enhanced service is invoked to determine whether the power gear control parameters meet preset valid conditions. If the power gear control parameters meet the preset valid conditions, the power interface control parameters are assigned values according to the power gear control parameters to set the corresponding control interface to closed or open, and an atomic service is invoked to pass the power interface control parameters to the atomic service, thereby invoking the corresponding IO abstract service and transmitting the corresponding control command. This application designs the power gear switching service based on an SOA architecture, thereby enabling gear switching invocation in multiple scenarios, greatly improving the applicability and flexibility of the gear switching service, shortening the development cycle, and enhancing the user experience.
[0097] Figure 5 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include:
[0098] The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.
[0099] When the processor 502 executes the program, it implements the power level switching service invocation method provided in the above embodiments.
[0100] Furthermore, the vehicle also includes:
[0101] Communication interface 503 is used for communication between memory 501 and processor 502.
[0102] The memory 501 is used to store computer programs that can run on the processor 502.
[0103] The memory 501 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0104] If the memory 501, processor 502, and communication interface 503 are implemented independently, then the communication interface 503, memory 501, and processor 502 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0105] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.
[0106] Processor 502 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0107] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described power level switching service invocation method.
[0108] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0109] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0110] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0111] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0112] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0113] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes one or a combination of the steps of the method embodiments.
[0114] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0115] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A method for service-oriented invocation of power level switching, characterized in that, Includes the following steps: Based on scenario services, determine whether the current scenario conditions of the vehicle meet the preset gear switching conditions; If the preset gear switching conditions are met, the enhanced service is invoked to determine whether the power gear control parameters meet the preset valid conditions. The process of calling the enhanced service to determine whether the power level control parameters meet preset valid conditions includes: Determine whether the parameter value of the power level control parameter is within a preset range; If it is within the preset range, then determine whether the enhanced service is occupied; If the enhanced service is not occupied, it is determined that the preset valid condition is met; if the power level control parameter meets the preset valid condition, the power interface control parameter is assigned a value according to the power level control parameter to set the corresponding control interface to closed or open, and the atomic service is called to pass the power interface control parameter to the atomic service. The atomic service isolates the IO abstract service from its upper layer service to call the corresponding IO abstract service and pass the corresponding control command. Obtain the service operation information of the enhanced service; Send the service operation information to the scenario service; When the enhanced service is running, the service status in the service running information is set to running status, and the request ID in the service running information is set to the request ID sent by the requester. When a previous request is interrupted due to a high-priority scenario service call, the service status is set to the interrupted state, and the service responds to the high-priority request of the high-priority scenario again. The service status and request ID in the service operation information are updated in the next cycle. After the enhanced service is completed, the service status is set to the completed state, and the service status and request ID of the service operation information are initialized after a preset period.
2. The method according to claim 1, characterized in that, The process of passing the power interface control parameters to the atomic service also includes: The power level status interface is updated based on the power interface control parameters to notify at least one preset service of the latest power level information.
3. A power level switching service-oriented invocation device, characterized in that, include: The judgment module is used to determine whether the current vehicle's scene conditions meet the preset gear switching conditions based on the scene service. The first calling module is used to call the enhanced service to determine whether the power level control parameters meet the preset valid conditions if the preset gear switching conditions are met. The first calling module includes: The comparison unit is used to determine whether the parameter value of the power level control parameter is within a preset range; An occupancy unit is used to determine whether the enhanced service is occupied if it is within the preset range. An unoccupied unit is used to determine that the preset valid condition is met if the enhanced service is not occupied; a second calling module is used to assign a value to the power interface control parameter according to the power level control parameter if the power level control parameter meets the preset valid condition, so as to set the corresponding control interface to closed or open, and call the atomic service to pass the power interface control parameter to the atomic service. The atomic service isolates the IO abstract service from its upper layer service to call the corresponding IO abstract service and pass the corresponding control command. Obtain the service operation information of the enhanced service; Send the service operation information to the scenario service; When the enhanced service is running, the service status in the service running information is set to running status, and the request ID in the service running information is set to the request ID sent by the requester. When a previous request is interrupted due to a high-priority scenario service call, the service status is set to the interrupted state, and the service responds to the high-priority request of the high-priority scenario again. The service status and request ID in the service operation information are updated in the next cycle. After the enhanced service is completed, the service status is set to the completed state, and the service status and request ID of the service operation information are initialized after a preset period.
4. The apparatus according to claim 3, characterized in that, Also includes: The notification module is used to transmit the power interface control parameters to the atomic service and update the power level status interface based on the power interface control parameters, so as to notify at least one preset service of the latest power level information.
5. A vehicle, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the power level switching service invocation method as described in any one of claims 1-2.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the power level switching service invocation method as described in any one of claims 1-2.
Citation Information
Patent Citations
Enhanced service calling method and device for vehicle position lamp, vehicle and medium
CN115175413A
Whole vehicle starting power-on and power-off method, device and equipment and medium
CN115268405A