CN112153117B - Image-text data transmission method, storage medium and terminal - Google Patents
Image-text data transmission method, storage medium and terminal Download PDFInfo
- Publication number
- CN112153117B CN112153117B CN202010928201.3A CN202010928201A CN112153117B CN 112153117 B CN112153117 B CN 112153117B CN 202010928201 A CN202010928201 A CN 202010928201A CN 112153117 B CN112153117 B CN 112153117B
- Authority
- CN
- China
- Prior art keywords
- image
- data
- text
- original data
- bitmap
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 230000005540 biological transmission Effects 0.000 title claims abstract description 26
- 230000000903 blocking effect Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
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
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Facsimiles In General (AREA)
Abstract
The invention provides a graphic data transmission method, a storage medium and a terminal. Wherein the method comprises the steps of: acquiring image-text original data, and analyzing the image-text original data; drawing the parsed image-text data into bitmap data, and writing the bitmap data into a shared memory; and reading the bitmap data from the shared memory, drawing pictures and texts according to the read bitmap data, and displaying the drawn pictures and texts. By adopting the shared memory, the acquired image and text is written into the shared memory after original analysis, and the data (the analyzed image and text data) in the shared memory is read, so that the image and text drawing can be performed on the bottom layer of the Android system with high version, the complexity of the system is reduced, and the stability of the system is improved.
Description
Technical Field
The present invention relates to the field of software debugging technologies, and in particular, to a method for transmitting graphic data, a storage medium, and a terminal.
Background
The image-text data transmission processing modes of the existing Android/linux system schemes are single, are only suitable for the linux system, are not suitable for the Android system, even the image-text data transmission processing of the Android system with a high version cannot be used with the image-text data transmission processing channels of the Android system with a low version, and a set of image-text data transmission processing channels which are used with the high version are required to be designed independently, so that the system complexity of the universality of software is reduced for the software of the system.
Accordingly, there is a need for further improvements and improvements in the art.
Disclosure of Invention
In view of the shortcomings of the prior art, the invention aims to provide a graphic data transmission method, a storage medium and a terminal, and aims to solve the problem that graphic software of an existing Android system and a linux system is poor in universality.
A picture and text data transmission method, wherein, comprising the steps of:
acquiring image-text original data, and analyzing the image-text original data;
drawing the parsed image-text data into bitmap data, and writing the bitmap data into a shared memory;
and reading the bitmap data from the shared memory, drawing pictures and texts according to the read bitmap data, and displaying the drawn pictures and texts.
According to the image-text data transmission method, the shared memory is adopted, the acquired image-text is written into the shared memory after original analysis, and the data (the analyzed image-text data) in the shared memory is read, so that the image-text drawing can be performed on the bottom layer of the Android system with a high version, the complexity of the system is reduced, and the stability of the system is improved.
Optionally, in the method for transmitting teletext data, the step of obtaining the teletext raw data and analyzing the teletext raw data specifically includes:
acquiring ATV image-text original data or DTV image-text original data;
and transmitting the ATV image-text original data or the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data or DTV bitmap data.
Optionally, in the method for transmitting teletext data, the step of obtaining the teletext raw data and analyzing the teletext raw data specifically includes:
acquiring ATV image-text original data and DTV image-text original data;
and transmitting the ATV image-text original data and the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data and DTV bitmap data.
Optionally, the method for transmitting teletext data further includes: and maintaining the reading and writing of the shared memory by adopting a semaphore.
Optionally, the method for transmitting teletext data, wherein the step of maintaining the read-write of the shared memory by adopting the semaphore specifically includes:
initializing the semaphore to zero to make the shared memory be in a blocking state;
and when the bitmap data appears, performing read-write operation on the shared memory.
Optionally, in the method for transmitting graphic data, the bitmap data is bitmap data to be displayed on the whole screen.
Based on the same inventive concept, the present invention also provides a storage medium storing one or more programs executable by one or more processors to implement steps;
acquiring image-text original data, and analyzing the image-text original data;
drawing the parsed image-text data into bitmap data, and writing the bitmap data into a shared memory;
and reading the bitmap data from the shared memory, drawing pictures and texts according to the read bitmap data, and displaying the drawn pictures and texts.
Optionally, the step of obtaining the original image-text data and analyzing the original image-text data specifically includes:
acquiring ATV image-text original data or DTV image-text original data;
and transmitting the ATV image-text original data or the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data or DTV bitmap data.
Optionally, the step of obtaining the original image-text data and analyzing the original image-text data specifically includes:
acquiring ATV image-text original data and DTV image-text original data;
and transmitting the ATV image-text original data and the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data and DTV bitmap data.
Based on the same inventive concept, the present invention also provides a terminal, including: a processor and a memory; the memory has stored thereon a program executable by the processor; the processor, when executing the program, implements the steps in the teletext data transmission method as described above.
Drawings
Fig. 1 is a schematic diagram of a static model of graphic data of a graphic data transmission method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for transmitting graphic data according to an embodiment of the present invention;
fig. 3 is a context diagram of teletext data transmission according to an embodiment of the invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. The drawings illustrate preferred embodiments of the invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
In the prior art, the image-text data transmission processing form of the electronic equipment based on the Android/Linux platform is single, if the electronic equipment is only suitable for a Linux system, the image-text data transmission processing of the Android system of a high version sometimes cannot be used with the image-text data transmission processing channel of a low version, and a set of image-text data transmission processing channels which are used with the high version need to be designed independently, so that the universality of software is low. And is not beneficial to the development and maintenance of the system.
Based on this, the present invention provides a solution to the above technical problem, and the details thereof will be described in the following embodiments.
In the following embodiments, a television is taken as an example, and the description of the embodiments is taken as a reference to the accompanying drawings to further explain the summary of the invention.
Referring to fig. 1, as shown in fig. 1, the present invention establishes a data transmission common-path model in advance, which includes a shared memory block, a television service DTV (Digital television) graphic resolution, a television service ATV (Analog television) graphic resolution, a television service client and an application. Wherein the teletext data can be divided into VBI (vertical blanking interval ) data and PSI (Program Specific Information, program specific information) data, and the teletext data is input into a shared memory by the television service DTV teletext parsing and the television service ATV teletext parsing.
Referring to fig. 2 and 3, as shown in the drawing, an embodiment of the present invention provides a method for transmitting teletext data, the method including the steps of:
s100, obtaining image-text original data, and analyzing the image-text original data;
specifically, the image-text original data is firstly obtained by the image-text driver and the PSI driver, the obtained image-text original data is sent to the image-text protocol stack, then the image-text protocol stack analyzes the image-text original data, and the analysis result is sent to the word stock protocol stack. It is easily understood that the acquired teletext raw data includes DTV data and ATV data. The steps of inputting the original image-text data into the image-text protocol stack and the word stock protocol stack and analyzing the image-text by using the image-text protocol stack and the word stock protocol stack are all the prior art, and are not repeated here.
S200, drawing the parsed image-text data into bitmap data, and writing the bitmap data into a shared memory;
specifically, through step S100, the graphics context protocol stack parses the obtained graphics context original data, and transmits the result obtained by parsing to the word stock protocol stack, the word stock protocol stack draws the data transferred from the graphics context protocol stack into bitmap data to be displayed on a whole screen, and writes the bitmap data into the shared memory.
And S300, reading the bitmap data from the shared memory, drawing pictures and texts according to the read bitmap data, and displaying the drawn pictures and texts.
Specifically, the television service client reads bitmap data from the shared memory, and performs image-text drawing on the television service client according to the read bitmap data, and displays the drawn image-text (supplies for reading). Because the television service client can draw the pictures and texts, the problem that the high-version Android cannot draw the pictures and texts at the bottom layer can be solved, namely, the pictures and texts of the high-version Android and the low-version Android can be mutually transmitted, and the universality of software is improved.
In one implementation manner of this embodiment, when the data is read from the shared memory, a secure mechanism for teletext data transmission may be further established, that is, the reading from the shared memory is protected by using a semaphore. Specifically, the semaphore may be initialized to 0, so that the shared memory is in a blocking state, and the read-write operation is started on the shared memory only when data (such as DTV bitmap data or ATV bitmap data) appears. I.e. there is no read operation when writing to the shared memory and no write operation when reading. Thereby ensuring the read-write safety of the shared memory.
In one implementation of this embodiment, in conjunction with fig. 3, after the graphics driver sends the acquired graphics data to the graphics protocol stack, part of the graphics data may also be controlled by the graphics on the television server to obtain graphics, while after the graphics data acquired by the PSI driver is sent to the graphics protocol stack, the subtitle data is sent to the subtitle protocol stack, and then MP (graphics) is obtained after the subtitle control. And the television service client communicates with the television service client directly, namely without passing through the shared memory. It should be noted that, instead of the shared memory, the image-text data with smaller data transmission amount is directly transmitted. That is, the graphic data occupying large memory is transmitted through the shared memory, and the graphic data occupying relatively small memory (such as 30kb, 100kb, 500kb, etc.) does not pass through the shared memory.
Based on the above-mentioned teletext data transmission method, the present invention also provides a storage medium storing one or more programs executable by one or more processors to implement the steps in the teletext data transmission method as follows:
acquiring image-text original data, and analyzing the image-text original data; drawing the parsed image-text data into bitmap data, and writing the bitmap data into a shared memory; and reading the bitmap data from the shared memory, drawing pictures and texts according to the read bitmap data, and displaying the drawn pictures and texts.
Specifically, the step of obtaining the original image-text data and analyzing the original image-text data includes: acquiring ATV image-text original data or DTV image-text original data; and transmitting the ATV image-text original data or the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data or DTV bitmap data.
In one implementation manner of this embodiment, the step of obtaining the original image-text data and analyzing the original image-text data includes: acquiring ATV image-text original data or DTV image-text original data; and transmitting the ATV image-text original data or the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data or DTV bitmap data.
Based on the above-mentioned teletext data transmission method, the present invention also provides a terminal, as shown in fig. 4, comprising at least one processor (processor) 30; a display screen 31; and a memory (memory) 32, which may further include a communication interface (communication interface) 33 and a bus 34. Wherein the processor 30, the display 31, the memory 32 and the communication interface 33 may communicate with each other via a bus 34. The display screen 31 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 33 may transmit information. The processor 30 may invoke logic instructions in the memory 32 to perform the methods of the embodiments described above. Further, the logic instructions in the memory 32 described above may be implemented in the form of software functional units and stored in a readable storage medium when sold or used as a stand-alone product. The memory 32 is provided as a readable storage medium and may be configured to store a software program, such as program instructions or modules corresponding to the methods in the embodiments of the present invention. The processor 30 executes functional applications and data processing, i.e. implements the methods of the embodiments described above, by running software programs, instructions or modules stored in the memory 32. The memory 32 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the terminal, etc. In addition, the memory 32 may include high-speed random access memory, and may also include nonvolatile memory. For example, a plurality of media capable of storing program codes such as a usb disk, a removable hard disk, a Read-only memory (ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or a transitory storage medium may be used. In addition, the specific processes that the storage medium and the plurality of instruction processors in the terminal load and execute are described in detail in the above method, and are not stated here.
In summary, the invention provides a method, a storage medium and a terminal for transmitting graphic data. Wherein the method comprises the steps of: acquiring image-text original data, and analyzing the image-text original data; drawing the parsed image-text data into bitmap data, and writing the bitmap data into a shared memory; and reading the bitmap data from the shared memory, drawing pictures and texts according to the read bitmap data, and displaying the drawn pictures and texts. By adopting the shared memory, the acquired image and text is written into the shared memory after original analysis, and the data (the analyzed image and text data) in the shared memory is read, so that the image and text drawing can be performed on the bottom layer of the Android system with high version, the complexity of the system is reduced, and the stability of the system is improved.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.
Claims (6)
1. The image-text data transmission method is characterized by comprising the following steps:
acquiring image-text original data, and analyzing the image-text original data;
drawing the parsed image-text data into bitmap data, and writing the bitmap data into a shared memory;
reading the bitmap data from the shared memory, drawing pictures and texts according to the read bitmap data, and displaying the drawn pictures and texts;
the bitmap data is the bitmap data to be displayed on the whole screen;
acquiring ATV image-text original data and DTV image-text original data;
the step of obtaining the image-text original data and analyzing the image-text original data specifically comprises the following steps:
transmitting the ATV image-text original data and the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data and DTV bitmap data;
the image-text data transmission method further comprises the steps of: and maintaining the reading and writing of the shared memory by adopting a semaphore.
2. The method for transmitting teletext data according to claim 1, wherein the step of obtaining the teletext raw data and parsing the teletext raw data comprises:
acquiring ATV image-text original data or DTV image-text original data;
and transmitting the ATV image-text original data or the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data or DTV bitmap data.
3. The method for transmitting teletext data according to claim 1, wherein the step of maintaining the read-write of the shared memory using a semaphore includes:
initializing the semaphore to zero to make the shared memory be in a blocking state;
and when the bitmap data appears, performing read-write operation on the shared memory.
4. A storage medium storing one or more programs executable by one or more processors to perform the steps of:
acquiring image-text original data, and analyzing the image-text original data;
drawing the parsed image-text data into bitmap data, and writing the bitmap data into a shared memory;
reading the bitmap data from the shared memory, drawing pictures and texts according to the read bitmap data, and displaying the drawn pictures and texts;
the bitmap data is the bitmap data to be displayed on the whole screen;
acquiring ATV image-text original data and DTV image-text original data;
the step of obtaining the image-text original data and analyzing the image-text original data specifically comprises the following steps:
and transmitting the ATV image-text original data and the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data and DTV bitmap data.
5. The storage medium of claim 4, wherein the step of obtaining the original teletext data and parsing the original teletext data comprises:
acquiring ATV image-text original data or DTV image-text original data;
and transmitting the ATV image-text original data or the DTV image-text original data to an image-text protocol stack, and analyzing by the image-text protocol stack to obtain ATV bitmap data or DTV bitmap data.
6. A terminal, comprising: a processor and a memory; the memory has stored thereon a program executable by the processor; the processor, when executing the program, implements the steps of the method for teletext data transmission according to any one of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010928201.3A CN112153117B (en) | 2020-09-07 | 2020-09-07 | Image-text data transmission method, storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010928201.3A CN112153117B (en) | 2020-09-07 | 2020-09-07 | Image-text data transmission method, storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112153117A CN112153117A (en) | 2020-12-29 |
CN112153117B true CN112153117B (en) | 2023-12-29 |
Family
ID=73890703
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010928201.3A Active CN112153117B (en) | 2020-09-07 | 2020-09-07 | Image-text data transmission method, storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112153117B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346229A (en) * | 2014-11-14 | 2015-02-11 | 国家电网公司 | Processing method for optimization of inter-process communication of embedded operating system |
CN107220067A (en) * | 2017-06-29 | 2017-09-29 | 广州优视网络科技有限公司 | The loading method and device of scalable vector graphicses picture under Android system |
CN111147925A (en) * | 2020-01-02 | 2020-05-12 | 南京巨鲨显示科技有限公司 | Processing method, system and device capable of playing video stream compatible with WPF (Windows presentation foundation) |
CN111142685A (en) * | 2019-12-12 | 2020-05-12 | 北京智慧章鱼科技有限公司 | Special effect character input method and input method system |
-
2020
- 2020-09-07 CN CN202010928201.3A patent/CN112153117B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346229A (en) * | 2014-11-14 | 2015-02-11 | 国家电网公司 | Processing method for optimization of inter-process communication of embedded operating system |
CN107220067A (en) * | 2017-06-29 | 2017-09-29 | 广州优视网络科技有限公司 | The loading method and device of scalable vector graphicses picture under Android system |
CN111142685A (en) * | 2019-12-12 | 2020-05-12 | 北京智慧章鱼科技有限公司 | Special effect character input method and input method system |
CN111147925A (en) * | 2020-01-02 | 2020-05-12 | 南京巨鲨显示科技有限公司 | Processing method, system and device capable of playing video stream compatible with WPF (Windows presentation foundation) |
Non-Patent Citations (1)
Title |
---|
UNIX平台上数据处理中内存桶模型的设计与实现;吴斌等;《计算机工程与设计》;20051128(第11期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112153117A (en) | 2020-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5861887A (en) | Graphic image compression and storage system | |
CN104156207A (en) | File display method and device | |
US7940273B2 (en) | Determination of unicode points from glyph elements | |
US7944421B2 (en) | Image display system, image display method, image display device, image data processor, program, storage medium, and image processing program distribution server | |
CN112153117B (en) | Image-text data transmission method, storage medium and terminal | |
US7657897B2 (en) | Methods and apparatus for communicating between multiple levels of software components | |
US20020087985A1 (en) | Methods and apparatuses for displaying meaningful abbreviated program titles | |
EP1622040A2 (en) | Apparatus and method for processing text data | |
JPH10228547A (en) | Method, device for editing image and storage medium | |
CN111782204A (en) | Batch scheduling editing method and device | |
EP2397953B1 (en) | A computer-implemented method, a computer program product and an embedded system for displaying data more efficiently | |
CN113986087B (en) | Video rendering method based on subscription | |
CN115599880A (en) | Map legend configuration management method and terminal | |
US20130027392A1 (en) | Image processing apparatus, image processing method, program, and non-transitory computer readable information storage medium | |
US20100017708A1 (en) | Information output apparatus, information output method, and recording medium | |
CN107657929B (en) | SD card data display device and display equipment | |
CN113112573B (en) | Picture generation method and device based on markup language and electronic equipment | |
CN112632902A (en) | Text processing method and device, text playing method and device and text playing control system | |
US6275199B1 (en) | Method and apparatus for background and foreground color control of image and facsimile data display on a non-programmable-terminal | |
CN113923509B (en) | HDMI video acquisition control processing system | |
US11877036B2 (en) | Rendering scrolling captions | |
CN110874253A (en) | Display method and display system | |
CN110290483B (en) | Multimedia message transmission method, system and terminal equipment | |
US20220270572A1 (en) | Image transmission apparatus, image transmission method, and program | |
JP2804110B2 (en) | Image output device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |