Vehicle state acquisition method and device based on complex scene and vehicle

By receiving API service call requests and generating Ethernet signals, combining atomic capabilities to match custom scenes, the problem of not being able to obtain real-time vehicle status and custom scene mode switching in the prior art is solved, and the vehicle status in complex scenarios is realized Acquisition and intelligent control.

CN118900284APending Publication Date: 2024-11-05CHINA FAW CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411122306.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

The prior art cannot obtain vehicle status information in real time in complex scenarios, and supports switching of custom scenario modes, and cannot effectively use the vehicle's multiple atomic capability interfaces to combine.

Method used

By receiving API service call requests, generate Ethernet signals, analyze data, combine atomic capabilities to match pre-established custom scenes, obtain target scene modes, and automatically adjust the scene mode according to vehicle state changes.

Benefits of technology

It realizes free switching in multiple scene modes, obtains vehicle information in real time, provides a more complex and intelligent vehicle control experience, and solves the problem of custom scene mode combination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900284A_ABST
    Figure CN118900284A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicles, and discloses a vehicle state obtaining method and device based on a complex scene and a vehicle, and the method comprises the steps: receiving an API service calling request defined based on a scene demand, and obtaining a URL corresponding to the API service calling request and a message list carrying position information; calling an SOA service, generating Ethernet signals based on the atomic power corresponding to the URLs one by one, and analyzing to obtain data transmitted by the URLs; combining a plurality of atomic energies according to data transmitted by the URL, and matching the combined atomic energies with a pre-established self-defined scene to obtain a target scene mode matched with a scene demand; and based on the position information carried by the message list, obtaining the vehicle state of the corresponding position in the target scene mode, and automatically adjusting the scene mode according to the change of the vehicle state. The vehicle information reporting capability can be obtained in real time, and different scene modes are automatically adjusted according to different states in a plurality of user-defined scenes of one object, so that the driving safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle technology, and specifically to a method, device, electronic equipment, storage medium and vehicle for acquiring vehicle status in complex scenarios. Background Art

[0002] The vehicle scenarios currently available in the market mainly take the vehicle user as the first object, and select the preset scene with matching information in the preset scene library, and set the corresponding parameters according to the corresponding scene. And more attention is paid to intelligently adjusting the vehicle scene, matching the preset scene based on the characteristic information of the first object.

[0003] Under this solution, only simple preset scenarios can be processed, and conditions cannot be preset in a customized form. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device and vehicle for obtaining vehicle status based on complex scenarios, which can obtain vehicle status information in real time and realize free switching among multiple scene modes based on the vehicle status; different from the traditional solution of manually switching scene modes, it solves the problem that the prior art does not support customized atomic capability interface combinations and cannot obtain vehicle information reporting in real time.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] In a first aspect, the present application provides a method for obtaining vehicle status based on a complex scenario, the method comprising:

[0007] Receive an API service call request defined based on scenario requirements, and obtain a URL corresponding to the API service call request and a message list carrying location information;

[0008] Call SOA service, generate Ethernet signal based on atomic capability corresponding to URL, and parse to obtain data transmitted by URL;

[0009] According to the data transmitted by the URL, multiple atomic capabilities are combined and matched with the pre-established custom scenarios to obtain the target scenario mode that matches the scenario requirements;

[0010] Based on the location information carried in the message list, the vehicle status at the corresponding location in the target scene mode is obtained, and the scene mode is automatically adjusted according to the change of the vehicle status;

[0011] The pre-established custom scenario includes multiple links, each link includes multiple atomic capabilities and scenario modes, and the atomic capabilities of different links are combined into the same format through URLs;

[0012] Each of the multiple scenario modes includes multiple atomic capabilities in different combinations; a parameter mapping method is used between the atomic capabilities so that the previous atomic capability becomes the basis for URL resolution corresponding to the next atomic capability.

[0013] Optionally, after receiving the API service call request defined based on scenario requirements, the method also includes: establishing a thread pool that is started synchronously with the API service, adding a first thread corresponding to the API service call request to the thread pool, and parsing the URL of the API service call request in the first thread, obtaining the atomic capability corresponding to the URL, executing subsequent processes in the SOA process, and adding it to the second thread.

