Access control method and apparatus, and communication system
This application relates to an access control method, applied to the field of short-range communication, for example, cockpit domain communication. An example method includes: determining that a status of a first device is a first status; and sending first indication information, where the first indication information indicates whether access of at least one second device to the first device is allowed. A system broadcast message carrying system status information is sent, so that after a non-vehicle-mounted device receives the system broadcast message, the non-vehicle-mounted device determines, based on the system status information, whether to initiate a random access request.
1 . An access control method, wherein the method comprises:
determining, by a first device, that a status of the first device is a first status, wherein the first device is a vehicle cockpit domain controller (CDC), and the vehicle CDC determines that the status of the first device is the first status; and
sending, by the first device, first indication information, wherein the first indication information comprises device type information, the device type information indicates at least one device type from a plurality of device types, the plurality of device types comprise a vehicle-mounted device type and a non-vehicle-mounted device type, and the first indication information indicates whether access of at least one second device to the first device is allowed.
2 . The access control method according to claim 1 , wherein:
the first status comprises at least one of a system preparation state or a vehicle-mounted device accessing state, and the first indication information indicates that access of the at least one second device is not allowed; or
the first status comprises at least one of a system running state or an access allowed state, and the first indication information indicates that access of the at least one second device is allowed.
3 . The access control method according to claim 1 , wherein the first indication information indicates whether access of at least one third device is allowed.
4 . The access control method according to claim 1 , wherein a device type of the at least one second device belongs to the at least one device type indicated by the device type information.
5 . The access control method according to claim 4 , wherein the first indication information further comprises access indication information, and the access indication information indicates whether access to the first device is allowed.
6 . An access method, wherein the method comprises:
receiving first indication information from a first device, wherein the first device is a vehicle cockpit domain controller (CDC), the first indication information comprises device type information, the device type information indicates at least one device type from a plurality of device types, and the plurality of device types comprise a vehicle-mounted device type and a non-vehicle-mounted device type; and
determining, based on the first indication information, whether access of at least one second device to the first device is allowed.
7 . The access method according to claim 6 , wherein the first indication information indicates whether access of at least one third device is allowed.
8 . The access method according to claim 6 , wherein a device type of the at least one second device belongs to the at least one device type indicated by the device type information.
9 . The access method according to claim 8 , wherein the first indication information further comprises access indication information, and the access indication information indicates whether access to the first device is allowed.
10 . The access method according to claim 6 , wherein the first indication information comprises access indication information, and the access indication information indicates a mapping relationship between a device type and an access relationship.
11 . The access method according to claim 10 , wherein the access indication information identifies a device type corresponding to one bit of a bitmap, and the access indication information identifies whether a device of the device type is allowed to access to the first device by using a value of the one bit of the bitmap.
12 . The access method according to claim 6 , wherein the first indication information comprises priority information, and a priority of the at least one second device belongs to at least one priority indicated by the priority information.
13 . The access method according to claim 10 wherein the first indication information further comprises the access indication information, and the access indication information indicates whether access to the first device is allowed.
14 . The access method according to claim 6 , wherein the first indication information comprises first time information, and the first time information indicates that the at least one second device is not allowed to access the first device within a first time range.
15 . An access control apparatus, wherein the access control apparatus comprises:
a transmitter;
at least one processor; and
one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to cause the access control apparatus to:
determine that a status of a first device is a first status, wherein the access control apparatus includes the first device, the first device is a vehicle cockpit domain controller (CDC), and the vehicle CDC determines that the status of the first device is the first status; and
send first indication information, wherein the first indication information comprises device type information, the device type information indicates at least one device type from a plurality of device types, the plurality of device types comprise a vehicle-mounted device type and a non-vehicle-mounted device type, and the first indication information indicates whether access of at least one second device to the first device is allowed.
16 . The access control apparatus according to claim 15 , wherein;
the first status comprises at least one of a system preparation state or a vehicle-mounted device accessing state, and the first indication information indicates that access of the at least one second device is not allowed; or
the first status comprises at least one of a system running state or an access allowed state, and the first indication information indicates that access of the second device is allowed.
17 . The access control apparatus according to claim 15 , wherein the first indication information indicates whether access of at least one third device is allowed.
18 . The access control apparatus according to claim 15 , wherein a device type of the at least one second device belongs to the at least one device type indicated by the device type information.
19 . The access control apparatus according to claim 18 , wherein the first indication information further comprises access indication information, and the access indication information indicates whether access to the first device is allowed.
20 . An apparatus, wherein the apparatus comprises:
a receiver;
at least one processor; and
one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to cause the apparatus to:
receive first indication information from a first device, wherein the first device is a vehicle cockpit domain controller (CDC), the first indication information comprises device type information, the device type information indicates at least one device type from a plurality of device types, and the plurality of device types comprise a vehicle-mounted device type and non-vehicle-mounted device type; and
determine, based on the first indication information, whether access of at least one second device to the first device is allowed.
21 . The apparatus according to claim 20 , wherein the first indication information indicates whether access of at least one third device is allowed.
22 . The apparatus according to claim 20 , wherein a device type of the at least one second device belongs to the at least one device type indicated by the device type information.
23 . The apparatus according to claim 22 , wherein the first indication information further comprises access indication information, and the access indication information indicates whether access to the first device is allowed.
24 . The apparatus according to claim 20 , wherein the first indication information comprises access indication information, and the access indication information indicates a mapping relationship between a device type and an access relationship.
25 . The apparatus according to claim 24 , wherein the access indication information identifies a device type corresponding to one bit of a bitmap, and the access indication information identifies whether a device of the device type is allowed to access to the first device by using a value of the one bit of the bitmap.
26 . The apparatus according to claim 20 wherein the first indication information comprises priority information, and a priority of the at least one second device belongs to at least one priority indicated by the priority information.
27 . The apparatus according to claim 26 , wherein the first indication information further comprises access indication information, and the access indication information indicates whether access to the first device is allowed.
28 . The apparatus according to claim 20 , wherein the first indication information comprises first time information, and the first time information indicates that the at least one second device is not allowed to access the first device within a first time range.
29 . The access control method according to claim 1 , wherein the at least one second device includes at least one of a mobile phone, a headset, a wearable device, a tablet computer, a notebook computer, a digital camera, a personal digital assistant (PDA), or a laptop computer.
30 . The access control method according to claim 1 , wherein the at least one second device includes a non-vehicle-mounted device, and the first device and the at least one second device are located in a vehicle.