Controller domain network message processing method and device and electronic equipment

By determining the distinguishing information and preset rules of the CAN message data segment, the data volume of the CAN message is reduced, which solves the problem of large network traffic usage when uploading CAN messages in the existing technology, and achieves effective reduction of data volume and traffic flow. savings.

CN118740541APending Publication Date: 2024-10-01BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310325358.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing technology cannot effectively reduce the amount of data when uploading CAN messages, resulting in large network traffic usage and the inability to effectively control the data amount of CAN messages.

Method used

By determining the difference between the current data to be sent and the data segment of the previous CAN message frame, the preset rules are used to determine the target data from the original data. The data amount of the target data is smaller than the original data amount, and is included in the data segment and header of the message. Segments record differentiated information to reduce the amount of data.

Benefits of technology

It achieves the reduction of CAN message data volume, saves network traffic, and ensures that the receiving end can accurately decode and restore the original data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740541A_ABST
    Figure CN118740541A_ABST
Patent Text Reader

Abstract

The invention provides a controller domain network message processing method and device and electronic equipment, and the method comprises the steps: determining the distinguishing information of current to-be-sent first data and second data recorded in a data segment of a previous frame of controller domain network message, and determining target data from the first data through employing a preset rule based on the distinguishing information, the data size of the target data is smaller than the data size of the first data, the target data is recorded in the data segment of the current frame controller domain network message, and the distinguishing information is recorded in the header segment of the current frame controller domain network message, so that the target data with smaller data size can be determined from the first data as the data sent by the current controller domain network message; therefore, the effect of reducing the data volume of the controller domain network message is achieved, and a large amount of network flow is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of vehicle data processing, and in particular to a controller area network message processing method, device and electronic equipment. Background Art

[0002] CAN is the abbreviation of Controller Area Network (CAN), which is one of the most widely used field buses. The CAN bus protocol has become the standard bus for automotive computer control systems and embedded industrial control local area networks. At present, multiple groups of CAN messages obtained by the actual vehicle need to be uploaded to the cloud. In order to reduce the network traffic occupied during uploading, the data volume of the CAN message needs to be reduced. In related technologies, compression software is usually used to compress CAN messages, and the data volume of the CAN message itself cannot be controlled. Therefore, when the original data volume is large, it will still occupy a lot of network traffic. Summary of the invention

[0003] The present disclosure proposes a controller area network message processing method, device and electronic device, aiming to solve one of the technical problems in the related art at least to a certain extent.

[0004] The first aspect of the present disclosure provides a controller area network message processing method, including: determining difference information between first data to be sent and second data recorded in a data segment of a previous frame controller area network message; based on the difference information, determining target data from the first data using preset rules, wherein the data volume of the target data is less than the data volume of the first data; and recording the target data in the data segment of the current frame controller area network message, and recording the difference information in the header segment of the current frame controller area network message.

[0005] The second aspect of the present disclosure proposes a controller area network message processing device, including: a first determination module, used to determine the difference information between the first data to be sent and the second data recorded in the data segment of the previous frame controller area network message; a second determination module, used to determine the target data from the first data based on the difference information and using preset rules, wherein the data volume of the target data is smaller than the data volume of the first data; and a recording module, used to record the target data in the data segment of the current frame controller area network message, and record the difference information in the header segment of the current frame controller area network message.

[0006] An embodiment of the third aspect of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the controller area network message processing method of the embodiment of the present disclosure.

[0007] The fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the controller area network message processing method disclosed in the embodiment of the present disclosure.

[0008] A fifth aspect of the present disclosure provides a vehicle, wherein the vehicle includes an electronic device according to the first aspect.

[0009] In this embodiment, by determining the difference information between the first data to be sent and the second data recorded in the data segment of the previous frame controller area network message, and based on the difference information, determining the target data from the first data using preset rules, wherein the data volume of the target data is smaller than the data volume of the first data, and recording the target data in the data segment of the current frame controller area network message, and recording the difference information in the header segment of the current frame controller area network message, the target data with a smaller data volume can be determined from the first data as the data to be sent by this controller area network message, thereby achieving the effect of reducing the data volume of the controller area network message itself, thereby saving a large amount of network traffic.

[0010] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0012] Figure 1 It is a flowchart of a method for processing a controller area network message according to an embodiment of the present disclosure;

[0013] Figure 2 is a flowchart of a method for processing a controller area network message according to another embodiment of the present disclosure;

[0014] Figure 3 It is a schematic diagram of the controller area network message encoding structure in the prior art;