[0014] Furthermore, the API service call request includes: multiple API service call requests sent from multiple service request ends, or multiple API service call requests sent by one service request end.

[0015] Optionally, the calling of the SOA service to generate Ethernet signals based on the atomic capabilities corresponding to the URLs includes:

[0016] During the initialization phase, the API server establishes a subscription to the SOA service based on the signal data provided by the SOA service;

[0017] Call an SOA service to connect to Ethernet. The SOA service reads the signal data in the link through the Ethernet protocol and converts the read signal data into Ethernet frames, so that all atomic capabilities correspond to a signal data on Ethernet, and generates Ethernet signals for the atomic capabilities.

[0018] Establishing communication between the Ethernet and the functional hardware corresponding to the atomic capability, sending the Ethernet signal to the corresponding functional hardware, and checking whether there is data corruption in the process of transmitting the Ethernet signal to the functional hardware corresponding to the atomic capability based on the cyclic redundancy CRC check of the Ethernet frame;

[0019] Wherein, the Ethernet frame includes a frame header, a data payload and padding bytes;

[0020] The signal data includes whether the functional hardware has atomic capability enabled;

[0021] The data corruption conditions include: single bit errors, double bit errors, and longer burst errors.

[0022] Furthermore, the data transmitted by the URL obtained by parsing includes:

[0023] Get the Ethernet signal received by the functional hardware, use the base64 method to convert different types of vehicles in the Ethernet signal into byte streams, and serialize them in the SDK provided by the SOA service; use URL as the unified atomic capability call format, and pass the base64-processed signal data in URL format.

[0024] Optionally, the acquiring the vehicle state at the corresponding position in the target scene mode and automatically adjusting the scene mode according to the change of the vehicle state includes:

[0025] Establish a signal change monitoring task and add the signal change monitoring task to the thread pool for multi-threaded processing to monitor the signal changes of the Ethernet signal;

[0026] Set the signal real-time reporting flag. When a signal change is detected, report the execution result of the signal change monitoring task to the SOA service through cross-process communication.

[0027] The callback SOA service monitors the latest vehicle status when the signal changes, and adjusts the scene mode based on the vehicle status after the signal changes.

[0028] Further, the setting of the signal real-time reporting flag includes: controlling the real-time reporting of signal changes by setting a reporting / cancelling registration attribute;

[0029] When the attribute is reporting registration status, reporting signal changes in real time;

[0030] When the attribute is in the deregistration state, no signal change is reported.

[0031] Furthermore, the latest vehicle status when the callback SOA service detects a signal change includes:

[0032] The location information carried in the message list is used as the judgment condition for the scenario requirements. When the SOA service detects a signal change, the vehicle status at the corresponding location is obtained according to the Ethernet protocol sequence, and the vehicle status is converted into an enumeration type in the JAVA code;

[0033] When transmitting signal data, the atomic capability corresponding to the signal data is called to convert the vehicle state into a JAVA boolean type, and return true or false information according to the vehicle state.

[0034] In a second aspect, the present application provides a vehicle state acquisition device based on a complex scenario, the device comprising:

[0035] An acquisition module is used to receive an API service call request defined based on scenario requirements, and obtain a URL corresponding to the API service call request and a message list carrying location information;

[0036] The parsing module is used to call SOA services, generate Ethernet signals based on the atomic capabilities corresponding to the URL, and parse the data transmitted by the URL;

[0037] The matching module is used to combine multiple atomic capabilities according to the data transmitted by the URL, match them with the pre-established custom scenarios, and obtain the target scenario mode that matches the scenario requirements;

[0038] The automatic adjustment module is used to obtain the vehicle status of the corresponding position in the target scene mode based on the location information carried by the message list, and automatically adjust the scene mode according to the change of the vehicle status.

[0039] In a third aspect, the present application provides a vehicle, including a vehicle body, and a vehicle status acquisition device based on complex scenarios as described in the second aspect, which is arranged in the vehicle body.

[0040] The beneficial effects of the present invention are embodied in:

