A vehicle-mounted fragrance system control method and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GAC AION NEW ENERGY AUTOMOBILE CO LTD
- Filing Date
- 2023-06-27
- Publication Date
- 2026-06-02
Smart Images

Figure CN116820004B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle control technology, and more specifically, to a method and apparatus for controlling an in-vehicle fragrance system. Background Technology
[0002] Currently, with technological advancements and consumption upgrades, the intelligent and personalized attributes of automobiles are becoming increasingly important. People's needs for cars have expanded from mere transportation tools to a third space, serving as a lounge, karaoke area, gaming space, and even a gathering place. As an important component of the intelligent cockpit, in-car fragrance systems can stimulate the sense of smell, engaging all five senses (sight, hearing, smell, touch, and emotion) to create a comfortable and personalized third space. Existing in-car fragrance system control methods typically achieve basic adjustment functions through SOA (Service-Oriented Architecture). However, in practice, it has been found that existing methods cannot check fragrance remaining levels or provide alerts, and cannot promptly remind users to replace the fragrance when it is running low. Furthermore, the aforementioned SOA interface cannot effectively identify fragrance types, causing inconvenience for users. Summary of the Invention
[0003] The purpose of this application is to provide a method and device for controlling an in-vehicle fragrance system, which can promptly know the remaining amount of fragrance and identify the fragrance type, and issue a remaining amount alarm when the remaining amount is insufficient, thereby improving the ease of operation and enhancing the user experience.
[0004] The first aspect of this application provides a method for controlling an in-vehicle fragrance system, including:
[0005] A pre-configured fragrance control interface based on SOA; wherein, the fragrance control interface includes the getTypeViaBoxID interface, the setTypeViaBoxID interface, the getRemainRatio interface, and the isWarning interface;
[0006] When a target fragrance box is detected to be loaded into the fragrance system, it is determined whether a fragrance type configuration instruction input by the user for the target fragrance box has been received;
[0007] If not, then query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface;
[0008] The current remaining amount of fragrance in the target fragrance box is detected based on the getRemainRatio interface;
[0009] Determine whether the remaining amount of fragrance is lower than a preset remaining amount threshold;
[0010] If so, an alarm message will be output based on the isWarning interface to indicate that the fragrance level in the target fragrance box is low.
[0011] In the above implementation process, this method can prioritize the pre-configuration of fragrance control interfaces, including getTypeViaBoxID, setTypeViaBoxID, getRemainRatio, and isWarning interfaces, based on SOA. When a target fragrance box is detected to be loaded into the fragrance system, it determines whether a fragrance type configuration command input by the user for the target fragrance box has been received. If no fragrance type configuration command input by the user for the target fragrance box has been received, the target fragrance type of the fragrance in the target fragrance box is queried through the getTypeViaBoxID interface. Then, the current fragrance remaining amount in the target fragrance box is detected based on the getRemainRatio interface. Next, it is determined whether the fragrance remaining amount is lower than a preset remaining amount threshold. When the fragrance remaining amount is lower than the preset remaining amount threshold, an alarm message is output based on the isWarning interface to indicate that the fragrance remaining amount in the target fragrance box is insufficient. It can be seen that this method can promptly know the fragrance remaining amount and identify the fragrance type, and issue a remaining amount alarm when the remaining amount is insufficient, thereby improving the ease of operation and enhancing the user experience.
[0012] Furthermore, the method also includes:
[0013] When it is determined that the fragrance type configuration instruction has been received, the fragrance type to be set is determined according to the fragrance type configuration instruction;
[0014] Based on the setTypeViaBoxID interface, the fragrance type of the target fragrance box is set to the fragrance type to be set, and the current fragrance remaining amount of the target fragrance box is detected based on the getRemainRatio interface.
[0015] Furthermore, the method also includes:
[0016] When it is determined that the remaining amount of fragrance is not lower than the preset remaining amount threshold, the target fragrance type and the remaining amount of fragrance are output for the user to view.
[0017] Furthermore, the method also includes:
[0018] Determine whether a user has received a query command regarding the fragrance type of the target fragrance box;
[0019] If so, execute the above steps to query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface.
[0020] A second aspect of this application provides a vehicle-mounted fragrance system control device, the vehicle-mounted fragrance system control device comprising:
[0021] A configuration unit is used to pre-configure the fragrance control interface based on SOA; wherein the fragrance control interface includes the getTypeViaBoxID interface, the setTypeViaBoxID interface, the getRemainRatio interface, and the isWarning interface;
[0022] The first judgment unit is used to determine whether a fragrance type configuration instruction input by the user for the target fragrance box has been received when a target fragrance box is detected to be loaded into the fragrance system.
[0023] The query unit is used to query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface when it is determined that the fragrance type configuration instruction has not been received;
[0024] The detection unit is used to detect the current remaining amount of fragrance in the target fragrance box based on the getRemainRatio interface;
[0025] The second judgment unit is used to determine whether the remaining amount of fragrance is lower than a preset remaining amount threshold.
[0026] The output unit is used to output an alarm message based on the isWarning interface when it is determined that the remaining amount of fragrance is lower than the preset remaining amount threshold, to indicate that the remaining amount of fragrance in the target fragrance box is insufficient.
[0027] In the above implementation process, the vehicle fragrance system control device can pre-configure fragrance control interfaces, including getTypeViaBoxID, setTypeViaBoxID, getRemainRatio, and isWarning interfaces, based on SOA through a configuration unit. When a target fragrance box is detected being loaded into the fragrance system, the first judgment unit determines whether a fragrance type configuration command input by the user for the target fragrance box has been received. If no fragrance type configuration command has been received, the query unit queries the target fragrance type in the target fragrance box through the getTypeViaBoxID interface. The detection unit detects the current remaining fragrance level in the target fragrance box based on the getRemainRatio interface. The second judgment unit determines whether the remaining fragrance level is lower than a preset threshold. Finally, when the remaining fragrance level is lower than the preset threshold, the output unit outputs an alarm message indicating insufficient fragrance level in the target fragrance box based on the isWarning interface. Therefore, this device can promptly obtain the remaining fragrance level and identify the fragrance type, and issue a remaining level alarm when the level is low, thereby improving operational convenience and enhancing the user experience.
[0028] Furthermore, the vehicle fragrance system control device also includes:
[0029] The determining unit is used to determine the fragrance type to be set according to the fragrance type configuration instruction when it is determined that the fragrance type configuration instruction has been received;
[0030] The setting unit is used to set the fragrance type of the target fragrance box to the fragrance type to be set based on the setTypeViaBoxID interface, and to trigger the detection unit to detect the current fragrance remaining amount of the target fragrance box based on the getRemainRatio interface.
[0031] Furthermore, the output unit is also used to output the target fragrance type and the remaining fragrance quantity when it is determined that the remaining amount of fragrance is not lower than the preset remaining amount threshold, so that the user can view them.
[0032] Furthermore, the in-vehicle fragrance system control device also includes:
[0033] The third judgment unit is used to determine whether a user's fragrance type query instruction for the target fragrance box has been received when it is determined that the fragrance type configuration instruction has not been received; if so, the query unit is triggered to query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface.
[0034] A third aspect of this application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to cause the electronic device to perform the vehicle fragrance system control method described in any one of the first aspects of this application.
[0035] The fourth aspect of this application provides a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, perform the vehicle fragrance system control method described in any one of the first aspects of this application. Attached Figure Description
[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 A flowchart illustrating a method for controlling an in-vehicle fragrance system provided in an embodiment of this application;
[0038] Figure 2A flowchart illustrating another method for controlling an in-vehicle fragrance system provided in an embodiment of this application;
[0039] Figure 3 This is a schematic diagram of the structure of a vehicle fragrance system control device provided in an embodiment of this application;
[0040] Figure 4 This is a schematic diagram of another vehicle fragrance system control device provided in an embodiment of this application. Detailed Implementation
[0041] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0042] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0043] Example 1
[0044] Please refer to Figure 1 , Figure 1 This embodiment provides a flowchart illustrating a method for controlling an in-vehicle fragrance system. The method includes:
[0045] S101. Pre-configure fragrance control interface based on SOA; wherein, the fragrance control interface includes getTypeViaBoxID interface, setTypeViaBoxID interface, getRemainRatio interface and isWarning interface.
[0046] In this embodiment, the method aims to enable users to promptly know the remaining amount of fragrance, and to conveniently and quickly display the fragrance type on the central control screen and operate the fragrance after changing the fragrance type themselves.
[0047] In this embodiment, in addition to the interfaces provided by the SDV working group, the method proposes the following SOA-based fragrance control interface design: getTypeViaBoxID, setTypeViaBoxID, getRemainRatio, and isWarning.
[0048] S102. When a target fragrance box is detected to be loaded into the fragrance system, determine whether a fragrance type configuration instruction input by the user for the target fragrance box has been received. If yes, end this process; otherwise, proceed to step S103.
[0049] S103. Query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface.
[0050] S104. Detect the current remaining amount of fragrance in the target fragrance box based on the getRemainRatio interface.
[0051] S105. Determine whether the remaining amount of fragrance is lower than the preset remaining amount threshold. If yes, proceed to step S106; otherwise, end the process.
[0052] S106. Output an alarm message based on the isWarning interface to indicate that the fragrance level in the target fragrance box is low.
[0053] In this embodiment, the subject executing the method can be a computing device such as a computer or server, and no limitation is made in this embodiment.
[0054] In this embodiment, the subject executing the method can also be a smart device such as a smartphone or tablet, and no limitation is made in this embodiment.
[0055] As can be seen, the vehicle fragrance system control method described in this embodiment can promptly obtain the remaining fragrance level and identify the fragrance type, and issue a remaining level alarm when the level is insufficient, thereby improving the ease of operation and enhancing the user experience.
[0056] Example 2
[0057] Please refer to Figure 2 , Figure 2 This embodiment provides a flowchart illustrating a method for controlling an in-vehicle fragrance system. The method includes:
[0058] S201. Pre-configure fragrance control interfaces based on SOA; wherein, the fragrance control interfaces include getTypeViaBoxID interface, setTypeViaBoxID interface, getRemainRatio interface and isWarning interface.
[0059] In this embodiment, the method aims to enable users to promptly know the remaining amount of fragrance, and to conveniently and quickly display the fragrance type on the central control screen and operate the fragrance after changing the fragrance type themselves.
[0060] In this embodiment, in addition to the interfaces provided by the SDV working group, the method proposes the following SOA-based fragrance control interface design: getTypeViaBoxID, setTypeViaBoxID, getRemainRatio, and isWaming.
[0061] In this embodiment, `getTypeViaBoxID` is used to represent the current fragrance type queried through the fragrance box. The function prototype is as follows: `TMS_FranganceTypegetTypeViaBoxID(uint8FragranceBoxID)`;
[0062] Parameter descriptions:
[0063] Parameter name type describe FragranceBoxID unit8 Fragrance box IDs, up to 256 supported.
[0064] Return value description:
[0065] type describe TMS_FranganceType The current fragrance box corresponds to the following fragrance type.
[0066] In this embodiment, `setTypeViaBoxID` is used to indicate that the current fragrance type is set via the fragrance box. The function prototype is as follows: `TMS_ReturnCodesetTypeViaBoxID(uint8FragranceBoxID, uint16FragranceType)`;
[0067] Parameter descriptions:
[0068] Parameter name type describe FragranceBoxID uint8 Fragrance box IDs, up to 256 supported. FragranceType uint16 Fragrance types, up to 65,536 supported.
[0069] Return value description:
[0070] type describe TMS_ReturnCode Returns SUCCESS on success, otherwise returns FAIL.
[0071] In this embodiment, `getRemainRatio` is used to represent the current remaining amount of fragrance when querying the fragrance box. The function prototype is as follows: `float32 getRemainRatio(uint8 FragranceBoxID)`;
[0072] Parameter descriptions:
[0073] Parameter name type describe FragranceBoxID uint8 Fragrance box ID, supports up to 256.
[0074] Return value description:
[0075] type describe float32 The current amount remaining in the fragrance box, in %
[0076] In this embodiment, isWaming is used to characterize the return of the fragrance remaining alarm status. The function prototype is as follows: TMS_FraganceRatioWarnTypeisWaming();
[0077] Parameter description: None;
[0078] Return value description:
[0079]
[0080] S202. When a target fragrance box is detected to be loaded into the fragrance system, determine whether a fragrance type configuration instruction input by the user for the target fragrance box has been received. If yes, proceed to steps S203 to S204; otherwise, proceed to step S205.
[0081] S203. Determine the fragrance type to be set according to the fragrance type configuration instruction.
[0082] S204. Based on the setTypeViaBoxID interface, set the fragrance type of the target fragrance box to the fragrance type to be set, and then execute step S207.
[0083] S205. Determine whether a user's query command for the fragrance type of the target fragrance box has been received. If yes, proceed to steps S206 to S208; otherwise, end the process.
[0084] S206. Query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface.
[0085] In this embodiment, the present invention can achieve independent setting of fragrance box and fragrance type through the above-mentioned getTypeViaBoxID interface and setTypeViaBoxID interface, thereby ensuring that users can purchase and change fragrance type according to their own preferences.
[0086] S207. Detect the current remaining amount of fragrance in the target fragrance box based on the getRemainRatio interface.
[0087] S208. Determine whether the remaining amount of fragrance is lower than the preset remaining amount threshold. If yes, proceed to step S209; otherwise, proceed to step S210.
[0088] S209. Output an alarm message based on the isWarning interface to indicate that the fragrance level in the target fragrance box is low, and end this process.
[0089] In this embodiment, the method can use the getRemainRatio and isWarning interfaces to query the remaining fragrance level and trigger an alarm.
[0090] In this embodiment, the method can obtain the remaining alarm information of the corresponding fragrance box through the aforementioned isWarning interface, thereby reminding the user to replace the fragrance block in a pop-up window on the central control screen.
[0091] In this embodiment, the method can obtain the specific remaining quantity of the corresponding fragrance box through the getRemainRatio interface, so as to obtain the remaining quantity of fragrance more accurately and make plans for the use and replacement of fragrance blocks in advance.
[0092] S210, Output the target fragrance type and remaining fragrance quantity for user viewing, and end this process.
[0093] For example, the method may include the following steps:
[0094] (1) The user replaces the fragrance block in the fragrance box.
[0095] For example, the fragrance block in fragrance box 1 can be replaced with the user's preferred "rosemary";
[0096] (2) Users can customize the fragrance type of the changed fragrance block through the central control screen.
[0097] For example, the fragrance type of "rosemary" is defined as FragranceType=15;
[0098] (3) Call the setTypeViaBoxID service to set the corresponding fragrance box to the corresponding fragrance type.
[0099] For example, by using TMS_ReturnCode setTypeViaBoxID(1,15), the fragrance type of fragrance box 1 is set to "rosemary". The return value is SUCCESS, which means that the setting was successful.
[0100] (4) If the user forgets the type of fragrance in the fragrance box after a period of time, they can query it by calling the getTypeViaBoxID service.
[0101] For example, if a user queries the fragrance type in fragrance box 1 using TMS_FranganceType getTypeViaBoxID(1), the returned value is TMS_FranganceType=15. After parsing, the user is told that the fragrance is "rosemary".
[0102] In this embodiment, the subject executing the method can be a computing device such as a computer or server, and no limitation is made in this embodiment.
[0103] In this embodiment, the subject executing the method can also be a smart device such as a smartphone or tablet, and no limitation is made in this embodiment.
[0104] As can be seen, the vehicle fragrance system control method described in this embodiment can promptly obtain the remaining fragrance level and identify the fragrance type, and issue a remaining level alarm when the level is insufficient, thereby improving the ease of operation and enhancing the user experience.
[0105] Example 3
[0106] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a vehicle-mounted fragrance system control device provided in this embodiment. Figure 3 As shown, the vehicle fragrance system control device includes:
[0107] Configuration unit 310 is used to pre-configure the fragrance control interface based on SOA; wherein the fragrance control interface includes getTypeViaBoxID interface, setTypeViaBoxID interface, getRemainRatio interface and isWarning interface;
[0108] The first judgment unit 320 is used to determine whether a fragrance type configuration instruction input by the user for the target fragrance box has been received when a target fragrance box is detected to be loaded into the fragrance system.
[0109] The query unit 330 is used to query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface when it is determined that no fragrance type configuration instruction has been received;
[0110] Detection unit 340 is used to detect the current remaining amount of fragrance in the target fragrance box based on the getRemainRatio interface;
[0111] The second judgment unit 350 is used to determine whether the remaining amount of fragrance is lower than the preset remaining amount threshold.
[0112] The output unit 360 is used to output an alarm message based on the isWarning interface to indicate that the remaining amount of fragrance in the target fragrance box is insufficient when it is determined that the remaining amount of fragrance is lower than the preset remaining amount threshold.
[0113] In this embodiment, the explanation of the vehicle fragrance system control device can be referred to the description in Embodiment 1 or Embodiment 2, and will not be repeated here.
[0114] As can be seen, by implementing the vehicle fragrance system control device described in this embodiment, the remaining amount of fragrance can be known in a timely manner and the fragrance type can be identified. When the remaining amount is insufficient, an alarm will be triggered, thereby improving the ease of operation and enhancing the user experience.
[0115] Example 4
[0116] Please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of a vehicle-mounted fragrance system control device provided in this embodiment. Figure 4 As shown, the vehicle fragrance system control device includes:
[0117] Configuration unit 310 is used to pre-configure the fragrance control interface based on SOA; wherein the fragrance control interface includes getTypeViaBoxID interface, setTypeViaBoxID interface, getRemainRatio interface and isWarning interface;
[0118] The first judgment unit 320 is used to determine whether a fragrance type configuration instruction input by the user for the target fragrance box has been received when a target fragrance box is detected to be loaded into the fragrance system.
[0119] The query unit 330 is used to query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface when it is determined that no fragrance type configuration instruction has been received;
[0120] Detection unit 340 is used to detect the current remaining amount of fragrance in the target fragrance box based on the getRemainRatio interface;
[0121] The second judgment unit 350 is used to determine whether the remaining amount of fragrance is lower than the preset remaining amount threshold.
[0122] The output unit 360 is used to output an alarm message based on the isWarning interface to indicate that the remaining amount of fragrance in the target fragrance box is insufficient when it is determined that the remaining amount of fragrance is lower than the preset remaining amount threshold.
[0123] As an optional implementation, the in-vehicle fragrance system control device further includes:
[0124] The determining unit 370 is used to determine the fragrance type to be set according to the fragrance type configuration instruction when it is determined that a fragrance type configuration instruction has been received;
[0125] Setting unit 380 is used to set the fragrance type of the target fragrance box to the fragrance type to be set based on the setTypeViaBoxID interface, and trigger detection unit 340 to detect the current fragrance remaining amount of the target fragrance box based on the getRemainRatio interface.
[0126] As an optional implementation, the output unit 360 is also used to output the target fragrance type and the remaining fragrance quantity when it is determined that the remaining fragrance quantity is not lower than a preset remaining quantity threshold, so that the user can view it.
[0127] As an optional implementation, the in-vehicle fragrance system control device further includes:
[0128] The third judgment unit 390 is used to determine whether a user's fragrance type query instruction for the target fragrance box has been received when it is determined that no fragrance type configuration instruction has been received; if so, the query unit 330 is triggered to query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface.
[0129] In this embodiment, the explanation of the vehicle fragrance system control device can be referred to the description in Embodiment 1 or Embodiment 2, and will not be repeated here.
[0130] As can be seen, by implementing the vehicle fragrance system control device described in this embodiment, the remaining amount of fragrance can be known in a timely manner and the fragrance type can be identified. When the remaining amount is insufficient, an alarm will be triggered, thereby improving the ease of operation and enhancing the user experience.
[0131] This application provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to execute the vehicle fragrance system control method in embodiment 1 or embodiment 2 of this application.
[0132] This application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the vehicle fragrance system control method in embodiment 1 or embodiment 2 of this application is performed.
[0133] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0134] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0135] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0136] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0137] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0138] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for controlling an in-vehicle fragrance system, characterized in that, include: A pre-configured fragrance control interface based on SOA is used. This interface includes the getTypeViaBoxID interface, setTypeViaBoxID interface, getRemainRatio interface, and isWarning interface. Specifically, the getTypeViaBoxID interface queries the fragrance type using the fragrance box ID, the setTypeViaBoxID interface sets the fragrance type using the fragrance box ID, the getRemainRatio interface obtains the remaining fragrance percentage using the fragrance box ID, and the isWarning interface returns the fragrance remaining alarm status. When a target fragrance box is detected to be loaded into the fragrance system, it is determined whether a fragrance type configuration instruction input by the user for the target fragrance box has been received; If not, the corresponding service is called through the getTypeViaBoxID interface, passing in the target fragrance box ID to query the target fragrance type of the fragrance in the target fragrance box; The corresponding service is called based on the getRemainRatio interface, and the target fragrance box ID is passed in to detect the current remaining amount of fragrance in the target fragrance box; Determine whether the remaining amount of fragrance is lower than a preset remaining amount threshold; If so, based on the alarm status returned by the isWarning interface, the vehicle central control screen will be triggered to output an alarm message indicating that the fragrance in the target fragrance box is low. The method further includes: When it is determined that the fragrance type configuration instruction has been received, the fragrance type to be set is determined according to the fragrance type configuration instruction; Based on the setTypeViaBoxID interface, the fragrance type of the target fragrance box is set to the fragrance type to be set, and the current fragrance remaining amount of the target fragrance box is detected based on the getRemainRatio interface.
2. The vehicle fragrance system control method according to claim 1, characterized in that, The method further includes: When it is determined that the remaining amount of fragrance is not lower than the preset remaining amount threshold, the target fragrance type and the remaining amount of fragrance are output for the user to view.
3. The vehicle-mounted fragrance system control method according to claim 1, characterized in that, The method further includes: Determine whether a user has received a query command regarding the fragrance type of the target fragrance box; If so, execute the above steps to query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface.
4. A vehicle-mounted fragrance system control device, characterized in that, The vehicle fragrance system control device includes: A configuration unit is used to pre-configure the fragrance control interface based on SOA; wherein, the fragrance control interface includes the getTypeViaBoxID interface, the setTypeViaBoxID interface, the getRemainRatio interface, and the isWarning interface; wherein, the getTypeViaBoxID interface is used to query the fragrance type by fragrance box ID, the setTypeViaBoxID interface is used to set the fragrance type by fragrance box ID, the getRemainRatio interface is used to obtain the remaining fragrance percentage by fragrance box ID, and the isWarning interface is used to return the fragrance remaining alarm status; The first judgment unit is used to determine whether a fragrance type configuration instruction input by the user for the target fragrance box has been received when a target fragrance box is detected to be loaded into the fragrance system. The query unit is used to call the corresponding service through the getTypeViaBoxID interface when it is determined that the fragrance type configuration instruction has not been received, and to pass the target fragrance box ID to query the target fragrance type of the fragrance in the target fragrance box; The detection unit is used to call the corresponding service based on the getRemainRatio interface, and pass in the target fragrance box ID to detect the current fragrance remaining amount of the target fragrance box; The second judgment unit is used to determine whether the remaining amount of fragrance is lower than a preset remaining amount threshold. The output unit is used to trigger a pop-up window on the vehicle central control screen to output an alarm message indicating that the remaining amount of fragrance in the target fragrance box is insufficient, based on the alarm status returned by the isWarning interface when it is determined that the remaining amount of fragrance is lower than the preset remaining amount threshold. The vehicle fragrance system control device further includes: The determining unit is used to determine the fragrance type to be set according to the fragrance type configuration instruction when it is determined that the fragrance type configuration instruction has been received; The setting unit is used to set the fragrance type of the target fragrance box to the fragrance type to be set based on the setTypeViaBoxID interface, and to trigger the detection unit to detect the current fragrance remaining amount of the target fragrance box based on the getRemainRatio interface.
5. The vehicle-mounted fragrance system control device according to claim 4, characterized in that, The output unit is further configured to output the target fragrance type and the remaining fragrance quantity when it is determined that the remaining amount of fragrance is not lower than the preset remaining amount threshold, for the user to view.
6. The vehicle-mounted fragrance system control device according to claim 4, characterized in that, The in-vehicle fragrance system control unit also includes: The third judgment unit is used to determine whether a user's fragrance type query instruction for the target fragrance box has been received when it is determined that the fragrance type configuration instruction has not been received; if so, the query unit is triggered to query the target fragrance type of the fragrance in the target fragrance box through the getTypeViaBoxID interface.
7. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the vehicle fragrance system control method according to any one of claims 1 to 3.
8. A readable storage medium, characterized in that, The readable storage medium stores computer program instructions, which, when read and executed by a processor, perform the vehicle fragrance system control method according to any one of claims 1 to 3.