CN102055965A - Media file transcoding system and method - Google Patents

Media file transcoding system and method Download PDF

Info

Publication number
CN102055965A
CN102055965A CN 200910193417 CN200910193417A CN102055965A CN 102055965 A CN102055965 A CN 102055965A CN 200910193417 CN200910193417 CN 200910193417 CN 200910193417 A CN200910193417 A CN 200910193417A CN 102055965 A CN102055965 A CN 102055965A
Authority
CN
China
Prior art keywords
module
file
transcoding
video
audio
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
CN 200910193417
Other languages
Chinese (zh)
Other versions
CN102055965B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN200910193417.3A priority Critical patent/CN102055965B/en
Publication of CN102055965A publication Critical patent/CN102055965A/en
Application granted granted Critical
Publication of CN102055965B publication Critical patent/CN102055965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a media file transcoding system, which belongs to the technical field of multimedia. The media file transcoding system comprises a transcoding module, a user parameter setting module and a splitting module, wherein the transcoding module is used for converting the format of a source file; and the splitting module is connected with the transcoding module and the user parameter setting module and is used for processing an output data stream of the transcoding module according to a user parameter so as to obtain a plurality of media files. Moreover, the invention also provides a media file transcoding method. The splitting module is added to the conventional transcoding system and can convert a video file of one format into a plurality of video files of another format, so that a part of finished videos can be watched under the condition that transcoding is not fully completed; moreover, split small files are beneficial to playing in small-volume handheld equipment, so that great convenience is brought to users.

Description