[0041] The above-mentioned method, device and vehicle for obtaining vehicle status based on complex scenarios receive an API service call request defined based on scenario requirements, obtain the URL corresponding to the API service call request and a message list carrying location information; call the SOA service, generate an Ethernet signal based on the atomic capabilities corresponding to the URL, and parse the data transmitted by the URL; combine multiple atomic capabilities according to the data transmitted by the URL, match them with the pre-established custom scenario, and obtain the target scenario mode that matches the scenario requirements; obtain the vehicle status at the corresponding position in the target scenario mode based on the location information carried by the message list, and automatically adjust the scenario mode according to the change of the vehicle status. Among them, atomic capabilities, as an interface, can be defined in combination with various vehicle information and network information provided by network interface signals, sensor signals and central control domain instructions, and the number is as many as hundreds. And the vehicle information status can be obtained in real time, and free switching between multiple scenario modes can be realized according to different states.

[0042] In addition, the present invention takes vehicle capabilities as the starting point, focuses on customizing complex scenarios, and completes custom scenarios in complex scenario modes by presetting various conditions based on existing atomic capabilities. The atomic capability interfaces of different links are integrated into the same format through URLs, and the status can be obtained and set by simply passing different URLs.

[0043] The above solution can control various hardware devices of the vehicle in various scenarios and handle more complex scenarios to provide a more detailed and intelligent experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.

[0045] Figure 1 A flow chart of a method for obtaining vehicle status based on complex scenarios provided by the present invention;

[0046] Figure 2 A schematic diagram of the structure of a vehicle status acquisition device based on complex scenarios provided by the present invention;

[0047] Figure 3 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0049] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, and unless the context clearly indicates other meanings, "multiple" generally includes at least two.

[0050] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0051] It should be understood that, although the terms first, second, third, etc. may be used to describe in the embodiments of the present application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0052] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0053] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.

[0054] It should be particularly noted that any symbols and / or numbers in the specification that are not marked in the accompanying drawings are not drawing marks.

[0055] The embodiments of the present application provide a method, device and vehicle for obtaining vehicle status based on complex scenarios, which are mainly used in vehicle-mounted equipment. The method can be applied to a terminal, a server, or a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc.

[0056] The embodiments of the present application are directed to the defects of the existing solutions, which only preset some relatively simple scenes and do not support customized combinations of scene modes such as opening wipers and closing windows on rainy days, opening windows for smoking, etc. In this solution, various atomic capabilities are called in a simple way, and conditions can be arbitrarily combined. For example, if the outside temperature is 25 and the PM2.5 concentration is low, the windows can be opened for ventilation, etc. Since the scene modes are not just preset in the present invention, the settings of customized scenes can be changed through the feature information of the object; for example, the vehicle account is logged in. This avoids the problem of inconsistent requirements for multiple objects in different scenes.

[0057] The vehicle status acquisition method in complex scenarios provided by the embodiment of the present application can obtain the ability to report vehicle information in real time, and automatically adjust different scene modes according to different states in multiple custom scenes of an object, thereby improving driving safety.

[0058] Reference Figure 1 , an embodiment of the present invention provides a method for obtaining vehicle status based on complex scenarios, the method comprising:

[0059] S101 receives an API service call request defined based on scenario requirements, and obtains a URL corresponding to the API service call request and a message list carrying location information;

[0060] S102 calls the SOA service, generates Ethernet signals based on the atomic capabilities corresponding to the URL, and parses and obtains the data transmitted by the URL;

[0061] S103 combines multiple atomic capabilities according to the data transmitted by the URL, matches them with the pre-established custom scene, and obtains a target scene mode that matches the scene requirements;

[0062] S104, based on the location information carried in the message list, obtaining the vehicle status of the corresponding location in the target scene mode, and automatically adjusting the scene mode according to the change of the vehicle status;

[0063] The pre-established custom scenario includes multiple links, each link includes multiple atomic capabilities and scenario modes, and the atomic capabilities of different links are combined into the same format through URLs;

[0064] Each of the multiple scenario modes includes multiple atomic capabilities in different combinations; a parameter mapping method is used between the atomic capabilities so that the previous atomic capability becomes the basis for URL resolution corresponding to the next atomic capability.

