CN111399788A - Media file playing method and media file playing device - Google Patents

Media file playing method and media file playing device Download PDF

Info

Publication number
CN111399788A
CN111399788A CN201811633177.XA CN201811633177A CN111399788A CN 111399788 A CN111399788 A CN 111399788A CN 201811633177 A CN201811633177 A CN 201811633177A CN 111399788 A CN111399788 A CN 111399788A
Authority
CN
China
Prior art keywords
media file
played
format
file
text
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.)
Granted
Application number
CN201811633177.XA
Other languages
Chinese (zh)
Other versions
CN111399788B (en
Inventor
韩丹
王伙荣
叶志兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Novastar Electronic Technology Co Ltd
Original Assignee
Xian Novastar Electronic Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xian Novastar Electronic Technology Co Ltd filed Critical Xian Novastar Electronic Technology Co Ltd
Priority to CN201811633177.XA priority Critical patent/CN111399788B/en
Publication of CN111399788A publication Critical patent/CN111399788A/en
Application granted granted Critical
Publication of CN111399788B publication Critical patent/CN111399788B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Abstract

The embodiment of the invention discloses a media file playing method, which comprises the following steps: acquiring a media file to be played; judging the format of the media file to be played; if the format of the media file to be played is a text file format, reading the content of the media file to be played, and converting the content of the media file to be played into a picture group; and playing the group of pictures. The embodiment of the invention also discloses a media file playing device. The embodiment of the invention can play the text file on the media playing device, and can set the attributes of character color (foreground color), background color, character font, font size, line spacing, character spacing, alignment mode and the like, thereby realizing lossless playing.

Description

Media file playing method and media file playing device
Technical Field
The present invention relates to the field of media playing technologies, and in particular, to a media file playing method and a media file playing apparatus.
Background
As an old-fashioned media type, characters can also transmit information to people, and particularly in the L ED (L light emitting diode) display industry, text playing still occupies a large part of application scenes.
Therefore, it is important to provide a text playing implementation scheme based on the existing media playing device.
Disclosure of Invention
The embodiment of the invention provides a video source switching playing method and a video source switching playing system, which can play a text file on a media playing device, and can set attributes such as character color (foreground color), background color, character font, font size, line spacing, character spacing, alignment mode and the like to realize lossless playing.
On one hand, a media file playing method provided by the embodiment of the present invention includes: acquiring a media file to be played; judging the format of the media file to be played; if the format of the media file to be played is a text file format, reading the content of the media file to be played, and converting the content of the media file to be played into a picture group; and playing the picture.
In an embodiment of the present invention, the media file playing method further includes: and if the format of the media file to be played is a video file format or an image file format, playing the media file to be played.
In an embodiment of the present invention, the converting the content of the media file to be played into a group of pictures specifically includes: setting text parameters, screen height and screen width; reading the content of the media file to be played; creating at least one sub-image according to the text parameters and the screen body width; drawing the content of the media file to be played on the sub-image according to the text parameter and the content of the media file to be played; and combining the sub-images according to the text parameters and the screen body height to obtain the picture group. In this embodiment, the content of the media file to be played is converted into a group of pictures, so that an effect of playing a text file on a media playing device can be achieved, and a limitation that an existing media playing device cannot play the text file is solved; through setting up text parameter, screen body height and screen body width, can realize increasing the practicality to the setting of text parameter, the text typeface of broadcasting can realize harmless broadcast, has very high definition.
In an embodiment of the present invention, each of the sub-images is used for displaying a line of the drawn content of the media file to be played. In this embodiment, each sub-image is used to display a line of the content of the drawn media file to be played, and the content reading and writing mode of the text file is met, so that the content reading efficiency of the media file to be played can be improved, and the media file playing efficiency realized by the media file playing method in this embodiment can be improved.
In one embodiment of the invention, the text parameter is selected from one or more of background color, text color, font size, font style, alignment style, inter-word space, and inter-line space.
In an embodiment of the present invention, the sub-graph is in a Bitmap format, and the group of pictures is in a PNG format.
In another aspect, an embodiment of the present invention provides a media file playing apparatus, including: the file acquisition module is used for acquiring a media file to be played; the format judging module is used for judging the format of the media file to be played; the text conversion module is used for reading the content of the media file to be played and converting the content of the media file to be played into a picture group if the format of the media file to be played is a text file format; and the media playing module is used for playing the picture group.
In an embodiment of the present invention, the media playing module is further configured to: and if the format of the media file to be played is a video file format or an image file format, playing the media file to be played.
In one embodiment of the present invention, the text conversion module includes: the parameter setting unit is used for setting text parameters, screen height and screen width; a file content reading unit, configured to read content of the media file to be played; the sub-image creating unit is used for creating at least one sub-image according to the text parameters and the screen body width; the drawing unit is used for drawing the content of the media file to be played on the subgraph according to the text parameter and the content of the media file to be played; and the combining unit is used for combining the subgraphs according to the text parameters and the screen height to obtain the group of the subgraphs.
In an embodiment of the present invention, each of the sub-images is used to display the content of a line of the rendered media file to be played, the sub-image is in a Bitmap format, the group of pictures is in a PNG format, and the text parameter is selected from one or more of a background color, a text color, a font size, a font style, an alignment style, a word spacing, and a line spacing.
The above technical solution may have one or more of the following advantages: the method can play the text file on the media playing device, and solves the limitation that the existing media playing device can not play the text file; the properties of character color, background color, character font, font size, line spacing, character spacing, alignment mode and the like can be set, so that the practicability is improved; meanwhile, the played text font can be played without damage, and the definition is very high.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced 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 to obtain other drawings based on these drawings without creative efforts.
Fig. 1A is a schematic flowchart of a media file playing method according to a first embodiment of the present invention;
FIG. 1B is a flowchart illustrating step S15 of the first embodiment of the present invention;
fig. 1C is a combination diagram of pictures obtained by combining subgraphs in the first embodiment of the invention;
FIG. 1D is a diagram illustrating contents of a text file according to an embodiment of the present invention;
FIG. 1E is a screenshot of a playing interface after a text file is converted into a picture according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a media file playing apparatus according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First embodiment
As shown in fig. 1A, a media file playing method 10 provided for a first embodiment of the present invention mainly includes:
step S11, acquiring the media file to be played. The file to be played may be obtained, for example, through a storage path of the media file to be played.
Specifically, the format of the media file to be played is judged according to the suffix name of the media file to be played, so as to judge whether the media file to be played is a text file, a video file, an image file or other types of files according to the format, for example, the suffix name corresponding to the text file is txt, word, etc., the suffix name corresponding to the video file is MP4, 3GP, F L V, MKV, AVI, MOV, etc., and the suffix name corresponding to the image file is MPG, bitmap, JPEG, PNG, etc.
Step S15, if the format of the media file to be played is a text file format, reading the content of the media file to be played and converting the content of the media file to be played into a group of pictures. Specifically, for example, if the suffix name of the media file to be played is txt, the format of the media file to be played is a text file format. And
step S17, playing the group of pictures. The group of pictures is played, for example, using a media playing device, such as a media player.
Further, the media file playing method 10, for example, further includes:
and step S19, if the format of the media file to be played is a video file format or an image file format, playing the media file to be played. And when the format of the media file to be played is not the text file format, nor the video file format or the image file format, ending the execution of the media file playing method 10.
As shown in fig. 1B, step S15 includes, for example, the sub-steps of:
step S151: and setting text parameters, screen height and screen width. Specifically, the text parameter is selected from one or more of a background color, a character color, a font size, a font style, an alignment style, a character spacing, and a line spacing, for example. The background color is the background color of the picture group; the character color is the color which is finally displayed on the picture group by the content of the media file to be played, namely the characters and the like; the character color, the font size, the font style, the alignment mode, the character spacing and the line spacing are respectively the color of the font to be displayed finally on the picture group, the font size, the font type, the alignment mode of the font contents, the spacing between the fonts and the spacing between two adjacent lines of fonts of the content of the media file to be played, namely the characters and the like.
Step S153: and reading the content of the media file to be played.
Step S155: and establishing at least one sub-image according to the text parameters and the screen body width.
Step S157: and drawing the content of the media file to be played on the subgraph according to the text parameter and the content of the media file to be played. And
step S159: and combining the sub-images according to the text parameters and the screen body height to obtain the picture group.
The execution of each sub-step of step S15 is described in detail below: for example, firstly, setting parameters such as background color, character color, font size, font style, alignment mode, character spacing, line spacing, and screen height and screen width for playing text file content; then reading the content of the text file, distinguishing each paragraph according to the line feed character "\ n", and storing each paragraph with a container; next, instantiating a Bitmap (Bitmap file) graph according to parameters such as the width of the screen body, the size of the font and the background color, wherein the width and the height of the Bitmap graph are respectively equal to the width of the screen body and the height of the font, and the Bitmap graph can be used for displaying a line of contents after being drawn; secondly, according to parameters such as character color, font size, font style, alignment mode, character spacing and the like, a painting brush is instantiated, the content of each paragraph of the text file is drawn on a Bitmap image, and a Bitmap image is instantiated after one Bitmap image is drawn or after one paragraph is drawn, until all the content of the text file is drawn on a series of Bitmap images; then, according to the height of the screen body and the set line spacing, the series of Bitmap images are arranged and combined into a PNG image group, that is, a group of PNG images, from top to bottom, for example, as shown in fig. 1C, the spacing between two adjacent Bitmap images (that is, two adjacent lines after drawing) is equal to the line spacing, the plurality of Bitmap images are spliced after filling the gap of the line spacing size until the height after splicing is equal to the height of the screen body, and a PNG (portable Network Graphic format) image is obtained by combination, and then the remaining Bitmap images are continuously spliced and combined according to the combination method shown in fig. 1C until all the Bitmap images are spliced and combined, and finally a group of PNG images is obtained, wherein each PNG image is a page of text displayed on the screen body for playing the content of the text file.
And each subgraph is used for displaying the content of the media file to be played after one line of drawing.
PNG uses lossless data compression algorithm derived from L Z77, resulting in high compression ratio without loss of data, and it marks repeated data with special coding method, thus having no influence on the color of image and no possibility of color loss, thus being able to be saved repeatedly without reducing image quality.
Referring to fig. 1D and 1E, a media file to be played is, for example, a text file with content in txt format as shown in fig. 1D, and an effect diagram played after the text file shown in fig. 1D is converted into a picture by the media file playing method 10 according to the first embodiment of the present invention is shown in fig. 1E. It can be seen that the media file playing method 10 according to the first embodiment of the present invention can realize playing a text file on a media playing device, and has high definition.
Second embodiment
As shown in fig. 2, a media file playing apparatus 20 according to a second embodiment of the present invention mainly includes: a file acquisition module 21, a format judgment module 23, a text conversion module 25 and a media playing module 27. The media file playing apparatus 20 is, for example, configured to execute the media file playing method 10 according to the foregoing first embodiment, and the functions and uses of the components of the media file playing apparatus 20 are briefly described below, and other specific flows and details may refer to the related descriptions in the foregoing first embodiment.
The file obtaining module 21 is, for example, configured to obtain a media file to be played, that is, to execute step S11 in the foregoing first embodiment.
The format determining module 23 is, for example, configured to determine the format of the media file to be played, that is, to execute step S13 in the foregoing first embodiment.
The text conversion module 25 is for example used to: if the format of the media file to be played is a text file format, the content of the media file to be played is read, and the content of the media file to be played is converted into a group of pictures, that is, the step S15 in the first embodiment is executed.
The media playing module 27 is, for example, configured to play the group of pictures, that is, configured to execute step S17 in the foregoing first embodiment. In some embodiments, the media play module 27 is further configured to, for example: if the format of the media file to be played is a video file format or an image file format, the media file to be played is played, that is, the media file to be played is also used to execute the step S19 in the first embodiment.
Specifically, the text conversion module 25 includes, for example: a parameter setting unit 251, a file content reading unit 253, a sub-graph creating unit 255, a drawing unit 257, and a combining unit 259.
The parameter setting unit 251 is used for setting text parameters, screen height, and screen width, for example, that is, for performing step S151 in the foregoing first embodiment.
The file content reading unit 253 is, for example, configured to read the content of the media file to be played, that is, configured to execute step S153 in the foregoing first embodiment.
The sub-image creating unit 255 is configured to create at least one sub-image according to the text parameter and the screen body width, for example, and is configured to execute step S155 in the foregoing first embodiment.
The drawing unit 257 is, for example, configured to draw the content of the media file to be played on the sub-graph according to the text parameter and the content of the media file to be played, that is, to execute step S157 in the foregoing first embodiment.
The combining unit 259 is, for example, configured to combine the sub-images according to the text parameter and the screen height to obtain the group of pictures, that is, to execute step S159 in the foregoing first embodiment.
Each sub-image is used for displaying the content of the media file to be played after one line of drawing, the sub-image is in a Bitmap format, the image group is in a PNG format, and the text parameters are selected from one or more of background color, character color, font size, font, alignment mode, character spacing and line spacing.
The media file playing apparatus 20 is implemented based on an ARM (advanced RISC machines), for example, and its internal components are implemented by software modules on the ARM processor, for example.
In summary, the foregoing embodiments of the present invention can realize: playing the text file on the media playing device, so as to solve the limitation that the existing media playing device can not play the text file; the method has the advantages that the method sets the attributes such as character color, background color, character font, font size, line spacing, character spacing and alignment mode, and increases practicability; meanwhile, lossless playing is realized, and high definition is achieved.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and/or method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units/modules is only one logical division, and there may be other divisions in actual implementation, for example, multiple units or modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units/modules described as separate parts may or may not be physically separate, and parts displayed as units/modules may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units/modules can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each functional unit/module in the embodiments of the present invention may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated into one unit/module. The integrated units/modules may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units/modules.
The integrated units/modules, which are implemented in the form of software functional units/modules, may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing one or more processors of a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for playing a media file, comprising:
acquiring a media file to be played;
judging the format of the media file to be played;
if the format of the media file to be played is a text file format, reading the content of the media file to be played, and converting the content of the media file to be played into a picture group;
and playing the picture group.
2. The media file playing method according to claim 1, wherein the media file playing method further comprises:
and if the format of the media file to be played is a video file format or an image file format, playing the media file to be played.
3. The method for playing a media file according to claim 1, wherein the converting the content of the media file to be played into a group of pictures specifically comprises:
setting text parameters, screen height and screen width;
reading the content of the media file to be played;
creating at least one sub-image according to the text parameters and the screen body width;
drawing the content of the media file to be played on the sub-image according to the text parameter and the content of the media file to be played;
and combining the sub-images according to the text parameters and the screen body height to obtain the picture group.
4. The media file playing method according to claim 3, wherein each of the sub-graphs is used for displaying a line of the drawn content of the media file to be played.
5. The media file playback method of claim 3, wherein the text parameter is selected from one or more of a background color, a text color, a font size, a font style, an alignment style, a space between characters, and a space between lines.
6. The media file playing method according to claim 3, wherein the sub-picture is in a Bitmap format, and the group of pictures is in a PNG format.
7. A media file playback apparatus, comprising:
the file acquisition module is used for acquiring a media file to be played;
the format judging module is used for judging the format of the media file to be played;
the text conversion module is used for reading the content of the media file to be played and converting the content of the media file to be played into a picture group if the format of the media file to be played is a text file format;
and the media playing module is used for playing the picture group.
8. The media file playback apparatus of claim 7, wherein the media playback module is further configured to:
and if the format of the media file to be played is a video file format or an image file format, playing the media file to be played.
9. The media file playback apparatus of claim 7, wherein the text conversion module comprises:
the parameter setting unit is used for setting text parameters, screen height and screen width;
a file content reading unit, configured to read content of the media file to be played;
the sub-image creating unit is used for creating at least one sub-image according to the text parameters and the screen body width;
the drawing unit is used for drawing the content of the media file to be played on the subgraph according to the text parameter and the content of the media file to be played;
and the combining unit is used for combining the subgraphs according to the text parameters and the screen height to obtain the group of the subgraphs.
10. The media file playing apparatus of claim 9, wherein each of the sub-images is used for displaying the content of the media file to be played after a line of drawing, the sub-image is in a Bitmap format, the group of images is in a PNG format, and the text parameter is selected from one or more of a background color, a text color, a font size, a font style, an alignment manner, a word space, and a line space.
CN201811633177.XA 2018-12-29 2018-12-29 Media file playing method and media file playing device Active CN111399788B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811633177.XA CN111399788B (en) 2018-12-29 2018-12-29 Media file playing method and media file playing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811633177.XA CN111399788B (en) 2018-12-29 2018-12-29 Media file playing method and media file playing device

Publications (2)

Publication Number Publication Date
CN111399788A true CN111399788A (en) 2020-07-10
CN111399788B CN111399788B (en) 2023-09-08

Family

ID=71432061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811633177.XA Active CN111399788B (en) 2018-12-29 2018-12-29 Media file playing method and media file playing device

Country Status (1)

Country Link
CN (1) CN111399788B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115767A (en) * 2020-08-31 2022-03-01 西安诺瓦星云科技股份有限公司 Media playing method, device and system and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0905679A2 (en) * 1997-09-26 1999-03-31 Adobe Systems Incorporated Associating text derived from audio with an image
CN1914906A (en) * 2004-02-10 2007-02-14 Lg电子株式会社 Text subtitle reproducing method and decoding system for text subtitle
CN101079301A (en) * 2006-07-28 2007-11-28 埃里克·路易斯·汉森 Device and method for text to audio mapping, and animation of the text
CN101976268A (en) * 2010-11-19 2011-02-16 百度在线网络技术(北京)有限公司 Online document reading device and method
CN106021343A (en) * 2016-05-09 2016-10-12 杭州施强教育科技有限公司 A PPT file processing method applied to a mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0905679A2 (en) * 1997-09-26 1999-03-31 Adobe Systems Incorporated Associating text derived from audio with an image
CN1914906A (en) * 2004-02-10 2007-02-14 Lg电子株式会社 Text subtitle reproducing method and decoding system for text subtitle
CN101079301A (en) * 2006-07-28 2007-11-28 埃里克·路易斯·汉森 Device and method for text to audio mapping, and animation of the text
CN101976268A (en) * 2010-11-19 2011-02-16 百度在线网络技术(北京)有限公司 Online document reading device and method
CN106021343A (en) * 2016-05-09 2016-10-12 杭州施强教育科技有限公司 A PPT file processing method applied to a mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AZADEH NAZEMI ET AL.: "Digital Talking Book Player for the Visually Impaired Using FPGAs", IEEE *
黄龙军;黄明和;郭斌;姚磊岳;: "基于RIA的富媒体播放组件的设计与实现", 江西师范大学学报(自然科学版) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115767A (en) * 2020-08-31 2022-03-01 西安诺瓦星云科技股份有限公司 Media playing method, device and system and computer readable storage medium

Also Published As

Publication number Publication date
CN111399788B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
CN109801347B (en) Method, device, equipment and medium for generating editable image template
CN101699426B (en) Document format conversion system and method
CN110458918B (en) Method and device for outputting information
US8289338B2 (en) Systems and methods for font file optimization for multimedia files
US11507727B2 (en) Font rendering method and apparatus, and computer-readable storage medium
RU2395856C2 (en) Data storage medium storing text-based subtitles, and device for processing text-based subtitles
WO2016008347A1 (en) Layout document rearrangement method and system, and electronic reading terminal
CN111368562B (en) Method and device for translating characters in picture, electronic equipment and storage medium
CN111221596B (en) Font rendering method, apparatus and computer readable storage medium
US11275935B2 (en) Patent analysis applications and corresponding user interface features
CN104298504A (en) Method for achieving font rendering based on FreeType font engine
CN108961361B (en) Method and system for generating special effect text image and computer equipment
CN105956133B (en) Method and device for displaying file on intelligent terminal
CN110012338A (en) A kind of method, apparatus, computer equipment and storage medium showing barrage data
CN111399788B (en) Media file playing method and media file playing device
US20150169508A1 (en) Obfuscating page-description language output to thwart conversion to an editable format
CN115988170A (en) Method and device for clearly displaying Chinese and English characters in real-time video screen combination in cloud conference
US20160283444A1 (en) Human input to relate separate scanned objects
CN113038184B (en) Data processing method, device, equipment and storage medium
CN111581402A (en) Method and system for generating content test material, electronic equipment and storage medium
CN107092622A (en) The methods of exhibiting and device of a kind of comment information
CN104731824A (en) Picture display method and picture display device
CN109933262B (en) GIF screen capturing method and device
CN106776489B (en) Electronic document display method and system of display device
CN111259276A (en) Method and device for displaying title content, electronic equipment and storage medium

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