Controller area network bus signal transmission method and device and electric vehicle

By detecting data frames in the CAN transceiver and switching control signals, the precise transmission and response of the CAN bus signal is realized, and the problems of inuniqueness of wake-up signals and bus blockage in the prior art are solved, and communication efficiency and chip design are improved. Integration degree.

CN119299254AInactive Publication Date: 2025-01-10CCORE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411834781.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the transmission of existing controller LAN bus (CAN) signals, the wake-up signal is not unique, causing all components to wake up, increasing system power consumption, and the dedicated chip cannot generate a response signal, resulting in bus blockage.

Method used

By detecting the frame start flag and identifier of the data frame in the CAN transceiver, switching the control signal from low to high to turn on the sending function, writing the dominant bit after the verification domain is completed indicates correct reception, the frame is Switch back to low to turn off the send function and trigger the send function when the data frame matches the preset configuration information.

Benefits of technology

Optimize the bus communication efficiency, avoid bus blockage caused by the sender sending the same data, improve the integration of chip design, and reduce the overall system development cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299254A_ABST
    Figure CN119299254A_ABST
Patent Text Reader

Abstract

The invention relates to a controller area network bus signal transmission method and device and an electric vehicle. The method is applied to a controller, the controller is integrated in a controller local area network bus transceiver, and the method comprises the following steps: receiving a data frame, the data frame comprising a check domain and a response domain; switching the control signal from a low level signal to a high level signal under the condition that the data frame is detected to comprise a frame start mark and an identifier, the high level signal being used for opening a sending function of a controller area network bus transceiver; after the cyclic redundancy check of the check domain is completed, the position of the response slot of the response domain is written into a dominant bit, and the dominant bit is used for indicating that a data frame is correctly received; under the condition that the frame tail of the data frame is detected, the control signal is switched from a high level signal to a low level signal, and the low level signal is used for closing the sending function of the controller area network bus transceiver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic control technology, and in particular to a method and device for transmitting controller area network bus signals, and an electric vehicle. Background Art

[0002] The Controller Area Network (CAN) bus is widely used for communication between different components of automotive electronics. The working status of each component is different under different working conditions. Some components need to exit the low-power mode, while some components still need to continue to maintain a low-power working state.

[0003] In the related art, the recognition of the wake-up signal is realized by adding a detection circuit of dominant level-implicit level-dominant level in the analog circuit of the CAN transceiver or the peripheral configuration circuit of the CAN transceiver chip. The wake-up signal generated by this solution is not unique, and all components with the detection function will be awakened, which cannot achieve precise control and increase the overall power consumption of the system. Although the dedicated chip with the wake-up function can recognize a specific CAN frame, it cannot generate a response signal to the bus to indicate a response, which causes the CAN sender to keep sending data. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device and electric vehicle for transmitting controller area network bus signals in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for transmitting a controller area network bus signal, which is applied to a controller, wherein the controller is integrated in a controller area network bus transceiver, and the method comprises:

[0006] receiving a data frame, wherein the data frame includes a check field and a response field;

[0007] When it is detected that the data frame includes a frame start flag and an identifier, the control signal is switched from a low level signal to a high level signal, wherein the high level signal is used to turn on the transmission function of the controller area network bus transceiver;

[0008] After the cyclic redundancy check of the check field is completed, the answer slot position of the answer field is written into a dominant bit, and the dominant bit is used to indicate that the data frame is correctly received;

[0009] When the end of the data frame is detected, the control signal is switched from a high level signal to a low level signal, and the low level signal is used to turn off the sending function of the controller area network bus transceiver.

[0010] In one embodiment, after receiving the data frame, the method further includes:

[0011] When the identifier, data length and data content of the data frame match the preset configuration information, a process of turning on the sending function of the controller area network bus transceiver is triggered.

[0012] In one embodiment, the process of determining whether the identifier of the data frame matches the preset configuration information includes:

[0013] Obtaining an identifier of the data frame and a mask in preset configuration information;

[0014] It is determined whether to match the identifier of the data frame based on the mask, and the length of the mask is the same as the identifier of the data frame.

[0015] In one embodiment, the method further comprises:

[0016] Obtaining a preset identifier in the preset configuration information, where each bit of the preset identifier corresponds to a mask;