[0015] Figure 4 It is a schematic diagram of the controller area network message encoding structure provided according to an embodiment of the present disclosure;

[0016] Figure 5 is a schematic diagram of a controller area network message processing device provided according to another embodiment of the present disclosure;

[0017] Figure 6 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0018] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0019] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0020] It should be noted that the executor of the CAN message processing method of this embodiment may be a CAN message processing device, which may be implemented by software and / or hardware, and may be configured in an electronic device, which may include but is not limited to a terminal, a server, etc.

[0021] Figure 1 FIG. 1 is a flow chart of a method for processing a controller area network message according to an embodiment of the present disclosure, such as Figure 1 As shown, the method includes:

[0022] S101: Determine difference information between first data to be sent currently and second data recorded in a data segment of a previous controller area network message.

[0023] Among them, the controller area network message (i.e., CAN message) refers to the frame in which the sending unit transmits data to the receiving unit, and the CAN message frame can be used to transmit data generated in any scenario. Among them, each frame of the controller area network message includes a data segment and a header segment. The data segment is used to record the actual data (DATA) to be transmitted, and the header segment is used to record the message information of each frame of the controller area network message. The message information, for example, the controller area network message timestamp (Real time), the controller area network message sequence number (ID), the controller area network message network channel information (Type&CH), the controller area network message data length (Data Length Code, DLC) and other information, which are not limited.

[0024] In the disclosed embodiments, the controller area network message can be used, for example, in a vehicle data transmission scenario to transmit data generated by a vehicle electronic control unit (ECU) to the cloud via a CAN message. The data can be data generated by one or more electronic control units in the vehicle, and there is no limitation on this.

[0025] Among them, the actual data generated by the vehicle ECU at the current time and requiring controller area network message transmission can be called the first data, that is, the data to be transmitted by the current frame controller area network message. The first data can be any possible data and can be data of any byte amount (N bytes), without any restriction.

[0026] Compared with the current frame CAN message, the CAN message sent at the previous moment can be called the previous frame CAN message, and the data recorded in the data segment of the previous frame CAN message can be called second data, that is, the second data is, for example, data generated by the vehicle ECU at the previous time.

[0027] In the embodiment of the present disclosure, after determining the first data to be sent, the first data and the second data may be subjected to a bitwise XOR logic operation to obtain difference information, and the difference information is used to indicate whether there is a difference between the first data and the second data. In some embodiments, the difference information indicates, for example, that there is no difference between the first data and the second data (i.e., they are completely the same), or indicates that there is a partial difference between the first data and the second data, which is not limited.

[0028] S102: Based on the distinguishing information, determine the target data from the first data using a preset rule.

[0029] The data to be transmitted by the current frame CAN message may be referred to as target data. The target data may be determined from the first data based on the distinguishing information, and the data volume of the target data is smaller than the data volume of the first data.

[0030] The preset rule refers to a rule for determining target data from the first data, wherein different distinguishing information may correspond to different preset rules, and no specific limitation is made here on the specific content of the rule.

[0031] After the distinguishing information is determined as described above, further, this embodiment can determine different target data from the first data using corresponding preset rules based on different distinguishing information.

[0032] In some embodiments, when the difference information indicates that there is no difference between the first data and the second data, that is, the data to be transmitted by the current frame controller area network message is exactly the same as the data transmitted by the previous frame controller area network message, then in order to avoid transmitting the same data and wasting traffic resources, the preset rule of this embodiment may be to determine empty data as the target data, that is, the data transmitted by the current frame controller area network message is empty.

[0033] In some other embodiments, the data transmitted by the controller area network message carries a check bit (checksum), that is, the first data and the second data include actual data and a check bit. If the distinction information indicates that there is a difference in the check bits of the first data and the second data, that is, the data to be transmitted by the controller area network message in the current frame is the same as the actual data transmitted by the controller area network message in the previous frame, only the check bit is different. In this case, the preset rule of this embodiment may be to determine the value of the check bit (checksum) and the message counter (rolling counter) in the first data as the target data, that is, only the check bit (checksum) and the message counter (rolling counter) data in the first data are retained as the transmission data.

[0034] In some other embodiments, when the difference information indicates that there is a difference between the target bytes of the first data and the second data, that is, there is a difference between the first data and part of the second data, then the preset rule of this embodiment may be to determine the position of the target byte in the first data and the value of the target byte as the target data, wherein the target byte may be one byte or multiple bytes, without limitation.

[0035] S103: Record the target data in the data segment of the current frame CAN message, and record the distinguishing information in the header segment of the current frame CAN message.

