Vehicle-mounted machine user data sharing method, device and system, vehicle-mounted machine and vehicle
Technical Field
The invention belongs to the technical field of vehicles, and particularly relates to a vehicle machine user data sharing method, device and system, a vehicle machine and a vehicle.
Background
With the development of vehicle technology, vehicles have become an indispensable part of people's life, and the scene in the vehicle has also become an important place in people's life. Along with the requirement of people on vehicles is higher and higher, people not only want to be able to drive safely, but also want to have good driving experience on the premise of ensuring safe driving.
The same vehicle often has a plurality of users, and different users use the vehicle and can produce rather than relevant car use data, and the car use data of using the user is most to be stored on the car machine of vehicle. Most of existing vehicles use a vehicle machine with an Android system, data of each application program in the vehicle machine are isolated based on a Linux sandbox, and storage spaces of different users are not allowed to access each other. However, in practical applications, a large amount of data on the in-vehicle device needs to be shared among different users, and therefore, how to provide a scheme for implementing data sharing of the in-vehicle device user is a problem that needs to be solved by those skilled in the art at present.
Disclosure of Invention
In order to solve the above problems in the prior art, that is, to solve the problem in the prior art that in-vehicle data cannot be shared among different users, a first aspect of the present invention provides a method for sharing in-vehicle user data, where the method is applied to a in-vehicle device based on an operating system of a Linux kernel, and the method includes:
controlling a vehicle machine APP corresponding to the current vehicle machine login user to call account system services added in the operating system in advance;
and storing and/or acquiring shared data in a system process database which is pre-constructed in the operating system according to the account system service.
Optionally, in the provided car machine user data sharing method, the step of controlling the car machine APP corresponding to the car machine currently logged in user to invoke the account system service added in advance in the operating system includes:
and controlling the vehicle machine APP to call the account system service according to the preset account service corresponding to the vehicle machine APP.
Optionally, in the provided car-mounted device user data sharing method, the step of "storing and/or acquiring shared data in a system process database pre-constructed in the operating system according to the account system service" includes:
judging whether the vehicle APP has access right through the account system service,
and if the vehicle machine APP has the access right, storing and/or acquiring shared data in the system process database according to the account system service.
Optionally, in the provided car-mounted device user data sharing method, "storing and/or acquiring shared data in the system process database according to the account system service" includes:
acquiring a data storage area corresponding to the vehicle machine APP in the system process database according to the account system service,
storing the shared data into the data storage area and/or acquiring the shared data pre-stored in the data storage area.
Optionally, in the provided in-vehicle device user data sharing method, the method further includes allocating an access right to the in-vehicle device APP through the account system service or prohibiting the access of the in-vehicle device APP.
Optionally, in the provided in-vehicle user data sharing method, the account system service is a system service corresponding to a preset master user in the operating system, and the system process database is a database constructed in a storage space corresponding to the master user.
Optionally, in the provided car machine user data sharing method, the shared data includes car body characteristic data of a car corresponding to the car machine, and/or car driving data, and/or car-mounted device operation data.
Optionally, in the provided car-machine user data sharing method, the operating system is an Android operating system.
The second aspect of the present invention further provides a car machine user data sharing system, where the system is applied to a car machine based on an operating system of a Linux kernel, and the system includes:
the service calling module is configured to control the vehicle machine APP corresponding to the current vehicle machine login user to call account system services added in the operating system in advance;
and the data sharing module is configured to store and/or acquire shared data in a system process database which is pre-constructed in the Android operating system according to the account system service.
Optionally, in the provided in-vehicle user data sharing system, the service invocation module is further configured to perform the following operations:
and controlling the vehicle machine APP to call the account system service according to the preset account service corresponding to the vehicle machine APP.
Optionally, in the provided in-vehicle user data sharing system, the data sharing module is further configured to perform the following operations:
judging whether the vehicle APP has access right through the account system service,
and if the vehicle machine APP has the access right, storing and/or acquiring shared data in the system process database according to the account system service.
Optionally, in the provided in-vehicle user data sharing system, the data sharing module is further configured to perform the following operations:
acquiring a data storage area corresponding to the vehicle machine APP in the system process database according to the account system service,
storing the shared data into the data storage area and/or acquiring the shared data pre-stored in the data storage area.
Optionally, in the provided car-in-vehicle user data sharing system, the system further includes an authority allocation module configured to perform the following operations:
and allocating access authority to the vehicle machine APP through the account system service or forbidding the vehicle machine APP to access.
Optionally, in the provided in-vehicle user data sharing system, the account system service is a system service corresponding to a preset master user in the operating system, and the system process database is a database constructed in a storage space corresponding to the master user.
Optionally, in the provided car-mounted device user data sharing system, the shared data includes car body characteristic data, and/or vehicle driving data, and/or vehicle-mounted device operation data of a vehicle corresponding to the car-mounted device.
Optionally, in the provided car-machine user data sharing system, the operating system is an Android operating system.
The third aspect of the present invention further provides a vehicle machine based on an operating system of a Linux kernel, where the vehicle machine includes the vehicle machine user data sharing system.
Optionally, in the provided vehicle machine with the operating system based on the Linux kernel, the operating system is an Android operating system.
The fourth aspect of the invention also provides a vehicle, which comprises the vehicle machine based on the Linux kernel operating system.
The fifth aspect of the present invention further provides a storage device, wherein a plurality of programs are stored, and the programs are suitable for being loaded by a processor to execute the in-vehicle user data sharing method.
The sixth aspect of the present invention also provides a control apparatus, including a processor and a storage device; the storage device is suitable for storing a plurality of programs; the program is suitable for being loaded by the processor to execute the vehicle user data sharing method.
Compared with the closest prior art, the technical scheme at least has the following beneficial effects:
1. the vehicle user data sharing method provided by the invention mainly comprises the following steps: and controlling a vehicle machine APP corresponding to a current login user of the vehicle machine to call account system services added in advance in the operating system, and storing and/or acquiring shared data in a system process database constructed in advance in the operating system through the account system services. Based on the steps, the vehicle user data sharing method provided by the invention can store shared data in the database to realize real-time update of the shared data, and can also acquire the shared data from the database to realize data sharing among different users;
specifically, the account system service may be a system service corresponding to a preset master user in an operating system, the system process database is a database built in a storage space corresponding to the master user, and the shared data may include vehicle body characteristic data of a vehicle corresponding to a vehicle machine, and/or vehicle driving data, and/or vehicle-mounted device operation data. Each user can know the vehicle using conditions of different users and the conditions of the vehicle by acquiring the data in the database constructed in the storage space of the master user, and the use experience of the user is improved.
2. The vehicle machine user data sharing method provided by the invention can also allocate access permission to the vehicle machine APP or forbid the access of the vehicle machine APP through the account system service, when the shared data is stored or obtained, the account system service judges whether the vehicle machine APP has the access permission, and if the vehicle machine APP has the access permission, the data is stored or obtained. Based on the steps, the vehicle-mounted device user data sharing method provided by the invention can meet the data sharing requirement among different users and can also meet the requirement of a vehicle-mounted device on data safety.
The scheme 1 is a vehicle-mounted device user data sharing method, which is characterized in that the method is applied to a vehicle-mounted device based on an operating system of a Linux kernel, and comprises the following steps:
controlling a vehicle machine APP corresponding to the current vehicle machine login user to call account system services added in the operating system in advance;
and storing and/or acquiring shared data in a system process database which is pre-constructed in the operating system according to the account system service.
The method for sharing the data of the vehicle-mounted device user according to the scheme 2 and the scheme 1 is characterized in that the step of controlling the vehicle-mounted device APP corresponding to the current login user of the vehicle-mounted device to call account system services added in the operating system in advance comprises the following steps:
and controlling the vehicle machine APP to call the account system service according to the preset account service corresponding to the vehicle machine APP.
The vehicle-mounted device user data sharing method according to the scheme 3 and the scheme 2 is characterized in that the step of storing and/or acquiring shared data in a system process database which is pre-constructed in the operating system according to the account system service comprises the following steps:
judging whether the vehicle APP has access right through the account system service,
and if the vehicle machine APP has the access right, storing and/or acquiring shared data in the system process database according to the account system service.
The vehicle-mounted machine user data sharing method according to the scheme 4 and the scheme 3 is characterized in that the step of storing and/or acquiring shared data in the system process database according to the account system service comprises the following steps:
acquiring a data storage area corresponding to the vehicle machine APP in the system process database according to the account system service,
storing the shared data into the data storage area and/or acquiring the shared data pre-stored in the data storage area.
The vehicle-mounted device user data sharing method according to the scheme 5 and the scheme 3 is characterized by further comprising the following steps:
and allocating access authority to the vehicle machine APP through the account system service or forbidding the vehicle machine APP to access.
The vehicle-mounted device user data sharing method according to any one of claims 1 to 5 and scheme 6 is characterized in that the account system service is a system service corresponding to a preset master user in the operating system, and the system process database is a database constructed in a storage space corresponding to the master user.
Scheme 7, the vehicle-mounted device user data sharing method according to any one of schemes 1 to 5, wherein the shared data includes vehicle body characteristic data, and/or vehicle driving data, and/or vehicle-mounted device operation data of a vehicle corresponding to the vehicle-mounted device.
Scheme 8 and the vehicle-mounted device user data sharing method according to any one of schemes 1 to 5, wherein the operating system is an Android operating system.
Scheme 9, a car machine user data sharing system, wherein the system is applied to a car machine based on an operating system of a Linux kernel, and the system comprises:
the service calling module is configured to control the vehicle machine APP corresponding to the current vehicle machine login user to call account system services added in the operating system in advance;
and the data sharing module is configured to store and/or acquire shared data in a system process database which is pre-constructed in the operating system according to the account system service.
In solution 10, the in-vehicle device user data sharing system according to solution 9, wherein the service invoking module is further configured to perform the following operations:
and controlling the vehicle machine APP to call the account system service according to the preset account service corresponding to the vehicle machine APP.
Scheme 11 and the in-vehicle device user data sharing system according to scheme 10, wherein the data sharing module is further configured to perform the following operations:
judging whether the vehicle APP has access right through the account system service,
and if the vehicle machine APP has the access right, storing and/or acquiring shared data in the system process database according to the account system service.
Scheme 12 and the in-vehicle device user data sharing system according to scheme 11, wherein the data sharing module is further configured to perform the following operations:
acquiring a data storage area corresponding to the vehicle machine APP in the system process database according to the account system service,
storing the shared data into the data storage area and/or acquiring the shared data pre-stored in the data storage area.
Scheme 13 and the in-vehicle device user data sharing system according to scheme 11, wherein the system further includes an authority allocation module configured to perform the following operations:
and allocating access authority to the vehicle machine APP through the account system service or forbidding the vehicle machine APP to access.
The in-vehicle user data sharing system according to any one of claims 14 to 13, wherein the account system service is a system service corresponding to a preset primary user in the operating system, and the system process database is a database constructed in a storage space corresponding to the primary user.
Scheme 15 and the vehicle user data sharing system according to any one of schemes 9 to 13, wherein the shared data includes vehicle body characteristic data, and/or vehicle traveling data, and/or vehicle-mounted device operation data of a vehicle corresponding to the vehicle.
The vehicle-mounted device user data sharing system according to any one of the claims 16 and 9 to 13 is characterized in that the operating system is an Android operating system.
The car machine based on the Linux kernel operating system according to the scheme 17 is characterized by comprising the car machine user data sharing system according to any one of the schemes 9 to 16.
The Linux kernel-based vehicle machine according to claim 18 or 17, wherein the operating system is an Android operating system.
Scheme 19, a vehicle, characterized in that, the vehicle includes the vehicle machine of the Linux kernel based operating system of any one of schemes 17 to 18.
Scheme 20, a storage device, wherein a plurality of programs are stored, wherein the programs are suitable for being loaded by a processor to execute the car user data sharing method according to any one of schemes 1 to 8.
Scheme 21, a control apparatus comprising a processor and a storage device; the storage device is suitable for storing a plurality of programs; the program is suitable for being loaded by the processor to execute the in-vehicle user data sharing method in any one of the schemes 1 to 8.
Drawings
Fig. 1 is a schematic diagram illustrating major steps of a car-mounted device user data sharing method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a vehicle-mounted device user data sharing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a car-on-board user data sharing system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and are not intended to limit the scope of the present invention.
Referring to fig. 1, fig. 1 exemplarily shows main steps of a vehicle user data sharing method in the present embodiment. As shown in fig. 1, the method for sharing data of a vehicle user in this embodiment includes the following steps:
step S101: and controlling the vehicle machine APP corresponding to the current login user of the vehicle machine to call account services corresponding to the vehicle machine APP in advance in the operating system.
In this embodiment, the vehicle machine may be a control system capable of implementing a specific function, and in some cases, may directly refer to a controller of the control system. It should be noted that the scope of the present invention is not limited to this specific embodiment. Without departing from the principle of the present invention, it should be clear to those skilled in the art that the vehicle machine may be an in-vehicle entertainment display system, an in-vehicle central control system, an in-vehicle computer system, etc., and these modifications or alternatives fall within the scope of the present invention.
In this embodiment, the in-vehicle user data sharing method is applied to an operating system based on a Linux kernel, which is an open source system. The Android operating system is an operating system constructed on the basis of a Linux kernel, and for simplicity of explanation, the Android operating system is taken as an example for explanation in the embodiment of the invention.
In practical application, the car machine APP runs in an Android operating system of a car machine, each car machine APP can generate a corresponding process in the Android operating system during running, and the highest authority of the car machine APP process is a system process. The Android operating system is constructed on the basis of a Linux kernel, a Linux sandbox still exists in the Android operating system, different users belong to different user groups due to the limitation of the Linux sandbox, and a vehicle machine APP process without system authority cannot access a directory and a file with the system authority, wherein the sandbox is an isolated running mechanism of a program and aims to limit the access authority when an untrusted process or an untrusted code runs. In addition, after the car machine switches the login user, the car machine APP can start a new process, then the car machine APP process of the background user is killed, and the new car machine APP process cannot access the data of the car machine APP process of the original user.
Specifically, in order to realize data sharing, after the Android operating System runs, a corresponding System account service can be established for each vehicle machine APP in the System Server, the vehicle machine APP can acquire the account System service through the account service, and the vehicle machine APP can also directly acquire the corresponding account System service to execute subsequent operations. The account System service is a service process which runs in a System Server and has certain authority.
The System Server is a provider of Android basic services and is the most basic requirement for the operation of an Android System, all services are operated in a process called the System Server, and the System Server process is the first virtual machine process inoculated after a Zygote process of the Android operating System is started. The last login user is a master user, the current login user is a non-master user for example, and the vehicle machine APP corresponding to the non-master user can access data of the master user running in the account system service through the account service, so that the new vehicle machine APP process can access the data of the vehicle machine APP process of the original user. The account System service can be a System service corresponding to a preset master user in an Android operating System, and is also pre-constructed by a System Server, and the master user can be a vehicle owner.
Step S102: and controlling the vehicle APP to call account system services added in advance in the operating system according to the account system services.
The account System service runs in the System Server, after users are switched, the account System service cannot be killed, and the vehicle-mounted APP processes corresponding to different users can access data of the master user through the account System service. Specifically, for example, the car APP is used as the display electric quantity information APP, the display electric quantity information APP corresponding to the currently logged-in user can access history information of battery electric quantity use in the storage space of the master user through the account system service, and the display electric quantity information APP corresponding to the next logged-in user can also access history information of battery electric quantity use in the storage space of the master user through the account system service.
The vehicle machine APP processes corresponding to different users can store and/or acquire shared data through an open interface of the account system service, and the account system service can control access permissions of the vehicle machine APP corresponding to the users.
Step S103: and the account system service judges whether the vehicle APP has the access right, and if so, the step S104 is executed.
In practical application, in order to ensure that the requirement of the vehicle machine on data security can be met while data sharing is carried out between different users, an access permission can be allocated to the vehicle machine APP through the account system service or the access of the vehicle machine APP is prohibited, before the vehicle machine APP stores and/or acquires shared data in a database, the account system service can judge whether the vehicle machine APP has the access permission, and if the vehicle machine APP has the access permission, the step S104 can be executed.
Specifically, whether the car-in-device APP has the access right or not can be judged by identifying the UID/PID of the car-in-device APP process, wherein the Android operating system allocates different UIDs (User Identification ) to each User, and which User runs the current car-in-device APP can be determined specifically according to the UID; the PID (Process Identification) is an identity of a vehicle-mounted machine APP Process, the Android operating system allocates a unique PID to each vehicle-mounted machine APP Process, the account system service can determine which user runs the current vehicle-mounted machine APP specifically according to the UID, whether the PID of the vehicle-mounted machine APP Process is in an authority list preset by the account system service is judged, and if the PID of the vehicle-mounted machine APP Process is in the authority list, the vehicle-mounted machine APP Process has access authority. Therefore, the account system service can judge whether the vehicle-machine APP processes corresponding to different users have access rights according to the UID/PID corresponding to the vehicle-machine APP processes. Therefore, the account system service can judge whether the vehicle-machine APP processes corresponding to different users have access rights according to the UID/PID corresponding to the vehicle-machine APP processes. Specifically, taking the users UID as 1, 2 and 3, and the car APP processes PID corresponding to each user as 4, 5 and 6 as examples, if UID/PID is 1/4 in the authority list preset by the account system service, it indicates that the car APP process with PID being 4 corresponding to the user UID being 1 has the authority to access the account system service.
Step S104: and storing and/or acquiring shared data in a system process database which is pre-constructed in an operating system according to the account system service.
In practical application, a system process database can be constructed in an operating system in advance, wherein the system process database is constructed in a storage space corresponding to a master user, data of vehicle machine APPs corresponding to different users can be stored in the system process database, the system process database has access authority limitation, and only the vehicle machine APP process with system authority can access the system process database. Optionally, in this embodiment, the car APP process that sets UID to system can access the system process database.
In practical application, an ID number may be allocated to the car-machine registered user, where an ID number user _ ID may be allocated to a primary user as 0, and an ID number user _ ID may be allocated to an i-th non-primary user as i + 9.
The following describes, with reference to fig. 2, the in-vehicle multi-user Data sharing method provided by the present invention, by taking a non-master user with a master user and a user _ id of 10, a car-machine APP as a navigation APP and a music APP, and a system process database as a Data Provider database as examples.
Referring to fig. 2, fig. 2 schematically shows a schematic block diagram of a data sharing method for a vehicle user in the present embodiment. As shown in fig. 2, the method for sharing data of a vehicle user in this embodiment mainly includes the following steps:
the navigation APP and the music APP corresponding to the main user and the navigation APP and the music APP corresponding to the non-main user with user _ id of 10 can both store and/or acquire shared Data from the Data Provider database through account system service. The shared data may include vehicle body characteristic data of a vehicle corresponding to the vehicle machine, and/or vehicle driving data, and/or vehicle-mounted device operation data, specifically, the vehicle body characteristic data may include a color of the vehicle, a height of the vehicle, vehicle length data, and the like; the vehicle driving data can comprise the residual battery capacity of the vehicle, the driving mileage of the vehicle and the like; the vehicle-mounted device operation data can comprise a vehicle-mounted device gesture unlocking password and the like.
By the vehicle-mounted device user data sharing method, shared data can be stored in the database, real-time updating of the shared data is achieved, the shared data can be obtained from the database, data sharing among different users is achieved, the requirement of a vehicle-mounted device on data safety can be met, a user can know vehicle information more, and user experience is improved.
Although the foregoing embodiments describe the steps in the above sequential order, those skilled in the art will understand that, in order to achieve the effect of the present embodiments, the steps may not be executed in such an order, and may be executed simultaneously (in parallel) or in an inverse order, and these simple variations are within the scope of the present invention.
Based on the method embodiment, the invention also provides a vehicle user data sharing system. The following describes the car-machine user data sharing system with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 exemplarily shows a main structure of the vehicle user data sharing system in the present embodiment. As shown in fig. 3, the car-machine user data sharing system of the present embodiment is applied to a car machine based on an operating system of a Linux kernel, and includes a service invoking module 1 and a data sharing module 2.
The service invoking module 1 is configured to control a vehicle machine APP corresponding to a current vehicle machine login user to invoke account system services added in advance in an operating system;
and the data sharing module 2 is configured to store and/or acquire shared data in a system process database which is pre-constructed in the operating system according to the account system service.
In a preferred implementation of the embodiment of the present invention, the service invocation module 1 may be further configured to perform the following operations:
and controlling the vehicle APP to call account system services according to the account services corresponding to the preset vehicle APP.
In a preferred implementation of the embodiment of the present invention, the data sharing module 2 may be further configured to perform the following operations:
firstly, whether the vehicle APP has the access right is judged through the account system service,
and then, if the vehicle APP has the access right, storing and/or acquiring the shared data in a system process database according to the account system service.
In a preferred implementation of the embodiment of the present invention, the data sharing module 2 is further configured to perform the following operations:
firstly, acquiring a data storage area corresponding to a vehicle machine APP in a system process database according to an account system service,
then, the shared data is stored in the data storage area and/or the shared data stored in the data storage area in advance is acquired.
In a preferred implementation of the embodiment of the present invention, the car-machine user data sharing system further includes an authority allocating module configured to perform the following operations:
and allocating access permission to the vehicle APP through the account system service or forbidding the vehicle APP to access.
In a preferred implementation of the embodiment of the present invention, the account system service is a system service corresponding to a preset primary user in an operating system, and the system process database is a database constructed in a storage space corresponding to the primary user.
In a preferred implementation of the embodiment of the present invention, the shared data includes vehicle body characteristic data of a vehicle corresponding to the vehicle machine, and/or vehicle driving data, and/or vehicle-mounted device operation data.
In a preferred implementation of the embodiment of the present invention, the operating system is an Android operating system.
Based on the system embodiment, the invention further provides a vehicle machine of an operating system based on the Linux kernel, and the vehicle machine can comprise the vehicle machine user data sharing system in the system embodiment.
In a preferred implementation of the embodiment of the present invention, the operating system is an Android operating system.
Based on the above vehicle machine embodiment, the present invention further provides a vehicle, where the vehicle may include the vehicle machine based on the Linux kernel operating system described in the above vehicle machine embodiment.
Further, based on the foregoing method embodiment, the present invention further provides a storage device, where multiple programs are stored, and the programs may be suitable for being loaded by a processor to execute the in-vehicle device user data sharing method described in the foregoing method embodiment.
Still further, based on the above method embodiment, the present invention further provides a control apparatus, which may include a processor, a storage device; the storage device may be adapted to store a plurality of programs, and the programs may be adapted to be loaded by the processor to perform the in-vehicle user data sharing method described in the above method embodiment.
It is clear to those skilled in the art that, for convenience and brevity of description, specific working processes and related descriptions of the embodiments of the system, the vehicle machine, the vehicle and the apparatus of the present invention may refer to corresponding processes in the foregoing method embodiments, and have the same beneficial effects as the foregoing method, and will not be described herein again.
Those of skill in the art will appreciate that the method steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described above generally in terms of their functionality in order to clearly illustrate the interchangeability of electronic hardware and software. Whether such functionality is implemented as electronic hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.