[0017] In the case where the mask of the target position of the preset identifier is a to-be-matched bit, matching the value at the target position of the identifier of the data frame with the value at the target position of the preset identifier;

[0018] In the case where the mask of the target position of the preset identifier is a default matching bit, the identifier automatically marked as a data frame matches the preset identifier.

[0019] In one embodiment, matching the value at the target position of the identifier of the data frame with the value at the preset identifier target position includes:

[0020] In the case where at least one bit in the mask of the to-be-matched bits matches a corresponding position in the preset identifier, the identifier marked as the data frame matches the preset identifier.

[0021] In a second aspect, the present application further provides a controller, the controller comprising a data configuration unit, a protocol parsing unit and a data comparison unit;

[0022] The data configuration unit is used to configure preset configuration information;

[0023] The protocol parsing unit is used to parse the received data frame and verify whether the data frame is received correctly;

[0024] The data comparison unit is used to match the received data frame with the preset configuration information and trigger the process of turning on the sending function of the controller area network bus transceiver;

[0025] The controller is used to implement the steps of any one of the methods described above.

[0026] In a third aspect, the present application further provides a transmission device for a controller area network bus signal, which is applied to a controller, wherein the controller is integrated in a controller area network bus transceiver, and the device comprises:

[0027] A receiving module, used for receiving a data frame, wherein the data frame includes a check field and a response field;

[0028] A switching module, used for switching the control signal from a low level signal to a high level signal when it is detected that the data frame includes a frame start flag and an identifier, wherein the high level signal is used for turning on a transmission function of the controller area network bus transceiver;

[0029] A verification module, used for writing the response slot position of the response field into a dominant bit after the cyclic redundancy check of the check field is completed, wherein the dominant bit is used for indicating that the data frame is correctly received;

[0030] The closing module is used to switch the control signal from a high level signal to a low level signal when the end of the data frame is detected, and the low level signal is used to close the sending function of the controller area network bus transceiver.

[0031] In one of the embodiments, after receiving the data frame, the device further includes:

[0032] When the identifier, data length and data content of the data frame match the preset configuration information, a process of turning on the transmission function of the controller area network bus transceiver is triggered. In one embodiment,

[0033] In one embodiment, the process of determining whether the identifier of the data frame matches the preset configuration information includes:

[0034] Obtaining an identifier of the data frame and a mask in preset configuration information;

[0035] It is determined whether to match the identifier of the data frame based on the mask, and the length of the mask is the same as the identifier of the data frame.

[0036] In one embodiment, the device further comprises:

[0037] Obtaining a preset identifier in the preset configuration information, where each bit of the preset identifier corresponds to a mask;

[0038] In the case where the mask of the target position of the preset identifier is a to-be-matched bit, matching the value at the target position of the identifier of the data frame with the value at the target position of the preset identifier;

[0039] In the case where the mask of the target position of the preset identifier is a default matching bit, the identifier automatically marked as a data frame matches the preset identifier.

[0040] In one embodiment, matching the value at the target position of the identifier of the data frame with the value at the preset identifier target position includes:

[0041] In the case where at least one bit in the mask of the to-be-matched bits matches a corresponding position in the preset identifier of the data frame, the identifier marked as the data frame matches the preset identifier.

[0042] In a fourth aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the controller area network bus signal transmission method are implemented.

[0043] In a fifth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for transmitting a controller area network bus signal are implemented.

[0044] In a sixth aspect, the present disclosure further provides an electric vehicle, the electric vehicle comprising the controller described above, the controller being integrated in a controller area network bus transceiver;

[0045] The controller is used for the steps of any one of the above methods.

[0046] The above-mentioned method for transmitting CAN bus signals has at least the following beneficial effects:

[0047] The embodiment scheme provided by the present disclosure optimizes the bus communication efficiency by identifying and detecting data frames and adding a function of temporarily turning on the sending function of the controller LAN bus transceiver. After the receiver correctly receives the data frame, it can respond to the sender in a timely manner, avoiding the situation where the sender keeps sending the same data and causes bus congestion. In addition, the controller LAN bus transceiver can be directly integrated into a chip design with a controller LAN bus transceiver that has a sending requirement, without using a dedicated sending chip to generate a sending signal, thereby improving the integration of the chip design and reducing the overall system development cost.