[0036] That is to say, this embodiment records the target data in the data segment of the controller area network message of the current frame to send the target data.

[0037] For example, when the target data is empty data, the data segment DATA of the current frame controller area network message is 0 byte, which can save 8-64 bytes of data space in actual applications; when the target data is checksum and rolling counter data, the number of bytes (byte) of the data segment DATA of the current frame controller area network message is the number of bytes of the checksum and rolling counter, which occupies 2 bytes and can save 6-62 bytes; when the target data is the position of the target byte and the value of the target byte, the data segment DATA of the current frame controller area network message is the position of the target byte and the byte of the target byte, which occupies 2 bytes and saves 6-62 bytes.

[0038] Since the present embodiment sends the target data in the first data, in order for the receiving unit (e.g., the cloud) to accurately decode the current frame CAN message to restore the first data, the present embodiment also configures the header segment of the current frame CAN message with a storage byte corresponding to the distinguishing information, and uses the storage byte to record the distinguishing information. Thus, the receiving unit can restore the target data based on the distinguishing information to obtain the first data.

[0039] It should be noted that, in this embodiment, after the current frame CAN message records data, the current frame CAN message may be compressed and then the compressed data may be sent.

[0040] In this embodiment, by determining the difference information between the first data to be sent and the second data recorded in the data segment of the previous frame controller area network message, and based on the difference information, determining the target data from the first data using preset rules, wherein the data volume of the target data is smaller than the data volume of the first data, and recording the target data in the data segment of the current frame controller area network message, and recording the difference information in the header segment of the current frame controller area network message, the target data with a smaller data volume can be determined from the first data as the data to be sent by this controller area network message, thereby achieving the effect of reducing the data volume of the controller area network message itself, thereby saving a large amount of network traffic.

[0041] Figure 2 FIG. 1 is a flow chart of a method for processing a controller area network message according to another embodiment of the present disclosure, such as Figure 2 As shown, the method includes:

[0042] S201: Determine the total number of bits required to record information of multiple messages of a controller area network message.

[0043] In practical applications, Figure 3 It is a schematic diagram of the controller area network message encoding structure in the prior art, such as Figure 3As shown, the actual data (DATA) to be transmitted is encoded and recorded in the data segment of the CAN message, and message information such as the timestamp (Realtime), sequence number (ID), channel type (Type&CH), and data length (DLC) are encoded and recorded in the header segment of the CAN message; and, in the related art, corresponding storage bytes (byte) are configured for different message information for encoding, for example, 8 bytes are allocated for encoding for the timestamp (Real time), 1 byte is allocated for encoding for the network channel information (Type&CH) and the data length (DLC), and 2 bytes are allocated for encoding for the sequence number (ID). That is to say, the header segment of the existing CAN message is configured with a total of 12 storage bytes. However, in actual applications, the timestamp (Real time) requires 8 bytes to be encoded, while the ID usually requires 11 bits (11 bits) to be encoded, the Type&CH requires 5 bits (5 bits) to be encoded, and the DLC requires 4 bits (4 bits) to be encoded. Therefore, the storage bytes allocated for different message information may not be fully utilized. For example, 2 bytes (16 bits) are allocated for the sequence number (ID), so 5 bits of the storage bytes used to encode the ID are not used; similarly, 3 bits of the storage bytes used to encode the Type&CH are not used, and 4 bits of the storage bytes used to encode the DLC are not used. Therefore, in the process of CAN message transmission, the unused bits of the header segment will also cause traffic waste.

[0044] In view of this, when configuring storage bytes for the header segment of the CAN message, this embodiment first determines the number of bits required to record each message information, and further accumulates the number of bits required for each message information to determine the total number of bits required to record multiple message information of the CAN message.

[0045] For example, Figure 4 is a schematic diagram of a controller area network message encoding structure provided according to an embodiment of the present disclosure, such as Figure 4 As shown, multiple message information of this embodiment, such as timestamp (Real time), sequence number (ID), network channel information (Type&CH), data length (DLC), and distinguishing information identification (Flags, corresponding to distinguishing information), wherein the timestamp requires 64 bits (64 bits), the ID requires 11 bits (11 bits), the Type&CH requires 5 bits (5 bits), the DLC requires 4 bits (4 bits), and the Flags require 4 bits (4 bits), so the total number of bits is 88 bits, i.e.: 88 bits.

[0046] S202: Calculate the ratio of the total number of bits to the number of bits per unit byte and round it up to the integer number to be used as the number of bytes stored in the header segment.

