Search

CN-117831150-B - Vehicle-mounted communication method and system, electronic equipment and storage medium

CN117831150BCN 117831150 BCN117831150 BCN 117831150BCN-117831150-B

Abstract

The application discloses a vehicle-mounted communication method and system, electronic equipment and storage medium, wherein the vehicle-mounted communication system comprises a battery management system and a plurality of groups of battery monitoring units, the battery management system is respectively connected with each group of battery monitoring units through a CAN bus. And the battery management system and each group of battery monitoring units are connected in a ring mode through the PWM wire harness. And then the battery management system sends target signals with specified frequency and specified duty ratio to the first group of battery monitoring units, and the last group of battery monitoring units sequentially send corresponding target signals to the next battery monitoring unit according to the ring shape formed by the PWM wire harness until the last group of battery monitoring units send corresponding target signals to the battery management system. Each battery management system determines the location to which the signal belongs based on the received signal and learns the communication ID corresponding to the location to which the signal belongs, so as to transmit the learned communication ID when communicating with the battery management system through the CAN bus.

Inventors

  • WANG PEIJIN
  • DU YI
  • ZHU QINGSONG
  • NI RONGLAI

Assignees

  • 北京经纬恒润科技股份有限公司

Dates

Publication Date
20260505
Application Date
20231228