[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0050] Figure 1 is a schematic diagram of a controller in one embodiment;

[0051] Figure 2 A schematic diagram of a flow chart of a method for transmitting a controller area network bus signal in one embodiment;

[0052] Figure 3 is a schematic diagram of the structure of a standard frame in an embodiment;

[0053] Figure 4 A schematic diagram of transmission of a controller area network bus signal in one embodiment;

[0054] Figure 5 A schematic diagram of the timing changes of the control signal and the response field of a standard frame in one embodiment;

[0055] Figure 6 It is a logic diagram of identifier comparison in one embodiment;

[0056] Figure 7 A schematic diagram of data comparison logic in an embodiment;

[0057] Figure 8 A structural block diagram of a transmission device for a controller area network bus signal in one embodiment;

[0058] Fig. 9 is an internal structure diagram of a computer device in one embodiment;

[0059] Fig.10 The figure is a diagram of the internal structure of a server in one embodiment. DETAILED DESCRIPTION

[0060] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0061] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0062] The present disclosure provides a method for transmitting a controller area network bus signal, which is applied to Figure 1 The controller in Figure 1 The schematic diagram of a controller in an embodiment includes a data configuration unit, a protocol parsing unit and a data comparison unit. The data configuration unit stores the configuration information (cfg-data) of each data segment in the CAN frame format, the protocol parsing unit performs data parsing on the received CAN frame (rxd) and outputs ACK (Acknowledge character) and verifies whether the data frame is correctly received, and the data comparison unit compares the parsed data segments of the CAN frame with the configuration information and outputs a specific frame wake-up signal (wuf).

[0063] In some embodiments of the present disclosure, Figure 2 As shown, a method for transmitting a controller area network bus signal is provided, and the method is applied to Figure 1 The controller in the embodiment processes the data frame as an example. In a specific embodiment, the method may include the following steps:

[0064] S202: Receive a data frame, where the data frame includes a check field and a response field.

[0065] In the CAN (Controller Area Network) communication protocol, a data frame is a frame type used to transmit actual data. A complete CAN data frame consists of multiple different fields to ensure the correct transmission and reception of data. A data frame can include a start field (Start of Frame, SOF): marking the beginning of a frame of information; an arbitration field (Arbitration Field): an identifier (Identifier, ID): used to distinguish different types of messages, for standard frames, the ID length is 11 bits, for extended frames, the ID length is 29 bits, and a remote transmission request (RTR, Remote Transmission Request) bit; a control field (Control Field): a data length code (Data Length Code, DLC) indicates how many bytes of data are contained in the data field, IDE (Identifier Extension) bit: used to distinguish between standard frames and extended frames, r0 / r1 reserved bits; a data field (Data Field) contains the actual data to be transmitted; a check field (CRC, Cyclic Redundancy Check Field) is used to detect errors that may occur during data transmission; an ACK field (ACK Field) contains an ACK slot (ACK Slot) and an ACK delimiter (ACK Delimiter); and an end of frame (EOF, End of Frame) indicates the end of the frame. Figure 3 FIG. 4 is a schematic diagram of the structure of a standard frame in an embodiment.

[0066] S204: When it is detected that the data frame includes a frame start flag and an identifier, the control signal is switched from a low level signal to a high level signal, wherein the high level signal is used to enable a sending function of the controller area network bus transceiver.

[0067] Parse the received data frame and extract the identifier and frame start flag. The frame start flag is the first bit of the data frame, indicating the beginning of a new frame. The identifier is an important part of the data frame, which is used to identify the message type and priority. It can be determined whether a response or other data needs to be sent based on the identifier. The control signal (tx_en signal) can be used to control the transmit function of the CAN transceiver. Pulling the tx_en signal high means enabling the transmit mode of the CAN transceiver, making it ready to send data. It takes a certain amount of time for the CAN transceiver to switch from receive mode to transmit mode to stabilize its internal circuit. After pulling the tx_en signal high, a certain amount of opening time is reserved for the CAN transceiver to ensure that its transmit circuit is fully ready and can reliably send data.

