Data access method, vehicle and computer readable storage medium
By setting up a unified database in the vehicle to manage sensor data and using access path information for data access, the problem of redundant development caused by different hardware platforms is solved, and the R&D efficiency and vehicle control speed are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-06-19
AI Technical Summary
Different hardware platforms require different data descriptions, data formats, and data access paths for the same data, which leads to repeated development and code refactoring and compilation of vehicle applications, resulting in low R&D efficiency.
A unified database is used to store vehicle sensor output data, and data nodes can be accessed directly using access path information, thereby achieving centralized data management and a unified format, avoiding redundant development and code refactoring.
It improved the development efficiency of vehicle applications, reduced communication bus bandwidth usage, increased data query and vehicle control speed, and enhanced user experience.
Smart Images

Figure CN122240683A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic digital data processing technology, specifically to a data access method, a vehicle, and a computer-readable storage medium. Background Technology
[0002] Various applications (Apps) with different functions can be installed in a vehicle. These applications may need to access data collected by vehicle sensors to control the vehicle. For example, for an application that controls the opening and closing of a car door, the sensor that detects the door opening angle is an angle sensor. The application needs to control the door opening based on the door opening angle output by the angle sensor. In order for the vehicle's applications to access the data output by the vehicle's sensors and / or actuators, technicians need to configure the application with the aforementioned functions.
[0003] However, for the same data, different hardware platforms, such as different vehicle models and / or Electronic Control Units (ECUs), have different data descriptions, data formats, and data access paths. Therefore, it is necessary to repeatedly develop and recompile the code for the aforementioned functions for different hardware platforms. The code size of the aforementioned functions is becoming increasingly large, and the R&D efficiency is low. Summary of the Invention
[0004] This application provides a data access method, a vehicle, and a computer-readable storage medium, which enables applications in the vehicle to avoid repeated development and code refactoring for different hardware platforms, thereby improving R&D efficiency.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions: Firstly, a data access method is provided, which is applied to a vehicle. The method includes: acquiring a data access instruction; wherein the data access instruction carries access path information; determining a target data node corresponding to the access path information in a target database; wherein the target database includes multiple data nodes, each data node includes identification information and data content, the data content including data collected by sensors in the vehicle; and performing a target access operation on the target data node.
[0006] In this embodiment, a database is set up to store vehicle sensor output data. When it is necessary to access sensor output data, the data node containing the sensor output data can be directly found in the database using access path information, and the access operation can be performed on that data node. This allows for unified and centralized management of data collected by sensors in the vehicle. For example, the database has a unified data description and data format, and data access commands can carry unified access path information for the same data. This eliminates the need for repeated development and code refactoring for different hardware platforms in vehicle applications, improving development efficiency.
[0007] In conjunction with the first aspect, in one possible design approach, the data access instruction is a data acquisition instruction that performs a target access operation on the target data node, including: acquiring the target data content of the target data node; and feeding back the target data content to the application program installed on the vehicle.
[0008] If multiple applications in a vehicle require data collected by the same sensor, each application needs to send a data acquisition command to the vehicle. In response to the data acquisition command, the vehicle will transmit the sensor-collected data multiple times on the communication bus, consuming communication bus bandwidth. However, in this application, the database only transmits the sensor-collected data once on the communication bus when storing only one piece of data output by the sensor. Therefore, since the sensor-collected data is already stored in the database, regardless of the number of data acquisition commands, data can be obtained only through the database without additional consumption of communication bus bandwidth.
[0009] In conjunction with the first aspect, in one possible design approach, the data access instruction is a data setting instruction, which also carries the expected data content; performing a target access operation on the target data node includes: adding the expected data content to the target data node; wherein, the target data node includes the data currently collected by the sensor.
[0010] In this embodiment, the target data content and the expected data content are stored in the same data node to improve the speed of vehicle data query.
[0011] In conjunction with the first aspect, in one possible design approach, the method further includes: acquiring target data content and expected data content in the target data node; wherein the target data content includes the data currently collected by the sensor; determining control instructions based on the target data content and expected data content; sending control instructions to the target actuator; wherein the control instructions are used to control the target actuator so that the measured data content collected by the sensor conforms to the expected data content; and, if the measured data content collected by the sensor conforms to the expected data content, changing the target data content in the target data node to the measured data content collected by the sensor.
[0012] In this application, storing the target data content and the expected data content in the same data node can improve the speed of vehicle data query. With a shorter data query time, the overall speed of change of operating parameters is improved, thereby improving the vehicle control speed and enhancing the user experience.
[0013] In conjunction with the first aspect, in one possible design approach, the data access instruction is a data update instruction; performing a target access operation on the target data node includes: updating the target data content in the target data node when a change is detected in the data collected by the sensor.
[0014] In this application, the target data content and expected data content are stored in the same data node, which improves the speed of vehicle data query. With a shorter data query time, the overall speed of change of operating parameters is improved, thereby improving the vehicle control speed and enhancing the user experience.
[0015] In conjunction with the first aspect, in one possible design approach, the data access instruction is a data subscription instruction; performing a target access operation on the target data node includes: notifying the application of update information when the target data content in the target data node changes; wherein the update information is used to characterize the change in the target data content.
[0016] If multiple applications in a vehicle subscribe to changes in data collected by the same sensor, each application needs to send a data subscription command to the vehicle separately. In response to the data subscription command, the vehicle will transmit the sensor-collected data multiple times on the communication bus, consuming communication bus bandwidth. However, in this application, the database only transmits the updated sensor data once on the communication bus when storing only one piece of data output by the sensor. Therefore, since the sensor-collected data is already stored in the database, regardless of the number of data subscription commands, data can be subscribed to through the database without consuming additional communication bus bandwidth.
[0017] In conjunction with the first aspect, in one possible design approach, the target database includes multiple data nodes and a tree-like relationship between the multiple data nodes; the access path information includes the relationship between the identification information of the root data node and the identification information of the target data node.
[0018] In conjunction with the first aspect, in one possible design approach, determining the target data node corresponding to the access path information includes: traversing each root data node in the target database based on the identification information of the root data node to determine the target root data node; and traversing each sub-data node corresponding to the target root data node based on the identification information of the target data node to determine the target root data node from each sub-data node.
[0019] Secondly, embodiments of this application provide a vehicle, including: a vehicle-mounted unit; and a memory for storing executable instructions of the vehicle-mounted unit, wherein the vehicle-mounted unit is used to execute the data access method described in the first aspect.
[0020] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program for performing the data access method described in the first aspect.
[0021] Fourthly, embodiments of this application provide a computer program product, which includes a computer program. When the computer program is executed by the processor of a computer device, it enables the computer device to perform the data access method described in the first aspect.
[0022] The technical effects of any of the design methods in the second to fourth aspects can be found in the technical effects of different design methods in the first aspect, and will not be repeated here. Attached Figure Description
[0023] Figure 1 The diagram illustrates an application scenario where a door control application in a vehicle acquires data, as provided in an exemplary embodiment of this application.
[0024] Figure 2 The diagram shown is an application scenario illustration of the data access method provided by an exemplary embodiment of this application.
[0025] Figure 3 The diagram shown is a flowchart illustrating a data access method provided in an exemplary embodiment of this application.
[0026] Figure 4 The diagram shown is a schematic representation of the relationship between some data nodes, provided by an exemplary embodiment of this application.
[0027] Figure 5 The diagram shown is a structural schematic of a data access device provided in an exemplary embodiment of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] Application Overview As mentioned in the background technology above, for the same type of data, different hardware platforms, such as different car models and / or electronic control units, correspond to different data descriptions, data formats, and data access paths. Therefore, it is necessary to repeatedly develop and recompile the code for the aforementioned functions for different hardware platforms. The code size of the aforementioned functions is becoming increasingly large, and the R&D efficiency is low.
[0030] For example, Figure 1 The diagram illustrates an application scenario where a vehicle door control application acquires data, as provided in an exemplary embodiment of this application. Figure 1 As shown, vehicle 100A includes vehicle infotainment system 101A, electronic control unit 102A, angle sensor 103A, and electric strut 104A; vehicle 100B includes vehicle infotainment system 101B, electronic control unit 102B, angle sensor 103B, and electric strut 104B.
[0031] The electronic control unit 102A can acquire data output by the angle sensor 103A via the communication bus and feed the acquired data back to the door control application. Based on the acquired door opening angle information and the expected opening angle information, the application generates a control command, which is then sent by the electronic control unit 102A to the electric strut 104A via the communication bus.
[0032] Among them, the angle sensor 103A can upload a data packet containing door opening angle information and communication identifier 1 to the communication bus. Then, the door control application sends a data access command to the electronic control unit 102A. The data access command carries the communication identifier 1. The electronic control unit 102A obtains the data packet with the communication identifier 1 from the communication bus and feeds it back to the door control application.
[0033] The electronic control unit 102B can acquire data output by the angle sensor 103B via the communication bus and feed the acquired data back to the door control application. Based on the acquired door opening angle information and the expected opening angle information, the application generates a control command, which is then sent by the electronic control unit 102B to the electric strut 104B via the communication bus.
[0034] Among them, the angle sensor 103B can upload a data packet containing door opening angle information and communication identifier 1 to the communication bus. Then, the door control application sends a data access command to the electronic control unit 102B. The data access command carries communication identifier 2. The electronic control unit 102B obtains the data packet with communication identifier 2 from the communication bus and feeds it back to the door control application.
[0035] Among them, the Controller Area Network Identifier (CANID) is a key field in the Controller Area Network bus protocol used to uniquely identify message frames.
[0036] As described above, if vehicle 100A and vehicle 100B are not the same model, the door control application needs to access different communication identifiers corresponding to the door opening angle data. Therefore, for the same data, different communication identifiers need to be set on different vehicle models. If there are more vehicle types, a lot of repetitive development and code refactoring and compilation are required, the code size becomes increasingly large, and the R&D efficiency is low.
[0037] To address the aforementioned technical problems, embodiments of this application provide a data access method, which includes: acquiring a data access instruction carrying access path information; then, determining a target data node corresponding to the access path information in a target database, the target database including multiple data nodes, each data node including identification information and data content, the data content including data collected by sensors in a vehicle; and then, performing a target access operation on the target data node.
[0038] In this embodiment, a database is set up to store vehicle sensor output data. When it is necessary to access sensor output data, the data node containing the sensor output data can be directly found in the database using access path information, and the access operation can be performed on that data node. This allows for unified and centralized management of data collected by sensors in the vehicle. For example, the database has a unified data description and data format, and data access commands can carry unified access path information for the same data. This eliminates the need for repeated development and code refactoring for different hardware platforms in vehicle applications, improving development efficiency.
[0039] Exemplary scenario The data access method provided in this application can be applied to various vehicles. Vehicles include various types of vehicles, such as sedans, SUVs, buses, and trucks. This application does not impose any special limitations on the specific form of the vehicle.
[0040] The following is an example illustration of an application scenario for a data access method. For example, Figure 2 The diagram illustrates an application scenario of the data access method provided in an exemplary embodiment of this application. Figure 2As shown, vehicle 100A includes vehicle infotainment system 101A, electronic control unit 102A, angle sensor 103A, electric strut 104A, and preset data path; vehicle 100B includes vehicle infotainment system 101B, electronic control unit 102B, angle sensor 103B, electric strut 104B, and target database.
[0041] The electronic control unit 102A can acquire data output by the angle sensor 103A via the communication bus and store the acquired data in a data node in the target database. Thus, when the vehicle infotainment system 101A receives a data access command, this command carries access path information 1. In the target database, the system determines the target data node corresponding to access path information 1. This target database includes multiple data nodes, each containing identification information and data content, including data collected by sensors in the vehicle. Then, the vehicle infotainment system 101A performs a target access operation on the target data node.
[0042] Similarly, the electronic control unit 102B can acquire data output by the angle sensor 103B via the communication bus and store the acquired data in a data node in the target database. Thus, when the vehicle infotainment system 101B receives a data access command, this command carries access path information 1. In the target database, the system determines the target data node corresponding to access path information 1. This target database includes multiple data nodes, each containing identification information and data content, including data collected by sensors in the vehicle. Then, the vehicle infotainment system 101B performs a target access operation on the target data node.
[0043] As described above, even though vehicle infotainment systems 101A and 101B are not from the same vehicle model, by setting up a database to store the output data of the vehicle's sensors, when access to sensor output data is needed, a unified access path information (such as access path information 1 mentioned above) can be used to directly find the data node containing the sensor output data from the database and perform access operations on that data node. This allows for unified and centralized management of the data collected by the sensors in the vehicle. For example, the database has a unified data description and data format, and for the same data, data access commands can carry unified access path information. This eliminates the need for repeated development and code refactoring for different hardware platforms in the vehicle's applications, improving development efficiency.
[0044] It should be understood that the above application scenario examples are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited thereto. Rather, the embodiments of this application can be applied to any applicable scenario.
[0045] Exemplary methods Figure 3 The diagram shown is a flowchart illustrating a data access method provided in an exemplary embodiment of this application. Figure 3 The method can be performed by a vehicle, such as Figure 2 Vehicle 100A or Vehicle 100B shall execute this. For example... Figure 3 As shown, the data access method may include the following steps: 310: Obtain data access instructions; wherein, the data access instructions carry access path information.
[0046] It's understandable that various functional applications can be installed on a vehicle. Examples include door control applications and window control applications, but these are not limited to. The vehicle's display screen can show the application's user interface, which includes data access controls. When the user performs a first operation on these controls, a data access command is generated, which the vehicle can then retrieve.
[0047] The access path information includes the identification information of multiple data nodes, as well as the association relationships between the identification information of multiple data nodes. Further, in some embodiments, the access path information may include the identification information of each data node between the root data node and the target data node, as well as the association relationships between the identification information of each data node between the root data node and the target data node.
[0048] The identification information may include the following: (1) Data name information.
[0049] (2) Identification information.
[0050] (3) Data name information and identity information.
[0051] Furthermore, the name information and identity information of the data can be represented by characters, which can include letters, numbers, operators, punctuation marks, etc., but are not limited to these.
[0052] The names of the data are primarily represented by letters. For example, the name information could be: "name":"speed". Here, "name" represents the name field of the data, and "speed" represents the value of the name field, indicating speed.
[0053] Identification information is primarily represented by letters and numbers. For example, identification information could include: "id":2. The "id" represents the identification field, and "2" represents the value of that field. For instance, " / vehicle / speed" represents the speed of the vehicle as defined above. 320: In the target database, determine the target data node corresponding to the access path information; wherein, the target database includes multiple data nodes, and the data nodes include the identification information and data content of the data nodes, and the data content includes the data collected by the sensors in the vehicle.
[0054] In some embodiments, the target database may include multiple data nodes and a tree-like relationship between them; the access path information includes the relationship between the identification information of the root data node and the identification information of the target data node. In this way, the vehicle can traverse the target data path based on the access path information to find the target data node corresponding to the access path information.
[0055] Furthermore, in some embodiments, the data in the target database is stored in a set of JavaScript Object Notation (JSON) file structures defined by the Vehicle Signal Specification (VSS). For example, the following describes a portion of the data stored in the target database as a set of JSON file structures.
[0056] [{ "name": "vehicle", "id": 1, "instancetype": "single", "mandatory": true, "resourcedefs": [ { "id": 1, "name": "gear", "operations": "NONE", "resourcetype": "single", "mandatory": true, "type": "integer", "range": "0-9", "units": "", "value": "1", } { "id": 2, "name": "speed ", "operations": "NONE", "resourcetype ": "single", "mandatory": true, "type": "integer", "range": "", "units": "kw", "value": 14",} }] The aforementioned `vehicle` represents a vehicle, `name` represents a name, `id` represents an identifier, `instancetype` represents an instance type, `single` indicates that the data is single, `mandatory` indicates mandatory, `resourcedefs` represents resource definitions (sets), `resource` represents a resource, `operations` represents operations (allowed operations), `NONE` represents none (no operations are allowed), `resourcetype` represents the resource type, `type` represents the data type, `integer` represents an integer, `range` represents the range of values, `units` represents units, `gear` represents gears, `speed` represents speed, and `kw` represents kilowatts.
[0057] The following diagram illustrates the relationships between the data nodes in the code above. For example, Figure 4 The diagram shown is a structural illustration representing the relationship between some data nodes, provided by an exemplary embodiment of this application. Figure 4 As shown, the graph includes three data nodes: data node 1, data node 2, and data node 3. Data node 1 is the root data node, and data nodes 2 and 3 are child data nodes of data node 1, with data nodes 1 and 2 being parallel nodes. Data node 1 includes data name information 1, for example, "name": "vehicle"; data node 2 includes data name information 2, for example, "name": "gear"; and data node 3 includes data name information 3, for example, "name": "speed".
[0058] In some embodiments, the target data node corresponding to the access path information can be determined through the following steps 2201 to 2202: Step 3201: Traverse each root data node in the target database based on the root data node's identifier information to determine the target root data node.
[0059] For example, if the access path information is / vehicle / speed, it means that the speed value of the car is to be accessed. Then, the database nodes are traversed, such as data node 1 to data node 3. Data node 1 can be found by using the value of the name field, vehicle.
[0060] For example, if the access path information is / vehicle,1 / speed,2, it means that the speed value of the car is to be accessed. Then, the database nodes are traversed, such as data node 1 to data node 2. Data node 1 can be found by using the value of the name field "vehicle" and the value of the identity field "1".
[0061] For example, if the access path information is / 1 / 2, it means that the speed value of the car needs to be accessed. Then, the database nodes are traversed, such as data node 1 to data node 2. Using the value 1 of the identity field, data node 1 can be found.
[0062] Step 3202: Based on the identification information of the target data node, traverse each sub-data node corresponding to the target root data node, and determine the target root data node from each sub-data node.
[0063] For example, if the access path information is / vehicle / speed, it means that the speed value of the car is to be accessed. Then, the database nodes are traversed, such as data nodes 1 to 3. Data node 1 can be found by using the value of the name field "vehicle". " / " means that the data node needs to be found by using the speed field. For example, data node 3 can be found by using the value of the name field "speed".
[0064] For example, if the access path information is / vehicle,1 / speed,2, it means that the speed value of the car is to be accessed. Then, the database nodes are traversed, such as data node 1 to data node 2. Data node 1 can be found by using the value of the name field "vehicle" and the value of the identity field "1". " / " means that the data node needs to be found by further using the speed field. For example, data node 3 can be found by using the value of the name field "speed" and the value of the identity field "2".
[0065] For example, if the access path information is / 1 / 2, it means that the speed value of the car needs to be accessed. Then, the database nodes are traversed, such as data node 1 to data node 2. Using the value 1 of the identity field, data node 1 can be found. / indicates that the speed needs to be used to find the data node. For example, using the value 2 of the identity field, data node 3 can be found.
[0066] Vehicle sensors can be used to collect information on vehicle operating parameters, as well as environmental information inside and outside the vehicle.
[0067] For example, vehicle operating parameter information may include, but is not limited to, vehicle speed collected by vehicle sensors, engine speed collected by engine speed sensors, tire pressure collected by tire pressure sensors, vehicle battery voltage collected by voltage sensors, vehicle battery current collected by current sensors, engine cooling temperature collected by coolant temperature sensors, and air entering the engine collected by intake air temperature sensors.
[0068] Environmental information inside and outside the vehicle can include, but is not limited to, images of the surroundings captured by cameras, distances between the vehicle and target objects measured by millimeter-wave radar, high-precision three-dimensional point cloud maps generated by lidar scanning with laser beams, facial images of the driver captured by infrared cameras, and temperature, humidity, and air quality inside the vehicle collected by cabin environment sensors.
[0069] 330: Perform a target access operation on the target data node.
[0070] The target access operation can be a get operation, a set operation, an update operation, or a subscribe operation, which will be introduced one by one below.
[0071] In some embodiments, a vehicle may perform a target access operation on a target data node through a Representational State Transfer Application Programming Interface (API).
[0072] This application provides a data access method. By setting up a database to store vehicle sensor output data, when access to sensor output data is needed, the data node containing the sensor output data can be directly found in the database using access path information, and the access operation can be performed on that data node. This allows for unified and centralized management of data collected by sensors in the vehicle. For example, the database has a unified data description and data format, and for the same data, data access instructions can carry unified access path information. This eliminates the need for repeated development and code refactoring for different hardware platforms in vehicle applications, improving development efficiency.
[0073] The acquisition operation will be described below. For example, if the data access instruction is a data acquisition instruction, performing a target access operation on a target data node may include the following steps 3301 to 3302: Step 3301: Obtain the target data content of the target data node.
[0074] The target data can be data collected by various sensors in the vehicle. For example, the target data could be the vehicle speed value collected by the speed sensor, or the door opening angle value collected by the angle sensor, but it is not limited to these. Please continue reading. Figure 4 If the access path information is / vehicle / speed, it means that the speed value of the car is to be accessed. After finding data node 3, the speed value of 14km is obtained from data node 3.
[0075] Step 3302: Feed back the target data content to the application set on the vehicle.
[0076] For example, the application could be a speed control application or a vehicle control application, where the vehicle control application includes a speed control module. After obtaining a speed value of 14 km / h from data node 3, the system feeds back the obtained vehicle speed value of 14 km / h to the speed control application or the vehicle control application.
[0077] If multiple applications in a vehicle require data collected by the same sensor, each application needs to send a data acquisition command to the vehicle. In response to the data acquisition command, the vehicle will transmit the data collected by the sensor multiple times on the communication bus, consuming the communication bus bandwidth. However, in this embodiment, the database only transmits the data collected by the sensor once on the communication bus when storing only one piece of data output by the sensor. Therefore, since the data collected by the sensor is already stored in the database, no matter how many data acquisition commands there are, the data only needs to be obtained through the database, without consuming additional communication bus bandwidth.
[0078] The following section describes the setup operations. For example, a data access command is a data setup command, which also carries the expected data content. Performing a target access operation on a target data node can be: adding the expected data content to the target data node; where the target data node includes the data currently collected by the sensor. For example, please continue reading. Figure 4 The expected speed of the car is 20km / h. The target data node is data node 3. The expected speed of the car is 20km / h is added to data node 3.
[0079] In this embodiment, the target data content and the expected data content are stored in the same data node to improve the speed of vehicle data query.
[0080] Furthermore, in order to ensure that the vehicle's operating parameters achieve the expected results, the following steps 3303 to 3306 can also be performed: Step 3303: Obtain the target data content and expected data content from the target data node; wherein, the target data content includes the data currently collected by the sensor.
[0081] After detecting a data change, the sensor transmits the changed data to the target data path. The data currently collected by the sensor refers to the data output by the sensor after the most recent change.
[0082] Step 3304: Determine control instructions based on target data content and expected data content.
[0083] Control commands can include target values for various parameters of the actuators to be adjusted. For example, a vehicle can determine control commands based on its current speed of 14 km / h and its expected speed of 20 km / h. These control commands can include the amount of fuel injected by the fuel injectors, the amount of fuel injected by the electronic throttle, and so on.
[0084] Step 3305: Send control commands to the target actuator; wherein, the control commands are used to control the target actuator so that the measured data collected by the sensor matches the expected data content.
[0085] Step 3306: If the measured data content collected by the sensor matches the expected data content, change the target data content in the target data node to the measured data content collected by the sensor.
[0086] In this embodiment, storing the target data content and the expected data content in the same data node can improve the speed of vehicle data query. With a shorter data query time, the overall speed of change of operating parameters is improved, thereby improving the vehicle control speed and enhancing the user experience.
[0087] Next, we will introduce the update operation. For example, the data access instruction is a data update instruction; performing a target access operation on a target data node includes: updating the target data content in the target data node when a change is detected in the data collected by the sensor.
[0088] The subscription operation will be described next. For example, the data access instruction is a data subscription instruction; performing a target access operation on a target data node includes: notifying the application of update information when the target data content in the target data node changes; wherein, the update information is used to indicate that the target data content has changed. Furthermore, in some embodiments, the update information may also carry the updated data content of the target data node.
[0089] If multiple applications in the vehicle subscribe to changes in data collected by the same sensor, each application needs to send a data subscription command to the vehicle separately. In response to the data subscription command, the vehicle will transmit the data collected by the sensor multiple times on the communication bus, consuming communication bus bandwidth. However, in this embodiment, the database only transmits the updated data of the sensor once on the communication bus when storing only one piece of data output by the sensor. Therefore, since the data collected by the sensor is already stored in the database, no matter how many data subscription commands there are, data can be subscribed through the database without consuming additional communication bus bandwidth.
[0090] Exemplary device Figure 5 The diagram shown is a structural schematic of a data access device provided in an exemplary embodiment of this application. Figure 5 As shown, the data access device 500 includes: an acquisition module 510, a determination module 520, and an execution module 530.
[0091] The acquisition module 510 is used to acquire a data access instruction, wherein the data access instruction carries access path information; the determination module 520 is used to determine the target data node corresponding to the access path information in the target database; wherein the target database includes multiple data nodes, and the data nodes include identification information and data content, the data content including data collected by sensors in the vehicle; the execution module 530 is used to perform a target access operation on the target data node.
[0092] This application provides a data acquisition device that includes a database for storing vehicle sensor output data. When access to sensor output data is needed, the device can directly locate the data node containing the sensor output data from the database using access path information, and then access that data node. This allows for unified and centralized management of data collected by vehicle sensors. For example, the database has a unified data description and format, and data access commands can carry unified access path information for the same data. This eliminates the need for repeated development and code refactoring for vehicle applications on different hardware platforms, improving development efficiency.
[0093] According to one embodiment of this application, the data access instruction is a data acquisition instruction, and the execution module 530 is used to acquire the target data content of the target data node and feed back the target data content to the application program set on the vehicle.
[0094] According to one embodiment of this application, the data access instruction is a data setting instruction, which also carries expected data content; the execution module 530 is used to add expected data content to the target data node; wherein, the target data node includes the data currently collected by the sensor.
[0095] According to one embodiment of this application, the execution module 530 is further configured to acquire target data content and expected data content in the target data node; wherein the target data content includes the data currently collected by the sensor; determine a control instruction based on the target data content and the expected data content; send the control instruction to the target actuator; wherein the control instruction is used to control the target actuator so that the data collected by the sensor changes from the target data content to the expected data content; and when the data collected by the sensor changes from the target data content to the expected data content, change the target data content in the target data node to the expected data content.
[0096] According to one embodiment of this application, the data access instruction is a data update instruction; the execution module 530 is used to update the target data content in the target data node when a change is detected in the data collected by the sensor.
[0097] According to one embodiment of this application, the data access instruction is a data subscription instruction; the execution module 530 is used to notify the application of update information when the target data content in the target data node changes; wherein, the update information is used to indicate that the target data content has changed.
[0098] According to one embodiment of this application, the target database includes multiple data nodes and a tree-like relationship between the multiple data nodes; the access path information includes the relationship between the identification information of the root data node and the identification information of the target data node.
[0099] According to one embodiment of this application, the determining module 520 is used to traverse each root data node in the target database according to the identification information of the root data node to determine the target root data node; and according to the identification information of the target data node, traverse each sub-data node corresponding to the target root data node to determine the target root data node from each sub-data node.
[0100] This application also provides a computer-readable storage medium storing a computer program for executing the trailer hook control method provided in any of the above embodiments.
[0101] This application also provides a computer program product, which includes a computer program. When the computer program is executed by the processor of a computer device, it enables the computer device to perform the data access method provided in any of the above embodiments.
[0102] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.
[0103] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0104] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0105] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0106] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0107] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0108] If a function is implemented as a software functional unit and sold or used as an independent product, it 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 part 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 of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program verification codes, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0109] It should be noted that in the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0111] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications or equivalent substitutions made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A data access method, characterized by, The method is applied to a vehicle, and the method includes: Obtain a data access instruction; wherein the data access instruction carries access path information; In the target database, the target data node corresponding to the access path information is determined; wherein, the target database includes multiple data nodes, the data node includes the identification information of the data node and data content, and the data content includes data collected by the sensors in the vehicle; Perform a target access operation on the target data node.
2. The data access method of claim 1, wherein, The data access instruction is a data acquisition instruction, and the execution of the target access operation on the target data node includes: Obtain the target data content of the target data node; The target data content is fed back to the application installed on the vehicle.
3. The data access method according to claim 1, characterized in that, The data access instruction is a data setting instruction, which also carries the expected data content; the execution of the target access operation on the target data node includes: The expected data content is added to the target data node; wherein, the target data node includes the data currently collected by the sensor.
4. The data access method according to claim 3, characterized in that, The method further includes: The target data content and the expected data content are obtained from the target data node; wherein, the target data content includes the data currently collected by the sensor; The control instructions are determined based on the target data content and the expected data content. Send control commands to the target actuator; wherein the control commands are used to control the target actuator so that the measured data collected by the sensor matches the expected data content; If the measured data collected by the sensor matches the expected data content, the target data content in the target data node is changed to the measured data content collected by the sensor.
5. The data access method according to claim 1, characterized in that, The data access instruction is a data update instruction; the execution of the target access operation on the target data node includes: If a change is detected in the data collected by the sensor, the target data content in the target data node is updated.
6. The data access method according to claim 1, characterized in that, The data access instruction is a data subscription instruction; the execution of the target access operation on the target data node includes: When the target data content in the target data node changes, an update message will be sent to the application; wherein the update message is used to indicate that the target data content has changed.
7. The data access method according to claim 1, characterized in that, The target database includes multiple data nodes and a tree-like relationship between the multiple data nodes; the access path information includes the relationship between the identification information of the root data node and the identification information of the target data node.
8. The data access method according to claim 7, characterized in that, Determining the target data node corresponding to the access path information includes: Based on the identification information of the root data node, traverse each root data node in the target database to determine the target root data node; Based on the identification information of the target data node, traverse each sub-data node corresponding to the target root data node, and determine the target root data node from each sub-data node.
9. A vehicle, characterized in that, include: In-vehicle infotainment system; Memory used to store executable instructions of the vehicle system. The vehicle-mounted system is used to execute the data access method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the data access method according to any one of claims 1 to 8.