Message compression method and device, electronic equipment and storage medium

By comparing the reference frame of the CAN message with the cyclic redundancy check of the current frame, setting the flag bits and performing byte compression, the problem of low compression rate in the prior art is solved, and more efficient message compression is achieved.

CN119232322APending Publication Date: 2024-12-31GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411302862.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

When compressing CAN packets in the prior art, conventional methods lead to large compression amounts and reduced compression rate, making it difficult to effectively reduce the compression amount of packets and increase compression rate.

Method used

By obtaining the reference frame message and the current frame message, determine whether the cyclic redundancy check is the same. If the same, set the cyclic redundancy flag bit and fill it into the target format message, and then perform byte compression. Avoid duplicate stuffing.

Benefits of technology

Reduces the compression amount of target packets, increases the compression rate, and avoids duplicate content occupies storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232322A_ABST
    Figure CN119232322A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle control method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a reference frame message and a current frame message; determining whether the calculated cyclic redundancy check of the current frame message and the actual cyclic redundancy check of the current frame message are the same or not; if it is determined that the actual cyclic redundancy check is the same as the calculated cyclic redundancy check, it is determined that the cyclic redundancy flag bit of the current frame message is a first flag value, and the first flag value indicates that the cyclic redundancy content corresponding to the current frame message is the same as the cyclic redundancy content corresponding to the reference frame message; and filling the cyclic redundancy flag bit into a message in a target format to obtain a target message, and performing byte compression on the target message and the reference frame message. According to the invention, the cyclic redundancy flag bit indicates that repeated content does not need to be filled again, so that the waste of storage resources of the target message is avoided, the compression amount of the target message is reduced, and the compression rate of the target message is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and more specifically, to a message compression method, device, electronic device and storage medium. Background Art

[0002] CAN message communication is the most common communication method for vehicle-side controllers. Vehicle-side big data needs to be stored on the vehicle side or reported to the cloud, so that the data on the vehicle side or the cloud can be used to monitor vehicle faults and analyze data. For safety reasons, CAN messages with end-to-end mechanisms are increasingly used in vehicle-side communications. The characteristics of end-to-end messages are that each frame of the message contains three parts: a cyclic redundancy check value, a counter value, and a payload value. The counter value increases each frame and is used by the receiver to verify data continuity. The cyclic redundancy check area is the counter area plus the payload area, which is used by the receiver to determine whether the data has been tampered with. Therefore, under normal circumstances, the cyclic redundancy check and counter of each frame of the message will change, and conventional compression methods will result in a large amount of compression and a decrease in the compression rate. Therefore, how to reduce the compression amount of the message and increase the compression rate has become an urgent problem to be solved. Summary of the invention

[0003] In view of this, the embodiments of the present application propose a message compression method, device, electronic device and storage medium to improve the above-mentioned problems.

[0004] According to the first aspect of an embodiment of the present application, a message compression method is provided, the method comprising: obtaining a reference frame message and a current frame message; determining whether a calculated cyclic redundancy check of the current frame message and an actual cyclic redundancy check of the current frame message are the same; if it is determined that the actual cyclic redundancy check is the same as the calculated cyclic redundancy check, determining that the cyclic redundancy flag of the current frame message is a first flag value, wherein the first flag value indicates that the cyclic redundancy content corresponding to the current frame message is the same as the corresponding cyclic redundancy content in the reference frame message; filling the cyclic redundancy flag into a message in a target format to obtain a target message, and performing byte compression on the target message and the reference frame message.

[0005] According to the second aspect of the embodiment of the present application, a message compression device is provided, the device comprising: a message acquisition module, used to acquire a reference frame message and a current frame message; a determination module, used to determine whether a calculated cyclic redundancy check of the current frame message and an actual cyclic redundancy check of the current frame message are the same; a cyclic redundancy flag first determination module, used to determine that the cyclic redundancy flag of the current frame message is a first flag value if it is determined that the actual cyclic redundancy check is the same as the calculated cyclic redundancy check, wherein the first flag value indicates that the cyclic redundancy content corresponding to the current frame message is the same as the corresponding cyclic redundancy content in the reference frame message; a first compression module, used to fill the cyclic redundancy flag into a message of a target format to obtain a target message, and perform byte compression on the target message and the reference frame message.

[0006] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the message compression method as described above is implemented.

[0007] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the message compression method as described above is implemented.

[0008] In the scheme of the present application, the reference frame message and the current frame message are first obtained, and it is determined whether the calculated cyclic redundancy check of the current frame message is the same as the actual cyclic redundancy check of the current message. In this way, when it is determined that the calculated cyclic redundancy check of the current frame message is the same as the actual cyclic redundancy check of the current message, the cyclic redundancy flag of the current frame message is determined as the first flag value, and then the cyclic redundancy flag as the first flag value is filled into the message of the target format to obtain the target message, and finally the target message and the reference frame message are compressed. The method of the present application indicates that the cyclic redundancy content corresponding to the current frame message is the same as the cyclic redundancy content corresponding to the reference frame message by using the cyclic redundancy flag as the first flag value, and then, there is no need to fill the repeated content again, so that the repeated content does not occupy the storage resources of the target message, and because there is no need to fill the repeated content again, the compression amount of the target message is reduced, and then the compression rate of the target message is improved.

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

[0010] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0011] Figure 1 It is a flowchart of a message compression method according to an embodiment of the present application.

[0012] Figure 2 It is a flowchart of a message compression method according to another embodiment of the present application.

[0013] Figure 3 It is a flowchart of a message compression method according to another embodiment of the present application.

[0014] Figure 4 It is a flowchart of specific steps after step 320 according to an embodiment of the present application.

[0015] Figure 5 It is a flowchart of a message compression method according to another embodiment of the present application.

[0016] Figure 6 It is a flowchart of specific steps after step 520 according to an embodiment of the present application.

[0017] Figure 7 It is a flowchart of the specific steps of step 610 shown in an embodiment of the present application.

[0018] Figure 8 It is a schematic diagram of the working principle of a message compression method according to an embodiment of the present application.

[0019] Fig. 9 It is a flowchart of a message compression method according to another embodiment of the present application.

[0020] Fig.10 It is a block diagram of a message compression device according to an embodiment of the present application.

[0021] Fig.11 It is a hardware structure diagram of an electronic device according to an embodiment of the present application.