[0068] S206: After the cyclic redundancy check of the check field is completed, the response slot position of the response field is written into a dominant bit, and the dominant bit is used to indicate that the data frame is correctly received.

[0069] The data frame contains a CRC (Cyclic Redundancy Check) field, which can be used to detect errors in the data transmission process and perform a cyclic redundancy check (CRC check). After receiving the complete CAN frame, the receiving node will calculate the CRC value and compare it with the CRC value in the frame. If the calculated CRC value is consistent with the CRC value in the frame, the CRC check is considered successful. In the data frame, the ACK segment is located after the CRC field, including an ACK slot (ACK Slot) and an ACK delimiter (ACK Delimiter). The ACK slot is a bit that the receiving node can use to confirm whether the frame has been received correctly. When the receiving node successfully completes the CRC check, it can write a dominant bit (logic 0) in the ACK slot to indicate that the data frame has been received correctly. The sending node will monitor the ACK slot. If it reads a dominant bit (logic 0), it knows that at least one receiving node has received the data frame correctly. Figure 4 FIG. 1 is a schematic diagram of transmission of a controller area network bus signal in an embodiment.

[0070] S208: When the end of the data frame is detected, the control signal is switched from a high level signal to a low level signal, wherein the low level signal is used to turn off the sending function of the CAN bus transceiver.

[0071] After the end of the frame is detected, the control signal can be switched from a high level signal to a low level signal to turn off the transmission function of the CAN transceiver, thereby reducing power consumption. The transmission function of the CAN transceiver can be turned off when data does not need to be sent, thereby reducing the overall power consumption of the system. Figure 5 FIG. 1 is a schematic diagram of the timing changes of the control signal and the response field of a standard frame in an embodiment.

[0072] In the above-mentioned controller area network bus signal transmission method, by identifying and detecting data frames, a function of temporarily turning on the sending function of the controller area network bus transceiver is added, thereby optimizing the bus communication efficiency. After the receiver correctly receives the data frame, it can respond to the sender in time, thereby avoiding the situation where the sender keeps sending the same data and causes bus congestion. In addition, the controller area network bus transceiver can be directly integrated into a chip design with a controller area network bus transceiver that has a sending requirement, without the need to use a dedicated sending chip to generate a sending signal, thereby improving the integration of the chip design and reducing the overall system development cost.

[0073] In some embodiments of the present disclosure, after receiving the data frame, the method further includes:

[0074] When the identifier, data length and data content of the data frame match the preset configuration information, a process of turning on the sending function of the controller area network bus transceiver is triggered.

[0075] The data frame includes an identifier, data length and data content. The data configuration unit allows the user to define a specific data frame as the trigger condition of the wake-up signal, that is, the preset configuration information. The wake-up signal is used to trigger the process of turning on the transmission function of the controller LAN bus transceiver. The wake-up signal will only be generated when the identifier, data length and data content of the data frame match the preset configuration information. Through the data configuration unit, users can easily set and modify the wake-up conditions to meet different application requirements.

[0076] In some embodiments of the present disclosure, the process of determining whether the identifier of the data frame matches the preset configuration information includes:

[0077] Obtaining an identifier of the data frame and a mask in preset configuration information;

[0078] It is determined whether to match the identifier of the data frame based on the mask, and the length of the mask is the same as the identifier of the data frame.

[0079] The mask is used to specify which bits need to be strictly matched and which bits can be ignored and do not need to be matched. The mask can be a binary number with the same length as the identifier.

[0080] In some embodiments of the present disclosure, the method further includes:

[0081] Obtaining a preset identifier in the preset configuration information, where each bit of the preset identifier corresponds to a mask;

[0082] In the case where the mask of the target position of the preset identifier is a to-be-matched bit, matching the value at the target position of the identifier of the data frame with the value at the target position of the preset identifier;

[0083] In the case where the mask of the target position of the preset identifier is a default matching bit, the identifier automatically marked as a data frame matches the preset identifier.

