CN111600961A - Method, system, equipment and medium for transmitting bitmap file through CAN port - Google Patents
Method, system, equipment and medium for transmitting bitmap file through CAN port Download PDFInfo
- Publication number
- CN111600961A CN111600961A CN202010442435.7A CN202010442435A CN111600961A CN 111600961 A CN111600961 A CN 111600961A CN 202010442435 A CN202010442435 A CN 202010442435A CN 111600961 A CN111600961 A CN 111600961A
- Authority
- CN
- China
- Prior art keywords
- data
- area
- frame
- data frame
- filling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 230000004044 response Effects 0.000 claims abstract description 32
- 230000001174 ascending effect Effects 0.000 claims description 35
- 230000010354 integration Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 abstract description 8
- 238000004904 shortening Methods 0.000 abstract 1
- 230000006870 function Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000007789 sealing Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method, a system, equipment and a storage medium for transmitting a bitmap file through a CAN port, wherein the method comprises the following steps: reading a bitmap file to be sent into a memory; dividing a transmission buffer area in a memory, and dividing a bitmap file into data frames based on the size of a minimum unit of the transmission buffer area; adding a corresponding type identifier in each data frame according to the characteristics of the data area, and integrating the data frames of the same type based on the identifiers; and sending handshake data to the receiver, and sending the integrated data frame to the receiver in response to receiving the response information of the receiver. The scheme provided by the invention realizes the purpose of shortening the transmission time when sending bitmap data through the CAN port by splitting the bitmap file and integrating the split data.
Description
Technical Field
The invention relates to the field of singlechip communication, in particular to a method, a system, computer equipment and a readable medium for transmitting a bitmap file through a CAN port.
Background
CAN is an abbreviation of Controller Area Network (hereinafter referred to as CAN) which is a serial communication protocol of ISO international standardization, belongs to the field bus category, and is a serial communication Network that effectively supports distributed control or real-time control. The high performance and reliability of CAN has been recognized and widely used in industrial automation, ships, medical equipment, industrial equipment, and the like. The field bus is one of the hot spots of the technical development in the current automation field, and is known as a computer local area network in the automation field.
A bitmap (bitmap), also called a dot matrix image or a raster image, is composed of single points called pixels (picture elements). The dots can be arranged and dyed differently to form a pattern. The bitmap has the characteristics of representing color change and color subtle transition and generating vivid effect, and has the defects of recording the position and color value of each pixel when in storage and occupying larger storage space. Although the rate of the CAN bus CAN reach up to 1Mbps, it often takes a lot of time to transmit a bitmap file because each frame of data is transmitted with only 8 bytes at a time.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, a system, a computer device, and a computer readable storage medium for transmitting a bitmap file through a CAN port, which greatly shorten the time for sending bitmap data through the CAN port by splitting the bitmap file and integrating the split data of the same type.
Based on the above object, an aspect of the embodiments of the present invention provides a method for transmitting a bitmap file through a CAN port, including the following steps: reading a bitmap file to be sent into a memory; dividing a sending buffer area in the memory, and dividing the bitmap file into data frames based on the size of the minimum unit of the sending buffer area; adding a corresponding type identifier in each data frame according to the characteristics of the data area, and integrating the data frames of the same type based on the identifiers; and sending handshake data to a receiver, and sending the integrated data frame to the receiver in response to receiving the response information of the receiver.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier includes: and in response to the existence of the repeated data, filling an identification corresponding to the type of the repeated frame at a first position in the type area of the data frame, filling the number of the repeated data at a second position, and filling the number of the repeated data at a third position.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier further includes: and in response to the existence of the ascending/descending data, filling the identification corresponding to the type of the ascending/descending frame at the first position of the type area of the data frame, filling the number of the ascending/descending data at the third position, and filling the initial data and the ascending/descending proportion in the data area.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier further includes: judging whether the current data frame belongs to one of the types of the processed data frames, responding to the fact that the current data frame belongs to one of the types of the processed data frames, integrating the current data frame and the corresponding processed data frame, and modifying a data area and/or a type area of the processed data frame.
In another aspect of the embodiments of the present invention, a system for transmitting a bitmap file through a CAN port is further provided, including: the reading module is configured to read a bitmap file to be sent into a memory; the dividing module is configured to divide a sending buffer area in the memory and divide the bitmap file into data frames based on the size of the minimum unit of the sending buffer area; the integration module is configured to add a corresponding type identifier in each data frame according to the characteristics of the data area and integrate the data frames of the same type based on the identifiers; and the execution module is configured to send handshake data to a receiving party, and send the integrated data frame to the receiving party in response to receiving the response information of the receiving party.
In some embodiments, the integration module is further configured to: and in response to the existence of the repeated data, filling an identification corresponding to the type of the repeated frame at a first position in the type area of the data frame, filling the number of the repeated data at a second position, and filling the number of the repeated data at a third position.
In some embodiments, the integration module is further configured to: and in response to the existence of the ascending/descending data, filling the identification corresponding to the type of the ascending/descending frame at the first position of the type area of the data frame, filling the number of the ascending/descending data at the third position, and filling the initial data and the ascending/descending proportion in the data area.
In some embodiments, the integration module is further configured to: judging whether the current data frame belongs to one of the types of the processed data frames, responding to the fact that the current data frame belongs to one of the types of the processed data frames, integrating the current data frame and the corresponding processed data frame, and modifying a data area and/or a type area of the processed data frame.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method as above.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has the following beneficial technical effects: by splitting the bitmap file and integrating the split data of the same type, the time for sending the bitmap data through the CAN port is greatly shortened.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a schematic diagram of an embodiment of a method for transmitting a bitmap file through a CAN port according to the present invention;
fig. 2 is a schematic diagram of a hardware structure of an embodiment of the computer device for transmitting a bitmap file through a CAN port according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above, a first aspect of the embodiments of the present invention provides an embodiment of a method for transmitting a bitmap file through a CAN port. Fig. 1 is a schematic diagram illustrating an embodiment of a method for transmitting a bitmap file through a CAN port according to the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s1, reading the bitmap file to be sent into a memory;
s2, dividing a sending buffer area in the memory, and dividing the bitmap file into data frames based on the size of the minimum unit of the sending buffer area;
s3, adding corresponding type identifiers in each data frame according to the characteristics of the data area, and integrating the data frames of the same type based on the identifiers; and
and S4, sending handshake data to the receiver, and sending the integrated data frame to the receiver in response to receiving the response information of the receiver.
And reading the bitmap file to be sent into a memory. And reading the bitmap file to be transmitted into the memory by the sender in a binary stream mode.
The method includes dividing a transmission buffer in a memory and dividing a bitmap file into data frames based on a size of a minimum unit of the transmission buffer. The transmission buffer is divided into 8 bytes, and the identification of the corresponding data type is added to one frame, wherein the data type is the original frame, and the data length is 7 bytes. And adding bitmap file data in the memory into the last 7-bit data area of each frame of the buffer area by taking each 7 bytes as a group.
And adding a corresponding type identifier in each data frame according to the characteristics of the data area, and integrating the data frames of the same type based on the identifiers. And performing frame sealing processing on the data of the bitmap file read into the memory according to a rule during sending, and adding corresponding data type identification, corresponding data, length and other information in a data head of each frame according to different data of each frame.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier includes: and in response to the existence of the repeated data, filling an identification corresponding to the type of the repeated frame at a first position in the type area of the data frame, filling the number of the repeated data at a second position, and filling the number of the repeated data at a third position. The "identification" includes, but is not limited to, a number, which may be filled in with duplicate data in the data field, a duplicate frame in [7:6] of the type field, the number of duplicate data in [5:4] of the type field, and the number of duplicate data in [3:0] of the type field. Wherein [ X: Y ] represents from the Y-th bit to the X-th bit. For example, if the number of the data field is 1111111, then the bits 0 to 3 of the type field are 0001, and since there is only one data frame, the bits 4 to 5 of the type field are filled in with 01, and when the same data frame exists subsequently, the number of the bits 4 to 5 in the type field is increased accordingly.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier further includes: and in response to the existence of the ascending/descending data, filling the identification corresponding to the type of the ascending/descending frame at the first position of the type area of the data frame, filling the number of the ascending/descending data at the third position, and filling the initial data and the ascending/descending proportion in the data area. And (3) standardizing the frames which conform to the ascending arrangement into ascending frames, filling the initial data and the ascending proportion in the data area, filling the ascending frames in the [7:6] of the type area, reserving the [5:4] of the type area, and filling the ascending data in the [3:0] of the type area for times. The descending frame is opposite to the ascending frame, the frame which accords with descending arrangement is normalized into the descending frame, the initial data and descending proportion are filled in the data area, the ascending frame is filled in the [7:6] of the type area, the [5:4] of the type area is reserved, and the descending data is filled in the [3:0] of the type area for times.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier further includes: judging whether the current data frame belongs to one of the types of the processed data frames, responding to the fact that the current data frame belongs to one of the types of the processed data frames, integrating the current data frame and the corresponding processed data frame, and modifying a data area and/or a type area of the processed data frame.
And sending handshake data to the receiving party, and sending the integrated data frame to the receiving party in response to receiving the response information of the receiving party. And the sender sends handshake data of transmission data, wherein the content comprises the total frame number of the sent bitmap file, the total data volume of the sent bitmap file and other related information. And after the receiving party responds to the frame information, transmitting the related data of the bitmap. And after receiving all the bitmap data, the receiver performs deframing processing according to the rule during transmission, thereby completing the synthesis and storage of the bitmap file. And after the data frame is received, sending the received frame to a sender. And according to the information of the handshake data, sequentially receiving each frame of data, and after receiving the data, performing data unpacking processing according to the rule of a sender. And finishing storing the bitmap according to the specific bitmap information. And after the receiving is finished, sending a receiving finished frame to a sender, wherein the information is the total frame number of the received bitmap file, and the information is related information such as the total data volume of the bitmap file.
It should be particularly noted that, the steps in the embodiments of the method for transmitting bitmap files through the CAN port CAN be mutually intersected, replaced, added, and deleted, so that these methods for transmitting bitmap files through the CAN port, which are reasonably transformed by permutation and combination, should also belong to the scope of the present invention, and should not limit the scope of the present invention to the embodiments.
In view of the above, a second aspect of the embodiments of the present invention provides a system for transmitting a bitmap file through a CAN port, including: the reading module is configured to read a bitmap file to be sent into a memory; the dividing module is configured to divide a sending buffer area in the memory and divide the bitmap file into data frames based on the size of the minimum unit of the sending buffer area; the integration module is configured to add a corresponding type identifier in each data frame according to the characteristics of the data area and integrate the data frames of the same type based on the identifiers; and the execution module is configured to send handshake data to a receiving party, and send the integrated data frame to the receiving party in response to receiving the response information of the receiving party.
In some embodiments, the integration module is further configured to: and in response to the existence of the repeated data, filling an identification corresponding to the type of the repeated frame at a first position in the type area of the data frame, filling the number of the repeated data at a second position, and filling the number of the repeated data at a third position.
In some embodiments, the integration module is further configured to: and in response to the existence of the ascending/descending data, filling the identification corresponding to the type of the ascending/descending frame at the first position of the type area of the data frame, filling the number of the ascending/descending data at the third position, and filling the initial data and the ascending/descending proportion in the data area.
In some embodiments, the integration module is further configured to: judging whether the current data frame belongs to one of the types of the processed data frames, responding to the fact that the current data frame belongs to one of the types of the processed data frames, integrating the current data frame and the corresponding processed data frame, and modifying a data area and/or a type area of the processed data frame.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executable by the processor to perform the steps of: s1, reading the bitmap file to be sent into a memory; s2, dividing a sending buffer area in the memory, and dividing the bitmap file into data frames based on the size of the minimum unit of the sending buffer area; s3, adding corresponding type identifiers in each data frame according to the characteristics of the data area, and integrating the data frames of the same type based on the identifiers; and S4, sending handshake data to the receiver, and sending the integrated data frame to the receiver in response to receiving the response information of the receiver.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier includes: and in response to the existence of the repeated data, filling an identification corresponding to the type of the repeated frame at a first position in the type area of the data frame, filling the number of the repeated data at a second position, and filling the number of the repeated data at a third position.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier further includes: and in response to the existence of the ascending/descending data, filling the identification corresponding to the type of the ascending/descending frame at the first position of the type area of the data frame, filling the number of the ascending/descending data at the third position, and filling the initial data and the ascending/descending proportion in the data area.
In some embodiments, the adding, according to characteristics of the data area, a corresponding type identifier to each data frame, and integrating the data frames of the same type based on the identifier further includes: judging whether the current data frame belongs to one of the types of the processed data frames, responding to the fact that the current data frame belongs to one of the types of the processed data frames, integrating the current data frame and the corresponding processed data frame, and modifying a data area and/or a type area of the processed data frame.
Fig. 2 is a schematic diagram of a hardware structure of an embodiment of the computer device for transmitting a bitmap file through a CAN port according to the present invention.
Taking the apparatus shown in fig. 2 as an example, the apparatus includes a processor 301 and a memory 302, and may further include: an input device 303 and an output device 304.
The processor 301, the memory 302, the input device 303 and the output device 304 may be connected by a bus or other means, and fig. 2 illustrates the connection by a bus as an example.
The memory 302 is a non-volatile computer-readable storage medium, and CAN be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for transmitting bitmap files through the CAN port in the embodiment of the present application. The processor 301 executes various functional applications of the server and data processing by running the nonvolatile software programs, instructions and modules stored in the memory 302, that is, implements the method of transmitting bitmap files through the CAN port of the above-described method embodiment.
The memory 302 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a method of transmitting a bitmap file through the CAN port, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 302 optionally includes memory located remotely from processor 301, which may be connected to a local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 303 may receive information such as a user name and a password that are input. The output means 304 may comprise a display device such as a display screen.
One or more program instructions/modules corresponding to a method for transmitting a bitmap file via the CAN port are stored in the memory 302, and when being executed by the processor 301, the method for transmitting a bitmap file via the CAN port in any of the above-mentioned method embodiments is executed.
Any embodiment of the computer device for executing the method for transmitting the bitmap file through the CAN port CAN achieve the same or similar effects as any corresponding method embodiment.
The invention also provides a computer readable storage medium storing a computer program which, when executed by a processor, performs the method as above.
Finally, it should be noted that, as one of ordinary skill in the art CAN appreciate, all or part of the processes of the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the program of the method of transmitting bitmap files through the CAN port may be stored in a computer readable storage medium, and when executed, the program may include the processes of the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the methods disclosed according to embodiments of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A method for transmitting bitmap files through a CAN port is characterized by comprising the following steps:
reading a bitmap file to be sent into a memory;
dividing a sending buffer area in the memory, and dividing the bitmap file into data frames based on the size of the minimum unit of the sending buffer area;
adding a corresponding type identifier in each data frame according to the characteristics of the data area, and integrating the data frames of the same type based on the identifiers; and
and sending handshake data to a receiver, and sending the integrated data frame to the receiver in response to receiving the response information of the receiver.
2. The method of claim 1, wherein adding a corresponding type identifier to each data frame according to the characteristics of the data area, and integrating the data frames of the same type based on the type identifier comprises:
and in response to the existence of the repeated data, filling an identification corresponding to the type of the repeated frame at a first position in the type area of the data frame, filling the number of the repeated data at a second position, and filling the number of the repeated data at a third position.
3. The method according to claim 1, wherein the adding a corresponding type identifier in each data frame according to the characteristics of the data area, and the integrating the data frames of the same type based on the identifier further comprises:
and in response to the existence of the ascending/descending data, filling the identification corresponding to the type of the ascending/descending frame at the first position of the type area of the data frame, filling the number of the ascending/descending data at the third position, and filling the initial data and the ascending/descending proportion in the data area.
4. The method according to claim 1, wherein the adding a corresponding type identifier in each data frame according to the characteristics of the data area, and the integrating the data frames of the same type based on the identifier further comprises:
judging whether the current data frame belongs to one of the types of the processed data frames, responding to the fact that the current data frame belongs to one of the types of the processed data frames, integrating the current data frame and the corresponding processed data frame, and modifying a data area and/or a type area of the processed data frame.
5. A system for transmitting a bitmap file through a CAN port, comprising:
the reading module is configured to read a bitmap file to be sent into a memory;
the dividing module is configured to divide a sending buffer area in the memory and divide the bitmap file into data frames based on the size of the minimum unit of the sending buffer area;
the integration module is configured to add a corresponding type identifier in each data frame according to the characteristics of the data area and integrate the data frames of the same type based on the identifiers; and
and the execution module is configured to send handshake data to a receiving party and send the integrated data frame to the receiving party in response to receiving the response information of the receiving party.
6. The system of claim 5, wherein the integration module is further configured to:
and in response to the existence of the repeated data, filling an identification corresponding to the type of the repeated frame at a first position in the type area of the data frame, filling the number of the repeated data at a second position, and filling the number of the repeated data at a third position.
7. The system of claim 5, wherein the integration module is further configured to:
and in response to the existence of the ascending/descending data, filling the identification corresponding to the type of the ascending/descending frame at the first position of the type area of the data frame, filling the number of the ascending/descending data at the third position, and filling the initial data and the ascending/descending proportion in the data area.
8. The system of claim 5, wherein the integration module is further configured to:
judging whether the current data frame belongs to one of the types of the processed data frames, responding to the fact that the current data frame belongs to one of the types of the processed data frames, integrating the current data frame and the corresponding processed data frame, and modifying a data area and/or a type area of the processed data frame.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010442435.7A CN111600961A (en) | 2020-05-22 | 2020-05-22 | Method, system, equipment and medium for transmitting bitmap file through CAN port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010442435.7A CN111600961A (en) | 2020-05-22 | 2020-05-22 | Method, system, equipment and medium for transmitting bitmap file through CAN port |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111600961A true CN111600961A (en) | 2020-08-28 |
Family
ID=72191390
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010442435.7A Pending CN111600961A (en) | 2020-05-22 | 2020-05-22 | Method, system, equipment and medium for transmitting bitmap file through CAN port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111600961A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113709131A (en) * | 2021-08-22 | 2021-11-26 | 山东云海国创云计算装备产业创新中心有限公司 | Network data transmission method and device, computer equipment and readable medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6286061B1 (en) * | 1998-06-02 | 2001-09-04 | Philips Electronics North America Corporation | System for applying a tag to a frame based on certain characteristics of the frame and transferring the frame as a function of the tag |
CN101523732A (en) * | 2006-09-01 | 2009-09-02 | 帕克比特软件股份有限公司 | Method and system for transmitting a data file over a data network |
CN105653484A (en) * | 2015-12-31 | 2016-06-08 | 厦门市美亚柏科信息股份有限公司 | Data block-oriented compression multi-path transmission method |
CN106656195A (en) * | 2015-11-04 | 2017-05-10 | 北京信威通信技术股份有限公司 | Data compression decompression method and data compression decompression system |
WO2018214140A1 (en) * | 2017-05-26 | 2018-11-29 | 深圳配天智能技术研究院有限公司 | Data compression method and data decompression method, and related device |
CN110266571A (en) * | 2019-06-17 | 2019-09-20 | 珠海格力电器股份有限公司 | Improve the method, apparatus and computer equipment of CAN bus data transmission credibility |
-
2020
- 2020-05-22 CN CN202010442435.7A patent/CN111600961A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6286061B1 (en) * | 1998-06-02 | 2001-09-04 | Philips Electronics North America Corporation | System for applying a tag to a frame based on certain characteristics of the frame and transferring the frame as a function of the tag |
CN101523732A (en) * | 2006-09-01 | 2009-09-02 | 帕克比特软件股份有限公司 | Method and system for transmitting a data file over a data network |
CN106656195A (en) * | 2015-11-04 | 2017-05-10 | 北京信威通信技术股份有限公司 | Data compression decompression method and data compression decompression system |
CN105653484A (en) * | 2015-12-31 | 2016-06-08 | 厦门市美亚柏科信息股份有限公司 | Data block-oriented compression multi-path transmission method |
WO2018214140A1 (en) * | 2017-05-26 | 2018-11-29 | 深圳配天智能技术研究院有限公司 | Data compression method and data decompression method, and related device |
CN110266571A (en) * | 2019-06-17 | 2019-09-20 | 珠海格力电器股份有限公司 | Improve the method, apparatus and computer equipment of CAN bus data transmission credibility |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113709131A (en) * | 2021-08-22 | 2021-11-26 | 山东云海国创云计算装备产业创新中心有限公司 | Network data transmission method and device, computer equipment and readable medium |
CN113709131B (en) * | 2021-08-22 | 2024-01-09 | 山东云海国创云计算装备产业创新中心有限公司 | Network data transmission method, device, computer equipment and readable medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7746250B2 (en) | Message encoding/decoding using templated parameters | |
US20090234971A1 (en) | Encoding/decoding while allowing varying message formats per message | |
CN112202623B (en) | Data processing method and device | |
CN110753095B (en) | Data processing method and device of network card and storage medium | |
EP3813318A1 (en) | Packet transmission method, communication device, and system | |
CN110413354B (en) | Method, equipment and storage medium for realizing interaction with third-party platform | |
CN110659165A (en) | Multi-node server automatic testing method and device | |
CN111600961A (en) | Method, system, equipment and medium for transmitting bitmap file through CAN port | |
CN112422485B (en) | Communication method and device of transmission control protocol | |
US20230300720A1 (en) | Network distribution method and apparatus | |
CN111371885B (en) | Method, device, equipment and medium for transmitting file to VMWare virtual machine | |
CN108133026B (en) | Multi-data processing method, system and storage medium | |
CN113238856A (en) | RDMA (remote direct memory Access) -based memory management method and device | |
CN110225293B (en) | Conference cascading method and electronic equipment | |
CN111045989A (en) | Method, device and medium for querying CPLD version information | |
CN111225077A (en) | Network distribution method, device and system for Internet of things equipment | |
WO2021232920A1 (en) | Data transmission method, electronic device, and storage medium | |
CN114157716A (en) | Data processing method and device based on block chain and electronic equipment | |
CN112423284A (en) | Zigbee equipment pairing method and device, gateway, electronic equipment and storage medium | |
CN110764927A (en) | Method and equipment for asynchronous communication among multiple machines | |
CN111090432A (en) | Interface processing method and device and electronic equipment | |
CN113837342B (en) | Encoding method, device, equipment and storage medium of electronic tag | |
CN110493038B (en) | Communication model optimization method and device | |
CN113098957B (en) | Data transmission method and related product | |
CN117061586A (en) | Service data sending method, receiving method, device, system and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200828 |
|
RJ01 | Rejection of invention patent application after publication |