[0065] In the above embodiments, atomic capabilities mainly refer to applications in the field of smart cars. In the Internet of Vehicles, atomic capabilities break down complex inter-vehicle communications into small, independent basic units, and implement data transmission and information sharing through APIs, connecting vehicles to vehicles, vehicles to pedestrians, vehicles to roads, vehicles to infrastructure (signal lights, etc.), vehicles to networks, and vehicles to the cloud, collectively referred to as V2X (X stands for everything).

[0066] The atomic capabilities in the smart cockpit provide passengers with personalized experiences and convenient functions such as seat adjustment, entertainment and human-computer interaction, bringing new scenarios and experiences to passengers' travel.

[0067] In terms of safety and reliability, atomic capabilities are used to monitor vehicle status and implement system fault handling to ensure the safe and stable operation of smart cars.

[0068] In one embodiment, after executing step S101 to receive an API service call request defined based on scenario requirements, it also includes: establishing a thread pool that is started synchronously with the API service, adding a first thread corresponding to the API service call request to the thread pool, and parsing the URL of the API service call request in the first thread, obtaining the atomic capability corresponding to the URL, executing subsequent processes in the SOA process, and adding it to the second thread.

[0069] The API service call request in step S101 of the above embodiment includes: multiple API service call requests sent from multiple service request ends, or multiple API service call requests sent by one service request end.

[0070] In the above embodiment, the implementation principle of the API service includes the following parts:

[0071] The first part is to establish a connection with the SOA service;

[0072] Through the jar package provided by the SOA service, a connection is established with the SOA service, and through the cross-process communication of the Android system, the signal changes received by the SOA service are called back.

[0073] The second part is the implementation logic of the API service itself;

[0074] During the initialization process of the API service, all interfaces are registered, the URL is parsed, and the characteristics of Java reflection are used to correspond the information transmitted by the URL to the internally implemented interface, and the call is made from the interface to the SOA.

[0075] The third part is the SDK provided for upper-level scene mode applications;

[0076] To ensure the convenience and efficiency of implementation, the SDK only provides three necessary methods. The first is the initialization method of this service, which must be executed to ensure the normal use of the function. The second is the request method for setting and obtaining methods through URL calls. The third is the registration and unregistration method for real-time information reporting. Since the cache value is obtained through invoke, the state change cannot be known in real time. However, by registering and reporting, the new state can be received when the signal value changes, and the new scene can be adjusted.

[0077] Because the API service has been simplified, in the scene mode application, you only need to call the interface according to the required situation, customize the complex scene, and make adjustments under this scene.

[0078] Taking the door lock function as an example, when subscribing to the door lock notification, you can call the register to pass in the URL of the door lock, and you will receive a notification when the car is locked. In this notification, you can add some scenario judgments, such as obtaining the child lock status, calling the request to pass in the corresponding URL and the message list containing the location information, and then matching the corresponding method and parameters from the service, obtaining the corresponding latest status from the SOA service, and then transmitting it back to the APP in the form of a message list. At this time, you can obtain the status of the corresponding location in the order of the protocol; if the child lock is in a locked state, you can open the car lock and turn on the hazard warning lights to remind the user.

[0079] In actual use, there may be longer and more complex scenarios; for example, before the car door is locked, there is a judgment on the occupancy of the seats. If all the seats are not occupied for a certain period of time, the car can be automatically locked and subsequent operations can be performed.

[0080] Optionally, in addition to this, the API service also provides two very important functions. The first is signal sampling. Since the transmission of signals on Ethernet is often massive, these data may be too precise or sent repeatedly. At this time, the API service can reduce the frequency of notifications through a sampling algorithm. For example, the vehicle sensor signal has a period of 10ms. Since its accuracy is more than 8 decimal places, the data is changing all the time. These changes are too detailed for the judgment of scene modes and are invalid information. After sampling, its accuracy can be reduced to two decimal places, and invalid data with too high precision can be filtered out, so that the frequency of transmission can be reduced to achieve the purpose of reducing occupancy and filtering invalid information. Our sampling algorithm uses non-uniform sampling to prevent the loss of key information in the uniform sampling process.