[0022] The above-mentioned drawings have shown clear embodiments of the present invention, which will be described in more detail hereinafter. These drawings and textual descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention to computer technicians in this field through specific embodiments. DETAILED DESCRIPTION

[0023] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the present application.

[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices. The flowcharts shown in the accompanying drawings are merely exemplary and do not necessarily include all the contents and operations / steps, nor do they necessarily have to be executed in the order described. For example, some operations / steps may be further decomposed, while some operations / steps may be combined or partially combined, so the actual execution order may change according to the actual situation.

[0027] See also Figure 1 , Figure 1 The message compression method provided by an embodiment of the present application is shown. In a specific embodiment, the message compression method can be applied to Fig.10 The message compression device 700 and the electronic device 800 equipped with the message compression device 700 ( Fig.11 ). The specific process of this embodiment will be described below. Of course, it can be understood that the method can be executed by a vehicle terminal with computing and processing capabilities. Figure 1 The process shown is described in detail, and the message compression method may specifically include the following steps:

[0028] Step 110, obtaining a reference frame message and a current frame message.

[0029] As a way to ensure that the vehicle side can realize different functions, it can be realized through CAN network messages with end-to-end (E2E) functions. Different electronic control units (ECUs) use CAN network messages to realize corresponding functions, for example, turning on the lights when opening the door.

[0030] Optionally, the first frame of the CAN network message obtained can be determined as the reference frame message. Since the messages in different time periods have corresponding data changes, in order to ensure the compression amount when the messages are compressed later, the same part of the message compared to other frames as the reference frame message can be filled and compressed without repeated filling and compression. Therefore, by determining the same part of the current frame message and the reference frame message, the increase in compression amount and the waste of storage space caused by repeated compression of the same content can be avoided.

[0031] Optionally, the reference frame message and the current frame message can be obtained on the CAN network bus, wherein all electronic control units send the CAN network message to the CAN network bus, and then the CAN network bus sends a control signal to the corresponding controller based on the received message, so as to realize the corresponding function or exchange information. Among them, the current frame message can be any frame message, or a frame message obtained in time sequence, and the messages that need to be compressed can be obtained in sequence.

[0032] Step 120, determining whether the calculated cyclic redundancy check of the current frame message and the actual cyclic redundancy check of the current frame message are the same.

[0033] As a method, cyclic redundancy check (CRC) is a channel coding technology that generates a short fixed-bit check code based on data such as network data packets or computer files. It is mainly used to detect or verify errors that may occur after data transmission or storage. Among them, the cyclic redundancy check code is composed of n bits of information code and k bits of check code. The k-bit check bit is spliced ​​after the n-bit data bit, and n+k is the word length of the cyclic redundancy check code, also known as this check code (n+k,n) code. Optionally, the calculated cyclic redundancy check of the current message can be determined by the modulo-2 algorithm. Among them, the length and position signal of the CRC need to be consistent with the vehicle-side CAN protocol stack setting parameters, and the CRC calculation method needs to be consistent with the vehicle-side CAN protocol stack setting parameters.

[0034] Optionally, before the electronic control unit sends a message to the CAN network bus, it will determine the actual cyclic redundancy check corresponding to the message based on the cyclic redundancy check calculation method before sending the message, and add the actual cyclic redundancy check to the corresponding message, and then send the message carrying the actual cyclic redundancy check to the CAN network bus in turn, and then after obtaining the current frame message, the actual cyclic redundancy check of the current frame message can be directly obtained in the current message frame.

[0035] Since the data in the message may change during the message sending process, in order to determine whether the data corresponding to the current frame message received by the CAN network bus has changed, it can be determined by comparing the calculated cyclic redundancy check with the actual cyclic redundancy check. Optionally, if the calculated cyclic redundancy check is the same as the actual cyclic redundancy check, it can be determined that the data corresponding to the current message frame obtained has not changed; if the calculated cyclic redundancy check is the same as the actual cyclic redundancy check, it can be determined that the data corresponding to the current frame message obtained has not changed.

[0036] Step 130: If it is determined that the actual cyclic redundancy check is the same as the calculated cyclic redundancy check, the cyclic redundancy flag of the current frame message is determined to be a first flag value, wherein the first flag value indicates that the cyclic redundancy content corresponding to the current frame message is the same as the corresponding cyclic redundancy content in the reference frame message.

[0037] As a method, when determining that the actual cyclic redundancy check is the same as the calculated cyclic redundancy check, it can be determined that the cyclic redundancy content corresponding to the current frame message has not changed during the message transmission process, and is also the same as the cyclic redundancy content corresponding to the reference frame message, so that the cyclic redundancy flag corresponding to the current frame message can be set to the first flag value, and then the cyclic redundancy flag of the first flag value can be used to mark that the cyclic redundancy check content corresponding to the current frame message is the same as the cyclic redundancy content corresponding to the reference frame message. Optionally, the first flag value can be 1 or other values, and the first flag value can be set according to actual needs.

[0038] Step 140: Fill the cyclic redundancy flag into a message of a target format to obtain a target message, and perform byte compression on the target message and the reference frame message.

[0039] As a method, the cyclic redundancy flag corresponding to the current frame message can be filled into the message of the target format, so that the cyclic redundancy flag with the first flag value in the current frame message can be used to indicate that the cyclic redundancy content corresponding to the current frame message is the same as the cyclic redundancy content corresponding to the reference frame message, and then there is no data in the storage location corresponding to the cyclic redundancy content in the target message, and then, in the process of compressing the target message, the compression amount can be reduced and the compression rate of the target message can be increased.

[0040] Optionally, the target message and the reference frame message are compressed simultaneously, so that after the compressed file is decompressed to obtain the target message and the reference frame message, the corresponding cyclic redundancy content can be obtained in the reference frame message based on the cyclic redundancy flag bit with the first flag value in the target message.

[0041] As another way, before step 130, the calculated cyclic redundancy check of the reference frame message can also be determined based on the cyclic redundancy check calculation method, and the actual cyclic redundancy check carried by the reference frame message can be obtained, and then the calculated cyclic redundancy check of the reference frame message can be compared with the actual cyclic redundancy check of the reference frame message to determine whether the calculated cyclic redundancy check of the reference frame message is the same as the actual cyclic redundancy check of the reference frame message. Then, when it is determined that the calculated cyclic redundancy check of the reference frame message is the same as the actual cyclic redundancy check of the reference frame message, it is determined that the cyclic redundancy content corresponding to the reference frame message is the same as the corresponding cyclic redundancy content in the standard true CAN FD message, so as to determine that the cyclic redundancy flag position of the reference frame message is 1, and the storage byte corresponding to the cyclic redundancy content in the reference frame message is empty; if it is determined that the calculated cyclic redundancy check of the reference frame message is not the same as the actual cyclic redundancy check of the reference frame message, then it is determined that the cyclic redundancy content corresponding to the reference frame message is the same as the standard frame CAN The corresponding cyclic redundancy content in the FD message is different, so as to determine the cyclic redundancy flag position of the reference frame message to be 0, and fill the cyclic redundancy content corresponding to the reference frame message into the storage byte corresponding to the reference frame message, so as to facilitate the subsequent decompression of the compressed reference frame message to quickly and timely obtain the cyclic redundancy content, and to obtain the cyclic redundancy content corresponding to the reference frame message by the cyclic redundancy flag bit of the first flag value in the decompressed target message. Optionally, the standard frame CAN FD message can be divided into a CRC area, a counter area and a payload area, as shown in Table 1 below:

[0042] Table 1 Message format of standard frame CAN FD message

[0043]

[0044] The CRC area occupies 2 bytes, the counter area occupies 1 byte, and the payload area occupies the remaining 61 bytes. During vehicle-side communication, there are a large number of different message IDs, where the ID is the message identification number. For a specific message ID, the vehicle-side communication protocol stack generates the above structured message at a fixed period, such as 10ms or 100ms.

[0045] In an embodiment of the present application, a reference frame message and a current frame message are first obtained, and it is determined whether the calculated cyclic redundancy check of the current frame message is the same as the actual cyclic redundancy check of the current message. In this way, when it is determined that the calculated cyclic redundancy check of the current frame message is the same as the actual cyclic redundancy check of the current message, the cyclic redundancy flag of the current frame message is determined as the first flag value, and then the cyclic redundancy flag as the first flag value is filled into the message of the target format to obtain the target message, and finally the target message and the reference frame message are compressed. The method of the present application indicates that the cyclic redundancy content corresponding to the current frame message is the same as the cyclic redundancy content corresponding to the reference frame message by using the cyclic redundancy flag as the first flag value, and then, there is no need to fill the repeated content again, so that the repeated content does not occupy the storage resources of the target message, and because there is no need to fill the repeated content again, the compression amount of the target message is reduced, and then the compression rate of the target message is improved.

[0046] See also Figure 2 , Figure 2 The message compression method provided by an embodiment of the present application is shown. Figure 2 The process shown is described in detail, and the message compression method may specifically include the following steps:

[0047] Step 210: Acquire a reference frame message and a current frame message.

[0048] Step 220, determining whether the calculated cyclic redundancy check of the current frame message and the actual cyclic redundancy check of the current frame message are the same.

[0049] The specific step descriptions of step 210 and step 220 can refer to step 110 and step 120, which will not be repeated here.

[0050] Step 230: If it is determined that the actual cyclic redundancy check is different from the calculated cyclic redundancy check, the cyclic redundancy flag of the current frame message is determined to be a second flag value, wherein the second flag value indicates that the cyclic redundancy content of the current frame message is different from the cyclic redundancy content of the reference frame message.

[0051] As a method, when determining that the actual cyclic redundancy check is different from the calculated cyclic redundancy check, it can be determined that the cyclic redundancy content corresponding to the current frame message has changed during the message transmission process, or that the cyclic redundancy content corresponding to the current frame message before information transmission is different from the cyclic redundancy content corresponding to the reference frame message, so that the cyclic redundancy flag corresponding to the current frame message can be set to a second flag value, and then the cyclic redundancy flag of the second flag value can be used to mark that the cyclic redundancy check content corresponding to the current frame message is different from the cyclic redundancy content corresponding to the reference frame message. Optionally, the second flag value can be 0 or other values, and the second flag value can be set according to actual needs, and the first flag value is different from the second flag value.

[0052] Step 240, obtaining the corresponding target cyclic redundancy content in the current frame message.

[0053] As a way, in order to ensure the data accuracy and integrity of the compressed message, when it is determined that the actual cyclic redundancy check and the calculated cyclic redundancy check are different, the target cyclic redundancy content can be determined based on the first target storage position in the current frame message. Optionally, the storage position of the target cyclic redundancy content can be pre-set (i.e., fixed bytes are used to store the cyclic redundancy content), so that the target cyclic redundancy content can be obtained based on the position of the fixed bytes in the current frame message.

[0054] Step 250: Fill the target cyclic redundancy content and the cyclic redundancy flag into a message in a target format to obtain a target message, and perform byte compression on the target message and the reference frame message.

[0055] As a method, after obtaining the target cyclic redundancy content of the current frame message, in order to clearly know in the target message that the target cyclic redundancy content corresponding to the current frame message is different from the cyclic redundancy content corresponding to the reference frame message, the target cyclic redundancy content and the cyclic redundancy flag used to indicate that the target cyclic redundancy content is different from the cyclic redundancy content corresponding to the reference frame message are filled into the message in the target format. Optionally, the message in the target format is shown in Table 2 below:

[0056] Table 2 Target format message

[0057]

[0058] The data is divided into two areas: the flag area and the Rpayload area. The payload check area is defined as two adjacent byte areas, such as byte0 to byte1 of the payload as check area 1, byte2 to byte3 as check area 2, and so on. The Rpayload area is only used to load data that is different from the reference frame, that is, the Rpayload area can be used to load the target cyclic redundancy content.

[0059] Optionally, the storage positions corresponding to the target cyclic redundancy content and the cyclic redundancy flag may be pre-set in the message of the target format (i.e., fixed bytes are used for storage), and then the target cyclic redundancy content and the storage positions corresponding to the cyclic redundancy flag may be associated with each other, so as to facilitate obtaining the corresponding target cyclic redundancy content according to the cyclic redundancy flag.

[0060] Optionally, the target message and the reference frame message are compressed simultaneously, so that after the compressed file is decompressed to obtain the target message and the reference frame message, it can be determined based on the cyclic redundancy flag bit with the second flag value in the target message that the target cyclic redundancy content corresponding to the current frame message can be obtained in the target message.

[0061] In this embodiment, a cyclic redundancy flag is used as a second flag value to indicate that the cyclic redundancy content corresponding to the current frame message is different from the corresponding cyclic redundancy content in the reference frame message, and then the cyclic redundancy flag and the target cyclic redundancy content corresponding to the current frame message are filled into the target message, thereby ensuring the data integrity of the target message.

[0062] See also Figure 3 , Figure 3 The message compression method provided by an embodiment of the present application is shown. Figure 3 The process shown is described in detail, and the message compression method may specifically include the following steps:

[0063] Step 310: Acquire a reference frame message and a current frame message.

[0064] Step 320: Determine a first counter of the reference frame message and a second counter of the current frame message.

[0065] As a method, the counter is also called a message counter (Rolling counter), which is located in the data segment of the CAN data frame and is used to determine whether frame loss occurs during message transmission. In an embodiment of the present application, the counter is used to determine whether the acquired message frame is continuous. Among them, when a message is sent, the corresponding counter is +1, so that whether the message frame is continuous can be determined based on the value of the counter. Among them, the length and position signal of the counter need to be consistent with the setting parameters of the vehicle-side CAN protocol stack, and the method for judging whether the message frame is continuous based on the counter is consistent with the setting parameters of the vehicle-side CAN protocol stack. If 0 to 255 cycles are generated, counter0 and counter255 are judged to be continuous.

[0066] Optionally, during the process of information exchange among CAN network messages in the CAN network bus, a CAN network message sent by an electronic control unit carries its corresponding counter. Then, after obtaining the reference frame message and the current frame message, the first counter can be directly obtained from the reference frame message and the second counter can be obtained from the current frame message.

[0067] Optionally, in any message, there is only one unique counter identifier, and thus, the corresponding counter can be obtained based on the timer identifier, thereby obtaining the first counter corresponding to the base frame message and the second counter of the current frame message based on the timer identifier in the base frame message and the current frame message.

[0068] Step 330: If it is determined that the second counter is equal to the value of the first counter plus 1, then the counter flag of the current frame message is determined to be the first flag value, wherein the first flag value indicates that the counter content corresponding to the current frame message is the same as the corresponding counter content in the reference frame message.

[0069] As a method, if the current frame message and the reference frame message are continuous frame messages, that is, the current frame message is the next frame message of the reference frame message, therefore, the value added by 1 on the basis of the counter of the reference frame message should be the same as the counter corresponding to the current frame message. In this way, whether the current frame message and the reference frame message are continuous frame messages can be determined by determining whether the second counter is equal to the value of the first counter plus 1.

[0070] Optionally, when the second counter is equal to the value of the first counter plus 1, it can be determined that the current frame message and the reference frame message are continuous frame messages, thereby determining that the counter content corresponding to the current frame message is the same as the counter content corresponding to the reference frame, and further, it can be determined that the counter flag of the current frame message is the first flag value, which is used to identify that the counter content corresponding to the current frame message is the same as the corresponding counter content in the reference frame message.

[0071] Step 340: fill the counter flag bit into the target message.

[0072] As a method, the counter flag corresponding to the current frame message can be filled into the message of the target format, so that the counter flag with the first flag value in the current frame message can be used to indicate that the counter content corresponding to the current frame message is the same as the counter content corresponding to the reference frame message, and then there is no data in the storage location corresponding to the counter content in the target message. Therefore, in the process of compressing the target message, the compression amount can be reduced and the compression rate of the target message can be increased.

[0073] Optionally, a fixed byte may be pre-set in the target format message for storing the counter flag, so that engineers can obtain the counter flag corresponding to the current frame message in the fixed byte, and then, based on the first flag value corresponding to the counter flag, determine that the counter content corresponding to the current frame message is the same as the counter content corresponding to the base frame message, and the corresponding counter content can be viewed in the base frame message.

[0074] In some embodiments, after step 320, Figure 4 As shown, the method also includes:

[0075] Step 410: If it is determined that the second counter is not equal to the value of the first counter plus 1, the counter flag of the current frame message is determined to be the second flag value, and the value of the first counter is updated to the value of the second counter, wherein the second flag value indicates that the counter content of the current frame message is different from the counter content of the reference frame message.

[0076] As a method, when it is determined that the second counter is not equal to the first counter plus 1, it can be determined that the counter content corresponding to the current frame message has lost a frame during the message transmission process (that is, there is message loss), so the counter flag corresponding to the current frame message can be set to the second flag value, and then the counter flag based on the second flag value can be used to mark that the counter content corresponding to the current frame message is different from the counter content corresponding to the reference frame message.

[0077] Optionally, since it can be determined that frame loss has occurred in the network message based on the second counter not being equal to the first counter plus 1, in order to determine whether the subsequently obtained message and the current frame message are continuous messages, the first counter can be updated to the value of the second counter, so as to facilitate comparison based on the updated first counter and the counter of the next frame message to be obtained.

[0078] Step 420, obtaining the corresponding target counter content in the current frame message.

[0079] As a way, in order to ensure the data accuracy and integrity of the compressed message, when it is determined that the second counter is not equal to the first counter plus 1, the target counter content can be determined based on the second target storage position in the current frame message. Optionally, the storage position of the target counter content can be pre-set (i.e., a fixed byte is used to store the counter content), so that the target counter content can be obtained based on the position of the fixed byte in the current frame message.

[0080] Optionally, when it is determined that the second counter is not equal to the first counter plus 1, in order to ensure the determination of the counter content of the subsequently acquired message, the reference frame message can be replaced with the current frame message, so that the continuous message frame is determined based on the current frame message. In this way, when the counter corresponding to the next acquired message is equal to the second counter plus 1, it can be determined that the counter content is the same as the current frame message. There is no need to obtain the target counter content, and there is no need to fill the target counter content into the message in the target format.

[0081] Optionally, the counter content in the reference frame message can be updated to the target counter content, so that when the counter corresponding to the next message obtained is equal to the second counter plus 1, it can be determined that the counter content is the same as the counter content of the current frame message. There is no need to obtain the target counter content, and there is no need to fill the target counter content into the message in the target format.

[0082] Step 430: Fill the target counter content and the counter flag into the target message.

[0083] As a method, after obtaining the target counter content of the current frame message, in order to clearly know in the target message that the target counter content corresponding to the current frame message is different from the counter content corresponding to the benchmark frame message, the target counter content and the counter flag used to indicate that the target counter content is different from the counter content corresponding to the benchmark frame message are jointly filled into the target format message.

[0084] Optionally, the storage positions corresponding to the target counter content and the counter flag can be pre-set in the target format message (i.e., fixed bytes are used for storage), and then the target counter content and the storage positions corresponding to the counter flag can be associated with each other, so as to facilitate obtaining the corresponding target counter content according to the counter flag bit.

[0085] Optionally, the target message and the reference frame message are compressed simultaneously, so that after the compressed file is decompressed to obtain the target message and the reference frame message, it can be determined based on the counter flag bit with the second flag value in the target message that the target counter content corresponding to the current frame message can be obtained in the target message.

[0086] Please continue reading Figure 3 , step 350, byte compression is performed on the target message and the reference frame message.

[0087] The specific step descriptions of step 310 and step 350 can refer to step 110 and step 140, which will not be repeated here.

[0088] In this embodiment, whether the current frame message and the reference frame message are continuous frame messages is determined by determining whether the second counter is equal to the first counter plus 1. Then, when it is determined that the second counter is equal to the first counter plus 1, the counter flag is determined to be the first flag value, thereby indicating that the counter content of the current frame message is the same as the counter content of the reference frame. Therefore, only the counter flag of the first flag value needs to be filled into the message, thereby significantly reducing storage space consumption and reporting traffic consumption, reducing the compression amount of the target message, and improving the compression rate of the target message.

[0089] At the same time, when it is determined that the second counter is not equal to the first counter plus 1, the counter flag is determined to be the second flag value, and the first counter is updated to the second counter, so as to facilitate the subsequent determination of whether the subsequent message is a continuous message of the current frame message according to the second counter. When filling, the counter flag of the second flag value and the target counter content are filled into the message, thereby ensuring the data integrity of the target message.

[0090] See also Figure 5 , Figure 5 The message compression method provided by an embodiment of the present application is shown. Figure 5 The process shown is described in detail, and the message compression method may specifically include the following steps:

[0091] Step 510: Acquire a reference frame message and a current frame message.

[0092] Step 520: Determine a first payload hash value of the reference frame message and a second payload hash value of the current frame message.

[0093] As a way, payload refers to the actual business data part contained in a data packet or message. In the embodiment of the present application, payload refers to the valid data content in the message, which carries the actual information to be transmitted, such as the requested web page content, uploaded or downloaded file data, or specific instruction information. Payload is the core part of the message. Its specific content determines the role and function of the message in the vehicle-side network communication. Different protocols have different requirements and processing methods for payload. In this embodiment, the length and position signal of the payload need to be consistent with the vehicle-side CAN protocol stack setting parameters.

[0094] Optionally, the first payload hash value of the reference frame message and the second payload hash value of the current frame message may be determined according to a common hash algorithm. Optionally, common hash algorithms include MD4, MD5, and SHA-1, etc. The hash algorithm may be set according to actual needs and is not specifically limited here.

[0095] Step 530: If it is determined that the first payload hash value and the second payload hash value are equal, then the payload flag of the current frame message is determined to be the first flag value, wherein the first flag value indicates that the payload content corresponding to the current frame message is the same as the corresponding payload content in the reference frame message.

[0096] As a method, when determining the first payload hash value and the second payload hash value, it can be determined that the payload content corresponding to the current frame message has not changed during the message transmission process, and is also the same as the payload content corresponding to the reference frame message. Therefore, the payload flag corresponding to the current frame message can be set to the first flag value, and then the payload flag corresponding to the current frame message can be marked based on the payload flag of the first flag value to verify that the payload content is the same as the payload content corresponding to the reference frame message.

[0097] Step 540: fill the payload flag bit into the target message.

[0098] As a method, the payload flag corresponding to the current frame message can be filled into the message of the target format, so that the payload flag with the first flag value in the current frame message can be used to indicate that the payload content corresponding to the current frame message is the same as the payload content corresponding to the reference frame message, and then there is no data in the storage location corresponding to the payload content in the target message. Therefore, in the process of compressing the target message, the compression amount can be reduced and the compression rate of the target message can be increased.

[0099] Optionally, the target message and the reference frame message are compressed simultaneously, so that after the compressed file is decompressed to obtain the target message and the reference frame message, the corresponding payload content can be obtained in the reference frame message based on the payload flag bit with the first flag value in the target message.

[0100] In some embodiments, after step 520, Figure 6 As shown, the method also includes:

[0101] Step 610: If it is determined that the first payload hash value and the second payload hash value are not equal, the payload flag of the current frame message is determined to be the second flag value, wherein the second flag value indicates that the payload content of the current frame message is different from the payload content of the reference frame message.

[0102] As a method, when it is determined that the first payload hash value is different from the second payload hash value, it can be determined that the payload content corresponding to the current frame message has changed during the message transmission process, or that the payload content corresponding to the current frame message before information transmission is different from the payload content corresponding to the reference frame message. In this way, the payload flag bit corresponding to the current frame message can be set to the second flag value, and then the payload flag bit based on the second flag value can be used to mark that the payload content corresponding to the current frame message is different from the payload content corresponding to the reference frame message.

[0103] In some embodiments, Figure 7 As shown, the step 610 includes:

[0104] Step 611: If it is determined that the first payload hash value and the second payload hash value are not equal, obtain multiple first data corresponding to the payload check area of ​​the current frame message and multiple second data corresponding to the payload check area of ​​the reference frame message.

[0105] As a method, when it is determined that the first payload hash value is not equal to the second payload hash value, in order to accurately determine the data area that has changed, so as to facilitate the determination of the corresponding target payload content in the current frame message, the multiple first data corresponding to the payload area of ​​the current frame message and the multiple second data corresponding to the payload check area of ​​the reference frame message can be first determined respectively.

[0106] Optionally, in each frame message, the bytes occupied by the payload area are much larger than the area occupied by other data, and each byte stores corresponding data in each verification area. By determining the bytes in the current frame message as the payload verification area, multiple first data can be obtained. Similarly, by determining the bytes in the reference frame message as the payload verification area, multiple second data can be obtained.

[0107] Step 612: If it is determined that there is target first data among the multiple first data that is different from the multiple second data, the payload flag bit corresponding to the target first data is determined as the second flag value, and the payload flag bit corresponding to the first data other than the target first data among the multiple first data is determined as the first flag value.

[0108] As a way, in order to accurately determine the data in the payload of the current frame message that is different from the reference frame message, the first data and the second data of the same byte can be compared respectively, so as to determine the target first data that is different from the corresponding second data in the multiple first data. Optionally, the two bytes of data can be compared in this way to determine the target first data.

[0109] Optionally, after determining the target first data, the payload flag bit corresponding to the target first data is determined as a second flag value, thereby indicating that the data corresponding to the area is different from the data corresponding to the reference frame message area.

[0110] Optionally, in order to ensure that the payload content stored in the target message is more accurate, the payload flag corresponding to the data other than the target first data may be determined as the first flag value among multiple first data, thereby indicating that the data corresponding to the area is the same as the data corresponding to the reference frame message area. Furthermore, when filling the message in the target format, it is only necessary to fill the corresponding byte position with its corresponding payload flag, thereby reducing the storage amount of the target message, thereby ensuring the compression amount when the target message is subsequently compressed, and improving the compression rate of the target message.

[0111] Step 613: Update the reference frame message based on the target first data.

[0112] As a method, after determining the target first data, in order to ensure comparison of subsequently acquired messages, the data at the corresponding storage location in the reference frame message may be updated to the target first data according to the storage location of the target first data in the current frame message.

[0113] Optionally, after the reference frame message is updated based on the target first data, in order to ensure whether the payload content corresponding to the subsequent message needs to be filled, the hash value can be recalculated based on the updated reference frame message to obtain the first payload hash value corresponding to the updated reference frame message.

[0114] Please continue reading Figure 6 , step 620, obtaining the corresponding target payload content in the current frame message.

[0115] As a way, in order to ensure the data accuracy and integrity of the compressed message, when it is determined that the first payload hash value and the second payload hash value are not the same, the target payload content can be determined based on the third target storage position in the current frame message. Optionally, the storage position of the target payload content can be pre-set (i.e., fixed bytes are used to store the payload content), so that the target payload content can be obtained based on the position of the fixed bytes in the current frame message.

[0116] Step 630: Fill the target payload content and the payload flag into the target message.

[0117] As a method, after obtaining the target payload content of the current frame message, in order to clearly know in the target message that the target payload content corresponding to the current frame message is different from the payload content corresponding to the reference frame message, the target payload content and the payload flag used to indicate that the target payload content is different from the payload content corresponding to the reference frame message are jointly filled into the target format message.

[0118] Optionally, the storage locations corresponding to the target payload content and the payload flag may be pre-set in the target format message (i.e., fixed bytes are used for storage), and then the target payload content and the storage locations corresponding to the payload flag may be associated with each other, so as to facilitate obtaining the corresponding target payload content according to the payload flag bit.

[0119] Optionally, the target message and the reference frame message are compressed simultaneously, so that after the compressed file is decompressed to obtain the target message and the reference frame message, it can be determined based on the payload flag bit with the second flag value in the target message that the target payload content corresponding to the current frame message can be obtained in the target message.

[0120] Please continue reading Figure 5 , step 550, byte compression is performed on the target message and the reference frame message.

[0121] The specific step descriptions of step 510 and step 550 can refer to step 110 and step 140, which will not be repeated here.

[0122] In this embodiment, whether the payload content of the current frame message is the same as the payload content of the reference frame message is determined by determining whether the first payload hash value is equal to the second payload hash value. Furthermore, when it is determined that the first payload hash value is equal to the second payload hash value, the payload flag is determined to be the first flag value, thereby indicating that the payload content of the current frame message is the same as the payload content of the reference frame. Therefore, only the payload flag of the first flag value needs to be filled into the message, thereby significantly reducing storage space consumption and reporting traffic consumption, reducing the compression amount of the target message and improving the compression rate of the target message.

[0123] At the same time, when it is determined that the first payload hash value is not equal to the second payload hash value, the payload flag is determined to be the second flag value, and the current frame message is deeply deduplicated at the byte level, so that the payload flag corresponding to the byte with repeated data is determined to be the first flag value, and the payload flag corresponding to the byte without repeated data is determined to be the second flag value. When filling, the area with repeated data only retains the payload flag, while the area without repeated data retains the payload flag and the corresponding payload content, so as to perform deduplication processing while ensuring the data integrity of the target message, and further improve the compression effect of the area with the payload content.

[0124] Figure 8 FIG. 1 is a schematic diagram showing the working principle of a message compression method according to an embodiment of the present application. Figure 8 As shown, first obtain the first frame message, and set the first frame message as the reference frame message, then receive the data frame message, then determine whether the calculated CRC corresponding to the data frame message is the same as the timing CRC of the data frame message, and determine whether the counter corresponding to the data frame message is continuous (i.e., whether the counter of the data frame message is equal to the counter+1 of the reference frame message), and then perform pyaload deduplication on the data frame message, and finally determine the content that needs to be filled in the data frame message based on whether the CRC of the data frame message is correct, whether the counter of the data frame message is continuous, and the pyaload deduplication result of the data frame message, and fill the target format message with the content that needs to be filled to obtain the target message, and then zlib compress the target message and the reference frame message, and store the compressed file. Among them, the data of the reference frame message can be updated based on whether the counter of the data frame message is continuous and the pyaload deduplication result of the data frame message.

[0125] Fig. 9 FIG. 1 is a flow chart of a message compression method according to an embodiment of the present application. Fig. 9As shown, first obtain the first frame message, and use the first frame message as the reference frame message, record the counter of the reference frame message at the same time, determine the calculated CRC of the reference frame message and the payload hash value of the reference frame message, and then obtain the actual CRC of the reference frame message, and then determine whether the calculated CRC is the same as the actual CRC, so as to determine whether the CRC content of the reference frame message is the same as the CRC content of the standard frame message, if the same, determine that the CRC content of the reference frame message is the same as the CRC content of the standard frame message, and set the CRC flag position of the reference frame message to 1; if different, determine that the CRC content of the reference frame message is different from the CRC content of the standard frame message, and set the CRC flag position of the reference frame message to 0. Among them, when the CRC flag position of the reference frame message is 1, there is no need to retain the CRC content in the reference frame message; when the CRC flag position of the reference frame message is 0, the CRC content in the reference frame message is retained.

[0126] Then obtain the next frame message, calculate the calculated CRC of the next frame message and obtain the actual CRC of the next frame message, and then determine whether the CRC of the next frame message is correct based on whether the calculated CRC of the next frame message is the same as the actual CRC of the next frame message. If the CRC of the next frame message is correct, that is, the calculated CRC of the next frame message is the same as the actual CRC of the next frame message, then set the CRC flag of the next frame message to 1; if the CRC of the next frame message is incorrect, that is, the calculated CRC of the next frame message is different from the actual CRC of the next frame message, then set the CRC flag of the next frame message to 0, and retain the CRC content of the next frame message.

[0127] Then determine the counter of the next frame message, and determine whether the counter of the next frame message is continuous based on the counter of the next frame message and the counter of the reference frame message. If the counter of the next frame message is continuous, that is, the counter of the next frame message is equal to the counter of the reference frame message + 1, then set the counter flag of the next frame message to 1; if the counter of the next frame message is not continuous, that is, the counter of the next frame message is not equal to the counter of the reference frame message + 1, then set the counter flag of the next frame message to 0 and retain the counter content of the next frame message.

[0128] The payload hash value of the next frame message is also calculated, and whether the payload hash value of the next frame message has changed is determined based on whether the payload hash value of the next frame message is the same as the payload hash value of the reference frame message. If the payload hash value of the next frame message has not changed, that is, the payload hash value of the next frame message is the same as the payload hash value of the reference frame message, the payload flag of the next frame message is set to 1; if the payload hash value of the next frame message has changed, that is, the payload hash value of the next frame message is different from the payload hash value of the reference frame message, the payload flag of the next frame message is set to 0, and the payload content of the reference frame message is updated according to the payload content of the next frame message, and then the payload hash value of the reference frame message is calculated based on the updated payload content of the reference frame message. Among them, when the payload hash value of the next frame message is different from the payload hash value of the reference frame message, determine whether the content of each two bytes in the reference frame message is the same as the same byte in the next frame message, so that the payload flag position corresponding to the bytes where the two bytes in the reference frame message are the same as the same byte in the next frame message is set to 1; the payload flag position corresponding to the bytes where the two bytes in the reference frame message are different from the same byte in the next frame message is set to 0, and the payload content corresponding to the byte is recorded.

[0129] Then, the messages of a preset number of frames are processed in turn according to the above steps. Finally, the CRC flag and CRC content of each frame of the message, the counter flag and counter content of each frame of the message, and the payload flag and payload content of each frame of the message are filled into the message of the target format to obtain the target message. Finally, the target message is byte compressed to avoid the waste of storage space and reporting traffic caused by recording the CRC content and counter content of each frame of the message, and to avoid the inability to deduplicate the entire frame of the message when the message frame changes, resulting in the inability to eliminate byte-level duplicate values ​​and increase in compression, thereby reducing the compression amount of the message frame and improving the compression rate.

[0130] Fig.10 is a block diagram of a message compression device according to an embodiment of the present application, such as Fig.10 As shown, the message compression device 700 includes a message acquisition module 710, a determination module 720, a first cyclic redundancy flag determination module 730 and a first compression module 740.

[0131] A message acquisition module 710 is used to acquire a reference frame message and a current frame message; a first determination module 720 is used to determine whether the calculated cyclic redundancy check of the current frame message and the actual cyclic redundancy check of the current frame message are the same; a cyclic redundancy flag first determination module 730 is used to determine that the cyclic redundancy flag of the current frame message is a first flag value if it is determined that the actual cyclic redundancy check is the same as the calculated cyclic redundancy check, wherein the first flag value indicates that the cyclic redundancy content corresponding to the current frame message is the same as the corresponding cyclic redundancy content in the reference frame message; a first compression module 740 is used to fill the cyclic redundancy flag into a message of a target format to obtain a target message, and perform byte compression on the target message and the reference frame message.

[0132] In some embodiments, the message compression device 700 also includes: a second cyclic redundancy flag determination module, which is used to determine that the cyclic redundancy flag of the current frame message is a second flag value if it is determined that the actual cyclic redundancy check is different from the calculated cyclic redundancy check, wherein the second flag value indicates that the cyclic redundancy content of the current frame message is different from the cyclic redundancy content of the reference frame message; a target cyclic redundancy content determination module, which is used to obtain the corresponding target cyclic redundancy content in the current frame message; a second compression module, which is used to fill the target cyclic redundancy content and the cyclic redundancy flag into a message in a target format to obtain a target message, and perform byte compression on the target message and the reference frame message.

[0133] In other embodiments, the message compression device 700 includes: a counter determination module, used to determine the first counter of the reference frame message and the second counter of the current frame message; a counter flag first determination module, used to determine that the counter flag of the current frame message is the first flag value if it is determined that the second counter is equal to the value of the first counter plus 1, wherein the first flag value indicates that the counter content corresponding to the current frame message is the same as the corresponding counter content in the reference frame message; and a first filling module, used to fill the counter flag into the target message.

[0134] In some other embodiments, the message compression device 700 also includes: a second counter flag determination module, which is used to determine that the counter flag of the current frame message is the second flag value if it is determined that the second counter is not equal to the value of the first counter plus 1, and update the value of the first counter to the value of the second counter, wherein the second flag value indicates that the counter content of the current frame message is different from the counter content of the reference frame message; a target counter content determination module, which is used to obtain the corresponding target counter content in the current frame message; and a second filling module, which is used to fill the target counter content and the counter flag into the target message.

[0135] In some further embodiments, the message compression device 700 includes: a payload hash value determination module, used to determine a first payload hash value of the reference frame message and a second payload hash value of the current frame message; a payload flag first determination module, used to determine that the payload flag of the current frame message is the first flag value if it is determined that the first payload hash value and the second payload hash value are equal, wherein the first flag value indicates that the payload content corresponding to the current frame message is the same as the corresponding payload content in the reference frame message; and a third filling module, used to fill the payload flag into the target message.

[0136] In some further embodiments, the message compression device 700 also includes: a second payload flag determination module, used to determine that the payload flag of the current frame message is the second flag value if it is determined that the first payload hash value and the second payload hash value are not equal, wherein the second flag value indicates that the payload content of the current frame message is different from the payload content of the reference frame message; a target payload content determination module, used to obtain the corresponding target payload content in the current frame message; and a fourth filling module, used to fill the target payload content and the payload flag into the target message.

[0137] In some embodiments, the payload flag second determination module includes: an acquisition unit, which is used to acquire multiple first data corresponding to the payload check area of ​​the current frame message and multiple second data corresponding to the payload check area of ​​the reference frame message if it is determined that the first payload hash value and the second payload hash value are not equal; a flag value determination unit, which is used to determine the payload flag corresponding to the target first data as the second flag value if it is determined that the multiple first data have target first data different from the multiple second data, and determine the payload flag corresponding to the first data among the multiple first data except the target first data as the first flag value; an updating unit, which is used to update the reference frame message based on the target first data.

[0138] According to one aspect of the embodiments of the present application, an electronic device is also provided, such as Fig.11 As shown, the electronic device 800 includes a processor 810 and one or more memories 820. The one or more memories 820 are used to store program instructions executed by the processor 810. When the processor 810 executes the program instructions, the above-mentioned message compression method is implemented.

[0139] Furthermore, the processor 810 may include one or more processing cores. The processor 810 runs or executes instructions, programs, code sets or instruction sets stored in the memory 820, and calls data stored in the memory 820. Optionally, the processor 810 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 810 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor, but may be implemented separately through a communication chip.

[0140] According to one aspect of the present application, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries computer-readable instructions, and when the computer-readable storage instructions are executed by a processor, the method in any of the above embodiments is implemented.

[0141] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0142] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0143] The flowchart and block diagram in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0144] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0145] It should be understood that the present application is not limited to the precise 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 application is limited only by the appended claims.