Media file trans-coding system and code-transferring method
[technical field]
The present invention relates to multimedia technology field, especially relate to a kind of trans-coding system and code-transferring method that the form of multimedia file is changed.
[background technology]
Multimedia (comprising video, audio frequency, image etc.) has become essential important component in people's work and study, plays increasing effect in people's work, study and life.Multimedia all has it to use at numerous areas, and at people's different demands to multimedia service in routine work, life, some standardization bodies are directed to society and go up the multiple audio/video encoding standard that the different business demand has proposed.For example, the H.263 standard that proposes at visual telephone and video conference business; At DVB, the Mpeg2 standard that HDTV and DVD propose; Mpeg 4 standard at streaming media service exploitation in the network; And can provide high video compression performance, network close friend's H.264 standard etc.
Owing to exist in the time of multiple coding standard, and the difference of the requirements of in multimedia application, compression efficiency, decompress(ion) speed, code stream being used such as target device, exist diversified media file, their employed each other file formats, video format, compressed format have nothing in common with each other.In order to effectively utilize existing multimedia resource, the switch technology between this standard---be the extensive concern that transcoding technology just has been subjected to people, constantly obtain further research and development.
Traditional transcoding device or system can only be converted to an a kind of video file of form a video file of another kind of form with man-to-man form, because the basic principle of transcoding is earlier video file to be decoded, encode with the coded system of the form that will change then, the lot of data work of treatment need be carried out, thereby the long time need be carried out.For the general family expenses machine of cpu performance, the time of transcoding and the time difference of video playback are few, thereby to bigger video file transcoding the time, wait for that time that transcoding is finished becomes to be impatient at.And at transcoding imperfect tense, video file can not be play.
In addition, the size of the video file behind the transcoding does not generally have bigger change yet, and jumbo video file also can have problems as if putting into less handheld device of capacity such as mobile phone or MP4 broadcast.
[summary of the invention]
Given this, be necessary with man-to-man form an a kind of video file of form to be converted to the problem of a video file of another kind of form, a kind of trans-coding system that an a kind of video file of form can be converted to a plurality of video files of another form is provided at traditional transcoding device or system.
A kind of method of media file transcoding is provided in addition.
A kind of media file trans-coding system, comprising that transcoding module, customer parameter that source file is carried out format conversion are provided with module and with customer parameter module are set with described transcoding module is connected, and the output stream of transcoding module is handled the fractionation module that obtains two above media files according to customer parameter.
In traditional trans-coding system, add and split module, an a kind of video file of form can be converted to a plurality of video files of another form, under the situation that transcoding need not be finished fully, can watch the partial video of finishing in advance, and the small documents that is divided into helps also playing in the handheld device of low capacity.
Preferably, described fractionation module comprises parameter parsing module, file generating module and subsequent treatment module, the parameter that described parameter parsing module receives user's setting also passes to file generating module after the parsing, file generating module generates satisfactory media file according to the parameter after resolving, and the subsequent treatment module is further handled the media file that generates.
Preferably, the processing that described parameter parsing module carries out comprises that segmentation strategy resolves, and described segmentation strategy comprises based on the cutting apart of timeslice, based on cutting apart of file size and cutting apart based on scene.
Preferably, the processing carried out of described subsequent treatment module comprises file storage, file designation or sets up to play and point to.
Preferably, described transcoding module comprises the audio/video flow separation module, the video code conversion module, audio frequency transcoding module and audio/video flow synthesis module, the audio/video flow separation module links to each other with audio frequency transcoding module with the video code conversion module, the video code conversion module all is connected with the audio/video flow synthesis module with audio frequency transcoding module, described audio/video flow separation module is handled source file audio stream and the video flowing that obtains separating, described video code conversion module and audio frequency transcoding module are carried out transcoding with video flowing and audio stream respectively, and video flowing and the audio stream of described audio/video flow synthesis module after with transcoding synthesizes the output stream that obtains audio frequency and video.
A kind of code-transferring method of media file comprises the steps: the reception sources file and reads customer parameter; Source file is carried out format conversion according to customer parameter; Source file after the conversion is cut apart according to customer parameter and obtained plural media file.
By an a kind of video file of form being converted to a plurality of video files of another form, under the situation that transcoding need not be finished fully, can watch the partial video of finishing in advance, and the small documents that is divided into helps also playing in the handheld device of low capacity.
Preferably, the step of source file being carried out format conversion comprises: source file is carried out the audio/video flow separating treatment, obtain audio stream and video flowing; Respectively audio stream and video flowing are carried out transcoding according to the customer parameter that is provided with; Audio stream behind the transcoding and video flowing are synthesized.
Preferably, the step of cutting apart comprises: the parameter that the user is provided with is resolved; Carry out dividing processing according to the customer parameter after resolving and generate a plurality of media files; Media file is carried out subsequent treatment.
Preferably, the parameter that the user is provided with comprises segmentation strategy, and described segmentation strategy is for based on the cutting apart of timeslice, based on cutting apart of file size or cutting apart based on scene.
Preferably, the subsequent treatment that media file is carried out comprises file storage, file designation or sets up to play and point to.
[description of drawings]
Fig. 1 is a media file trans-coding system structure chart;
Fig. 2 is the cut-away view of media file trans-coding system;
Fig. 3 is for splitting modular structure figure;
Fig. 4 is the transcoding process chart.
[embodiment]
As shown in Figure 1, be the media file trans-coding system structure chart of present embodiment.This trans-coding system comprises that transcoding module 100, customer parameter are provided with module 200 and with transcoding module 100 and customer parameter the fractionation module 300 that module 200 is connected are set.Transcoding module 100 is provided with module 200 according to customer parameter parameter request carries out the output stream that format conversion obtains audio frequency and video to source file, splits module 200 is provided with module 200 according to customer parameter parameter request and the output stream of audio frequency and video is handled is obtained a plurality of media files.
As shown in Figure 2, be the cut-away view of media file trans-coding system.
Transcoding module 100 comprises audio/video flow separation module 110, video code conversion module 120, audio frequency transcoding module 130 and audio/video flow synthesis module 140.Source file is at first handled audio stream and the video flowing that obtains separating by audio/video flow separation module 110, and audio/video flow separation module 110 links to each other video flowing with audio frequency transcoding module 130 with video code conversion module 120 and audio stream passes to video code conversion module 120 respectively and audio frequency transcoding module 130 is carried out video code conversion and audio frequency transcoding.Video code conversion module 120 all is connected with audio/video flow synthesis module 140 again with audio frequency transcoding module 130 video flowing behind the transcoding and audio stream is synthesized the output stream that obtains audio frequency and video.
Customer parameter is provided with module 200 parameter according to user's setting in transcoding process and controls video code conversion, audio frequency transcoding and audio/video flow are synthetic.
As shown in Figure 3, for splitting the structure chart of module 300.Split module 300 and comprise parameter parsing module 310, file generating module 320 and the subsequent treatment module 330 that connects successively.The parameter that parameter parsing module 310 receives user's setting also passes to file generating module 320 after the parsing, file generating module 320 is handled according to the audio/video flow of the parameter after resolving after to transcoding and is generated satisfactory media file, and the media file of 330 pairs of generations of subsequent treatment module is further processed.
Wherein the processing carried out of parameter parsing module 310 comprises that segmentation strategy resolves, and which kind of rule segmentation strategy promptly takes media file is cut apart.Segmentation strategy comprises based on the cutting apart of timeslice, based on cutting apart of file size and cutting apart based on scene.Parameter parsing module 310 determines according to segmentation strategy which kind of processing is file generating module 320 carry out.
If cutting apart based on timeslice, the video that the user is provided with certain hour length is a file, as 20 minutes, then parameter parsing module 310 is transferred to file generating module 320 with analysis result, file generating module 320 is just extracted key frame in the video according to the timestamp information in video flowing and the audio stream, as frame constantly such as 00:00:00,00:19:59,00:20:00,00:39:59 as key frame.Then when generating video file, just generate every section single medium file of 20 minutes (the time possibility deficiency of final stage file 20 minutes), thereby generate a plurality of media files with the audio/video flow between 00:00:00~00:19:59, the 00:20:00~00:39:59.
If cutting apart based on file size, the video that the user is provided with a certain size is a file, as 100M, then parameter parsing module 310 is transferred to file generating module 320 with analysis result, the size of 320 record tone video flowings when generating media file of file generating module, every 100M generates a media file (the not enough 100M of size possibility of last file), thereby generates a plurality of media files.
If based on the cutting apart of scene, parameter parsing module 310 is transferred to file generating module 320 with analysis result, and file generating module 320 is handled scene detection, when scene is switched as the cut-point of file.Because the switching meeting of video scene is many, can carry out cutting apart in conjunction with file size or counter based on scene.For example, in conjunction with file size based on scene be divided into file be limited in the 10M based on the cutting apart of scene, when cut-point was fixed on a certain scene, file size was in 10M, will surpass 10M and increase a scene again, this moment, the end point of this scene just can be decided to be cut-point; And for example, carry out based on per 50 scenes of being divided into of scene as a file in conjunction with counter, then scene is that the end point of the scene of 50 integral multiple can be used as cut-point.The switching of scene represents that the variation of video file content is bigger, such as switching to outdoor scene from indoor scene, when scene is switched as cut-point, can not make seem lofty cutting apart of file, the words that are unlikely to a role in the video have not been said, file just finishes, and need reopen another file and then play a file role and do not said.
The cut-point that file generating module 320 is determined according to aforesaid way is formed media file with the audio/video flow packing.
Each media file of 330 pairs of generations of subsequent treatment module carries out extra processing.Comprise and select media file storage, name, foundation to play processing such as sensing.Storage positions of files can be preestablished the storage folder of an acquiescence by the user, also can inquire that when media file of every generation the user is selected voluntarily by the user, can also generate one and source file file of the same name automatically, a plurality of media files that generate are left in this document folder.Same name can be the naming rule according to acquiescence, adds the suffix 1,2,3 of order etc. as source filename, also can carry out rename when the user selects the memory location.Set up the information of in the video file of cutting apart, setting up the next media file that should play of sensing that is meant of pointing to of playing, because video file be divided into a plurality of after, if play a file, also need another file of manual unlocking will cause using inconvenience, by above-mentioned directional information, under the situation of player support, can play next media file automatically.
Therefore in the present embodiment,, handle according to following steps during to the media file transcoding according to above-mentioned media file trans-coding system:
S10: reception sources file and customer parameter is set.Source file promptly is the file that will carry out transcoding, customer parameter is set comprises the parameter that is used to control transcoding and be used to control the parameter of cutting apart that the parameter of control transcoding generally comprises the form of file destination, video resolution, broadcast code check etc.; The parameter that control is cut apart generally comprises segmentation strategy.
S20: source file is carried out the audio/video flow separating treatment, obtain audio stream and video flowing.Because the processing that transcoding carried out of video and audio frequency is different fully, therefore be necessary the audio stream and the video flowing of source file are carried out separating treatment.
S30: respectively audio stream and video flowing are carried out transcoding according to the parameter that the user is provided with.
S40: audio stream behind the transcoding and video flowing are synthesized.
S50: the parameter that the user is provided with is resolved.Here mainly be that the parameter that control is cut apart is resolved, mainly be meant parsing segmentation strategy, as segmentation strategy for based on the cutting apart of timeslice, based on cutting apart of file size or cutting apart based on scene.Therefore the partitioning parameters that is provided with at the user is wanted the corresponding different processing of carrying out.
S60: carry out dividing processing according to the customer parameter after resolving and generate a plurality of media files.After obtaining processing parameter, just the audio/video flow behind the transcoding can be generated a plurality of media files according to set strategy.
S70: media file is carried out subsequent treatment.Subsequent treatment generally comprises file storage, name or sets up to play and point to.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (10)