[0084] The bit to be matched can be a bit that needs to be strictly matched, and the mask can be expressed as 0. The default matching bit can be a bit that does not need to be matched, and the mask can be expressed as 1. For example, if the mask of a bit (binary digit) of the preset identifier is 1, the corresponding bit of the identifier of the data frame does not need to be compared with the configuration bit, and it is automatically considered that the comparison is consistent; if the mask of a bit of the preset identifier is 0, the corresponding bit of the identifier of the data frame must be compared with the configuration bit, and the comparison is considered consistent only when the logical value of the configuration bit and the received bit are the same. Only when the comparison of all bits of the ID is passed, the ID comparison can be considered to have passed. Figure 6 1 is a logic diagram of identifier comparison in an embodiment, wherein “id-mask” represents a mask, “cfg-id” represents a preset identifier, and “rcv-id” represents an identifier of a data frame.

[0085] In some embodiments of the present disclosure, comparing the mask bit that is the bit to be matched with the corresponding data bit in the data frame includes:

[0086] The matching of the value at the target position of the identifier of the data frame with the value at the preset identifier target position comprises:

[0087] In the case where at least one bit in the mask of the to-be-matched bits matches a corresponding position in the preset identifier, the identifier marked as the data frame matches the preset identifier.

[0088] When comparing data, it is required that at least one bit in the mask of the to-be-matched bit is logically 1 at the corresponding position in the preset identifier of the data frame in order to consider the data comparison consistent. Figure 7 This is a logical diagram of data comparison in an embodiment, where “data-mask” represents masked data and “rcv-data” represents data corresponding to the identifier of the data frame.

[0089] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0090] Based on the same inventive concept, the embodiment of the present disclosure also provides a transmission device for a controller area network bus signal for implementing the above-mentioned transmission method for a controller area network bus signal. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiment of the transmission device for a controller area network bus signal provided below can refer to the limitations of the transmission method for a controller area network bus signal in the above text, and will not be repeated here.

[0091] The device may include a system (including a distributed system), software (application), module, component, server, client, etc. that uses the method described in the embodiments of this specification and is combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiments of the present disclosure is as described in the following embodiments. Since the implementation scheme and method of the device to solve the problem are similar, the implementation of the specific device in the embodiments of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0092] In one embodiment, Figure 8 As shown, a transmission device 800 for a controller area network bus signal is provided, which is applied to a controller, and the controller is integrated in a controller area network bus transceiver. The device includes:

[0093] The receiving module 802 is used to receive a data frame, wherein the data frame includes a check field and a response field;

[0094] A switching module 804, configured to switch the control signal from a low level signal to a high level signal when it is detected that the data frame includes a frame start flag and an identifier, wherein the high level signal is used to turn on the transmission function of the controller area network bus transceiver;

[0095] Verification module 806, used for writing the response slot position of the response field into a dominant bit after the cyclic redundancy check of the check field is completed, wherein the dominant bit is used for indicating that the data frame is correctly received;

[0096] The closing module 808 is used to switch the control signal from a high level signal to a low level signal when the end of the data frame is detected, and the low level signal is used to close the sending function of the controller area network bus transceiver.

[0097] In one of the embodiments, after receiving the data frame, the device further includes:

[0098] When the identifier, data length and data content of the data frame match the preset configuration information, a process of turning on the sending function of the controller area network bus transceiver is triggered.

[0099] In one embodiment, the process of determining whether the identifier of the data frame matches the preset configuration information includes:

[0100] Obtaining an identifier of the data frame and a mask in preset configuration information;

[0101] It is determined whether to match the identifier of the data frame based on the mask, and the length of the mask is the same as the identifier of the data frame.

[0102] In one embodiment, the device further comprises:

[0103] Obtaining a preset identifier in the preset configuration information, where each bit of the preset identifier corresponds to a mask;

[0104] In the case where the mask of the target position of the preset identifier is a to-be-matched bit, matching the value at the target position of the identifier of the data frame with the value at the target position of the preset identifier;

[0105] In the case where the mask of the target position of the preset identifier is a default matching bit, the identifier automatically marked as a data frame matches the preset identifier.

[0106] In one embodiment, matching the value at the target position of the identifier of the data frame with the value at the preset identifier target position includes:

[0107] In the case where at least one bit in the mask of the to-be-matched bits matches a corresponding position in the preset identifier, the identifier marked as the data frame matches the preset identifier.

[0108] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0109] Each module in the above-mentioned transmission device for controller area network bus signals can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0110] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data frames. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for transmitting a controller local area network bus signal is implemented.

[0111] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for transmitting controller local area network bus signals is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0112] Those skilled in the art will understand that Fig. 9 , Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0113] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.

[0114] In one embodiment, a computer program product is provided, including a computer program, which implements the method described in any embodiment of the present disclosure when executed by a processor.

[0115] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to this.

[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0117] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.

Claims

1. A method for controlling transmission of a controller area network bus signal, characterized in that: Applied to a controller, the controller being integrated in a controller area network bus transceiver, the method comprising: receiving a data frame, wherein the data frame includes a check field and a response field; When it is detected that the data frame includes a frame start flag and an identifier, the control signal is switched from a low level signal to a high level signal, wherein the high level signal is used to turn on the transmission function of the controller area network bus transceiver; After the cyclic redundancy check of the check field is completed, the answer slot position of the answer field is written into a dominant bit, and the dominant bit is used to indicate that the data frame is correctly received; When the end of the data frame is detected, the control signal is switched from a high level signal to a low level signal, and the low level signal is used to turn off the sending function of the controller area network bus transceiver.

2. The method according to claim 1, characterized in that After receiving the data frame, the method further includes: When the identifier, data length and data content of the data frame match the preset configuration information, a process of turning on the sending function of the controller area network bus transceiver is triggered.

3. The method according to claim 2, characterized in that The process of determining whether the identifier of the data frame matches the preset configuration information includes: Obtaining an identifier of the data frame and a mask in preset configuration information; It is determined whether to match the identifier of the data frame based on the mask, and the length of the mask is the same as the identifier of the data frame.

4. The method according to claim 3, characterized in that The method further comprises: Obtaining a preset identifier in the preset configuration information, where each bit of the preset identifier corresponds to a mask; In the case where the mask of the target position of the preset identifier is a to-be-matched bit, matching the value at the target position of the identifier of the data frame with the value at the target position of the preset identifier; In the case where the mask of the target position of the preset identifier is a default matching bit, the identifier automatically marked as a data frame matches the preset identifier.

5. The method according to claim 4, characterized in that The matching of the value at the target position of the identifier of the data frame with the value at the preset identifier target position comprises: In the case where at least one bit in the mask of the to-be-matched bits matches a corresponding position in the preset identifier, the identifier marked as the data frame matches the preset identifier.

6. A controller, characterized in that: The controller includes a data configuration unit, a protocol parsing unit and a data comparison unit; The data configuration unit is used to configure preset configuration information; The protocol parsing unit is used to parse the received data frame and verify whether the data frame is received correctly; The data comparison unit is used to match the received data frame with the preset configuration information and trigger the process of turning on the sending function of the controller area network bus transceiver; The controller is used to implement the steps of the method according to any one of claims 1 to 5.

7. A transmission device for a controller area network bus signal, characterized in that: Applied to a controller, the controller is integrated in a controller area network bus transceiver, and the device comprises: A receiving module, used for receiving a data frame, wherein the data frame includes a check field and a response field; A switching module, used for switching the control signal from a low level signal to a high level signal when it is detected that the data frame includes a frame start flag and an identifier, wherein the high level signal is used for turning on a transmission function of the controller area network bus transceiver; A verification module, used for writing the answer slot position of the answer field into a dominant bit after the cyclic redundancy check of the check field is completed, wherein the dominant bit is used for indicating that the data frame is correctly received; The closing module is used to switch the control signal from a high level signal to a low level signal when the end of the data frame is detected, and the low level signal is used to close the sending function of the controller area network bus transceiver.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. An electric vehicle, characterized in that: The electric vehicle comprises the controller of claim 6, wherein the controller is integrated in a controller area network bus transceiver; The controller is used to implement the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for analyzing and triggering controller area network (CAN) bus

    CN102355382A

  • Method and device for serial data transmission having a flexible message size and a variable bit length

    CN103782283A

  • Network management system, control method, electronic controller and electric vehicle

    CN114363099A

  • Data transmission system based on CAN bus controller and electronic equipment

    CN115065575A

  • Equipment awakening method, device and system, electronic equipment and storage medium

    CN115309462A