Access control method and device
Patent Information
- Application Number
- CN202280095296.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-07-29
AI Technical Summary
In the field of autonomous driving, the access control methods of existing vehicle operating systems need to configure strategies for a large number of scattered real resources, resulting in difficult configuration, high usage costs, and low efficiency.
By integrating system resources and controlling permissions on the integrated system resources through services, the execution process on the application side is simplified, the complexity of permission configuration and authentication is reduced, and system processing efficiency is improved.
It achieves simplified management and efficient permission control of multiple system resources, reduces configuration difficulty and cost, and improves the overall processing efficiency and security of the system.
Smart Images

Figure CN119053968A_ABST
Abstract
Description
Access control method and device Technical Field
[0001] The present application relates to the field of computer information technology, and in particular to an access control method and device. Background Art
[0002] In the field of autonomous driving, blocking attacks from the entire Internet and ensuring safe driving for end users has become one of the important research topics.
[0003] As the cornerstone of autonomous vehicle software, the in-vehicle operating system (OS) must provide robust access control capabilities to mitigate various attack scenarios. Mainstream in-vehicle OSes include, but are not limited to, Linux. Currently, the most common access control method is to directly control access to the system's actual resources.
[0004] Since the real resources of the system are large and scattered, in the access control method for the real resources of the system, it is necessary to configure access control policies based on the large and scattered real resources. This will result in huge access control policy entries, which in turn leads to difficult configuration, high usage costs and low efficiency.
[0005] Summary of the Invention
[0006] The present invention provides an access control method and apparatus, wherein the apparatus can integrate system resources and perform permission control on the integrated system resources through services, thereby reducing the complexity of permission configuration and authentication processes, thereby improving the overall processing efficiency of the system.
[0007] In a first aspect, embodiments of the present application provide an access control method. The method includes: a device obtaining a first file request sent by a first application. The first file request is triggered by the first application performing a target file operation on a target resource file. Next, the device detects, based on the first file request and preset permission information, whether the first application has permission to perform the target file operation. If the first application has permission to perform the target file operation, the device invokes, in accordance with the first file request, multiple system resources managed by a target service corresponding to the target resource file. The multiple system resources include software and hardware entities required for the operation of the first application. Thus, in embodiments of the present application, the target service presents a resource file to the application. The application can operate on the resource file to cause the target service to provide the application with the corresponding multiple system resources, thereby simplifying the application's execution process and reducing the complexity of resource requests. Furthermore, the present application integrates system resources and controls the permissions of the integrated system resources through the service, allowing the service to authenticate the application, thereby achieving authentication of multiple system resources. In other words, the application can interact with the service to obtain permission to use multiple system resources, thereby reducing the complexity of the permission configuration and authentication process and improving the overall processing efficiency of the system.
[0008] Exemplarily, the device includes multiple services, each of which is configured based on the requirements of a corresponding application.
[0009] For example, the usage permissions of the system resources and / or records managed by multiple services in the device are not exactly the same.
[0010] For example, the preset permission information is an application permission table in the following embodiment. In the embodiment of the present application, the table is used as an example for explanation. In other embodiments, it can also be in other forms, which is not limited in the present application.
[0011] Illustratively, the device may be the middleware layer in the following embodiments, or may be an electronic device such as a smart vehicle, a mobile phone, or a wearable device.
[0012] Exemplarily, system resources are real resources described in the embodiments of this application, and may also be referred to as operating system resources. System resources are resources provided by the kernel in the operating system, including but not limited to network resources, file resources, etc.
[0013] Exemplarily, the device can be an electronic device in the embodiments of the present application (such as a smart vehicle, wearable device, etc.), or it can be the middleware layer described in the embodiments of the present application, or it can be a chip in the electronic device, and this application does not limit it.
[0014] In one possible implementation, a second file request sent by a first application is obtained, and the second file request is generated by triggering the first application to access a target resource file. Obtaining the first file request sent by the first application includes: when the device determines that the first application has access rights based on the second file request, obtaining the first file request sent by the first application. Exemplarily, the application needs to have access rights to access the file (such as the real resource corresponding to the service) before performing other operations on the file. Accordingly, after determining that the application has access rights to the target resource file, the device can further obtain other file requests from the application and further authenticate it.
[0015] In one possible implementation, obtaining the second file request sent by the first application includes: after the device successfully authenticates the first application, obtaining the second file request sent by the first application. In this way, the device can verify the legitimacy of the application and then authenticate the application, thereby preventing unauthorized applications from illegally accessing system resources managed by the target service corresponding to the resource file.
[0016] In one possible implementation, the second file request includes the identification information of the target resource file and the identification information of the first application, and the identity authentication is performed based on the identification information of the target resource file and the identification information of the first application. In this way, what the service presents to the application side is the identification information of the target resource file. The access object on the application side is the object corresponding to the identification information. Compared with the existing technology in which the application needs to access the real resources one by one, the application of this application can directly interact with the service corresponding to the required real resource to obtain the corresponding resource.
[0017] In a possible implementation, the identification information of the target resource file is the file path of the target resource file. In this way, the application can access the service just like opening a file, thereby simplifying the interaction between processes and making programming easier.
[0018] In one possible implementation, when the target file operation is a write operation, the first file request includes first target data; and the device, in accordance with the first file request, calls multiple system resources managed by a target service corresponding to the target resource file, including: the device writes the first target data to the multiple system resources managed by the target service corresponding to the target resource file. In this way, after the device authenticates the application, no further authentication is required in subsequent processes, simplifying access procedures.
[0019] In one possible implementation, when the target file operation is a read operation, the device invokes multiple system resources managed by a target service corresponding to the target resource file according to a first file request, including: reading second target data from the multiple system resources managed by the target service corresponding to the target resource file according to the first file request. The device returns the second target data to the first application. In this way, after the device authenticates the application, no further authentication is required in subsequent processes, simplifying the access process.
[0020] In a possible implementation, the target file operation includes: a read operation or a write operation.
[0021] In a second aspect, an embodiment of the present application provides an access control device. The access control device includes a target service, which is used to obtain a first file request sent by a first application, and the first file request is triggered by the first application performing a target file operation on a target resource file. The target service is also used to detect whether the first application has the operation permission for the target file operation based on the first file request and preset permission information. The target service is also used to call multiple system resources managed by the target service corresponding to the target resource file according to the first file request when the first application has the permission to perform the target file operation. The multiple system resources include the software and hardware entities required for the operation process of the first application.
[0022] In one possible implementation, the device further includes an identity access management module, which exchanges data with the first application via a first communication channel and with the target service via a second communication channel. The identity access management module is configured to obtain a second file request sent by the first application via the first communication channel. The second file request is triggered by the first application accessing a target resource file and includes identification information of the target resource file and identification information of the first application. The identity access management module is further configured to, upon successful authentication of the first application based on the identification information of the target resource file and the identification information of the first application, send the second file request to the target service via the second communication channel. The target service is further configured to establish a third communication channel with the first application upon determining, based on the second file request, that the first application has access rights. This allows legitimate applications to exchange data with the identity access management module via the pre-set communication channel. Illegal applications, however, are unable to access the corresponding communication channel, and the identity access management module can refuse to exchange data with the illegal applications. Furthermore, services can only interact with applications via secure channels, thereby ensuring resource security. For applications that do not directly access the kernel's system resources through a secure channel, the kernel can confirm that such applications are illegal applications, effectively improving the security of system access.
[0023] In one possible implementation, the target service is specifically configured to obtain the first file request sent by the first application through the third communication channel. The service and the application interact through a secure channel, eliminating the need for identity authentication and simplifying access procedures.
[0024] In a possible implementation, the identification information of the target resource file is the file path of the target resource file.
[0025] In a possible implementation, when the target file operation is a write operation, the first file request includes first target data; the target service is specifically used to write the first target data into multiple system resources managed by the target service corresponding to the target resource file.
[0026] In one possible implementation, when the target file operation is a read operation, the target service is configured to read second target data from multiple system resources managed by the target service corresponding to the target resource file according to the first file request; and return the second target data to the first application.
[0027] In a possible implementation, the target file operation includes: a read operation or a write operation.
[0028] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can be referred to the technical effects corresponding to the first aspect and any implementation of the first aspect, and will not be repeated here.
[0029] In a third aspect, an embodiment of the present application provides a computer storage medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0030] In a fourth aspect, an embodiment of the present application provides a computer program comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0031] In a fifth aspect, embodiments of the present application provide a chip comprising a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path, and the processing circuit executes the method of the first aspect or any possible implementation of the first aspect to control the receive pin to receive a signal and to control the transmit pin to send a signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] FIG1 is a block diagram of a smart vehicle according to an embodiment of the present invention;
[0033] FIG2 is a block diagram of the software structure of the intelligent vehicle provided in an embodiment of the present application;
[0034] FIG3 is a flow chart of an access control method provided in an embodiment of the present application;
[0035] FIG4 is a block diagram of the software structure of the intelligent vehicle provided in an embodiment of the present application;
[0036] FIG5 is a block diagram of the software structure of the smart vehicle provided in an embodiment of the present application;
[0037] FIG6 is a block diagram of the software structure of the smart vehicle provided in an embodiment of the present application;
[0038] FIG7 is a schematic diagram of an access process provided in an embodiment of the present application;
[0039] FIG8 is a block diagram of the software structure of the smart vehicle provided in an embodiment of the present application;
[0040] FIG9 is a schematic diagram of the device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0042] The access control method in the embodiments of the present application can be applied to scenarios such as autonomous driving services, Internet of Things services, and data services. It can also be applied to devices or equipment such as mobile phones, laptops, e-readers, smart vehicles, servers, wearable devices, and smart home devices.
[0043] In the embodiments of the present application, the device is an intelligent vehicle (or can be understood as an on-board device on an intelligent vehicle) as an example for explanation. Figure 1 is a structural block diagram of the intelligent vehicle provided in the embodiments of the present application. It should be understood that the intelligent vehicle 100 shown in Figure 1 is only an example of a device, and the intelligent vehicle 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in Figure 1 can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0044] As shown in Figure 1, the intelligent vehicle 100 may include multiple systems, such as a travel system 110, a sensing system 120, a control system 130, one or more peripheral devices 140, a power supply 150, a computer system 160, and a user interface 170. Optionally, the intelligent vehicle 100 may include more or fewer systems, and each system may include multiple components. In addition, each subsystem and component of the intelligent vehicle 100 may be interconnected via wired or wireless connections.
[0045] The travel system 110 may include components that provide powered movement for the intelligent vehicle 100. In one embodiment, the travel system 110 may include an engine 111, an energy source 112, a transmission 113, and wheels / tires 114. The engine 111 may be an internal combustion engine, an electric motor, an air compression engine, or a combination of other types of engines, such as a hybrid engine consisting of a gasoline engine and an electric motor, or a hybrid engine consisting of an internal combustion engine and an air compression engine. The engine 111 converts the energy source 112 into mechanical energy. Examples of the energy source 112 include gasoline, diesel, other petroleum-based fuels, propane, other compressed gas-based fuels, ethanol, solar panels, batteries, and other sources of electricity. The energy source 112 may also provide energy for other systems of the intelligent vehicle 100.
[0046] The transmission 113 can transmit mechanical power from the engine 112 to the wheels 114. The transmission 113 may include a gearbox, a differential, and a drive shaft. In one embodiment, the transmission 113 may also include other components, such as a clutch. The drive shaft may include one or more shafts that can be coupled to one or more wheels 114.
[0047] The sensing system 120 may include several sensors that sense information about the environment surrounding the smart vehicle 100. For example, the sensing system 120 may include a positioning system 121 (the positioning system 121 may be a GPS system, a BeiDou system, or other positioning systems), an inertial measurement unit (IMU) 122, a radar 123, a laser rangefinder 124, and a camera 125. The sensing system 120 may also include sensors of the internal systems of the monitored smart vehicle 100 (e.g., an in-vehicle air quality monitor, a fuel gauge, an oil temperature gauge, etc.). Sensor data from one or more of these sensors may be used to detect objects and their corresponding characteristics (position, shape, direction, speed, etc.). This detection and recognition is a key function for the safe operation of the autonomous smart vehicle 100.
[0048] The positioning system 121 may be used to estimate the geographic location of the smart vehicle 100 .
[0049] The IMU 122 is used to sense the position and orientation changes of the smart vehicle 100 based on inertial acceleration. In one embodiment, the IMU 122 can be a combination of an accelerometer and a gyroscope. For example, the IMU 122 can be used to measure the curvature of the smart vehicle 100.
[0050] The radar 123 can use radio signals to sense objects in the surrounding environment of the smart vehicle 100. In some embodiments, in addition to sensing objects, the radar 123 can also be used to sense the speed and / or heading of the objects.
[0051] The laser rangefinder 124 can utilize laser light to sense objects in the environment in which the smart vehicle 100 is located. In some embodiments, the laser rangefinder 124 can include one or more laser sources, a laser scanner, and one or more detectors, among other system components.
[0052] The camera 125 may be used to capture multiple images of the surrounding environment of the smart vehicle 100. The camera 125 may be a still camera or a video camera.
[0053] The control system 130 controls the operation of the intelligent vehicle 100 and its components. The control system 130 may include various components, including a steering system 131 , a throttle 132 , a brake unit 133 , a computer vision system 134 , a path control system 135 , and an obstacle avoidance system 136 .
[0054] The steering system 131 is operable to adjust the forward direction of the intelligent vehicle 100. For example, in one embodiment, it can be a steering wheel system that can be used to adjust the angle of the steering wheel rotation.
[0055] The throttle 132 is used to control the operating speed of the engine 11 and thus the speed of the smart vehicle 100 .
[0056] Braking unit 133 is used to control the deceleration of intelligent vehicle 100. Braking unit 133 can use friction to slow down wheels 114. In other embodiments, braking unit 133 can convert the kinetic energy of wheels 114 into electric current. Braking unit 133 can also take other forms to slow the rotation speed of wheels 114 to control the speed of intelligent vehicle 100.
[0057] The computer vision system 134 can be operated to process and analyze the images captured by the camera 125 in order to identify objects and / or features in the environment surrounding the intelligent vehicle 100. The objects and / or features may include traffic signals, road boundaries, and obstacles. The computer vision system 134 can use object recognition algorithms, structure from motion (SFM) algorithms, video tracking, and other computer vision technologies. In some embodiments, the computer vision system 134 can be used to map the environment, track objects, estimate the speed of objects, and the like.
[0058] The route control system 135 is used to determine the driving route of the smart vehicle 100. In some embodiments, the route control system 135 can combine data from the sensor system 1204, the GPS 121, and one or more predetermined maps to determine the driving route for the smart vehicle 100.
[0059] The obstacle avoidance system 136 is used to identify, assess, and avoid or otherwise negotiate potential obstacles in the environment of the intelligent vehicle 100 .
[0060] Of course, in one example, the control system 130 may include additional or alternative components other than those shown and described, or may also include a portion of the components shown above.
[0061] The smart vehicle 100 interacts with external sensors, other vehicles, other computer systems, or users through the peripheral devices 140 . The peripheral devices 140 may include a wireless communication system 141 , an onboard computer 142 , a microphone 143 , and / or a speaker 144 .
[0062] In some embodiments, the peripheral devices 140 provide a means for the user of the smart vehicle 100 to interact with the user interface 170. For example, the onboard computer 142 can provide information to the user of the smart vehicle 100. The user interface 170 can also operate the onboard computer 142 to receive user input. The onboard computer 142 can be operated via a touch screen. In other cases, the peripheral devices 140 can provide a means for the smart vehicle 100 to communicate with other devices located within the vehicle. For example, the microphone 143 can receive audio (e.g., voice commands or other audio input) from the user of the smart vehicle 100. Similarly, the speaker 144 can output audio to the user of the smart vehicle 100.
[0063] The wireless communication system 141 may communicate wirelessly with one or more devices directly or via a communication network.
[0064] Power supply 150 can provide power to various components of smart vehicle 100. In one embodiment, power supply 150 can be a rechargeable lithium-ion or lead-acid battery. One or more battery packs of such batteries can be configured as a power source to provide power to various components of smart vehicle 100. In some embodiments, power supply 150 and energy source 112 can be implemented together, such as in some all-electric vehicles.
[0065] Some or all functions of the smart vehicle 100 are controlled by the computer system 160 . The computer system 160 may include at least one processor 161 and a memory 162 .
[0066] The processor 161 may be any conventional processor, such as a commercially available processor CPU. Alternatively, the processor may be a dedicated device such as an ASIC or other hardware-based processor.
[0067] The memory 162 can store an application 1621 and target real data 1622. The application 1621 includes at least a plurality of business processes 16211 and an access control framework 16212.
[0068] The processor 161 executes the application program 1621 stored in the memory 162 . For example, the processor 161 is configured to call the business processes 1621 and the access control architecture 1622 in the memory 162 to access the real resource 1623 .
[0069] It can be understood that the functional diagram of the smart vehicle 100 in Figure 1 is only an exemplary implementation in the embodiment of the present application and is not used to limit the smart vehicle 100 in the embodiment of the present application.
[0070] The software system of the smart vehicle 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the Linux system with a layered architecture as an example to illustrate the software structure of the smart vehicle 100. Of course, the embodiment of the present application can also be applied to other systems, such as the Android system, SELinux system, etc., and this application does not limit it.
[0071] Figure 2 is an exemplary block diagram of the software architecture of the intelligent vehicle 100. Referring to Figure 2 , the software architecture includes, but is not limited to, the application layer, middleware layer, and kernel layer. In one possible implementation, the application layer, middleware layer, and kernel layer can be understood as being included in the Linux system. That is, the application layer, middleware layer, and kernel layer can constitute the software architecture of the Linux system. In another possible implementation, in the Linux system, the kernel layer can also be understood as the Linux system, while the application layer and middleware layer can be understood as layers above the Linux system architecture. For other systems, such as the Android system, the Android system may include, but is not limited to, the application layer, system framework layer, and kernel layer. The system framework layer can be equivalent to the middleware layer in the embodiments of this application. That is, the services and authentication modules included in the middleware layer can be located in the system framework layer of the Android system. Of course, the positions, numbers, and names of the layers described in the embodiments of this application are for illustrative purposes only. The system may include more or fewer layers, and this application does not limit this.
[0072] For example, the application layer can also be called the business layer, which includes a series of services (also called applications). Services include but are not limited to: human-computer interaction, over-the-air upgrades, remote diagnosis, historical records, map updates, remote control, V2X, log synchronization, annotation calibration, etc.
[0073] In the embodiments of the present application, different services can provide different functions for smart vehicles. For example, the human-computer interaction service can provide a human-computer interaction interface for users, through which users can perform corresponding operations on the smart vehicle 100. The human-computer interaction service responds to the received user operations and performs corresponding operations on the smart vehicle. For another example, the over-the-air upgrade service can provide an over-the-air upgrade function for applications (i.e., services) for smart vehicles, that is, the over-the-air upgrade service can obtain the latest version of each service from the cloud and upgrade the current service version based on the latest version.
[0074] Optionally, the smart vehicle 100 may be pre-installed with an application package corresponding to at least one of the above services when it leaves the factory, and automatically installed when it is started for the first time.
[0075] Optionally, the smart vehicle 100 may also automatically install at least one of the above services before leaving the factory.
[0076] Optionally, the smart vehicle 100 may also download an application package from the cloud (referring to a server or a cluster of multiple servers) and install the corresponding service by running the application package.
[0077] The middleware layer can be understood as the application layer and the kernel layer. It can interact with the application layer and the kernel layer for data to perform permission management and resource integration when the application layer calls the real resources of the kernel layer, thereby providing a simple, easy-to-operate and highly secure access control mechanism. Exemplarily, the middleware layer includes but is not limited to: Identity Access Management (IAM) module and a variety of services. Services include but are not limited to: general resource management services, on-chip device management services, system process management services, etc. The names, types and quantities of the services shown in Figure 2 are only illustrative examples and are not limited in this application.
[0078] As shown in Figure 2, the real resources in the kernel layer (which may also be referred to as system resources, kernel resources, or kernel real resources, etc., and can be set according to actual needs and are not limited in this application) include, but are not limited to: network resources, file resources, encryption and decryption resources, device drivers, and other related resources provided by the operating system kernel. In other words, the kernel can provide the real resources required by upper-layer applications. Of course, the kernel can also include other modules or hardware, which will not be detailed in this application.
[0079] It should be noted that the real resources described in the embodiments of the present application can be hardware resources and / or software resources, and can also be understood as software entities and / or hardware entities, which are not limited in this application. For example, the kernel can provide storage resources for upper-layer applications, while the actual storage space on the storage (such as a hard disk) is invisible to the upper layer (including the services and businesses in this article). The kernel maps the storage to a file system (which can also be understood as a file resource) for each service to call.
[0080] In an embodiment of the present application, before the smart vehicle 100 leaves the factory, the operator can pre-configure the correspondence between services and kernel real resources based on the business scenario requirements of the business.
[0081] In an embodiment of the present application, business scenario requirements may include requirements for the types of real resources when the business is running. For example, when the business process corresponding to business A (for example, a human-computer interaction business) is running (which can be understood as a human-computer interaction business scenario), the real resources it requires include real resources A (for example, file resources), real resources B (for example, device drivers) and real resources C (for example, hardware acceleration resources). Then the smart vehicle 100 may be provided with a service A (for example, a general resource management service), which is used to manage real resources A, real resources B and real resources C, wherein real resources A, real resources B and real resources C can also be understood as a set of real resources managed by service A. For another example, when the business process corresponding to business B (for example, a remote diagnosis service) is running, the real resources it requires include real resources A (for example, file resources) and real resources D (for example, network resources). Accordingly, the smart vehicle 100 may be provided with a service B, which is used to manage real resources A and real resources D. It should be noted that the "business process" described in the embodiment of the present application is optionally an instance of the program corresponding to the business when it is running. It can be understood that a business is a computer program before it is run. After the business computer program is run, the entity corresponding to it is the business process. In the embodiments below in this application, the steps performed by the business can all be understood as being performed by the business process, and no further explanation will be given below.
[0082] In the embodiment of the present application, the business scenario requirements include not only the type of real resources (i.e., type), but also the requirements for the permissions on the real resources. Accordingly, the correspondence between services and real resources also needs to be set based on the business scenario's requirements for the permissions on the real resources.
[0083] For example, the real resources required by business A include real resource A, real resource B and real resource C, and it further requires access (i.e., "open") permissions, read permissions and write permissions to real resource A, real resource B and real resource C. Accordingly, service A can be used to manage real resource A, real resource B and real resource C. The real resources required by business C also include real resource A, real resource B and real resource C, but it may only need (or can be understood to only have) access and read permissions to the real resources. Accordingly, service C can be used to manage real resource A, real resource B and real resource C. Service B and service C are different services. Obviously, since the business has different permission requirements for the real resources managed by the service, the corresponding services are also different. Of course, in some embodiments, different businesses may have the same requirements for real resources, and accordingly, the services corresponding to the businesses with the same requirements are also the same.
[0084] Optionally, in an embodiment of the present application, different services may manage the same type of real resources, but may have different permissions. Alternatively, different services may manage different types of real resources. In other words, the types and / or permissions of the real resources corresponding to different services may not be exactly the same.
[0085] In an embodiment of the present application, as described above, the correspondence between services and real resources is set based on the business scenario requirements of the business, wherein the business scenario requirements include the types and permissions of real resources. In an embodiment of the present application, each service (including sub-services) can be used to manage the business's permissions to multiple real resources (which can also be understood as a set of real resources) corresponding to the service. Exemplarily, the service can maintain a business permission table, which can be used to record whether each business has the permission to access the real resources corresponding to the service. Among them, permissions include but are not limited to: access permissions, read permissions, write permissions, etc. The service can determine whether it can provide corresponding real resources for the business based on the business permission table. Specific examples will be described in the embodiments below and will not be repeated here.
[0086] In summary, in this embodiment of the present application, operators can pre-integrate the real resources within the core of the intelligent vehicle 100 to manage permissions for these real resources through corresponding services. It should be noted that, for businesses, they can only interact with services to obtain the corresponding real resources. In reality, the system's real resources are invisible to businesses, effectively improving the security of the system's real resources.
[0087] It should be noted that in the embodiments of the present application, each service may also be referred to as a module or a logical unit, etc., and this application does not limit this.
[0088] In the embodiment of the present application, a single service may be an independent service, that is, providing a type of service. A single service may also include multiple sub-services to provide multiple types of services.
[0089] It should be noted that the correspondence between business and services, and the correspondence between services and real resources in the embodiments of this application are only illustrative examples. In other embodiments, they can be set according to actual needs and this application does not limit them.
[0090] In one possible implementation, the smart vehicle 100 can interact with the cloud to detect whether there is a new service version. For example, the smart vehicle 100 can periodically send a service update request to the cloud to request the service version currently saved on the cloud side. If the current service version on the cloud is inconsistent with the current service version of the smart vehicle 100, the smart vehicle 100 can download a new service version from the cloud. The new service version can optionally be a higher-level version of at least one service in the smart vehicle 100, and the new version can also be a service not included in the smart vehicle 100. In other words, the operator can update the version of at least one service in the cloud according to the business in the market or the needs of the business installed on the smart vehicle 100, and the vehicle can obtain the latest version of each service from the cloud.
[0091] 2 , the identity access management module in the middleware layer is used to authenticate the legitimacy of the business and determine the corresponding service based on the business request.
[0092] In an embodiment of the present application, before the smart vehicle 100 leaves the factory, the operator can configure an authentication channel (also known as a trusted channel or verification channel, etc., which is not limited in this application) between the services in the smart vehicle 100 and the identity access management module. For example, the authentication channel can be maintained based on IPC (Inter-Process Communication). Services in the smart vehicle 100 can exchange data with the identity access management module through the pre-configured authentication channel.
[0093] Exemplarily, the identity access management module may maintain a business information table, which includes business verification information and service information. Among them, the business verification information is used to authenticate the legitimacy of the business. For example, the business verification information may include information such as the identification information of the business. The identity access management module may perform legitimacy verification on the business (or business process (the concept can be referred to above)) that interacts with the identity access management module based on the business verification information to verify whether the business is a legitimate business. In an embodiment of the present application, a legitimate business generally refers to a business obtained through formal channels. Among them, "formal channels" optionally include but are not limited to: the cloud (it may also refer to an application store or platform provided by the device manufacturer, etc.), or installed before leaving the factory. Businesses downloaded and installed through other channels may be illegal businesses, which cannot pass the legitimacy verification of the identity access management module.
[0094] For example, the service information in the business information table is used to indicate the target service that can be provided for the business. The identity access management module can specify the corresponding service for the business based on the service information. The specific implementation will be described in detail below.
[0095] It should be noted that the recording method of various tables described in the embodiments of the present application (i.e., the tabular method) is only an illustrative example. In other embodiments, information can also be recorded in other ways, and this application does not limit it.
[0096] FIG3 is a flow chart of an access control method provided by an embodiment of the present application. Referring to FIG3 , the steps include but are not limited to:
[0097] S301: A first service sends an access request to an identity access management module.
[0098] Exemplarily, the first business sends an access request to the identity access management module in response to the received user operation. The access request includes but is not limited to: the identification information of the business, the first virtual resource file, and the access request information. The access request is used to request the service corresponding to the first virtual resource file to provide it with real resources. As described above, the services in the smart vehicle and the correspondence between the services and the real resources are all set based on the business scenario requirements of the business. Accordingly, after the first business is running, it is necessary to open (i.e., access) the real resources that support the operation of the first business. In an embodiment of the present application, as described above, after the real resources are integrated, they are managed through the corresponding services. Accordingly, the first business needs to interact with the corresponding services to request the services to provide the corresponding real resources to the first business.
[0099] It should be noted that the first service can be any service in the smart vehicle.
[0100] It should be further explained that the embodiments of this application only use the example of a user triggering the first service to perform related operations. In other embodiments, the triggering conditions for the first service to send an access request may also be other. For example, the first service may periodically trigger the access request. This application does not limit this.
[0101] Exemplarily, the identification information of the service may be the ID number of the service process (the concept can be referred to above), or other information that can be used to uniquely identify the service, which is not limited in this application.
[0102] Illustratively, the access request information is used to request access rights.
[0103] In this embodiment of the present application, each service (including subservices) is pre-configured with a corresponding virtual resource file. The virtual resource file can provide an access interface for the first service to access the service, thereby preventing the first service from directly accessing the service, thereby further improving system security. Accordingly, in this embodiment of the present application, the first service can interact with the first service corresponding to the first virtual resource by carrying request information for the first virtual resource.
[0104] Exemplarily, the identification information of the virtual resource file may be a name in a file path style. In other embodiments, the virtual resource file may also be in other forms, which is not particularly limited in this application.
[0105] It should be noted that the virtual resource file in the embodiments of the present application can also be understood as the identification information of the service. The virtual resource file can be used to uniquely identify the corresponding service. For example, in the embodiments below, the identity access management module can find the corresponding service based on the virtual resource file.
[0106] It should be further explained that the virtual resource file in the embodiments of the present application can also be understood as abstracting the service into a file path (or other forms of identification information). In other words, each service is presented as a file path for the business level. Accordingly, the business can obtain the corresponding real resource by accessing or operating a file path.
[0107] FIG4 is a schematic diagram of the software structure of an exemplary intelligent vehicle 100. Referring to FIG4 , in this example, each service (including subservices) is pre-set (i.e., factory-set) with a corresponding virtual resource file. A virtual resource file can also be understood as service identification information, used to uniquely identify the corresponding service. In the context of this application, a virtual resource file is a file path name. For example, in the field of autonomous driving, virtual resource files include but are not limited to Open / read / write / ioctl, pub / sub / service, Get / set / monitor, etc. Among them, the virtual resource file Open / read / write / ioctl corresponds to the general resource management service, pub / sub / service corresponds to the on-chip device management service, and Get / set / monitor corresponds to the system process management service. In other words, other modules (such as the identity access management module) can use "Open / read / write / ioctl" to find the corresponding general resource management service and interact with the general resource management service. It should be noted that each virtual resource file (i.e., the file path corresponding to the service) is set according to pre-set rules. The rules can be set according to actual needs and are not limited in this application. It should be further explained that each virtual resource file is unique and is used to uniquely identify the corresponding service.
[0108] That is, for the business, real resources are integrated and managed by the service, and the service presents the business with a virtual resource file. In the embodiment of the present application, the business can access the virtual resource file to request the service corresponding to the virtual resource file to provide the corresponding real resources. That is, in the embodiment of the present application, the service is virtualized into a file and presented to the business layer. When the business layer interacts with the service, it can be regarded as accessing a file (or virtual file).
[0109] It should be noted that the names, quantities, and corresponding relationships between virtual resource files and services in FIG4 are merely illustrative examples and can be set according to actual needs. This application does not limit this. The specific operation process between virtual resources and services will be described in detail below.
[0110] It should be noted that "accessing" a virtual resource file in the embodiments of the present application can also be understood as "opening" a virtual resource file. In other words, before a business needs to perform a read and / or write operation on a virtual resource file, it is necessary to first "open" the virtual resource file before performing subsequent operations on the virtual resource file.
[0111] It should be further noted that in the embodiments of the present application, the access, read, and write operations performed by the service side are all on virtual resource files, while in reality, the service operates on the real resources managed by the service corresponding to the virtual resource file. The specific implementation will be described in detail below.
[0112] In an embodiment of the present application, as shown in Figure 5, an authentication channel is pre-configured between each service and the identity access management module. Taking the first service as an example, the first service can send an access request to the identity access management module through the authentication channel. It should be noted that the authentication channel in the embodiment of the present application is maintained based on IPC communication. The specific communication method can use a pipeline or other feasible method, which is not limited by this application. Taking the pipeline method in IPC communication as an example, the operator pre-configures an authentication channel in the kernel for the identity access management module and the first service. It can also be understood as a pipeline that can only be used for communication between the first service and the identity access management module. The so-called pipeline is a series of caches within the kernel. The first service can write data (such as the access request described above) from one end of the pipeline. The written data is actually cached in the kernel, and the other end (i.e., the identity access management module) reads it, that is, reads this data from the kernel. Of course, in other embodiments, other services, such as the second service, also pre-configured authentication channels with the identity access management module, and this authentication channel is only used for data exchange between the second service and the identity access management module.
[0113] In one possible implementation, if there is an illegal business (for example, an application downloaded from a third-party platform by an on-board device, and the application has not been authenticated by the smart vehicle platform) that needs to access real resources in the kernel. Since the business does not have a pre-configured authentication channel, it cannot communicate with the identity access management module, and accordingly, the illegal business cannot pass the legitimacy authentication. The kernel in the operating system of the smart vehicle can provide a forced access mechanism, which can deny the business access to the kernel when it detects that the illegal business has not passed the legitimacy verification. Among them, the situations where the legitimacy verification fails include: failure to interact with the identity access management module through the pre-set authentication channel, and / or, verification failure when interacting with the identity access management module through the authentication channel.
[0114] In another possible implementation, as shown in FIG6 , the middleware layer may provide an encapsulation interface to the application layer. The encapsulation interface may optionally be POSIX (Portable Operating System Interface), and in other embodiments, it may also be other standard interfaces, which are not limited in this application. In an embodiment of the present application, the POSIX interface may support an IPC communication mechanism (or other communication standards, which are not limited in this application). In this example, data can be exchanged between the first business and the identity access management module in the middleware layer, or between the first business and the service in the middleware layer based on the POSIX interface. Taking the communication between the first business and the identity access management module as an example, during the communication between the first business and the identity access management module based on the POSIX interface, the first business and the identity access management module will encapsulate the information that needs to be exchanged (such as the access request sent by the first business, or the information fed back by the identity access management module, etc.) to obtain information with a preset format (i.e., in accordance with IPC communication) to implement a compatible access interface, thereby achieving a high-performance information transmission mechanism. It should be noted that the communication between the first business and the service is similar to the above and will not be repeated below.
[0115] S302: The identity access management module determines a first service based on the access request.
[0116] Exemplarily, as described above, the identity access management module is pre-configured with identity authentication channels with different services. The identity access management module can receive an access request sent by the first service based on the identity authentication channel.
[0117] The identity access management module may decapsulate the access request to obtain the first virtual resource file and other information (such as business identification information and access request information) in the access request.
[0118] As described above, the identity access management module may maintain a business information table including business verification information and service information. The identity access management module may verify the legitimacy of information in the access request (eg, business identification information) based on the business verification information.
[0119] In one example, if the verification is successful, the subsequent steps are executed. In another example, if the verification fails, the identity access management module determines that the business is illegal and rejects the business request, that is, the subsequent steps are not executed for it. Accordingly, the illegal business cannot operate the real resources of the system.
[0120] Illustratively, after the identity access management module determines that the verification is successful, the identity access management module may determine a first service that can provide corresponding services for the first business based on the first virtual resource file carried in the access request and the service information maintained by the identity access management module.
[0121] Please refer to Figure 4 or Figure 5. As described above, each service corresponds to a virtual resource file, which is used to uniquely identify the corresponding service. For example, the virtual resource file of the general resource management service is "Open / read / write / ioctl". As shown in Figure 4 (or Figure 5), the kernel pre-sets a communication channel between the identity access management module and each service. The service information maintained by the identity access management module may include the correspondence between the virtual resource file and the communication channel. Accordingly, the identity access management module can find the corresponding channel in the service information based on the virtual resource file (for example, "Open / read / write / ioctl") as the first channel, that is, the channel between the general resource management service, and then determine that the general resource management service is the first service that needs to provide services for the first business. The communication channel between the identity access management module and the service can also be based on IPC communication (or other communication protocols, which are not limited in this application). The specific implementation is similar to the authentication channel between the business and the identity access management module, and will not be repeated here.
[0122] Exemplarily, after the identity access management module determines the first service based on the first virtual resource file in the access request, S303 is executed.
[0123] S303: The identity access management module sends an access request to the first service.
[0124] Exemplarily, after the identity access management module identifies the first service, it sends (or forwards) an access request to the first service. The access request includes identification information of the first service and access request information. This access request instructs the first service to provide real resources to the first service. To distinguish it from the access request in S301, the access request in S303 can be referred to as access instruction information.
[0125] Exemplarily, as described above, the identity access management module and the first service exchange data via a preset communication channel. The identity access management module may send access indication information to the first service via the communication channel between the identity access management module and the first service.
[0126] Exemplarily, the communication channel between the identity access management module and the first service may be based on IPC communication. Accordingly, the identity access management module may repackage the access indication information into a format that complies with the protocol supported by the communication channel (eg, IPC communication) and send it to the first service.
[0127] S304: The first service determines, based on the access request, whether the first business has permission to access the first virtual resource file.
[0128] For example, the first service may receive access instruction information sent by the identity access management module via a communication channel. The first service decapsulates the access request and obtains the information carried therein. The information includes, but is not limited to, identification information of the first service and access request information.
[0129] Exemplarily, as described above, the first service maintains a business permission table. The business permission table includes at least one table entry, and the table entry includes the identification information and permission information of the business. Among them, the permission information is used to indicate whether the business has the permission to access the virtual resource file. It should be noted that in the embodiment of the present application, the service presents a virtual resource file to the business, while the service manages real resources. Accordingly, the service determines whether the first business has the permission to access the first virtual resource file, which can also be understood as whether the first business has the permission to access the first service, and can also be understood as whether the first business has the permission to access the real resources managed by the first service. Of course, the first business cannot directly access the real resources, but accesses the real resources through the first service.
[0130] For example, after the human-computer interaction service is running, it needs to access the network, and the kernel needs to provide it with network resources (such as Bluetooth). The access request sent by the human-computer interaction service includes the first virtual resource file (such as "Open / read / write / ioctl"), the identification information of the human-computer interaction service, and the access request information. After the identity access management module verifies the legitimacy of the service, it determines that the corresponding first service is the general resource management service. The specific details can be referred to above and will not be repeated here. The identity access management module sends access indication information to the general resource management service, and the access indication information includes the identification information and access request information of the human-computer interaction service. The general resource management service can determine whether the human-computer interaction service has the permission to access "Open / read / write / ioctl" (i.e., the first virtual resource file) based on the service permission table. If it has the permission to access "Open / read / write / ioctl", the general resource management service can execute S305, that is, provide the kernel's network resources to the human-computer interaction service, for example, based on the access request information, open the file corresponding to the network resource.
[0131] In one possible implementation, if the first service determines, based on the service permission table, that the first service does not have permission to access the first virtual resource file, the first service denies the first service access to the real resources managed by the first service. Optionally, the first service may send a denial response to the first service, indicating that the first service is denied access to the first virtual resource file, which can also be understood as denying the first service access to the real resources corresponding to the first virtual resource file.
[0132] S305: The first service establishes a secure channel with the first business.
[0133] In an embodiment of the present application, the first service may establish a secure channel with the first business after determining that the first business has the authority to access the first virtual resource file. The purpose of building a secure channel is to enable the first business to access the first virtual resource file through the secure channel when the first business has the authority to access the first virtual resource file to ensure the security of access. In addition, after the secure channel is established, the first business does not need to perform the identity authentication stage described above when performing operations (such as read operations and / or write operations, etc.) on the first virtual resource file. In other words, the businesses that interact with the service for data based on the secure channel are all verified legitimate businesses.
[0134] In an embodiment of the present application, a secure channel can be maintained based on IPC communication. For example, data exchange can be performed through pipe communication in IPC communication, thereby achieving direct message communication between the first business and the first service. The communication method of the secure channel can refer to the authentication channel between the business and the identity access management module, and will not be repeated here.
[0135] In one possible implementation, if an illegal business directly accesses the service by bypassing the identity access management module, the service can determine that the illegal business does not have access rights based on the business permission table and deny the business access to real resources, thereby ensuring the security of real resources and avoiding attacks from malicious applications.
[0136] It should be noted that the various channels involved in the embodiments of the present application (including the authentication channel, the communication channel between the identity access management module and the service, and the secure channel between the business and the service) are pre-configured. In other words, illegal businesses cannot communicate with the identity access management module or the service through the pre-configured channels. For example, the operator has pre-configured a secure channel establishment policy between the business and the service (such as port information, etc., the specific policy depends on the communication method of the channel). When the first service establishes a secure channel with the first business, the secure channel can be established based on the pre-configured policy.
[0137] Illustratively, after the first service establishes a secure channel with the first business, the first service may send a secure channel establishment success response message to the first business, indicating that the secure channel has been established.
[0138] Exemplarily, during the process of establishing a secure channel between the first service and the first business, or before or after establishing the secure channel, that is, after the first service determines that the first business has the authority to access the first virtual resource file, the first service responds to the access request and provides the corresponding real resource for the first business. Optionally, in the access scenario (that is, the business requests access rights from the service), the first service can access (also understood as opening) the file corresponding to the corresponding real resource. It should be noted that the kernel may present the real resource to the upper module or business in the form of a file. Accordingly, the access, reading or writing of the real resource by the service in the embodiment of the present application can be understood as operating on the file corresponding to the real resource. Exemplarily, the first service can send a response message to the first business through the secure channel, and the response message is used to indicate that the corresponding real resource has been accessed (or opened), or it can also be understood as having opened the virtual resource file requested by the business. In the embodiment of the present application, after the file is opened, subsequent operations such as reading and / or writing can be performed.
[0139] FIG7 is a schematic diagram of an exemplary access process. Referring to FIG7 , the steps include but are not limited to:
[0140] S701: A first business sends an operation request to a first service through a secure channel.
[0141] As shown in Figure 8, illustratively, as described above, a secure channel has been established between the first business and the first service. The first business can directly interact with the first service in the secure channel. For example, the first business can send an operation request to the first service through the secure channel. The operation request includes but is not limited to: identification information of the first business, identification information of the first virtual resource file, and operation request information. The operation request information includes but is not limited to: read request information and / or write request information, which is used to request to read and / or write the real resources corresponding to the first virtual resource file.
[0142] S702: The first service determines, based on the operation request, whether the first business has operation authority for the first virtual resource file.
[0143] In this embodiment of the present application, the service permission table maintained by the first service also records the service's operational permissions. Operational permissions include, but are not limited to, read permissions and write permissions. In other words, the first service can determine whether the first service has read and / or write permissions for the first virtual resource file based on the service permission table.
[0144] The first service can determine whether the first business has the target operation permission (i.e., the permission requested by the first business) for the first virtual resource file based on the operation permission requested by the first business (i.e., the permission indicated by the operation request information) and the business permission table. It can also be understood as whether it has the target operation permission for the real resource corresponding to the virtual resource file. That is to say, in an embodiment of the present application, the business has access rights to the real resource and can open the real resource. If the business needs to operate on the real resource, such as reading or writing, it needs to have the corresponding permission to operate on the real resource, thereby ensuring the reliability and security of the real resource and avoiding changes to the real resource by unauthorized businesses.
[0145] In an example, if the first service has the operation authority for the first virtual resource file, S703 is executed.
[0146] In another example, if the first business does not have the operation permission for the first virtual resource file, the first service returns an operation failure response to the first service through the secure channel, indicating that the first business is denied the operation on the first virtual resource file, which can also be understood as denying the first business the operation on the real resource corresponding to the first business.
[0147] S703: The first service provides real resources to the first business through a secure channel.
[0148] Exemplarily, after the first service determines that the first business has the operation authority for the first virtual resource file, that is, the operation authority for the real resource corresponding to the first virtual resource file, the first service may provide the corresponding real resource to the first business.
[0149] For example, if the access request of the first business includes read request information, it is used to request to read the data in the real resource corresponding to the first virtual resource file. Optionally, the read request information may also include information such as the location of the data to be read, which is not limited in this application. Accordingly, after the first service determines that the first business has the authority to read the first virtual resource file, it can send the specified data in the real resource to the first business through a secure channel. After receiving the data, the first business can perform corresponding operations, such as displaying the corresponding data on the screen of the vehicle-mounted device, which is not limited in this application.
[0150] To illustrate, if the access request of the first service includes write request information, the write request information is used to request that data be written to the first virtual resource file (i.e., the corresponding real resource). Optionally, the write request information may include the data to be written. Accordingly, after the first service determines that the first service has write permission for the first virtual resource file, it may write the data in the write request information to the corresponding real resource.
[0151] In one possible implementation, before or after a service terminates its operation, the service may send a close request to the service via the secure channel between the service and the service. The close request can be used to indicate the end of the access. It can be understood that the close operation corresponds to the access operation: the access operation is used to open a file, while the close operation is used to close a file. Exemplarily, in response to the received close request, the service terminates the secure channel with the service and closes the file corresponding to the corresponding real resource. Exemplarily, if the service needs to access the first virtual resource (i.e., the real resource corresponding to the first service) again, the service needs to re-execute S301. In other words, the service needs to re-perform the legitimacy verification and access rights authentication process, and after completing the above process, re-establish the secure channel with the first service. It should be noted that, as described above, the secure channel between the service and the service is pre-established and unique. For example, the kernel may be provided with a corresponding module (e.g., a channel maintenance module, not limited in this application) to maintain corresponding configuration information. This configuration information may include channel configuration policies for each of the channels described above (including the authentication channel and the security channel, etc.). The service can re-establish the secure channel with the service based on the configuration policy. The configuration information of this secure channel is the same as that of the previously established secure channel, and can also be regarded as the same secure channel.
[0152] In an embodiment of the present application, the kernel of the operating system provides a mandatory access control mechanism. In this mandatory access control mechanism, if the kernel detects that a business directly accesses real resources, that is, it does not access them through the access method in the embodiment of the present application, the kernel can determine that the business is an illegal business and that this access is an illegal access. The kernel prohibits the business from accessing real resources. Optionally, the kernel can directly delete the business. Optionally, the kernel can display a prompt message through the interactive interface of the on-board device to indicate that there is a malicious business accessing system resources. The user can manually delete the business based on the prompt message. This can prevent the business process from bypassing the access control architecture to directly access the target real resources, thereby ensuring the security and reliability of access.
[0153] That is to say, in an embodiment of the present application, if the business does not perform legitimacy verification with the identity access management module, or the business does not interact with the service within the secure channel and does not have access rights, or the business does not operate on real resources through the secure channel (i.e., directly access real resources), the module in the system (which can be a service, identity access management control or kernel) can prohibit the business from accessing real resources, thereby protecting the security of real resources.
[0154] In an embodiment of the present application, since the number of virtual resource files is limited, based on the above-mentioned access control method, it is only necessary to set the access control policy based on the limited virtual resource files. Compared with the prior art, the access control policy is set based on scattered and large numbers of real resources (that is, each real resource needs to be set with access rights corresponding to each business), which greatly reduces the entries of the access control policy, reduces the configuration difficulty and cost, and improves the configuration efficiency.
[0155] In the embodiment of the present application, since the access control policy is written based on the business and virtual resource files, and since the complexity of the access control policy is positively correlated with the number of businesses and the number of virtual resource files, and in each business scenario, the number of businesses and the number of virtual resource files are limited, the number of access control policies will not be large, and the access performance and query performance of the policy can also be guaranteed, thereby reducing the configuration difficulty and usage cost and improving the configuration efficiency.
[0156] In the embodiments of the present application, because the configuration of multiple virtual resource files is determined by reintegrating the target real resources according to the services required by the business scenario, the configuration of the virtual resource files is more closely aligned with the business scenario. In addition, because access to real resources is achieved by accessing virtual resource files, and because the configuration of virtual resource files is more closely aligned with the business scenario, the above-mentioned access control architecture and access control method are more closely aligned with the business scenario and have higher security performance.
[0157] In an embodiment of the present application, the access method based on the virtual resource file allows the business to access the real resource just like accessing an ordinary file. That is, the real resource is presented to the business as a virtual resource file, which can also be understood as a file path, making programming easier.
[0158] In the prior art, since access is directed to specific real resources, when the kernel provides real resources to a business, it is necessary to pre-configure corresponding permissions for each of the multiple real resources required by the business and perform authentication. The configuration process of this access method is relatively cumbersome, and the authentication method during the access process is also complex, resulting in reduced access efficiency. In the present application, since access is directed to virtual resource files, it can also be understood as being directed to the set of real resources corresponding to the service. Therefore, when providing services to a business, the service only needs to verify the business's permissions to the virtual resource files corresponding to the required services, thereby improving access efficiency and reducing access costs.
[0159] In one possible implementation, the first service can also access real resources managed by a second service. The second service is different from the first service. The real resources managed by the second service can be completely or partially different from the real resources managed by the first service. The specific implementation method can be referred to in the above embodiment and will not be repeated here.
[0160] In another possible implementation, the second service may also access the first service or the second service, and its access method is the same as in the above embodiment. Taking the second service accessing the first service as an example, optionally, the second service may not have the authority to access the first virtual resource file. Accordingly, the first service may deny the second service access to the corresponding real resource. In other words, the same service may be set with the same or different permissions corresponding to different services. For example, the business permission table of the first service records that the first service has access rights, read rights, and write rights corresponding to the first virtual resource file, and the business permission table of the second service records that the first service has access rights and read rights corresponding to the second virtual resource file, as well as that the second service has access rights and write rights corresponding to the second virtual resource file. Specific permissions can be pre-set according to actual needs, and this application does not limit them.
[0161] In another possible implementation, the smart vehicle can periodically (or at other times, not limited in this application) send request information to the cloud to request the latest version of the service permission table for each service. In other words, the operator can set a new service permission table in the cloud, such as adding, deleting, or modifying entries in the service permission table of the second service. The smart vehicle can obtain the latest version of the service permission table from the cloud and update it. The second service can then manage and control service permissions based on the new service permission table.
[0162] An embodiment of the present application further provides an electronic device. As shown in FIG9 , the electronic device 900 includes a processor 901 , a transceiver 902 , and a communication line 903 .
[0163] The processor 901 is configured to execute any step in the above method embodiment.
[0164] Furthermore, the electronic device 900 may further include a memory 904 . The processor 901 , the memory 904 and the transceiver 902 may be connected via a communication line 903 .
[0165] The processor 901 is a CPU, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 901 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.
[0166] Transceiver 902 is used to communicate with other devices or other communication networks, such as Ethernet, radio access networks (RAN), wireless local area networks (WLAN), etc. Transceiver 902 can be a module, circuit, transceiver, or any device capable of implementing communication.
[0167] The transceiver 902 is mainly used for transmitting and receiving code streams, and may include a transmitter and a receiver for transmitting and receiving code streams respectively. Operations other than transmitting and receiving code streams are implemented by the processor, such as information processing, calculation, etc.
[0168] The communication line 903 is used to transmit information between the components included in the electronic device 900.
[0169] In one design, the processor can be considered as the logic circuit and the transceiver as the interface circuit.
[0170] The memory 904 is used to store instructions, where the instructions may be computer programs.
[0171] The memory 904 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM may be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). Memory 904 may also be a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc. It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0172] It should be noted that the memory 904 can exist independently of the processor 901 or can be integrated with the processor 901. The memory 904 can be used to store instructions, program code, or some data. The memory 904 can be located inside the electronic device 900 or outside the electronic device 900, without limitation. The processor 901 is configured to execute the instructions stored in the memory 904 to implement the methods provided in the above embodiments of the present application.
[0173] In one example, the processor 901 may include one or more CPUs.
[0174] Optionally, the electronic device 900 further includes an output device 905 and an input device 906. The input device 906 is a device such as a keyboard, a mouse, a microphone, or a joystick, and the output device 905 is a device such as a display screen and a speaker.
[0175] The electronic device 900 may be a chip system or a device having a similar structure as shown in FIG9 . The chip system may be composed of chips, or may include chips and other discrete devices. The actions, terms, etc. involved in the various embodiments of the present application may refer to each other without limitation. The message names or parameter names in the messages exchanged between the various devices in the embodiments of the present application are only an example, and other names may be used in the specific implementation without limitation. In addition, the component structure shown in FIG9 does not constitute a limitation on the electronic device 900. In addition to the components shown in FIG9 , the electronic device 900 may include more or fewer components than shown in FIG9 , or combine certain components, or arrange the components differently.
[0176] The processor and transceiver described in this application can be implemented on an integrated circuit (IC), an analog IC, a radio frequency integrated circuit, a mixed-signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
[0177] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.
[0178] This embodiment further provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement the method in the above-mentioned embodiment.
[0179] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the chip to execute the methods in the above-mentioned method embodiments.
[0180] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0181] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.
[0182] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0183] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0184] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0185] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0186] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0187] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0188] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.
[0189] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0190] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.
[0191] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. An access control method, characterized in that: The method comprises: Obtaining a first file request sent by a first application, where the first file request is triggered by the first application performing a target file operation on a target resource file; Based on the first file request and preset permission information, detecting whether the first application has the operation permission for the target file operation; When the first application has the permission to perform the target file operation, according to the first file request, multiple system resources managed by the target service corresponding to the target resource file are called, and the multiple system resources include the software and hardware entities required for the operation process of the first application.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a second file request sent by the first application, where the second file request is triggered by the first application accessing the target resource file; The obtaining the first file request sent by the first application includes: When it is determined based on the second file request that the first application has access rights, the first file request sent by the first application is obtained.
3. The method according to claim 2, characterized in that The obtaining the second file request sent by the first application includes: After the identity authentication of the first application is successful, a second file request sent by the first application is obtained.
4. The method according to claim 3, characterized in that The second file request includes identification information of the target resource file and identification information of the first application, and the identity authentication is performed based on the identification information of the target resource file and the identification information of the first application.
5. The method according to claim 4, characterized in that The identification information of the target resource file is the file path of the target resource file.
6. The method according to any one of claims 1 to 5, characterized in that When the target file operation is a write operation, the first file request includes first target data; The calling, according to the first file request, a plurality of system resources managed by a target service corresponding to the target resource file, includes: The first target data is written into a plurality of system resources managed by a target service corresponding to the target resource file.
7. The method according to any one of claims 1 to 5, characterized in that When the target file operation is a read operation, calling a plurality of system resources managed by a target service corresponding to the target resource file according to the first file request includes: Reading second target data from a plurality of system resources managed by a target service corresponding to the target resource file according to the first file request; Return the second target data to the first application.
8. The method according to any one of claims 1 to 7, characterized in that The target file operation includes: a read operation or a write operation.
9. An access control device, characterized in that: The access control device includes a target service, The target service is configured to obtain a first file request sent by a first application, where the first file request is triggered by the first application performing a target file operation on a target resource file; The target service is further configured to detect, based on the first file request and preset permission information, whether the first application has permission to operate the target file; The target service is also used to call multiple system resources managed by the target service corresponding to the target resource file according to the first file request when the first application has the permission to perform the target file operation. The multiple system resources include the software and hardware entities required for the operation process of the first application.
10. The device according to claim 9, characterized in that The device further includes an identity access management module, the identity access management module interacting with the first application via a first communication channel and interacting with the target service via a second communication channel; The identity access management module is configured to obtain, through the first communication channel, a second file request sent by the first application, where the second file request is triggered by the first application accessing the target resource file, and includes identification information of the target resource file and identification information of the first application; The identity access management module is further configured to send the second file request to the target service through the second communication channel when the identity authentication of the first application is successful based on the identification information of the target resource file and the identification information of the first application; The target service is further configured to establish a third communication channel with the first application when it is determined that the first application has access rights based on the second file request.
11. The device according to claim 10, characterized in that The target service is specifically configured to obtain the first file request sent by the first application through the third communication channel.
12. The device according to claim 10 or 11, characterized in that The identification information of the target resource file is the file path of the target resource file.
13. The device according to any one of claims 9 to 12, characterized in that When the target file operation is a write operation, the first file request includes first target data; The target service is specifically configured to write the first target data into a plurality of system resources managed by the target service corresponding to the target resource file.
14. The device according to any one of claims 9 to 12, characterized in that When the target file operation is a read operation, The target service is configured to read second target data from a plurality of system resources managed by the target service corresponding to the target resource file according to the first file request; and return the second target data to the first application.
15. The device according to any one of claims 9 to 14, characterized in that The target file operation includes: a read operation or a write operation.
16. A computer storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, enable the electronic device to execute the method according to any one of claims 1 to 8.
17. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to perform the method according to any one of claims 1 to 8.
18. A chip, characterized in that: The electronic device comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of the electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
System and method for lauching a resource in a network
CA2770789A1
Terminal and data service processing method
CN103200606A
File security management terminal and system
CN112329050A
File access control system and method and computing equipment
CN113449327A
Resource calling method and device based on vehicle application permission and electronic equipment
CN114238997A
Cited By
Surveying and mapping resistance protection method and device for network node group and electronic equipment
CN122475957A