1. media file trans-coding system, comprise that transcoding module and customer parameter that source file is carried out format conversion are provided with module, it is characterized in that, comprise that also with customer parameter module being set with described transcoding module is connected, the output stream of transcoding module is handled the fractionation module that obtains two above media files according to customer parameter.
2. media file trans-coding system as claimed in claim 1, it is characterized in that, described fractionation module comprises parameter parsing module, file generating module and subsequent treatment module, the parameter that described parameter parsing module receives user's setting also passes to file generating module after the parsing, file generating module generates satisfactory media file according to the parameter after resolving, and the subsequent treatment module is further handled the media file that generates.
3. media file trans-coding system as claimed in claim 2, it is characterized in that, the processing that described parameter parsing module carries out comprises that segmentation strategy resolves, and described segmentation strategy comprises based on the cutting apart of timeslice, based on cutting apart of file size and cutting apart based on scene.
4. media file trans-coding system as claimed in claim 2 is characterized in that, the processing that described subsequent treatment module is carried out comprises file storage, file designation or sets up to play and point to.
5. as each described media file trans-coding system in the claim 1 to 4, it is characterized in that, described transcoding module comprises the audio/video flow separation module, the video code conversion module, audio frequency transcoding module and audio/video flow synthesis module, the audio/video flow separation module links to each other with audio frequency transcoding module with the video code conversion module, the video code conversion module all is connected with the audio/video flow synthesis module with audio frequency transcoding module, described audio/video flow separation module is handled source file audio stream and the video flowing that obtains separating, described video code conversion module and audio frequency transcoding module are carried out transcoding with video flowing and audio stream respectively, and video flowing and the audio stream of described audio/video flow synthesis module after with transcoding synthesizes the output stream that obtains audio frequency and video.
6. the code-transferring method of a media file is characterized in that, comprises the steps:
Reception sources file and read customer parameter;
Source file is carried out format conversion according to customer parameter;
Source file after the conversion is cut apart according to customer parameter and obtained two above media files.
7. the code-transferring method of media file as claimed in claim 7 is characterized in that, the step of source file being carried out format conversion comprises:
Source file is carried out the audio/video flow separating treatment, obtain audio stream and video flowing;
Respectively audio stream and video flowing are carried out transcoding according to customer parameter;
Audio stream behind the transcoding and video flowing are synthesized.
8. the code-transferring method of media file as claimed in claim 7 is characterized in that, the step of cutting apart comprises:
The parameter that the user is provided with is resolved;
Carry out dividing processing according to the customer parameter after resolving and generate two above media files;
Media file is carried out subsequent treatment.
9. the code-transferring method of media file as claimed in claim 8 is characterized in that, the parameter that the user is provided with comprises segmentation strategy, and described segmentation strategy is for based on the cutting apart of timeslice, based on cutting apart of file size or cutting apart based on scene.
10. the code-transferring method of media file as claimed in claim 8 is characterized in that, the subsequent treatment that media file is carried out comprises file storage, file designation or sets up the broadcast sensing.
CN200910193417.3A 2009-10-28 2009-10-28 Media file transcoding system and method Active CN102055965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910193417.3A CN102055965B (en) 2009-10-28 2009-10-28 Media file transcoding system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910193417.3A CN102055965B (en) 2009-10-28 2009-10-28 Media file transcoding system and method

Publications (2)

Publication Number Publication Date
CN102055965A true CN102055965A (en) 2011-05-11
CN102055965B CN102055965B (en) 2015-05-20

Family

ID=43959834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910193417.3A Active CN102055965B (en) 2009-10-28 2009-10-28 Media file transcoding system and method

Country Status (1)

Country Link
CN (1) CN102055965B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051941A (en) * 2013-01-28 2013-04-17 北京暴风科技股份有限公司 Method and system for playing local video on mobile platform
CN103369355A (en) * 2012-04-10 2013-10-23 华为技术有限公司 Online media data conversion method, video playing method and corresponding device
CN103686203A (en) * 2013-12-04 2014-03-26 深圳市融创天下科技股份有限公司 Video transcoding method and device
CN103841451A (en) * 2012-11-28 2014-06-04 腾讯科技(深圳)有限公司 Multimedia playing method, device and terminal
CN104159127A (en) * 2014-08-21 2014-11-19 北京奇艺世纪科技有限公司 Method, device and system of video transcoding
CN104469396A (en) * 2014-12-24 2015-03-25 北京中科大洋信息技术有限公司 Distributed transcoding system and method
CN106454180A (en) * 2016-09-27 2017-02-22 宇龙计算机通信科技(深圳)有限公司 Methods and devices for recording, processing and transmitting video and terminal
WO2017107442A1 (en) * 2015-12-22 2017-06-29 乐视控股(北京)有限公司 Video transcoding method and device
US10616616B2 (en) 2018-01-01 2020-04-07 Nice Ltd Method and system for streaming a media file during a concurrent transcoding thereof
US10853439B2 (en) 2017-08-08 2020-12-01 Nice Ltd. Systems and methods for fast play back of recorded data
CN115134630A (en) * 2022-06-02 2022-09-30 江苏网博视界网络科技股份有限公司 Video automatic synthesis method based on artificial intelligence and application thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100471114C (en) * 2005-07-01 2009-03-18 萧学文 Method and system for accessing computer resource through mobile terminal
CN101083756A (en) * 2007-03-14 2007-12-05 中国科学技术大学 internet based TV stream data real time transmission and service apparatus and method

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103369355A (en) * 2012-04-10 2013-10-23 华为技术有限公司 Online media data conversion method, video playing method and corresponding device
CN103841451B (en) * 2012-11-28 2017-09-29 腾讯科技(深圳)有限公司 Multi-medium play method, device and terminal
CN103841451A (en) * 2012-11-28 2014-06-04 腾讯科技(深圳)有限公司 Multimedia playing method, device and terminal
WO2014082553A1 (en) * 2012-11-28 2014-06-05 腾讯科技(深圳)有限公司 Multimedia playing method, device and terminal
US9781380B2 (en) 2012-11-28 2017-10-03 Tencent Technology (Shenzhen) Company Limited Method, apparatus and terminal for playing multimedia content
CN103051941B (en) * 2013-01-28 2015-10-28 北京暴风科技股份有限公司 A kind of method and system playing local video on a mobile platform
CN103051941A (en) * 2013-01-28 2013-04-17 北京暴风科技股份有限公司 Method and system for playing local video on mobile platform
CN103686203A (en) * 2013-12-04 2014-03-26 深圳市融创天下科技股份有限公司 Video transcoding method and device
CN104159127A (en) * 2014-08-21 2014-11-19 北京奇艺世纪科技有限公司 Method, device and system of video transcoding
CN104159127B (en) * 2014-08-21 2019-02-22 北京奇艺世纪科技有限公司 A kind of video transcoding method, apparatus and system
CN104469396B (en) * 2014-12-24 2018-01-05 北京中科大洋信息技术有限公司 A kind of distributed trans-coding system and method
CN104469396A (en) * 2014-12-24 2015-03-25 北京中科大洋信息技术有限公司 Distributed transcoding system and method
WO2017107442A1 (en) * 2015-12-22 2017-06-29 乐视控股(北京)有限公司 Video transcoding method and device
CN106454180A (en) * 2016-09-27 2017-02-22 宇龙计算机通信科技(深圳)有限公司 Methods and devices for recording, processing and transmitting video and terminal
CN106454180B (en) * 2016-09-27 2022-03-18 宇龙计算机通信科技(深圳)有限公司 Method and device for recording, processing and transmitting video and terminal
US10853439B2 (en) 2017-08-08 2020-12-01 Nice Ltd. Systems and methods for fast play back of recorded data
US10616616B2 (en) 2018-01-01 2020-04-07 Nice Ltd Method and system for streaming a media file during a concurrent transcoding thereof
CN115134630A (en) * 2022-06-02 2022-09-30 江苏网博视界网络科技股份有限公司 Video automatic synthesis method based on artificial intelligence and application thereof