Claims (10)

  1. 1. The vehicle-mounted communication method is characterized by being applied to a vehicle-mounted communication system, wherein the vehicle-mounted communication system comprises a battery management system and a plurality of groups of battery monitoring units, each group of battery monitoring units are sequentially connected through a pulse width modulation wire harness, the battery management system is respectively connected with a first group of battery monitoring units and a last group of battery monitoring units in the battery management system through the pulse width modulation wire harness, and is respectively connected with each battery monitoring unit through the same CAN bus, and the vehicle-mounted communication method comprises the following steps: The battery management system sends first target signals in all target signals to a first group of battery monitoring units through a pulse width modulation wire harness, wherein the target signals are signals with specified frequency and specified duty ratio, and the signals with different target signals with different specified frequencies and specified duty ratios are different; each battery monitoring unit collects signals sent to the battery monitoring unit through a pulse width modulation wire harness, and the collected signals are compared with each target signal to determine the target signals collected by the battery monitoring unit; The battery monitoring unit encodes the self position according to the determined position corresponding to the target signal acquired by the battery monitoring unit, so as to obtain the self position identification, and when the battery monitoring unit communicates with the battery management system, the battery monitoring unit sends the communication ID in the communication ID range corresponding to the self position identification to the battery management system through the CAN bus; The battery monitoring unit sends the target signal corresponding to the next position of the battery monitoring unit to the corresponding current downstream object through a pulse width modulation wire harness, wherein the current downstream object corresponding to the battery monitoring unit refers to the battery monitoring unit or the battery management system which is connected with the battery monitoring unit through pulse width modulation and does not send signals to the battery monitoring unit through pulse width modulation at present; the battery management system collects signals sent to the battery monitoring unit by the last group of battery monitoring units through a pulse width modulation wire harness, and determines the target signals collected by the battery monitoring unit by comparing the collected signals with the target signals; The battery management system determines the number of the battery monitoring units based on the determined target signals acquired by the battery management system.
  2. 2. The method of claim 1, wherein the battery monitoring unit collects signals transmitted thereto by a pulse width modulation harness and determines the target signals collected by itself by comparing the collected signals with the respective target signals, comprising: Continuously collecting signals sent to the target signal through a pulse width modulation wire harness, comparing the collected signals with each target signal every time one signal is collected until the deviation between the continuously collected preset number of signals and one of the target signals meets a preset deviation range, and determining the target signals, which meet the preset deviation range with the continuously collected preset number of signals, as the target signals collected by the target signal.
  3. 3. The method according to claim 2, wherein the continuously collecting signals transmitted thereto by the pulse width modulation harness and comparing the collected signals with the respective target signals until deviations of a preset number of the continuously collected signals from one of the target signals satisfy a preset deviation range, and determining the target signals whose deviations from the preset number of the continuously collected signals satisfy the preset deviation range as the target signals collected by themselves, each time one of the signals is collected, comprises: collecting signals sent to the device through a pulse width modulation wire harness; judging whether the current signal set is empty or not; If the current signal set is judged to be empty, comparing the current collected signals with each target signal to determine whether the deviation between the current collected signals and any one of the target signals meets a preset deviation range; If the deviation between the currently acquired signal and any one of the target signals does not meet the preset deviation range, returning to the step of acquiring the signals sent to the target signal through the pulse width modulation wire harness; If the deviation between the currently acquired signal and any one of the target signals is determined to meet the preset deviation range, determining that the currently acquired signal belongs to the target signal with the deviation meeting the preset deviation range, and placing the currently acquired signal in the current signal set; If the current signal set is judged not to be empty, comparing whether the deviation of the currently acquired signal and the target signal to which the signal in the current signal set belongs meets a preset deviation range or not; If the deviation between the currently acquired signal and the target signal to which the signal in the current signal set belongs does not meet the preset deviation range, the current signal set is emptied, and the step of acquiring the signal sent to the current signal set through a pulse width modulation wire harness is executed in a returning mode; if the deviation between the currently acquired signal and the target signal to which the signal in the current signal set belongs is compared and meets a preset deviation range, the currently acquired signal is placed in the current signal set; judging whether the number of signals in the current signal set is the preset number or not; If the number of the signals in the current signal set is not the preset number, returning to the step of collecting the signals sent to the current signal set through the pulse width modulation wire harness; If the number of the signals in the current signal set is judged to be the preset number, determining the target signal to which the signals in the current signal set belong as the target signal acquired by the user.
  4. 4. The method of claim 1, wherein the battery monitoring unit transmits the target signal corresponding to a next position of its own position to its corresponding current downstream object through a pulse width modulation harness, comprising: And the battery monitoring unit updates the determined target signal acquired by the battery monitoring unit according to the preset unit change quantity to obtain the target signal corresponding to the next position of the battery monitoring unit, and sends the target signal to the corresponding current downstream object.
  5. 5. The method according to claim 4, wherein the battery monitoring unit updates the determined target signal acquired by the battery monitoring unit according to a preset unit change amount to obtain the target signal corresponding to a next position of the battery monitoring unit, and the method comprises: and the battery monitoring unit keeps the determined frequency of the target signal acquired by the battery monitoring unit unchanged, and increases the duty ratio by a preset unit change proportion to obtain the target signal corresponding to the next position of the battery monitoring unit.
  6. 6. The method of claim 4, wherein the battery management system determining the number of battery monitoring units based on the determined self-collected target signal comprises: Comparing the first target signal with the determined target signal acquired by the target signal acquiring device to obtain a total signal variation; dividing the total signal variation by the preset unit variation to obtain the number of the battery monitoring units.
  7. 7. The method as recited in claim 1, further comprising: after the battery management system sends the first target signal, monitoring whether the last group of signals sent to the battery monitoring unit through a pulse width modulation wire harness are collected in a preset time or not in real time; and if the last group of signals sent to the battery monitoring unit through the pulse width modulation wire harness are not collected within the preset time, sending alarm information.
  8. 8. A vehicle-mounted communication system, comprising: a battery management system and a plurality of battery monitoring units; wherein, each group of the battery monitoring units are sequentially connected through a pulse width modulation wire harness; The battery management system is respectively connected with a first group of battery monitoring units and a last group of battery monitoring units through pulse width modulation wire harnesses, and is respectively connected with each battery monitoring unit through the same CAN bus, and the vehicle-mounted communication method comprises the following steps: The battery management system is used for transmitting first target signals in all target signals to a first group of battery monitoring units through a pulse width modulation wire harness, collecting signals transmitted to the battery monitoring units through the pulse width modulation wire harness by the last group of battery monitoring units, comparing the collected signals with the target signals, determining the target signals collected by the battery management system, and determining the number of the battery monitoring units based on the determined target signals collected by the battery management system, wherein the target signals are signals with specified frequency and specified duty ratio, and the specified frequency and the specified duty ratio of different target signals are different; The battery monitoring unit is used for collecting signals sent to the battery monitoring unit through a pulse width modulation wire harness and determining the target signals collected by the battery monitoring unit by comparing the collected signals with the target signals; Coding the self position according to the determined position corresponding to the target signal acquired by the self, and obtaining the self position identification so as to send the communication ID in the communication ID range corresponding to the self position identification to the battery management system through the CAN bus when communicating with the battery management system; The method comprises the steps of sending a target signal corresponding to a next position of a self position to a corresponding current downstream object through a pulse width modulation wire harness, wherein the current downstream object corresponding to a battery monitoring unit refers to the battery monitoring unit or the battery management system which is connected with the current downstream object through pulse width modulation and does not send signals to the current downstream object through pulse width modulation, and the target signal corresponding to the next position is obtained by updating the target signal acquired by the self through a preset unit change amount.
  9. 9. An electronic device, comprising: A memory and a processor; Wherein the memory is used for storing programs; The processor is configured to execute the program, and the program is specifically configured to implement the vehicle-mounted communication method according to any one of claims 1 to 7 when executed.
  10. 10. A computer storage medium storing a computer program which, when executed, is adapted to carry out the vehicle-mounted communication method according to any one of claims 1 to 7.