[0081] The second is that the API service has designed a thread pool for multiple apps or the same app calling multiple interfaces. The interface call after URI resolution will be passed to the thread pool through the post method of Android's handler and the do-action method will be executed to ensure that multiple methods run at the same time, avoiding the problem that all methods are called through the main thread and the waiting time is too long due to JNI.

[0082] In step S102 of the above embodiment, calling the SOA service and generating Ethernet signals based on the atomic capabilities corresponding to the URLs include:

[0083] During the initialization phase, the API server establishes a subscription to the SOA service based on the signal data provided by the SOA service;

[0084] Call an SOA service to connect to Ethernet. The SOA service reads the signal data in the link through the Ethernet protocol and converts the read signal data into Ethernet frames, so that all atomic capabilities correspond to a signal data on Ethernet, and generates Ethernet signals for the atomic capabilities.

[0085] Establishing communication between the Ethernet and the functional hardware corresponding to the atomic capability, sending the Ethernet signal to the corresponding functional hardware, and checking whether there is data corruption in the process of transmitting the Ethernet signal to the functional hardware corresponding to the atomic capability based on the cyclic redundancy CRC check of the Ethernet frame;

[0086] Wherein, the Ethernet frame includes a frame header, a data payload and padding bytes;

[0087] The signal data includes whether the functional hardware has atomic capability enabled;

[0088] The data corruption conditions include: single bit errors, double bit errors, and longer burst errors.

[0089] In step S102 of the above embodiment, the data transmitted by the URL obtained by parsing includes:

[0090] Get the Ethernet signal received by the functional hardware, use the base64 method to convert different types of vehicles in the Ethernet signal into byte streams, and serialize them in the SDK provided by the SOA service; use URL as the unified atomic capability call format, and pass the base64-processed signal data in URL format.

[0091] In step S104 of the above embodiment, obtaining the vehicle state at the corresponding position in the target scene mode and automatically adjusting the scene mode according to the change of the vehicle state includes:

[0092] Establish a signal change monitoring task and add the signal change monitoring task to the thread pool for multi-threaded processing to monitor the signal changes of the Ethernet signal;

[0093] The signal real-time reporting flag is set. When a signal change is detected, the execution result of the signal change monitoring task is reported to the SOA service through cross-process communication.

[0094] The callback SOA service monitors the latest vehicle status when the signal changes, and adjusts the scene mode based on the vehicle status after the signal changes.

[0095] In the above embodiment, setting the signal real-time reporting flag includes: setting the reporting / cancelling registration attribute to control the real-time reporting when the signal changes;

[0096] When the attribute is reporting registration status, reporting signal changes in real time;

[0097] When the attribute is in the deregistration state, no signal change is reported.

[0098] In the above embodiment, the latest vehicle status when the callback SOA service detects a signal change includes:

[0099] The location information carried in the message list is used as the judgment condition for the scenario requirements. When the SOA service detects a signal change, the vehicle status at the corresponding location is obtained according to the Ethernet protocol sequence, and the vehicle status is converted into an enumeration type in the JAVA code;

[0100] When transmitting signal data, the atomic capability corresponding to the signal data is called to convert the vehicle state into a JAVA boolean type, and return true or false information according to the vehicle state.

[0101] Optionally, automatically adjusting the scene mode according to the change of the vehicle state includes:

[0102] Call atomic capabilities based on the actual vehicle status after the change and adjust them in each scenario mode;

[0103] Obtain each vehicle performance index corresponding to each atomic capability, and obtain the input index value and output index value of each vehicle performance index corresponding to each atomic capability by calculation;

[0104] The input index value and the output index value corresponding to the atomic capability are input into an atomic capability evaluation model established based on data envelopment analysis (DEA) to obtain the atomic capability signal value corresponding to each atomic capability.

[0105] Optionally, a specific embodiment is provided based on the above content.

[0106] The APP is transmitted to the car API service through the URL. This service calls another SOA service to connect to Ethernet, sends and receives signals on Ethernet, and the functional hardware corresponding to the relevant atomic capabilities receives the corresponding signals, completing the call of the entire link.

[0107] During this process, when a function, such as air conditioning temperature, is adjusted, the result of the successful adjustment will be fed back and the current air conditioning temperature will be received so that more adjustments can be made.