Also Published As

Publication number Publication date
CN102055965B (en) 2015-05-20

Similar Documents

Publication Publication Date Title
CN102055965B (en) Media file transcoding system and method
JP6493765B2 (en) Information processing apparatus and method
CN101098483A (en) Video cluster transcoding system using image group structure as parallel processing element
KR102151707B1 (en) Decoder for decoding a media signal and encoder for encoding secondary media data comprising metadata or control data for primary media data
CN101635854B (en) Method and device for realizing transcoding merging
CN100334880C (en) Method and its device for transmitting and receiving dynamic image data
CN102055966B (en) Compression method and system for media file
CN101473645B (en) Object-based 3-dimensional audio service system using preset audio scenes
RU2370906C2 (en) Method and device for editing of video fragments in compressed area
JPH11177946A (en) Coder, coding method, decoder, decoding method and served medium
JP7028398B2 (en) Methods for encoding and decoding digital video, as well as related encoding and decoding devices
CN101569195B (en) Method and system for scalable bitstream extraction
CN109327706A (en) Programme televised live signal acceptance method and system based on DTMB
CN103024441B (en) A kind of method of playing television program at mobile terminal
KR100839800B1 (en) DMB terminal unit and peripheral for the same
JPH11205740A (en) Compressed recording device and its method
CN102075817A (en) Method and system for forwarding audio and video data
CN106851331B (en) Easy broadcast processing method and system
JP2014520413A (en) High speed scalable video coding apparatus and method using multi-track video
CN103200443A (en) Multimedia data transmitting method and device and multimedia data processing system
JP2002223441A (en) Coded signal demultiplexer/multiplexer, coded signal demultiplexing/multiplexing method and medium for recording coded signal demultiplexing/multiplexing program
CN100589545C (en) Method and apparatus for transmitting and receiving dynamic image data
JP2000156840A (en) Method and device for synchronizing data of plural formats
CN102868708A (en) Method and system for acquiring transcoded target document
CN103219009A (en) Audio frequency data processing device and method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant