Communication method, bus interface, master-slave system and vehicle
By adopting a new communication method in the master-slave system, the time slice and time slot information are configured according to the data transmission characteristics of the target slave, the problem that the bus protocol in the prior art is difficult to be compatible with multiple slave devices and a single transmission specification is solved, and a wider application scenario and higher data transmission flexibility are achieved.
Patent Information
- Application Number
- CN202311368494.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-29
AI Technical Summary
In the prior art, the bus protocol of the master-slave system is difficult to compatible with or manage multiple types of slave devices, and the specifications for transmitting slave data at the same time are single, and the application scenarios are limited.
A communication method is proposed, by responding to communication instructions in the current scenario, determining the target communication mode, and in the time trigger mode, the time slice and time slot information of the host sending data according to the data transmission characteristics of the target slave is configured to achieve compatibility with multiple slave devices and transmitting data of different specifications.
This communication method can be compatible with and manage a variety of slave devices, meet the communication needs of different scenarios, is suitable for more application scenarios, and transmit more specifications of slave data at the same time, improving the flexibility and security of the system.
Smart Images

Figure CN119903001A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicles, and in particular to a communication method, a bus interface, and a master-slave system and a vehicle having the same. Background Art
[0002] For a master-slave system, including a host and multiple slaves, the bus protocol of the master-slave system, such as a peripheral sensor interface, has a relatively simple application scenario and cannot be compatible with or manage more types of slave devices. In addition, the specifications for transmitting slave data in the same period are also relatively simple. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the first purpose of the present invention is to propose a communication method, which can be compatible with and manage multiple types of slave devices, and can realize the transmission of slave data of different specifications in the same time period, and has various application scenarios.
[0004] A second objective of the present invention is to provide a bus interface.
[0005] The third object of the present invention is to provide a master-slave system.
[0006] A fourth object of the present invention is to provide a vehicle.
[0007] In order to achieve the above-mentioned purpose, a communication method of an embodiment of the first aspect of the present invention is used for a host in a master-slave system, and the communication method includes: determining a target communication mode in response to a communication instruction of the current scene; if the target communication mode is a time-triggered mode, obtaining the data transmission characteristics of the target slave in the master-slave system; determining the time slice for the host to send data and the time slot information of the target slave in each time slice according to the data transmission characteristics of the target slave; in each of the time slices, transmitting data according to the time slot information with each of the target slaves; wherein the time slot information includes the number of time slots, and the data transmission characteristics of the target slave include the frequency at which the target slave sends data, and in the first time-triggered mode, in each of the time slices, determining the number of time slots of the target slave according to the refresh frequency of the data sent by the target slave, and the higher the frequency at which the target slave sends frame data, the greater the number of time slots of the target slave.
[0008] According to the communication method of the embodiment of the present invention, the target communication mode is determined by the communication instruction of the current scene, and in the time trigger mode, data is sent and received according to the time slice and time slot information in the target communication mode, wherein different communication modes can be configured with different time slices and time slot information, and the time slot information and time slice are configured according to the data transmission characteristics of the target slave, so that more types of slave devices can be compatible or managed, the communication requirements of different scenes can be met, and it is suitable for more application scenes, and different time slot information can realize the transmission of slave data of more specifications in the same period. In addition, in the first time trigger mode, the number of time slots of the target slave is determined according to the refresh frequency of the target slave sending data, so that the refresh frequency requirement of the target slave sending data can be met, especially for important data such as data related to vehicle safety, which can be transmitted more timely to improve safety.
[0009] In some embodiments, obtaining the data transmission characteristics of the target slave in the master-slave system includes: sending a slave identification signal; receiving feedback information from the slave in the master-slave system in response to the slave identification signal; determining the target slave based on the feedback information and identifying the amount of frame data sent by each target slave, the frequency of sending data, and the response time to the slave identification signal.
[0010] In some embodiments,
[0011] In the first time trigger mode, the time slice for the host to send data and the time slot information of the target slave in each time slice are determined according to the data sending characteristics of the target slave, and also includes: determining that the amount of data sent by each of the target slaves to send frame data is the same, then configuring the time slot lengths of the time slots corresponding to the data sent by each of the target slaves to be equal, wherein the time slot length is the time required for the target slave to send the amount of frame data.
[0012] In some embodiments, in the second time trigger mode, the time slice for the host to send data and the time slot information of the target slave in each time slice are determined according to the data sending characteristics of the target slave, including: determining that there is a difference in the amount of data sent by the target slave to send frame data, and then determining the time slot length of the time slot corresponding to the target slave according to the data amount, wherein the time slot length is the time required for the target slave to send the data amount of frame data.
[0013] In some embodiments, in a third time trigger mode, the time slice for the host to send data and the time slot information of the target slave in each time slice are determined according to the data sending characteristics of the target slave, including: determining that the amount of data of the frame data sent by the target slave is equal, and configuring the time slot lengths of the time slots corresponding to the data sent by each target slave to be equal, wherein the time slot length is the time required for the target slave to send the amount of frame data.
[0014] In some embodiments, determining the time slice for the host to send data and the time slot information of the target slave in each time slice based on the data sending characteristics of the target slave also includes: determining that the refresh frequency of the data sent by each target slave is the same, and then configuring a time slot for each target slave in each data transmission cycle.
[0015] In some embodiments, determining the time slice for the host to send data and the time slot information of the target slave in each time slice based on the data sending characteristics of the target slave also includes: taking the sum of the time slot lengths of all corresponding time slots of the target slaves in a single data transmission cycle as the time slice.
[0016] In some embodiments, the time slice for the host to send data and the time slot information of the target slave in each time slice are determined according to the data sending characteristics of the target slave, and also includes: determining the relative order of the time slots in the time slice allocated by the target slave according to the response duration of the target slave to the slave identification signal, wherein the shorter the response duration, the earlier the time slot corresponding to the target slave in the time slice.
[0017] In some embodiments, before transmitting data with each of the target slaves according to the time slot information, the communication method further includes: sending configuration information to the target slave, wherein the configuration information includes the time slot information of the target slave in the master-slave system within the time slice; receiving confirmation information from the target slave in response to the configuration information; if the confirmation information is abnormal, determining that the target slave is abnormal, and reserving the target slave's right to use the configured time slot information.
[0018] In some embodiments, the communication method further includes: obtaining data transmission and reception requirements of a triggering event, wherein the data transmission and reception requirements of the triggering event include identity identification information of a target slave; determining a target slave according to the identity identification information; and performing data transmission with the target slave.
[0019] In some embodiments, the communication method further includes: sending local network address information to the slave machine according to the communication bus topology structure in the master-slave system as identification information of the slave machine.
[0020] In order to achieve the above-mentioned purpose, a communication method of an embodiment of the second aspect of the present invention is used for a slave in a master-slave system, and the communication method includes: when the target communication mode is a time-triggered mode, obtaining time slot information for sending data, wherein the time slot information is determined according to the data sending characteristics of the slave, wherein the time slot information includes the number of time slots, and the data sending characteristics of the target slave include the frequency of the target slave sending data. In the first time-triggered mode, within each of the time slices, the number of time slots of the target slave is determined according to the refresh frequency of the data sent by the target slave, and the higher the frequency of the target slave sending frame data, the greater the number of time slots of the target slave; and within each time slice in which the host sends data in the master-slave system, sending data according to the time slot information.
[0021] According to the communication method of an embodiment of the present invention, in a time-triggered mode, data is sent according to the time slot information in a target communication mode, wherein different communication modes can be configured with different time slot information, and the time slot information is determined according to the data transmission characteristics of the slave device, thereby being compatible with or managing more types of slave devices, meeting the communication needs of different scenarios, and being suitable for more application scenarios, and different time slot information can realize the transmission of slave data of more specifications and sizes in the same period.
[0022] In some embodiments, the communication method further comprises: sending feedback information in response to a slave identification signal, so as to identify data transmission characteristics of the slave according to the feedback information to configure the time slot information.
[0023] In some embodiments, sending data according to the time slot information includes: sending data in a relative order of the time slices according to the configured time slots, wherein the relative order is configured according to the response duration of the target slave to the slave identification signal.
[0024] In some embodiments, sending data according to the time slot information further includes: sending data according to the number of time slots configured within the time slice, wherein the number of time slots is configured according to a refresh frequency at which the target slave sends data.
[0025] In some embodiments, sending data according to the time slot information further includes: sending data according to the time slot length of the configured time slot, wherein the time slot length is configured according to the amount of frame data sent by the slave machine.
[0026] In some embodiments, obtaining time slot information for sending data includes: receiving configuration information, wherein the configuration information includes the time slot information; performing parameter configuration according to the configuration information; and feeding back confirmation information in response to the configuration information.
[0027] In some embodiments, the communication method further includes: if the target communication mode is an event trigger mode, sending or receiving data according to a data transmission and reception requirement of a triggering event, wherein the data transmission and reception requirement of the triggering event includes the identity identification information of the slave.
[0028] In order to achieve the above-mentioned purpose, an embodiment of the third aspect of the present invention proposes a bus interface for a master-slave system, wherein the bus interface includes: at least one data transmission line and a ground line, connected between a host and a slave in the master-slave system, and used to realize data transmission between the host and the slave according to the communication method described in the above embodiment.
[0029] According to the bus interface of the embodiment of the present invention, the communication method of the above embodiment is adopted to realize the data reception and transmission between the master and the slave. It can be compatible with or manage more types of slave devices, can meet the communication needs of different scenarios, is suitable for more application scenarios, and can transmit slave data of more specifications in the same period.
[0030] In some embodiments, the at least one data line includes: a voltage line for providing power signals to the host and the slave and for transmitting host data; and at least one current line for transmitting slave data.
[0031] In some embodiments, at least one of the current lines is a plurality of the current lines.
[0032] In order to achieve the above-mentioned purpose, the fourth aspect of the present invention also proposes a master-slave system, including: a host and multiple slaves; the bus interface; the host and the multiple slaves are connected through the bus interface to communicate.
[0033] The master-slave system according to the embodiment of the present invention can be compatible with and manage more types of slaves by adopting the bus interface of the above embodiment, is suitable for more application scenarios, and can transmit slave data of different specifications in the same time period.
[0034] In some embodiments, the bus interface is a parallel topology or a daisy chain topology.
[0035] In some embodiments, the host is an electronic control unit and the slave is a vehicle-mounted sensor.
[0036] In order to achieve the above-mentioned object, a fifth aspect of the present invention further proposes a vehicle, comprising the master-slave system described in the above embodiment.
[0037] The vehicle of the embodiment of the present invention can be equipped with more slave devices by adopting the master-slave system of the above embodiment, so as to meet the complex requirements of the vehicle electronic system and improve safety.
[0038] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0040] Figure 1 is a schematic diagram of a daisy chain topology structure of a master-slave system according to an embodiment of the present invention;
[0041] Figure 2 is a schematic diagram of a parallel topology structure of a master-slave system according to another embodiment of the present invention;
[0042] Figure 3 is a schematic diagram of a bus interface according to an embodiment of the present invention;
[0043] Figure 4 is a schematic diagram of a bus interface according to another embodiment of the present invention;
[0044] Figure 5 is a flow chart of a communication method according to an embodiment of the present invention;
[0045] Figure 6 is a schematic diagram of time allocation of communication mode 1 according to an embodiment of the present invention;
[0046] Figure 7 is a schematic diagram of time allocation of communication mode 2 according to an embodiment of the present invention;
[0047] Figure 8 is a schematic diagram of time allocation of communication mode 3 according to an embodiment of the present invention;
[0048] Fig. 9 is a flowchart of a configuration process of communication mode 1 according to an embodiment of the present invention;
[0049] Fig.10 is a flowchart of a configuration process of communication mode 2 according to an embodiment of the present invention;
[0050] Fig.11 is a flowchart of a configuration process of communication mode 3 according to an embodiment of the present invention;
[0051] Fig.12 is a flow chart of a communication method according to another embodiment of the present invention;
[0052] Fig.13 is a block diagram of a vehicle according to one embodiment of the present invention. DETAILED DESCRIPTION
[0053] Embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. Embodiments of the present invention are described in detail below.
[0054] Safety is paramount in vehicle design, so designers are adding more sensors and driver assistance systems. These systems require a common interface and must be able to communicate reliably with zero errors despite large temperature and humidity fluctuations and vibration and electromagnetic compatibility issues.
[0055] Therefore, the PSI5 bus protocol was born in the vehicle field. The PSI5 interface can be used to connect multiple sensors to an electronic control unit, and has been widely used as the main sensor communication bus for airbags and related restraint systems. However, with the continuous innovation and technological iteration of vehicle electronics, the electronic systems required for vehicle systems are becoming more complex, and more and more sensors are required. However, the application scenarios of the above bus protocols are too single and cannot take into account more types of slave devices such as sensors. In addition, for the PSI5 bus interface, the number of devices that can be managed by a single interface is limited, up to 4, and the maximum transmission rate is less than 200Kbps, and the single data transmission capacity is limited, for example, mostly 10 bits and 16 bits.
[0056] In order to solve the above problems, an embodiment of the present invention proposes a bus interface, which can be used in a master-slave system, wherein the master-slave system includes a host and multiple slaves, for example, the host can be a host, a controller, etc., and the slave can include a sensor or other device that communicates with the slave. The host is mainly responsible for organizing the slave network, managing the network, monitoring the network, etc.; the slave is mainly responsible for collecting relevant data and transmitting it to the host, obeying the management and configuration of the host, and responding to relevant commands in a timely manner.
[0057] Figure 1 is a schematic diagram of a daisy chain topology structure of a master-slave system according to an embodiment of the present invention, Figure 2 FIG. 1 is a schematic diagram of a parallel topology structure of a master-slave system according to another embodiment of the present invention. In the embodiment, the bus topology of the master-slave system can be as follows: Figure 1 The daisy-chain bus topology shown can also be used as Figure 2 The parallel topology shown, or other topologies may also be used.
[0058] The physical layer structure of the bus interface of the embodiment of the present invention may adopt a multi-wire single-ended interface, for example, may be composed of two-wire, three-wire or more wire bundles.
[0059] like Figure 3 As shown, the bus interface 10 includes at least one data transmission line 101 and a ground line 102 .
[0060] At least one data transmission line 101 is connected between the host and the slave in the master-slave system, and is used to realize data transmission between the host and the slave according to the configured communication method. Based on this communication method, it can be applied to a larger type of slaves, and the transmission data specifications are more diverse, so that the application scenarios of the bus interface 10 are more diverse. Among them, the communication method can refer to the specific description below.
[0061] Specifically, when the bus interface 10 is a two-wire harness, namely a data transmission line and a ground line, the voltage line state is maintained at the host end to ensure the normal operation and communication of the connected slave. The host and the slave transmit their own communication data based on the base voltage Vbase.
[0062] Furthermore, in some embodiments, Figure 4 As shown, at least one data line 101 includes a voltage line 11 and at least one current line 12. A ground line 102 is a ground connection line of the voltage line 11 and the at least one current line 12.
[0063] The voltage line 11 is used to provide power signals to the host and slave in the master-slave system, and is also used to transmit host data. Specifically, the host ensures that the voltage of the voltage line 11 is at a fixed voltage, called the base voltage Vbase (>0V), which provides driving power for the connected slave. At the same time, the host sends a differential Manchester modulation code based on the base voltage to realize related command transmission.
[0064] At least one current line 12 is used to transmit slave data. Specifically, the host maintains the current of the current line 12 at a fixed current, which can be called base current Ibase (≥0A), and the slave can send differential Manchester modulation code based on the base current to achieve related data transmission.
[0065] In some embodiments, when the bus uses a network interface with two wire harnesses, the voltage wire 11 and the current wire 12 can share a wire harness for data transmission and reception, that is, the bus interface 10 is composed of a data transmission line and a ground line. In this way, fewer interfaces can be used for communication, saving system interface resources.
[0066] In an embodiment of the present invention, the wiring harness of the bus interface 10 for transmitting host and slave data can be separately set, namely, a voltage line 11 and a current line 12, to achieve dedicated use of dedicated lines, effectively improving the transmission rate of the entire interface, and setting at least one current line 12 is equivalent to adding a slave-dedicated bus port, thereby expanding the slave network scale at a single interface.
[0067] Furthermore, in an embodiment, there may be multiple current lines 12, and a slave-specific bus port may be added, so that more slave devices can be connected, thereby increasing the number of slave devices connected to a single bus interface.
[0068] The data link layer of the bus interface of the embodiment of the present invention realizes the communication between the host and the slave. The communication method can cover the communication requirements of various devices and can also meet the transmission of different data specifications in the same time period. The communication method of the embodiment of the present invention can be applied to the host or slave in the master-slave system.
[0069] Reference below Figure 5-Figure 11 A communication method according to an embodiment of a first aspect of the present invention is described, and the communication method can be applied to a host in a master-slave system.
[0070] Figure 5 is a flow chart of a communication method according to an embodiment of the present invention. Figure 5 As shown, the communication method includes the following steps S1-S3.
[0071] S1, in response to a communication instruction of a current scenario, determining a target communication mode.
[0072] In an embodiment of the present invention, the protocol interface for communication between the host and the slave in the master-slave system can be configured with multiple communication modes, such as a time-triggered mode or an event-triggered mode. Furthermore, the time-triggered mode can also set different host and slave data sending time periods to achieve different communication modes, for example, including but not limited to TDMA (Time division multiple access), DTDMA (dynamic time division multiple access), STDMA (Self-Organized Time-Division Multiple Access), etc.
[0073] Specifically, the host computer or controller connected to the master-slave system can issue communication instructions based on the data requirements of the current scene. The host receives the communication instructions and determines a target communication mode that meets the requirements, such as one of the time-triggered modes or the event-triggered mode.
[0074] S2, if the target communication mode is the time-triggered mode, obtain the data transmission characteristics of the target slave in the master-slave system.
[0075] The target slave may be understood as a slave that has a need to send and receive data with the host.
[0076] In an embodiment, the host sends data to the slave, for example, sends a broadcast signal on a bus, and the time between two adjacent broadcast signals sent by the host is the time slice for the host to send the data.
[0077] In addition, the slave responds to the broadcast signal of the host on the bus, that is, the slave can send data to the host within the time slice when the host sends data. Since there are multiple slaves, the time period for the slave to send data can be set based on the data sending characteristics of the slave, that is, the time slot information corresponding to each slave sending data is allocated within the time slice.
[0078] The data transmission characteristics of the slave may include, but are not limited to, for example, the amount of data of the transmitted frame data, the refresh frequency of the transmitted data, the response time of the transmitted data, etc. In an embodiment, the data transmission characteristics of the slave may be determined by the structure, setting or characteristics of the slave itself, or by the specific data transmission requirements of the application environment in which the slave is located. The time slice and time slot information are configured according to the data transmission characteristics of the target slave, so that it can be applicable to more types of slaves, transmit data of different specifications, and be applicable to more application scenarios.
[0079] S3, determining the time slice for the host to send data and the time slot information of the target slave in each time slice according to the data sending characteristics of the target slave.
[0080] In an embodiment, the time slot information may include the relative order of the time slots, i.e., the order in which multiple slaves send data, the time length for sending data, i.e., the time slot length, the number of time slots, etc. Among them, the order in which the slaves send data can take into account the frequency of data transmission of different types of slaves, different time slot lengths can meet the size specifications of different slave data, and the number of time slots can meet the needs of the slaves to refresh data.
[0081] S4: In each time slice, data is transmitted with the target slave according to the time slot information.
[0082] In an embodiment, in different communication modes, different time slices and time slot information within the time slices may be set based on the data transmission characteristics of the target slave machine, so as to meet different communication requirements.
[0083] Among them, the time trigger mode can set different data transmission modes based on different slave devices. For example, multiple time trigger modes can be set. Different time trigger modes can be configured with different time slot information and time slice information to meet the data transmission requirements of different types of slave devices.
[0084] In some embodiments, in the first time trigger mode, in each time slice, the number of time slots of the target slave is determined according to the refresh frequency of the target slave sending data, and the higher the refresh frequency of the target slave sending data, the more time slots the target slave has. In particular, if the sensor data related to vehicle safety needs to be refreshed more times in a data transmission cycle, multiple time slots can be set to meet the refresh frequency requirements.
[0085] Specifically, in the process of master-slave data transmission, for the data situation, although the slave is not clear about the data on the entire bus link, the host monitors the data on the bus link and can identify whether the data in the time slice is abnormal by the amount of data written in the register. If there is no abnormality, the time slot information of the target slave is identified in sequence by the address sequence written in the register. For the bus situation, the data sent by the slave in the corresponding time slot is sent in a specific data format, including the information header and tail. The host can monitor whether the data format header is generated within a specific time on the bus. If it is not generated or the waveform is different, it is considered as a data abnormality. That is, a specific waveform is removed through the time window as the start of the time slot or the start of the slave data. If the header of the data format is generated within the specified time slot, it is stored in the corresponding memory.
[0086] According to the communication method of the embodiment of the present invention, the target communication mode is determined by the communication instruction of the current scene, and in the time trigger mode, data is sent and received according to the time slice and time slot information in the target communication mode, wherein different communication modes can be configured with different time slices and time slot information, and the time slot information and time slice are configured according to the data transmission characteristics of the target slave, so that more types of slave devices can be compatible or managed, the communication requirements of different scenes can be met, and it is suitable for more application scenes, and different time slot information can realize the transmission of slave data of more specifications in the same period. In addition, in the first time trigger mode, the number of time slots of the target slave is determined according to the refresh frequency of the target slave sending data, so that the refresh frequency requirement of the target slave sending data can be met, especially for important data such as data related to vehicle safety, which can be transmitted more timely to improve safety.
[0087] In an embodiment, the time slice for the host to send data and the time slot information for the slave to send data are configured according to the data sending characteristics of the target slave. Therefore, after determining the target communication mode, the host can identify the data sending characteristics of the slave based on the feedback information of the slave for the broadcast signal by sending a broadcast signal to the main line.
[0088] Specifically, when the host obtains the time slice and time slot information in the target communication mode, it sends a slave identification signal to the bus. The slave that interacts with the host in the target communication mode will send feedback information based on the slave identification signal. The host receives the feedback information of the slave in the master-slave system in response to the slave identification signal. The feedback information may include slave identity identification information and other confirmation information. The host can identify the target slave in the target communication mode and the data transmission characteristics of the target slave according to the feedback information, such as the amount of frame data sent by the slave, the refresh frequency of the sent data, the response time to the slave identification signal, etc. Furthermore, the host determines the time slot information of each target slave according to the data transmission characteristics of the target slave in the target communication mode, such as the time slot length, the number of time slots, the time slot sequence, etc. And, the host determines the time slice based on the time slot information of each target slave to ensure that each target slave can send corresponding data in each time slice.
[0089] The various communication modes of the present invention are described below through specific embodiments.
[0090] In an embodiment, for the time-triggered mode, the time slice and time slot information are configured according to the data sending characteristics of the target slave machine. For example, in some communication modes, time slots of fixed length and time slices of fixed length can be configured; in some communication modes, based on the demand for data refresh frequency in the environment where the target slave machine is located, more time slots can be configured in one time slice for a certain target slave machine; and, in some communication modes, the time slice and time slot information are not fixed but are configured based on the specific situation of the target slave machine sending data.
[0091] In some embodiments, the host can configure the time slices in the target communication mode and the time slots in each time slice. For example, the time slices can be time periods with equal time intervals, and the time slots can be time lengths with equal time intervals. Of course, the time slice and time slot information can also be configured based on the specific situation of the data transmission characteristics of the target slave, so that different types of slaves can be compatible, and slave data of different specifications and sizes can be sent in the same time period.
[0092] The following takes three time trigger modes as an example, including a first time trigger mode, a second time trigger mode and a third time trigger mode.
[0093] For example, in some communication modes, such as communication mode 1, i.e., the third time trigger mode, the data transmission characteristics of the target slave include the amount of frame data sent by the target slave, i.e., the amount of data sent once, and a certain length of time is required to send the amount of data. The host determines, based on the feedback information of the target slave, that the amount of frame data sent by each target slave in the target communication mode is the same, and then configures the time slot length of the time slot corresponding to the data sent by each target slave to be equal according to the amount of frame data sent by the target slave, i.e., the time slots within the time slice are configured to be equally spaced time lengths, i.e., the time length of each target slave sending data is configured to be the same. Among them, the time slot length is the time required for the target slave to send the amount of frame data, so as to meet the data transmission requirements of each target slave in each data transmission cycle.
[0094] Also, in an embodiment, in the first time trigger mode, each target slave sends data at the same refresh frequency, and each target slave is allocated a time slot in each data transmission cycle, that is, in this mode, each target slave sends data in one time slot in one transmission cycle.
[0095] Furthermore, in communication mode 1, the host can configure time slices of the same length, for example, the sum of the time slot lengths of the corresponding time slots of all target slaves in a single data transmission cycle is used as the time slice. That is, the time length of each time slice is the sum of the time lengths of the corresponding time slots of all target slaves in the same time slice. That is, in this communication mode 1, time slices of the same length and time slots of the same length can be configured, that is, each time slice in which the host sends data is the same, and the time length of the slave sending data is the same.
[0096] In addition, the data transmission characteristics of the target slave also include the response time of the target slave to the host data. In communication mode 1, the relative order of the target slave occupying the time slot in the time slice can be determined according to the response time of the target slave to the host data, that is, when the target slave sends data.
[0097] Specifically, for communication mode 1, the host can configure gaps of equal time lengths according to the data sending characteristics of the target slave, and divide the time for the host to send data into time slices of equal time lengths, and allocate the relative order of multiple target slaves occupying time slots within the time slice according to the response time of the target slaves in response to the host data. In this way, communication mode 1 can be implemented, such as the TDMA communication mode described below.
[0098] Specifically, for communication mode 1, the communication mode is similar to the TDMA communication mode. Figure 6FIG. 1 is a schematic diagram of time allocation of communication mode 1 according to an embodiment of the present invention. In this mode, the host divides time into time slices of equal intervals, and divides time slices into time slots of equal intervals. That is, the time slices specified by the host are of fixed duration, and the time slots are divided according to the data transmission characteristics of the slave connected to the protocol interface. That is, in this mode, each time slot of the time slice occupies a different slave on the bus, that is, the same slave is not allowed to occupy two time slots in the same time slice, so as to ensure that each required slave can use the bus in each time slice, for example Figure 6 In this mode, the time slice between the host sending the broadcast signal is divided into n time slots, and each time slot corresponds to a slave occupying the bus. In this mode, the slaves connected to the host interface can be allocated the right to use the time slots in the corresponding order of the address in the bus interface network.
[0099] Among them, in the embodiment, in the communication mode 1, the relative order of the target slaves occupying the time slots in the time slice is determined according to the response time of the target slave in response to the slave identification signal sent by the host. For example, the longer the response time of the slave, the later the order of the time slots in the time slice is allocated, and the shorter the response time, the earlier the time slot corresponding to the target slave in the time slice, so that each target slave can occupy the corresponding time slot in the time slice. Figure 6 In the example, time slot 1 corresponds to slave 1 occupying the bus, and time slot n corresponds to slave n occupying the bus.
[0100] In other embodiments, the host can send local network address information to the target slave according to the communication bus topology in the master-slave system, and the host can also determine the relative order of the time slots occupied by the target slave in the time slice according to the local network address. Specifically, after the slave and the host are connected through the bus interface, the host sends a broadcast signal to the bus, and then the local network address can be configured based on the order in which the slave responds to the broadcast signal, which can also reflect the speed of the slave responding to the data. The faster the response, the earlier the time slot in the allocated time slice, thereby meeting the data transmission needs of the target slave.
[0101] Among them, for the bus topology, the response order of the slave is the length of the bus delay, that is, the closer the distance, the faster the response speed, so the distance determines the order of the slave's sending and receiving. For the daisy chain topology, the slave data is stored and sent in sequence. Because in this protocol, the daisy chain is also a power line, the response order can be either from the nearest slave or from the farthest slave. But overall, as long as the first device to send data is determined, that is, the device in time slot 1, the other devices are determined according to the distance of the time slot 1 device. The device closest to the time slot 1 device is the time slot 2 device, and so on.
[0102] Furthermore, in some communication modes, such as communication mode 2, i.e., the first time trigger mode, the number of time slots occupied by the slave in the time slice can also be allocated according to the refresh frequency requirement of the slave sending data. Specifically, the data transmission characteristics of the target slave also include the refresh frequency of the target slave sending data; and the number of time slots of the target slave in the time slice is determined according to the refresh frequency of the target slave sending data.
[0103] For example, for a vehicle, various sensors collect data at different frequencies. For some data that requires high-frequency monitoring, the sensor needs to send data at a higher frequency. In the communication mode 2 of the embodiment of the present invention, multiple time slots of the time slice can be allocated to the corresponding slaves, for example Figure 7 In the time slice, time slot 1 and time slot 5 are both allocated to slave 1, so that the timeliness of data transmission by the target slave can be guaranteed and the data refresh frequency can be guaranteed.
[0104] That is, in communication mode 2, it is determined that the amount of frame data sent by each target slave machine is the same, and the time slot lengths corresponding to the time slots for sending data from each target slave machine are configured to be equal, wherein the time slot length is the time required for the target slave machine to send the amount of frame data, that is, time slices with the same interval time length and time slots with the same time slot length are used, and the number of time slots is also configured according to the refresh frequency of the data sent by the target slave machine, so that a mode similar to STDMA communication can be realized.
[0105] Specifically, for communication mode 2, the communication mode is similar to the STDMA communication mode. Figure 7 As shown, in this mode, the host can configure time slots of equal interval length. Unlike communication mode 1, there is no limit on the number of time slots occupied by the slave in this communication mode 2. The host can allocate the number of occupied time slots to the relevant slave according to the data transmission characteristics of the slave, such as data refresh requirements, but the total number of all configured time slots cannot be greater than the number of time slots in the time slice. Among them, in this communication mode 2, the time slot configuration is mainly based on the transmission requirements of the data sent by the slave. If there is a slave that does not need to transmit, it will no longer be allocated the corresponding bus occupied time slot, that is, the slave is no longer the target slave.
[0106] In other embodiments, in some communication modes such as communication mode 3, i.e., the second time trigger mode, the time length of the time slice and the time length of the time slot can be configured according to specific needs. Specifically, the host determines that the amount of data sent by the target slave in the target communication mode is different according to the feedback information of the slave, and then determines the time slot length of the time slot of the corresponding target slave according to the data amount of the specific frame data of the slave, wherein the time slot length of the time slot can be the time required for the amount of data sent by the corresponding target slave to send the frame data. And, in order to ensure that each target slave in each time slice can occupy the bus to transmit data, the time length of the time slice will also be different. Specifically, the time length of the time slice can be determined according to the sum of the time slot lengths of the time slots occupied by all target slaves in the data transmission cycle.
[0107] In the embodiment, in communication mode 3, the relative order of the target slaves occupying the time slots in the time slice can also be determined according to the response time of the target slaves to the host data.
[0108] For communication mode 3, the communication mode is similar to the DTDMA communication mode. The time slice and time slot are configured based on the specific situation of the slave data transmission characteristics.
[0109] Specifically, the host can determine its data transmission characteristics based on the feedback information of the target slave, such as when to send data and how long it takes to send data, etc.; determine the time slice and the time slot information of the target slave allocated within the time slice based on the data transmission characteristics of the target slave, such as the order of occupying the time slots and the time slot length.
[0110] For example, the amount of data transmitted by the target slave for each frame of data is obtained, and the amount of data reflects the time required for the target slave to send data; the time slot length of the corresponding time slot of the target slave is determined according to the amount of data transmitted by the target slave for each frame of data to meet the time required for the slave to send data; the time slice is determined according to the time slot length of the time slots occupied by all target slaves.
[0111] For example, the response time of the target slave to the host data is obtained. The response time can reflect how long the target slave sends data. The relative order of the time slots in the time slice allocated to the target slave is determined according to the response time. For example, the longer the response time of the slave, the later the order of the time slots in the time slice is allocated. Conversely, the earlier the time slots in the time slice are allocated to the slave.
[0112] Different from the communication modes 1 and 2 mentioned above, in communication mode 3, the host can freely set the time slice, and there is no fixed requirement for the length of its internal time slot, that is, the time slot can be divided into unequal intervals. Figure 8As shown in the figure, within the same time slice, the time length of each time slot is different, and the actual time length of the time slot can be determined by the amount of data transmitted by the slave. In addition, the specific length of the time slice is determined by the host and the situation of the slave that applies for transmission confirmed by the bus structure. Among them, if there is a slave that does not need to transmit data, the corresponding bus occupation time slot will no longer be allocated to it.
[0113] From the above, the amount of frame data sent by each target slave and the time point of sending and receiving the data, that is, the time slot length and the time slot sequence, are different for different working modes.
[0114] In addition, the time point at which the slave receives and sends data, that is, the relative order of the time slots, is related to the response time of the slave to the slave identification signal, and the response time is different when the bus interface adopts different topological structures. For example, under the parallel bus topology, the slave response order is the length of the bus delay. That is, the closer the distance, the faster the response speed, so the distance determines the order of data transmission and reception of the slave. For another example, under the daisy chain topology, the slave data is stored in sequence and the data is sent in sequence. Because in this protocol, the daisy chain is also a power line, so the response order can be either from the nearest slave or from the farthest slave.
[0115] But in general, once the first slave device to send data is determined, that is, the slave device of time slot 1, the other slave devices are determined based on the distance from the device of time slot 1. The device closest to the device of time slot 1 is the device of time slot 2, and so on.
[0116] The communication mode of the above embodiment is a time-triggered mode. In some examples, before receiving data sent by the target slave according to the time slot information, the communication method further includes: the host sends configuration information to the target slave, wherein the configuration information includes the time slot information allocated to the target slave in the master-slave system within the time slice. And receive confirmation information of the target slave in response to the configuration information. If the confirmation information is abnormal, it is determined that the target slave is abnormal, and the target slave is reserved to use the configured time slot information.
[0117] Refer to the following Figure 4 The bus interface shown illustrates the configuration process of the three time-triggered communication modes mentioned above, wherein bus 1 may correspond to the voltage line 11 mentioned above, and bus 2 may correspond to the current line 12 mentioned above.
[0118] For communication mode 1, specifically, Fig. 9 FIG. 1 is a flow chart of a configuration process of communication mode 1 according to an embodiment of the present invention. Fig. 9As shown, after the host configures the relevant system parameters, including the number of time slots, the order of time slots, the length of time slots, the time slices and other information, the host broadcasts the configuration information related to the protocol to bus 1. After receiving the broadcast information from the host, each slave sets its own relevant parameters and sends confirmation information on bus 2 in turn. If the slave information received before is all confirmation information, then after receiving the confirmation information sent by the last slave, the host sends a heartbeat signal, indicating the start of a new time slice, which is used as a time reference for the connected slaves. After the heartbeat signal is sent, all slaves send their own collected data in the configured time slots, and cycle back and forth on the entire time axis until other instructions and configuration information from the host are received.
[0119] Among them, if there is a slave that sends a non-confirmation signal (NAK), the host will broadcast the same configuration information to the slave that sent the non-confirmation signal again after receiving the signal sent by the last slave. If the slave sends a NAK signal for the second time under this broadcast inquiry, the slave is considered abnormal, the abnormality is reported, and the right to use the allocated time slot is reserved for it. If the slave sends an ACK signal during the second broadcast signal, the host will regard the slave as normal.
[0120] For communication mode 2, specifically, Fig.10 FIG. 1 is a flow chart of a configuration process of communication mode 2 according to an embodiment of the present invention. Fig.10 As shown, after the host is configured to communication mode 2, it sets its time slot length and then broadcasts to the slaves in the connected interface network. After receiving the broadcast signal, the slave will send the device-related parameters to the host, including device type, factory date, manufacturer and other information. After receiving the above-mentioned relevant data, the host evaluates the transmission capability and data transmission characteristics of the device in combination with the data sent by all slave devices connected to the current interface, and allocates time slots and the number of time slots for each applied slave, as well as the time slot sequence in the time slice, that is, the relative order of the allocated time slots. After the host configures the relevant time slices and the number and order of time slots, it broadcasts the above-mentioned result information to all slave devices, including the number of occupied time slots and the relative order of time slots of each slave device participating in the working mode in the time slice. After the slave device parses its own relevant time parameters and completes the configuration, it sends a confirmation message to the host. After receiving the relevant confirmation message, the host sends a heartbeat signal and officially starts the current working mode, and cycles back and forth on the entire time axis until the host changes its configuration.
[0121] If a slave previously sends a demand request and fails to send a confirmation signal in time or sends a non-confirmation signal in the final confirmation stage, it is considered as an abnormal slave and the right to use its time slot is reserved for it.
[0122] For communication mode 3, specifically, Fig.11FIG. 4 is a flow chart of a configuration process of communication mode 3 according to an embodiment of the present invention. Fig.11 As shown, after the host is configured to communication mode 3, a broadcast signal is sent to the slaves in the connected bus interface network. After receiving the broadcast signal, the slave will send its own data transmission characteristic information, such as the transmission time length requirement, to the host. After the host receives the relevant time length, it adds the required time length in sequence according to the relative address order of the slave in the interface network and obtains the time slice length in the current working mode. After completing the time slot sorting in the relevant time slice, the host broadcasts the above result information to all slave devices, including the start time and end time of each slave device participating in the working mode in the time slice. After the slave device parses its own relevant time parameters and completes the configuration, it sends a confirmation message to the host. After the host receives the relevant confirmation information, it officially starts the current working mode and cycles back and forth on the entire timeline until the host changes its configuration.
[0123] If a slave previously sends a demand request and fails to send a confirmation signal in time or sends a non-confirmation signal in the final confirmation stage, it is considered as an abnormal slave and the right to use its time slot is reserved for it.
[0124] The communication mode of the above embodiment is a time-triggered mode. In the embodiment of the present invention, if the target communication mode is an event-triggered mode, the host obtains the data transceiving demand of the triggering event, and the data transceiving demand of the triggering event includes the identity identification information of the target slave. The target slave is determined according to the data transceiving demand of the triggering event, that is, which slave to send data to or which slave to receive data from. The identity identification information of the target slave is obtained, that is, the information that can identify which slave the slave is, and data is sent to the target slave or received from the target slave according to the identity identification information. Different from the above time-triggered mode, in the event-triggered mode, the communication demand between the host and the slave is no longer time-triggered, but triggered by events on both sides. According to the demand, the host initiates a one-to-one transmission channel to a specific slave or the slave to the host.
[0125] In an embodiment, the host may send local network address information to the slave according to the communication bus topology in the master-slave system as the slave's identification information, which may be used for the host to address and declare itself.
[0126] Specifically, for the event trigger mode configuration process, after being configured as the event trigger mode, the host broadcasts the bus interface working mode to the slaves in the connected interface network. At this time, because the data transmission directions of bus 1, i.e., the voltage line 11 mentioned above, and slave bus 2, i.e., the current line 12 mentioned above, are inconsistent, there is no conflict in the signal transmitted on the above bus. Bus 2 is shared by multiple slaves, so there will be conflict. At this time, if the bus topology is a parallel bus topology, the slave uses a backoff strategy when detecting the conflict signal, chooses to avoid for a certain period of time, and then listens to the bus status. If it is not occupied, it chooses to send; if it is continuously occupied, it continues to avoid until the transmission is successful or the slave itself generates new transmission data. If the bus topology is a daisy chain bus topology, slave n moves forward from the current position in sequence, passing through all hosts to the slave in the middle of the current slave until the transmission is successful. If during the transmission process, the slave a in front generates a communication demand, the bus that is physically close to the host is sent first. Slave n waits for the previous storage to be cleared, and clears and continues to move forward.
[0127] Furthermore, in an embodiment, after the host changes the communication mode, it will broadcast to all slaves on the interface bus network to notify them, and require the slaves to complete their own settings and adjustments within the fixed time broadcast, and make corresponding feedback to ensure the consistency of subsequent work timing.
[0128] Further, in an embodiment, when a slave accesses an interface, the host sends the slave a local network address bit according to its location in the bus topology structure from the host.
[0129] In summary, the communication method of the embodiment of the present invention can be compatible with and manage more types of slave devices by setting multiple working modes. At the same time, the performance of multiple communication modes enables the protocol interface of the embodiment of the present invention to transmit slave data of different sizes in the same time period.
[0130] The embodiment of the present invention further provides a communication method, which is used for a slave in a master-slave system. Fig.12 FIG. 1 is a flow chart of a communication method according to an embodiment of the present invention. Fig.12 As shown, the communication method includes:
[0131] S11, when the target communication mode is the time trigger mode, obtain the time slot information of the transmitted data, wherein the time slot information is determined according to the data transmission characteristics of the slave machine, the time slot information includes the number of time slots, the data transmission characteristics of the target slave machine include the frequency of the target slave machine sending data, in the first time trigger mode, within each of the time slices, the number of time slots of the target slave machine is determined according to the refresh frequency of the target slave machine sending data, the higher the frequency of the target slave machine sending frame data, the greater the number of time slots of the target slave machine.
[0132] S12, sending data according to the time slot information within the time slice in which the host sends data in each master-slave system.
[0133] Specifically, in the process of master-slave data transmission, for the data situation, although the slave is not clear about the data on the entire bus link, the host monitors the data on the bus link and can identify whether the data in the time slice is abnormal by the amount of data written in the register. If there is no abnormality, the time slot information of the target slave is identified in sequence by the address sequence written in the register. For the bus situation, the data sent by the slave in the corresponding time slot is sent in a specific data format, including the information header and tail. The host can monitor whether the data format header is generated within a specific time on the bus. If it is not generated or the waveform is different, it is considered as a data abnormality. That is, a specific waveform is removed through the time window as the start of the time slot or the start of the slave data. If the header of the data format is generated within the specified time slot, it is stored in the corresponding memory.
[0134] According to the communication method of an embodiment of the present invention, in a time-triggered mode, data is sent according to the time slot information in a target communication mode, wherein different communication modes can be configured with different time slot information, and the time slot information is determined according to the data transmission characteristics of the slave device, thereby being compatible with or managing more types of slave devices, meeting the communication needs of different scenarios, and being suitable for more application scenarios, and different time slot information can realize the transmission of slave data of more specifications in the same period.
[0135] In different communication modes, the time slot information may include the relative order of allocated time slots, the number of allocated time slots, and the length of time slots.
[0136] In an embodiment, the slave may send feedback information in response to a slave identification signal sent by the host. After receiving the feedback information, the host may identify the data transmission characteristics of the slave based on the feedback information to configure time slot information, for example, identifying the frequency of data transmission by the slave, the length of time required to send data, the response time, etc. based on the feedback information.
[0137] In some embodiments, in communication mode 1, such as TDMA communication mode, the slave can send data in the relative order of the time slice according to the configured time slot, wherein the relative order is configured according to the response time of the slave to the slave identification signal sent by the master. For example, the longer the slave response time is, the later the order of the time slot in the allocated time slice is, so that each target slave can occupy the corresponding time slot in the time slice. Figure 6 In the example, time slot 1 corresponds to slave 1 occupying the bus, and time slot n corresponds to slave n occupying the bus.
[0138] And, the slave can send data according to the time slot length of the configured time slot, wherein the time slot length is configured according to the amount of data of the frame data sent by the slave. In communication mode 1, the time length of each time slot can be the same, that is, the time length of each slave sending data in the time slice is the same.
[0139] In some embodiments, in communication mode 2, such as STDMA communication mode, unlike the above communication mode 1, in this communication mode, the slave can send data according to the number of time slots configured in the time slice, wherein the number of time slots is configured according to the refresh frequency of the target slave sending data. For example, on a vehicle, various sensors collect data at different frequencies. For some data that requires high-frequency monitoring, the sensor needs to send data at a relatively high frequency. In the communication mode 2 of the embodiment of the present invention, multiple time slots of the time slice can be allocated to the corresponding slave, for example Figure 7 In the time slice, time slot 1 and time slot 5 are both allocated to slave 1, so that the timeliness of data transmission by the target slave can be guaranteed and the data refresh frequency can be guaranteed.
[0140] In some embodiments, in communication mode 3, such as DTDMA communication mode, the slave can send data according to the time length of the allocated time slot in the occupied time slice and the relative order of the occupied time slot, wherein the time slot length is determined according to the amount of data sent by the slave per frame of data, and the relative order is determined according to the response time length of the slave to the host data. For example, the longer the response time length of the slave, the later the order of the time slot in the allocated time slice, and vice versa, the earlier the time slot in the allocated time slice of the slave.
[0141] Furthermore, after the host side completes the configuration of various parameters, it will send configuration information to the slave. For the slave, the communication method also includes: receiving configuration information, which may include time slot information; performing parameter configuration according to the configuration information; and feedback confirmation information in response to the configuration information, so that the host side can determine whether the slave has a fault based on the confirmation information.
[0142] The above is the way in which the slave sends data in different communication modes under the time trigger mode. In other embodiments, the communication method also includes: if the target communication mode is the event trigger mode, the slave can send or receive data according to the data transceiver requirements of the trigger event. The data transceiver requirements triggered by the event include the identity information of the slave, which can facilitate the identification of the host. Different from the time trigger mode above, in the event trigger mode, the communication demand between the host and the slave is no longer time-triggered, but triggered by events on both sides. The slave initiates a one-to-one transmission channel to the host according to the demand.
[0143] In some embodiments, the bus topology of the master-slave system is a parallel bus topology such as Figure 1As shown in the figure, when a conflict signal is detected on the parallel bus, the slave will wait for a preset time before sending data again until the data is successfully sent. That is, the slave adopts a backoff strategy. When there is a conflict, it chooses to avoid for a certain period of time, and then listens to the bus status. If it is not occupied, it sends data.
[0144] In summary, for the slave side of the master-slave system, the bus interface based on the above embodiment, equipped with multiple communication modes, can be compatible with and manage more types of slave devices. Moreover, this performance of multiple working modes can transmit slave data of different sizes in the same time period, making the interface networking more flexible, improving the utilization rate of the system, and reducing complex protocol interface resources.
[0145] Based on the bus interface of the above embodiment, an embodiment of the present invention further proposes a master-slave system. The master-slave system includes a host and multiple slaves and the bus interface of the above embodiment. The host and the multiple slaves are connected through the bus interface to communicate according to the communication method of the above embodiment.
[0146] According to the master-slave system of the embodiment of the present invention, by adopting the bus interface of the above embodiment and executing the communication method of the above embodiment, more types of slaves can be compatible, and slave data of different specifications can be transmitted in the same time period. In addition, the bus interface adopts a dedicated line for a dedicated purpose, which can improve the transmission efficiency of the interface, expand the slave network scale at a single interface, and effectively alleviate the complexity of the system.
[0147] In some embodiments, Figure 1 and 2 As shown, the bus interface can be a parallel topology or a daisy chain topology.
[0148] Among them, in some embodiments, the host can be an electronic control unit, and the slave can be a vehicle-mounted sensor such as a temperature sensor, a humidity sensor, etc. Thus, the required universal bus interface is provided for the vehicle, which not only has the function of the PSI5 interface, but also has diverse application scenarios, more connected slave devices, and higher transmission rates, which can achieve reliable communication and improve data transmission accuracy.
[0149] The embodiment of the present invention further provides a vehicle, such as Fig.13 As shown, a vehicle 1000 includes the master-slave system 100 of the above embodiment.
[0150] The vehicle 1000 of the embodiment of the present invention can be equipped with more slave devices by adopting the master-slave system 100 of the above embodiment, so as to meet the complex requirements of the vehicle electronic system and improve safety.
[0151] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.
[0152] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A communication method, characterized in that: For a host in a master-slave system, the communication method comprises: In response to the communication instruction of the current scenario, determining a target communication mode; If the target communication mode is a time-triggered mode, obtaining data transmission characteristics of the target slave in the master-slave system; Determine the time slice for the host to send data and the time slot information of the target slave in each time slice according to the data sending characteristics of the target slave; In each of the time slices, data is transmitted with each of the target slaves according to the time slot information; Among them, the time slot information includes the number of time slots, and the data sending characteristics of the target slave include the frequency at which the target slave sends data. In the first time trigger mode, within each of the time slices, the number of time slots of the target slave is determined according to the refresh frequency of the data sent by the target slave. The higher the refresh frequency of the data sent by the target slave, the greater the number of time slots of the target slave.
2. The communication method according to claim 1, characterized in that: Acquiring data transmission characteristics of a target slave in the master-slave system, including: Send slave identification signal; receiving feedback information from a slave in the master-slave system in response to the slave identification signal; The target slave is determined according to the feedback information, and the amount of frame data sent by each target slave, the frequency of sending data, and the duration of response to the slave identification signal are identified.
3. The communication method according to claim 2, characterized in that: In the first time trigger mode, determining the time slice for the host to send data and the time slot information of the target slave in each time slice according to the data sending characteristics of the target slave, further comprising: If it is determined that the amount of frame data sent by each of the target slaves is the same, the time slot lengths of the time slots corresponding to the data sent by each of the target slaves are configured to be equal, wherein the time slot length is the time required for the target slave to send the amount of frame data.
4. The communication method according to claim 2, characterized in that: In the second time trigger mode, determining the time slice for the host to send data and the time slot information of the target slave in each time slice according to the data sending characteristics of the target slave includes: If it is determined that the amount of frame data sent by the target slave is different, the time slot length of the time slot corresponding to the target slave is determined according to the data amount, wherein the time slot length is the time required for the target slave to send the frame data amount.
5. The communication method according to claim 2, characterized in that: In the third time trigger mode, determining the time slice for the host to send data and the time slot information of the target slave in each time slice according to the data sending characteristics of the target slave includes: Determine that the data amount of the frame data sent by the target slaves is equal, and configure the time slot lengths of the time slots corresponding to the data sent by each target slave to be equal, wherein the time slot length is the time required for the target slave to send the data amount of the frame data.
6. The communication method according to claim 4 or 5, characterized in that: Determining the time slice for sending data by the host and the time slot information of the target slave in each time slice according to the data sending characteristics of the target slave, further comprising: It is determined that the refresh frequency of data sent by each of the target slaves is the same, and then a time slot is configured for each of the target slaves in each data transmission cycle.
7. The communication method according to any one of claims 3 to 5, characterized in that: Determining the time slice for sending data by the host and the time slot information of the target slave in each time slice according to the data sending characteristics of the target slave, further comprising: The sum of the time slot lengths of the time slots corresponding to all the target slaves in a single data transmission cycle is taken as the time slice.
8. The communication method according to any one of claims 3 to 5, characterized in that: Determining the time slice for sending data by the host and the time slot information of the target slave in each time slice according to the data sending characteristics of the target slave, further comprising: The relative order of the target slave in allocating the time slots in the time slice is determined according to the response time of the target slave to the slave identification signal, wherein the shorter the response time is, the earlier the time slot corresponding to the target slave in the time slice is.
9. The communication method according to claims 1-8, characterized in that: Before performing data transmission with each of the target slaves according to the time slot information, the communication method further includes: Sending configuration information to the target slave, wherein the configuration information includes time slot information of the target slave within the time slice; Receiving confirmation information from the target slave in response to the configuration information; If the confirmation information is abnormal, the target slave is determined to be abnormal, and the target slave is reserved the right to use the configured time slot information.
10. The communication method according to claim 1, characterized in that: The communication method further comprises: If the target communication mode is an event-triggered mode, obtaining a data transceiver requirement of a triggering event, wherein the data transceiver requirement of the triggering event includes identity information of the target slave; Determine the target slave machine according to the identity identification information; Perform data transmission with the target slave device.
11. The communication method according to claim 10, characterized in that: The communication method further includes: The local network address information is sent to the slave according to the communication bus topology structure in the master-slave system to serve as the identification information of the slave.
12. A communication method, characterized in that: For a slave in a master-slave system, the communication method comprises: When the target communication mode is the time trigger mode, obtaining time slot information for sending data, wherein the time slot information is determined according to the data sending characteristics of the slave machine, the time slot information includes the number of time slots, the data sending characteristics of the target slave machine include the frequency of the target slave machine sending data, and in the first time trigger mode, within each of the time slices, the number of time slots of the target slave machine is determined according to the refresh frequency of the target slave machine sending data, and the higher the frequency of the target slave machine sending frame data, the more time slots of the target slave machine are; and In each of the master-slave systems, within a time slice in which the host sends data, data is sent according to the time slot information.
13. The communication method according to claim 12, characterized in that: The communication method further comprises: Feedback information is sent in response to a slave identification signal to identify the data transmission characteristics of the slave according to the feedback information to configure the time slot information.
14. The communication method according to claim 12, characterized in that: Sending data according to the time slot information includes: Data is sent in a relative order in the time slice according to the configured time slots, wherein the relative order is configured according to a response duration of the target slave to a slave identification signal.
15. The communication method according to claim 12, characterized in that: Sending data according to the time slot information also includes: Data is sent according to the configured number of time slots within the time slice, wherein the number of time slots is configured according to a refresh frequency at which the target slave sends data.
16. The communication method according to claim 12, characterized in that: Sending data according to the time slot information also includes: Data is sent according to the configured time slot length of the time slot, wherein the time slot length is configured according to the data amount of the frame data sent by the target slave machine.
17. The communication method according to any one of claims 12 to 16, characterized in that: Get the time slot information for sending data, including: receiving configuration information, wherein the configuration information includes the time slot information; Perform parameter configuration according to the configuration information; A confirmation message is fed back in response to the configuration information.
18. The communication method according to claim 12, characterized in that: The communication method further comprises: If the target communication mode is an event-triggered mode, data is sent or received according to a data transceiving requirement of a triggering event, and the data transceiving requirement of the triggering event includes the identity information of the target slave.
19. A bus interface, characterized in that: For a master-slave system, the bus interface comprises: At least one data transmission line and a ground line are connected between a host and a slave in the master-slave system, and are used to implement data transmission between the host and the slave according to the communication method according to any one of claims 1-18.
20. The bus interface according to claim 19, characterized in that: The at least one data line comprises: A voltage line, used to provide power signals to the host and the slave, and also used to transmit host data; At least one current line, the current line is used to transmit slave data.
21. The bus interface according to claim 20, characterized in that: At least one of the current lines is a plurality of the current lines.
22. A master-slave system, characterized in that: include: Master and multiple slaves; The bus interface according to any one of claims 19 to 21; The host and the plurality of slaves are connected via the bus interface for communication.
23. The master-slave system according to claim 22, characterized in that: The bus interface is a parallel topology structure or a daisy chain topology structure.
24. The master-slave system according to claim 22, characterized in that: The host is an electronic control unit, and the slave is a vehicle-mounted sensor.
25. A vehicle, characterized in that: A master-slave system comprising any one of claims 22-24.