Claims

1. A message compression method, characterized in that: The method comprises: Get the reference frame message and the current frame message; Determining whether a calculated cyclic redundancy check of the current frame message and an actual cyclic redundancy check of the current frame message are the same; If it is determined that the actual cyclic redundancy check is the same as the calculated cyclic redundancy check, determining that the cyclic redundancy flag of the current frame message is a first flag value, wherein the first flag value indicates that the cyclic redundancy content corresponding to the current frame message is the same as the cyclic redundancy content corresponding to the reference frame message; The cyclic redundancy flag is filled into a message of a target format to obtain a target message, and byte compression is performed on the target message and the reference frame message.

2. The method according to claim 1, characterized in that After determining the calculated cyclic redundancy check of the current frame message and the actual cyclic redundancy check of the current frame message, the method further includes: If it is determined that the actual cyclic redundancy check is different from the calculated cyclic redundancy check, determining that the cyclic redundancy flag of the current frame message is a second flag value, wherein the second flag value indicates that the cyclic redundancy content of the current frame message is different from the cyclic redundancy content of the reference frame message; Obtaining the target cyclic redundancy content corresponding to the current frame message; The target cyclic redundancy content and the cyclic redundancy flag are filled into a message in a target format to obtain a target message, and byte compression is performed on the target message and the reference frame message.