[0108] In the car, the physical hardware communicates with the central control system via Ethernet. Therefore, all available atomic capabilities can correspond to a signal on Ethernet. If the central control system can receive the signal from the hardware, it means that the hardware status can be received. If it can be sent to the hardware, it can be adjusted from the central control system. This service in the central control system is called SOA (Service-Oriented Architecture), which is responsible for the transmission and reception of signals and the caching of signal values.

[0109] The core service in this solution is the automotive API service, which is responsible for integrating the atomic capabilities that SOA can provide. Since SOA receives signals, it is transmitted in a more concise hexadecimal form, which actually represents binary numbers. For example, the first two digits of 1A3F represent the binary number 00011010, and each 01 may represent a single function or a combination of several digits to represent a certain function.

[0110] For example, in the air conditioner switch function, the state of the air conditioner is represented by 0 off and 1 on. After the SOA service receives the signal and parses the actual state using a predefined protocol, it converts the state into an enumeration type in the JAVA code to represent the switch state.

[0111] The API service then establishes a subscription relationship with the SOA service internally, calls the interface of the corresponding signal data, and converts it into JAVA's boolean type. In this way, when calling the interface to check whether the air conditioner is turned on, true or false can be returned based on the actual status.

[0112] Since there is a large amount of vehicle information on the Ethernet signal, in order to ensure the security of the transmitted information, Ethernet also uses the CRC (Cyclic Redundancy Check) method to check whether the data is erroneous during transmission. CRC is a verification method based on polynomial calculation, which can detect a variety of data corruption situations, including single-bit errors, double-bit errors, and longer burst errors. The CRC check of the Ethernet frame covers the entire data packet, including the frame header, data payload, and possible padding bytes. This method ensures the accuracy of the SOA delivered to the service, and ensures that the data is not tampered with when executing the setting interface.

[0113] The API service also provides a standard and unified calling form, namely URL, for many complex interfaces. Its form is similar to val: / / Vehicle / static / ADAS / getPdcInfo. You only need to find the corresponding function according to the provided standard protocol to replace the last ADAS / getPdcInfo path.

[0114] Considering that the return of many interfaces may be of different types, for example, the function of setting temperature in the air conditioner, the parameter transmitted should be a float type of data. In the setting of the atmosphere light, a list containing color, mode, and brightness must be transmitted. Obviously, there are obvious differences between these two sets of data. If you want to pass parameters through the same interface, you must solve their differences. In this solution, we use the base64 encoding method, which is mainly considered the universality of base64 and does not rely on the characteristics of the language. In this way, the data obtained from the C++ code part in the NDK can be directly returned through AndroidAidl; although the serialization method Serializable in Java can also achieve a similar purpose, it needs to go through JNI once more. In order to avoid excessive occupancy, the base64 method is used to convert different types of objects into byte streams, and deserialize them in the SDK provided by the service to ensure that the data parsing is completed in the service.

[0115] Therefore, the final effect is to store all the input parameters in an ArrayList, and use it together with the URL as the request input parameter, and you can get an ArrayList return. The reason for using ArrayList as the return is the same as the above input parameter. You only need to follow the provided standard protocol to know the actual returned data type and take out the parameters for use. If there are multiple returns, just take them out in order.

[0116] For the method steps disclosed in the above embodiments, the method steps are described as a series of action combinations for the purpose of simple description, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0117] Based on the same inventive concept, the embodiment of the present application also provides a vehicle state acquisition device based on complex scenarios for implementing the above-mentioned vehicle state acquisition device method based on complex scenarios. The implementation solution to the problem provided by the device is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the vehicle state acquisition device based on complex scenarios provided below can be found in the above limitations on the above-mentioned vehicle state acquisition method based on complex scenarios, and will not be repeated here. It can be understood that the above description of its method is also applicable to the description of the device.

[0118] In one embodiment, a vehicle state acquisition device based on complex scenarios is also provided. The embodiments of the present invention are described below in conjunction with the accompanying drawings. Figure 2 As shown, the device specifically includes:

[0119] The acquisition module 210 is used to receive an API service call request defined based on scenario requirements, and obtain a URL corresponding to the API service call request and a message list carrying location information;

[0120] The parsing module 220 is used to call the SOA service, generate Ethernet signals based on the atomic capabilities corresponding to the URL, and parse and obtain the data transmitted by the URL;

[0121] The matching module 230 is used to combine multiple atomic capabilities according to the data transmitted by the URL, match them with the pre-established custom scene, and obtain a target scene mode that matches the scene requirements;

[0122] The automatic adjustment module 240 is used to obtain the vehicle status of the corresponding position in the target scene mode based on the position information carried in the message list, and automatically adjust the scene mode according to the change of the vehicle status.

[0123] Optionally, the device also includes: a setting module for receiving an API service call request defined based on scenario requirements, and then also includes: establishing a thread pool that is started synchronously with the API service, adding a first thread corresponding to the API service call request to the thread pool, and parsing the URL of the API service call request in the first thread, obtaining the atomic capability corresponding to the URL, executing subsequent processes in the SOA process, and adding it to the second thread.

[0124] It is worth noting that although only some basic functional modules are disclosed in the embodiment of the present invention, it does not mean that the composition of the present system is limited to the above basic functional modules. On the contrary, what the present embodiment wants to express is that on the basis of the above basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. In other words, the present device is open rather than closed. Just because the present embodiment only discloses individual basic functional modules, it cannot be considered that the protection scope of the claims of the present invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above device is described by dividing it into various units and modules according to their functions. Of course, when implementing the present invention, the functions of each unit and module can be implemented in the same or one or more software and / or hardware.

[0125] like Figure 3As shown, the present invention also provides an electronic device, including: a processor, a communication atomic capability interface, a memory and a communication bus, wherein the processor, the communication atomic capability interface and the memory communicate with each other through the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the vehicle status acquisition method based on a complex scenario.

[0126] Figure 3 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 3 The electronic device provided in the embodiment of the present invention includes: one or more processors 310 and a storage device 320; the processor 310 in the electronic device may be one or more, Figure 3 A processor 310 is taken as an example; the storage device 320 is used to store one or more programs; the one or more programs are executed by the one or more processors 310, so that the one or more processors 310 implement the vehicle status acquisition method based on complex scenarios as described in any one of the embodiments of the present invention.

[0127] The electronic device may further include: an input device 330 and an output device 340 .

[0128] The processor 310, storage device 320, input device 330 and output device 340 in the electronic device can be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0129] The storage device 320 in the electronic device is a computer-readable storage medium that can be used to store one or more programs, which can be software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the vehicle status acquisition method based on complex scenarios provided in the embodiments of the present invention. The processor 310 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the storage device 320, that is, the vehicle status acquisition method based on complex scenarios in the above method embodiments is implemented.

[0130] The storage device 320 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the storage device 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0131] The input device 330 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 340 may include a display device such as a display screen.

[0132] The present invention also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a vehicle status acquisition method based on complex scenarios.

[0133] Specifically, the computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0134] The present invention also provides a vehicle, which is provided with a vehicle body, and the vehicle state acquisition device based on complex scenarios as described above is arranged in the vehicle body.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A vehicle status acquisition method based on complex scenarios, characterized in that: The method comprises: Receive an API service call request defined based on scenario requirements, and obtain a URL corresponding to the API service call request and a message list carrying location information; Call SOA service, generate Ethernet signal based on atomic capability corresponding to URL, and parse to obtain data transmitted by URL; According to the data transmitted by the URL, multiple atomic capabilities are combined and matched with the pre-established custom scenarios to obtain the target scenario mode that matches the scenario requirements; Based on the location information carried in the message list, the vehicle status at the corresponding location in the target scene mode is obtained, and the scene mode is automatically adjusted according to the change of the vehicle status; The pre-established custom scenario includes multiple links, each link includes multiple atomic capabilities and scenario modes, and the atomic capabilities of different links are combined into the same format through URLs; Each of the multiple scenario modes includes multiple atomic capabilities in different combinations; a parameter mapping method is used between the atomic capabilities so that the previous atomic capability becomes the basis for URL resolution corresponding to the next atomic capability.

2. The method according to claim 1, characterized in that: After receiving the API service call request defined based on scenario requirements, the method also includes: establishing a thread pool that is started synchronously with the API service, adding a first thread corresponding to the API service call request to the thread pool, and parsing the URL of the API service call request in the first thread, obtaining the atomic capability corresponding to the URL, executing subsequent processes in the SOA process, and adding it to the second thread.

3. The method according to claim 2, characterized in that The API service call request includes: multiple API service call requests sent from multiple service request ends, or multiple API service call requests sent by one service request end.

4. The method according to claim 1, characterized in that: The calling of SOA service and generating Ethernet signal based on atomic capability corresponding to URL one by one includes: During the initialization phase, the API server establishes a subscription to the SOA service based on the signal data provided by the SOA service; Call an SOA service to connect to Ethernet. The SOA service reads the signal data in the link through the Ethernet protocol and converts the read signal data into Ethernet frames, so that all atomic capabilities correspond to a signal data on Ethernet, and generates Ethernet signals for the atomic capabilities. Establish communication between the Ethernet and the functional hardware corresponding to the atomic capability, send the Ethernet signal to the corresponding functional hardware, and check whether there is data corruption in the process of transmitting the Ethernet signal to the functional hardware corresponding to the atomic capability based on the cyclic redundancy CRC check of the Ethernet frame; Wherein, the Ethernet frame includes a frame header, a data payload and padding bytes; The signal data includes whether the functional hardware has atomic capability enabled; The data corruption conditions include: single bit errors, double bit errors, and longer burst errors.

5. The method according to claim 4, characterized in that The data transmitted by the URL obtained by parsing includes: Get the Ethernet signal received by the functional hardware, use the base64 method to convert different types of vehicles in the Ethernet signal into byte streams, and serialize them in the SDK provided by the SOA service; use URL as the unified atomic capability call format, and pass the base64-processed signal data in URL format.

6. The method according to claim 1, characterized in that The obtaining of the vehicle state at the corresponding position in the target scene mode and automatically adjusting the scene mode according to the change of the vehicle state comprises: Establish a signal change monitoring task and add the signal change monitoring task to the thread pool for multi-threaded processing to monitor the signal changes of the Ethernet signal; Set the signal real-time reporting flag. When a signal change is detected, report the execution result of the signal change monitoring task to the SOA service through cross-process communication. The callback SOA service monitors the latest vehicle status when the signal changes, and adjusts the scene mode based on the vehicle status after the signal changes.

7. The method according to claim 6, characterized in that The setting of the signal real-time reporting flag includes: controlling the real-time reporting of signal changes by setting the reporting / cancelling registration attribute; When the attribute is reporting registration status, reporting signal changes in real time; When the attribute is in the deregistration state, no signal change is reported.

8. The method according to claim 6, characterized in that The latest vehicle status when the callback SOA service detects a signal change includes: The location information carried in the message list is used as the judgment condition for the scenario requirements. When the SOA service detects a signal change, the vehicle status at the corresponding location is obtained according to the Ethernet protocol sequence, and the vehicle status is converted into an enumeration type in the JAVA code; When transmitting signal data, the atomic capability corresponding to the signal data is called to convert the vehicle state into a JAVA boolean type, and return true or false information according to the vehicle state.

9. A vehicle status acquisition device based on complex scenarios, characterized in that: The device comprises: An acquisition module is used to receive an API service call request defined based on scenario requirements, and obtain a URL corresponding to the API service call request and a message list carrying location information; The parsing module is used to call SOA services, generate Ethernet signals based on the atomic capabilities corresponding to the URL, and parse the data transmitted by the URL; The matching module is used to combine multiple atomic capabilities according to the data transmitted by the URL, match them with the pre-established custom scenarios, and obtain the target scenario mode that matches the scenario requirements; The automatic adjustment module is used to obtain the vehicle status of the corresponding position in the target scene mode based on the location information carried by the message list, and automatically adjust the scene mode according to the change of the vehicle status.

10. A vehicle, characterized in that: It comprises a vehicle body, and a vehicle state acquisition device based on complex scenarios as claimed in claim 9, which is arranged in the vehicle body.