[0047] The number of bits in a unit byte (1 byte) is 8, that is, this embodiment calculates the ratio of the total number of bits to 8 and rounds it up, and uses the calculation result as the number of bytes stored in the header segment of this embodiment. Therefore, this embodiment allocates the total storage bytes to multiple message information, so as to record multiple message information using continuous bits.

[0048] For example, if the total number of bits is 88, then 88 / 8=11 is calculated, and the result is rounded up to 11. Then 11 is used as the number of bytes for storing the header segment. That is to say, the present embodiment configures 11 storage bytes for the header segment to encode multiple message information using 88 (11*8) consecutive bits. Compared with the header segment in the prior art, the present embodiment can reduce one storage byte. For another example, if the total number of bits is 54, then 54 / 8=6.75 is calculated, and then 6.75 is rounded up to 7. That is to say, the present embodiment configures 7 storage bytes for the header segment to encode multiple message information using 56 (7*8) consecutive bits.

[0049] In practical applications, such as Figure 4 As shown, 8 consecutive storage bytes (8 bytes) can be allocated for the timestamp (Real time) of the header segment, and 3 consecutive storage bytes (3 bytes) can be allocated for the sequence number (ID), network channel information (Type&CH), data length (DLC), and distinguishing information identification (Flags), among which ID allocates 11 consecutive bits of 3 bytes, Flags allocates 4 consecutive bits, Type&CH allocates 5 consecutive bits, and DLC allocates 4 consecutive bits.

[0050] Therefore, this embodiment reduces the bytes stored in the header segment while ensuring that the header segment can record all message information, thereby further saving traffic resources.

[0051] S203: Determine difference information between the first data to be sent currently and the second data recorded in the data segment of the previous frame of the controller area network message.

[0052] S204: Based on the distinguishing information, determine the target data from the first data using a preset rule.

[0053] S205: Record the target data in the data segment of the controller LAN message of the current frame.

[0054] The specific description of S203-S205 refers to the above embodiment and will not be repeated here.

[0055] S206: Based on a recording rule corresponding to the distinguishing information, the distinguishing information is recorded at a target bit position of the storage byte.

[0056] Among them, Figure 4 As shown, the target bit is the bit corresponding to the distinguishing information identifier Flags, including bit2, bit3, bit4, and bit5. That is to say, this embodiment uses 4 bits of the Flags segment to record the distinguishing information.

[0057] The rule for recording the difference information in the target bit position can be called a recording rule. Different difference information in this embodiment can correspond to different recording rules. Specifically, bit 2 of Flags is used to record the CAN channel type, 0 represents CAN, and 1 represents CANFD; bit 3 is used to record whether there is a difference between the first data and the second data; bit 4 is used to record whether there is a difference between the first data and the second data check bit (check byte); bit 4 is used to record whether the first data and the second data target byte are different.

[0058] In actual applications, when the distinction information indicates that there is no difference between the first data and the second data, the recording rule is, for example, bit3=0; when the distinction information indicates that there is a difference in the check bits of the first data and the second data, the recording rule is, for example, bit3=1and bit4=1; when the distinction information indicates that there is a difference in the target bytes of the first data and the second data, the recording rule is, for example, bit3=1and bit4=0and bit5=1.

[0059] In this embodiment, by determining the difference information between the first data to be sent and the second data recorded in the data segment of the previous frame controller area network message, and based on the difference information, determining the target data from the first data using a preset rule, wherein the data volume of the target data is smaller than the data volume of the first data, and recording the target data in the data segment of the current frame controller area network message, and recording the difference information in the header segment of the current frame controller area network message, the target data with a smaller data volume can be determined from the first data as the data to be sent by the current controller area network message, thereby achieving the effect of reducing the data volume of the controller area network message itself, thereby saving a large amount of network traffic. In addition, while ensuring that the header segment can record all message information, this embodiment reduces the bytes stored in the header segment, further saving traffic resources.

[0060] In order to implement the above embodiments, the present disclosure also proposes a controller area network message processing device.

[0061] Figure 5It is a schematic diagram of a controller area network message processing device provided according to another embodiment of the present disclosure.

[0062] like Figure 5 As shown, the controller area network message processing device 50 includes:

[0063] A first determination module 501 is used to determine difference information between first data to be sent currently and second data recorded in a data segment of a previous frame of a controller area network message;

[0064] A second determination module 502 is configured to determine target data from the first data based on the distinguishing information and using a preset rule, wherein the data volume of the target data is smaller than the data volume of the first data; and