3. The method according to claim 1, characterized in that The method further comprises: Determine a first counter of the reference frame message and a second counter of the current frame message; If it is determined that the second counter is equal to the value of the first counter plus 1, then determining that the counter flag bit of the current frame message is the first flag value, wherein the first flag value indicates that the counter content corresponding to the current frame message is the same as the corresponding counter content in the reference frame message; Fill the counter flag bit into the target message.

4. The method according to claim 3, characterized in that After determining the first counter of the reference frame message and the second counter of the current frame message, the method further includes: If it is determined that the second counter is not equal to the value of the first counter plus 1, determine that the counter flag bit of the current frame message is the second flag value, and update the value of the first counter to the value of the second counter, wherein the second flag value indicates that the counter content of the current frame message is different from the counter content of the reference frame message; Obtaining the target counter content corresponding to the current frame message; Fill the target counter content and the counter flag bit into the target message.

5. The method according to claim 1, characterized in that The method further comprises: Determine a first payload hash value of the reference frame message and a second payload hash value of the current frame message; If it is determined that the first payload hash value and the second payload hash value are equal, determining that the payload flag bit of the current frame message is the first flag value, wherein the first flag value indicates that the payload content corresponding to the current frame message is the same as the corresponding payload content in the reference frame message; Fill the target message with the payload flag.

6. The method according to claim 5, characterized in that After determining the first payload hash value of the reference frame message and determining the second payload hash value of the current frame message, the method further includes: If it is determined that the first payload hash value and the second payload hash value are not equal, determining that the payload flag bit of the current frame message is the second flag value, wherein the second flag value indicates that the payload content of the current frame message is different from the payload content of the reference frame message; Obtaining the target payload content corresponding to the current frame message; The target payload content and the payload flag are filled into the target message.

7. The method according to claim 6, characterized in that If it is determined that the first payload hash value and the second payload hash value are not equal, determining that the payload flag bit of the current frame message is a second flag value includes: If it is determined that the first payload hash value and the second payload hash value are not equal, obtaining a plurality of first data corresponding to the payload check area of ​​the current frame message and a plurality of second data corresponding to the payload check area of ​​the reference frame message; If it is determined that there is target first data different from the plurality of second data among the plurality of first data, then the payload flag bit corresponding to the target first data is determined as the second flag value, and the payload flag bit corresponding to the first data other than the target first data among the plurality of first data is determined as the first flag value; The reference frame message is updated based on the target first data.

8. A message compression device, characterized in that: The device comprises: A message acquisition module, used to acquire a reference frame message and a current frame message; A determination module, used to determine whether the calculated cyclic redundancy check of the current frame message and the actual cyclic redundancy check of the current frame message are the same; a cyclic redundancy flag first determination module, configured to determine that the cyclic redundancy flag of the current frame message is a first flag value if it is determined that the actual cyclic redundancy check is the same as the calculated cyclic redundancy check, wherein the first flag value indicates that the cyclic redundancy content corresponding to the current frame message is the same as the cyclic redundancy content corresponding to the reference frame message; The first compression module is used to fill the cyclic redundancy flag into the message of the target format to obtain the target message, and perform byte compression on the target message and the reference frame message.

9. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 7.