Description

Vehicle-mounted communication method and system, electronic equipment and storage medium Technical Field The present application relates to the field of vehicle communications technologies, and in particular, to a vehicle communications method and system, an electronic device, and a storage medium. Background A plurality of battery monitoring units (BatteryMonitorUnit, BMU) are generally arranged in the vehicle and are used for collecting data such as battery voltage, temperature and the like and sending the data to a battery management system (BatteryManagement System, BMS) for processing through a CAN bus. In order to distinguish the data sent by each group of BMU, two communication modes are mainly adopted at present, one mode is that each group of BMU is respectively mounted on different CAN buses so as to carry out data transmission through the different CAN buses, and therefore the data sent by each group of BMU CAN be distinguished on the premise that the programs of each group of BMU are consistent. In another way, each group of BMUs is mounted on the same CAN bus, but different programs are required to be downloaded to each group of BMUs respectively, so that different types of communication IDs are generated during communication through the different programs, and data sent by each group of BMUs CAN be distinguished through the communication IDs. However, the number of BMUs is large, so the first approach needs to occupy more CAN bus, thereby wasting resources of the microcontroller unit. In the second way, a large number of different programs need to be compiled and downloaded, which is cumbersome. Disclosure of Invention Based on the defects of the prior art, the application provides a vehicle-mounted communication method and system, electronic equipment and a storage medium, so as to solve the problems of resource waste and relative complexity in the prior art. In order to achieve the above object, the present application provides the following technical solutions: the application provides a vehicle-mounted communication method, which is applied to a vehicle-mounted communication system, wherein the vehicle-mounted communication system comprises a battery management system and a plurality of groups of battery monitoring units, each group of battery monitoring units is sequentially connected through a pulse width modulation wire harness, the battery management system is respectively connected with a first group of battery monitoring units and a last group of battery monitoring units in the battery management system through the pulse width modulation wire harness, and is respectively connected with each battery monitoring unit through the same CAN bus, and the vehicle-mounted communication method comprises the following steps: The battery management system sends first target signals in all target signals to a first group of battery monitoring units through a pulse width modulation wire harness, wherein the target signals are signals with specified frequency and specified duty ratio; each battery monitoring unit collects signals sent to the battery monitoring unit through a pulse width modulation wire harness, and the collected signals are compared with each target signal to determine the target signals collected by the battery monitoring unit; The battery monitoring unit encodes the self position according to the determined position corresponding to the target signal acquired by the battery monitoring unit, so as to obtain the self position identification, and when the battery monitoring unit communicates with the battery management system, the battery monitoring unit sends the communication ID in the communication ID range corresponding to the self position identification to the battery management system through the CAN bus; The battery monitoring unit sends the target signal corresponding to the next position of the battery monitoring unit to the corresponding current downstream object through a pulse width modulation wire harness, wherein the current downstream object corresponding to the battery monitoring unit refers to the battery monitoring unit or the battery management system which is connected with the battery monitoring unit through pulse width modulation and does not send signals to the battery monitoring unit through pulse width modulation at present; the battery management system collects signals sent to the battery monitoring unit by the last group of battery monitoring units through a pulse width modulation wire harness, and determines the target signals collected by the battery monitoring unit by comparing the collected signals with the target signals; The battery management system determines the number of the battery monitoring units based on the determined target signals acquired by the battery management system. Optionally, in the vehicle-mounted communication method, the battery monitoring unit collects signals sent to the battery monitoring unit by a pulse width modulation w