[0065] The recording module 503 is used to record the target data in the data segment of the current frame CAN message, and record the distinguishing information in the header segment of the current frame CAN message.

[0066] In some embodiments, when the difference information indicates that there is no difference between the first data and the second data, the second determination module 502 is specifically configured to: determine empty data as the target data.

[0067] In some embodiments, when the difference information indicates that there is no difference between the first data and the second data, the second determination module 502 is specifically configured to: determine a check bit in the first data and a value of a message counter as the target data.

[0068] In some embodiments, when the difference information indicates that there is no difference between the first data and the second data, the second determination module 502 is specifically used to: determine the position of the target byte in the first data and the value of the target byte as the target data.

[0069] In some embodiments, the device 50 also includes: a third determination module, used to determine the total number of bits required to record multiple message information of the controller area network message; and a configuration module, used to calculate the ratio of the total number of bits to the number of bits per unit byte and round it up to use it as the number of bytes stored in the header segment.

[0070] In some embodiments, the recording module 503 is specifically configured to: record the distinguishing information at a target bit position of the storage byte based on a recording rule corresponding to the distinguishing information.

[0071] In this embodiment, by determining the difference information between the first data to be sent and the second data recorded in the data segment of the previous frame controller area network message, and based on the difference information, determining the target data from the first data using preset rules, wherein the data volume of the target data is smaller than the data volume of the first data, and recording the target data in the data segment of the current frame controller area network message, and recording the difference information in the header segment of the current frame controller area network message, the target data with a smaller data volume can be determined from the first data as the data to be sent by this controller area network message, thereby achieving the effect of reducing the data volume of the controller area network message itself, thereby saving a large amount of network traffic.

[0072] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0073] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When an instruction processor in the computer program product is executed, the controller area network message processing method proposed in the above embodiments of the present disclosure is executed.

[0074] Figure 6 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 6 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0075] like Figure 6 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0076] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.

[0077] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0078] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 Not shown, often called a "hard drive").

[0079] although Figure 6 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.

[0080] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0081] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0082] The processing unit 16 executes various functional applications by running programs stored in the system memory 28, such as implementing the CAN message processing method mentioned in the above embodiments.

[0083] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0084] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0085] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.

[0086] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0087] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0088] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0089] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0090] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0091] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", 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 disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0092] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.

Claims

1. A controller area network message processing method, characterized in that: The method comprises: Determine difference information between first data to be sent currently and second data recorded in the data segment of a previous controller area network message; Based on the distinguishing information, determining target data from the first data using a preset rule, wherein the data volume of the target data is smaller than the data volume of the first data; and The target data is recorded in the data segment of the controller area network message of the current frame, and the distinguishing information is recorded in the header segment of the controller area network message of the current frame.

2. The method according to claim 1, characterized in that When the difference information indicates that there is no difference between the first data and the second data, determining the target data from the first data by using a preset rule includes: Null data is determined as the target data.

3. The method according to claim 1, characterized in that When the difference information indicates that the check bits of the first data and the second data are different, the determining the target data from the first data by using a preset rule includes: A check bit and a value of a message counter in the first data are determined as the target data.

4. The method according to claim 1, characterized in that When the difference information indicates that there is a difference between the target bytes of the first data and the second data, determining the target data from the first data by using a preset rule includes: The position of the target byte in the first data and the value of the target byte are determined as the target data.

5. The method according to claim 1, characterized in that Before recording the distinguishing information in the header section of the controller area network message of the current frame, the method further includes: Determining the total number of bits required to record information of multiple messages of a controller area network message; and The ratio of the total number of bits to the number of bits per unit byte is calculated and rounded up to obtain the ratio as the number of bytes stored in the header segment.

6. The method according to claim 5, characterized in that The recording of the distinguishing information in the header segment of the controller area network message of the current frame includes: Based on a recording rule corresponding to the distinguishing information, the distinguishing information is recorded at a target bit position of the storage byte.

7. A controller area network message processing device, characterized in that: include: A first determination module, used to determine difference information between first data to be sent currently and second data recorded in a data segment of a previous frame of controller area network message; A second determination module, configured to determine target data from the first data based on the distinguishing information and using a preset rule, wherein the data volume of the target data is smaller than the data volume of the first data; as well as The recording module is used to record the target data in the data segment of the current frame controller area network message, and record the distinguishing information in the header segment of the current frame controller area network message.

8. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A vehicle, characterized in that: The vehicle includes the electronic device as claimed in claim 8.

Citation Information

Cited By

  • Data monitoring early warning method and system, computer equipment and storage medium

    CN119322507A