CN103064690B - A kind of Development Framework based on Android operation system and the method for execution thereof - Google Patents

A kind of Development Framework based on Android operation system and the method for execution thereof Download PDF

Info

Publication number
CN103064690B
CN103064690B CN201310027630.3A CN201310027630A CN103064690B CN 103064690 B CN103064690 B CN 103064690B CN 201310027630 A CN201310027630 A CN 201310027630A CN 103064690 B CN103064690 B CN 103064690B
Authority
CN
China
Prior art keywords
module
data
thread
processing module
interface
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
Application number
CN201310027630.3A
Other languages
Chinese (zh)
Other versions
CN103064690A (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.)
Beijing Interactive Encyclopedia Network Technology Co.,Ltd.
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Interactive Online (beijing) 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 Interactive Online (beijing) Technology Co Ltd filed Critical Interactive Online (beijing) Technology Co Ltd
Priority to CN201310027630.3A priority Critical patent/CN103064690B/en
Publication of CN103064690A publication Critical patent/CN103064690A/en
Application granted granted Critical
Publication of CN103064690B publication Critical patent/CN103064690B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of Development Framework based on Android operation system and execution method thereof, this framework includes thread process module, data processing module, display module and control module.Method includes the network address and the required parameter of interface data are stored in data processing module object;The method calling described thread process module starts background thread, performs networking operation according to incoming described data processing module object and gives data processing module by the interface data of acquisition;Described data processing module carries out parsing and the storage of interface data;Background thread terminates, and enters main thread;Described control module takes out the interface data after resolving by the main thread method of described thread process module, and by incoming for these data display module;Interface data is filled to view control by described display module, is presented at interface.The present invention can more preferable reputable code, provide constraint and reference for the cooperative cooperating between developer.

Description

A kind of Development Framework based on Android operation system and the method for execution thereof
Technical field
The present invention relates to Android operation system.More particularly it relates to an based on Android The Development Framework of operating system and the method for execution thereof.
Background technology
Android is a kind of freedom based on Linux and the operating system of open source code, is mainly used for Portable equipment, such as smart mobile phone and panel computer.Along with the high speed development of mobile Internet, according to not exclusively system Meter, Android occupies the share in operation system of smart phone market 76%, the whole world, and Chinese market occupation rate is 90%。
In this strand of big mobile tide, a lot of companies are in order to do sth. before others have a chance to capture Mobile Market, simply Pursuing the speed of product and do not focus on the specification of code, early stage does not carry out project pool work, neither one Complete framework, developer cannot cooperative cooperating, and then cause whole item code in disorder, leak Numerous, bring great difficulty to later maintenance.
Additionally because Android operation system enters Chinese less than 3 or four years, on a lot of technical forums and blog The most do not provide ripe framework, so being difficult to reference to ripe case.
MVC(Model-View-Controller) it is a kind of software architecture pattern in soft project, soft Part system is divided into three essential parts: data model (Model), view (View) and controller (Controller).
Model (Model) is for encapsulating the data relevant to the service logic of application program and to data Processing method, is equivalent to data Layer." model " is independent of " view " and " controller ", say, that Model is indifferent to how it can be shown or how to be operated.But the change of data typically can be led in model Cross a kind of flush mechanism to come forth.In order to realize this mechanism, those are for monitoring that the view of this model is necessary Register on this model in advance, thus, view it will be seen that the change occurred on data model.
View (View) is capable of the autotelic display of data (in theory, this is optional), phase When in display layer.Logic in the most typically no program.In order to realize the refresh function on view, View needs to access the data model (Model) that it monitors, therefore should in advance the data monitored by it that In register.
Controller (Controller) plays the function of organization between different aspects, for controlling the stream of application program Journey.Its process event also responds." event " includes changing on the behavior of user and model (Model) Become.
Summary of the invention
Present invention aim at providing a kind of Development Framework based on Android operation system and the side of execution thereof Method, solves the problem that present stage Android exploitation cooperative cooperating difficulty is in disorder with code.
Technical scheme is as follows:
A kind of Development Framework based on Android operation system, including with lower module:
Business logic processing module, for processing the service logic including thread and data;
Display module, for according to interface data display interface;And,
Control module, is used for calling business logic modules and obtaining interface data and by incoming for these data described aobvious Show module.
Further, described business logic processing module farther includes thread process module and data process mould Block;
Described thread process module is for performing the described boundary of networking acquisition according to calling of described control module Face data;
Described data processing module for according to described control module call storage described interface data and The network address and required parameter, and for described interface data is resolved.
Further, described Development Framework based on Android operation system also includes with lower module:
Exception catching module, for according to the multi-threaded approach of described thread process module carry out abnormal capture and Process.
Correspondingly, a kind of execution method based on Android operation system Development Framework,
This framework includes thread process module, data processing module, display module and control module,
The method comprises the following steps:
In described control module, create data processing module object, by the network address of interface data and please Parameter is asked to be stored in this data processing module object;
In described control module, the background thread method calling described thread process module starts backstage line Journey, in this background thread, performs networking operation according to incoming described data processing module object and will obtain Interface data give described data processing module;
Described data processing module carries out parsing and the storage of interface data;Background thread terminates, and enters main line Journey;
Described control module by the main thread method of described thread process module from described data processing module The middle interface data taken out after resolving, and by incoming for these data display module;
Interface data is filled to view control by described display module, is presented at interface.
Further, this framework also includes exception catching module;
Described in described control module, call described thread process module and start background thread, on this backstage In thread, perform networking operation according to incoming described data processing module object and the interface data obtained is handed over Further include steps of in described data processing module
According to described exception catching module, when performing networking operation, all exceptions are spilled over;
Described exception is captured and is uniformly processed by the multi-threaded approach of described thread process module.
The beneficial effects of the present invention is: can more preferable reputable code, reduce the development difficulty of technology, delete Subtract useless redundant code, provide constraint and reference for the cooperative cooperating between developer, to the later stage simultaneously Maintenance serve important booster action.
Accompanying drawing explanation
It is specifically described below with reference to accompanying drawings and in conjunction with the embodiments to the present invention.
Fig. 1 is the frame diagram of the present invention;
Fig. 2 is that the framework of the present invention performs flow chart;
Fig. 3 is the flow chart of the specific embodiment of the invention.
Detailed description of the invention
With reference to the accompanying drawings and by embodiments of the invention, technical scheme is described in detail.
The Development Framework based on Android operation system of the present invention is to design according to MVC pattern, according to Fig. 1, this framework includes: business logic processing module, display module and control module.Described service logic Processing module includes the service logic of thread and data for processing, and is equivalent to the model in MVC (Model);Described display module, for according to interface data display interface, is equivalent to regarding in MVC Figure (View);Described control module is used for calling described business logic modules and obtains interface data should The incoming display module of data.Described control module, is equivalent to controller (Controller).
Further, described business logic processing module includes thread process module and data processing module;Institute State thread process module for performing the networking described interface data of acquisition according to calling of described control module; Described data processing module is for storing described interface data and network thereof according to calling of described control module Address and required parameter, and for described interface data is resolved.
Correspondingly, according to Fig. 2, Development Framework based on Android operation system performs method and includes following Step:
In described control module, create data processing module object, by the network address of interface data and please Parameter is asked to be stored in this data processing module object;
In described control module, the multi-threaded approach calling described thread process module starts background thread, In this background thread, perform networking operation the interface that will obtain according to incoming described data processing module object Data give described data processing module;
Described data processing module carries out parsing and the storage of interface data;
Data processing module resolves and after storage, background thread terminates, and enters main thread.
Described control module by the main thread method of described thread process module from described data processing module The middle interface data taken out after resolving, and by incoming for these data display module.
It should be noted that on the one hand the described data processing module in framework stores described display module institute The network address of the interface data needed and required parameter, for networking and the acquisition number of described thread process module According to.On the other hand it is additionally operable to resolve the interface data got in described thread process module, resolves Become the data that described display module can identify, and the data after this parsing are stored this data processing module In, wait calling of control module.
In Android develops, general utilization inherits Android SDK(development kit) base class that provides And rewrite the certain methods in base class to realize specific function.
In the described Development Framework of the present invention, BaseView is the base class of described display module, is inherited from View class in Android SDK, for initialization and the display operation at interface of Android control; BaseActivity is the base class of described control module, the Activity class being inherited from Android SDK, Turn to for calling service logic and interface;BaseAysncTask is the base class of thread process module, inherits AysncTask class in AndroidSDK, being used for networking obtains data and data is given BaseRequest process;BaseRequest is the base class of data processing module, is used for entering the data of acquisition Row resolves operation.
Further, the framework of the present invention also includes exception catching module, and ErrorMessage is this module Base class, all of exception (such as representing with ErrorMsg) is unified by such capture and process.
In the present invention, when performing networking operation, all exceptions are spilled over.Specifically, connection is first called The getInst () method of net class HttpUtils obtains networking class example, then calls such getString () side Method obtains the interface data after networking, and in getString () method, the unified ErrorMsg that dishes out is abnormal, then Background thread method doInBackground () catches and calls the AsyncTask class that Android system provides PublishProgress () method, perform AsyncTask onProgressUpdate () method return to main line Journey, this exception is thrown by the onProgress () method calling incoming parameter OnUICallback class in the method Process in the method for main thread.
As it is shown on figure 3, below with reference to the base class of Android SDK and method thereof to the present invention based on The detailed description of the invention of Android operation system Development Framework is described in detail.
Step S1, newly-built display subclass TestView inherit the base class BaseView of described display module, from And realize three kinds of methods in this base class BaseView: display control UI initial method initUI (), number According to initial method initData () and interface data fill method setDataForview ();
InitUI () and initData () method are all to call in the building method of TestView. SetDataForview () method when networking obtain interface data and by this Data Analysis after by thread Callback method performs in main thread.
Step S2, newdata process subclass TestRequest and inherit the base class of described data processing module BaseRequest, these data process subclass TestRequest be used for storing the network address (or being called for short url) and Required parameter and the parsing of data and storage.
Incoming url and required parameter in building method TestRequest () of TestRequest, in parsing side In method read () method newdata analysis object and will resolve after interface data store in this object.
Step S3, newly-built control subclass TestActivity inherit the base class BaseActivity of described control module, This newly-built control subclass TestActivity is for calling the line of the base class BaseAysncTask of thread process module Cheng Fangfa, and it is used for creating display object and data processing module object, and by this display object (i.e. originally TestView object in embodiment) and data processing module object (i.e. in the present embodiment TestRequest pair As) as the parameter of described multi-threaded approach;
Wherein the multi-threaded approach of base class BaseAysncTask includes main thread method onPostExecute and backstage Multi-threaded approach DoInBackground.
Realize the onCreate () method in base class BaseActivity, the most newly-built one BaseAysncTask example performs networking operation, and the example of incoming OnUICallback class, for step S6 In, i.e. after background thread is finished, return to main thread and perform the onGetResult () of OnUICallback class With onProgress () method, onGetResult () method is called the setDataForView () of Testview Method, will show in incoming for interface data Testview, and onProgress () method is for abnormal process, To be described in detail below.Wherein OnUICallback is the internal interface class of BaseActivity, and inside includes OnGetResult () and two methods of onProgress () method.
Step S4, execution background thread method DoInBackground, in background thread, by incoming The TestRequest object acquisition network address of the parameter as DoInBackground and required parameter,
Perform time-consuming networking according to this network address and required parameter to operate to obtain interface data.Now, obtain To interface data still can not be shown module and identified.
Such as, url acquisition methods getUrl () and the request ginseng of TestRequest base class BaseRequest are called Number acquisition methods getRequestMapValues () obtains url and required parameter, calls networking processing class GetString () method obtains the interface data after networking.
Step S5, callback data process analytic method read () of subclass TestRequest by interface data solution Analysis is for discernible interface data and is stored in the variable that data process subclass TestRequest.So far backstage Multi-threaded approach DoInBackground is finished.
Step S6, by perform thread process module base class BaseAysncTask in main thread method OnPostExecute, calls the onGetResult () method of incoming parameter OnUICallback, thus takes out solution Interface data after analysis.This onGetResult () method have invoked the setDataForview () of Testview Method, refers to the description in abovementioned steps S3.
Step S7, in the setDataForview () method of Testview by BaseRequest force convert For TestRequest, taken out the global variable of carrying data by TestRequest, fill UI control thus Carry out interface to present.
Specific code is as follows:
The Development Framework based on Android operation system of the present invention have employed the design pattern of MVC, becomes Being separated with data Layer by display layer of merit, utilizes the Development Framework based on Android operation system of the present invention And execution method can be that the cooperative cooperating between developer provides constraint and reference, the dimension to the later stage Protect and serve important booster action.Simultaneously for providing the Framework of a kind of maturation on market, excite more Many developers design better method and make the simpler, more of Android exploitation change step by step Maturing.
Should be appreciated that above is to show by preferred embodiment to the detailed description that technical scheme is carried out Meaning property and nonrestrictive.Those of ordinary skill in the art can on the basis of reading description of the invention So that the technical scheme described in each embodiment is modified, or wherein portion of techniques feature is equal to Replace;And these amendments or replacement, do not make the essence of appropriate technical solution depart from various embodiments of the present invention The spirit and scope of technical scheme.Protection scope of the present invention is only limited by following claims.

Claims (2)

1. a Development Framework based on Android operation system, it is characterised in that include with lower module:
Business logic processing module, for processing the service logic including thread and data;
Display module, for according to interface data display interface;And,
Control module, is used for calling business logic processing module and obtaining interface data and by incoming for these data institute State display module;
Described business logic processing module farther includes thread process module and data processing module;
Described thread process module is for performing the described boundary of networking acquisition according to calling of described control module Face data;
Described data processing module for according to described control module call storage described interface data and The network address and required parameter, and for described interface data is resolved;
This Development Framework farther includes exception catching module, for the thread according to described thread process module Method carries out abnormal capture and process.
2. an execution method based on Android operation system Development Framework,
This framework includes thread process module, data processing module, display module and control module,
It is characterized in that, the method comprises the following steps:
S1, newly-built display subclass TestView inherit the base class BaseView of described display module, it is achieved should In base class BaseView: display control UI initial method initUI (), data initialization method initData () With interface data fill method setDataForview ();
S2, newdata process subclass TestRequest and inherit the base class of described data processing module BaseRequest, these data process subclass TestRequest be used for storing the network address and required parameter and The parsing of data and storage;
S3, newly-built control subclass TestActivity inherit the base class BaseActivity of described control module, should Newly-built control subclass TestActivity is for calling the thread of the base class BaseAsyncTask of thread process module Method, and be used for creating display object and data processing module object, and by this display object and data Reason module object is as the parameter of described multi-threaded approach;
S4, execution background thread method DoInBackground, in background thread, by incoming conduct The TestRequest object acquisition network address of the parameter of DoInBackground and required parameter, according to this The network address and required parameter perform time-consuming networking and operate to obtain interface data;Now, the boundary got Face data still can not be shown module and be identified;
Interface data is resolved to by analytic method read () of S5, callback data process subclass TestRequest can In the interface data identified the variable being stored in data process subclass TestRequest;So far background thread side Method DoInBackground is finished;
S6, by perform thread process module base class BaseAsyncTask in main thread method OnPostExecute, calls the onGetResult () method of incoming parameter OnUICallback, thus takes out solution Interface data after analysis;This onGetResult () method have invoked the setDataForview () of Testview Method, i.e. performs in step S3, and newly-built control subclass TestActivity inherits the base class of described control module BaseActivity, this newly-built control subclass TestActivity is for calling the base class of thread process module The multi-threaded approach of BaseAsyncTask, and it is used for creating display object and data processing module object, and Using this display object and data processing module object as the parameter of described BaseAsyncTask multi-threaded approach;
S7, in the setDataForview () method of Testview by BaseRequest force be converted into TestRequest, takes out the global variable of carrying data by TestRequest, fills UI control thus enters Row interface presents;
S8, first call networking class HttpUtils getInst () method obtain networking class example, then call this The getString () method of class obtains the interface data after networking, and in getString () method, unification is dished out ErrorMsg is abnormal, then catches in background thread method doInBackground () and calls android system The publishProgress () method of the AsyncTask class that system provides, performs AsyncTask's OnProgressUpdate () method returns to main thread, in the onProgressUpdate () method of AsyncTask Call the method that this exception is thrown main thread by the onProgress () method of incoming parameter OnUICallback class In process.
CN201310027630.3A 2012-12-16 2013-01-24 A kind of Development Framework based on Android operation system and the method for execution thereof Active CN103064690B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310027630.3A CN103064690B (en) 2012-12-16 2013-01-24 A kind of Development Framework based on Android operation system and the method for execution thereof

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN2012105465256 2012-12-16
CN201210546525.6 2012-12-16
CN201210546525 2012-12-16
CN201310027630.3A CN103064690B (en) 2012-12-16 2013-01-24 A kind of Development Framework based on Android operation system and the method for execution thereof

Publications (2)

Publication Number Publication Date
CN103064690A CN103064690A (en) 2013-04-24
CN103064690B true CN103064690B (en) 2016-09-07

Family

ID=48107328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310027630.3A Active CN103064690B (en) 2012-12-16 2013-01-24 A kind of Development Framework based on Android operation system and the method for execution thereof

Country Status (1)

Country Link
CN (1) CN103064690B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593231B (en) 2012-08-14 2016-06-01 腾讯科技(深圳)有限公司 A kind of data processing method, device and mobile terminal
CN104281441B (en) * 2013-07-09 2018-11-23 腾讯科技(深圳)有限公司 Data extraction method and device based on MVC
CN103761082A (en) * 2013-12-31 2014-04-30 湖南大唐先一科技有限公司 Componential research and development mode and domain driving model combined application development system and platform
CN105446755B (en) * 2014-08-06 2019-01-08 阿里巴巴集团控股有限公司 A kind of method and apparatus quickly loading Activity data in android system
CN104392408B (en) * 2014-10-20 2019-04-16 贵阳语玩科技有限公司 A kind of system and method showing image
CN104834544B (en) * 2015-05-04 2018-03-13 广州杰赛科技股份有限公司 Data load method and device
CN105824611A (en) * 2015-10-20 2016-08-03 广东亿迅科技有限公司 Rapid development system based on Android intelligent operation platform
CN106909408B (en) * 2015-12-23 2020-09-11 北京奇虎科技有限公司 Method and device for calling APK plug-in of application program
CN105847319A (en) * 2016-02-22 2016-08-10 乐视移动智能信息技术(北京)有限公司 Mobile terminal network request method and system
CN107517188A (en) * 2016-06-16 2017-12-26 大唐软件技术股份有限公司 A kind of data processing method and device based on Android system
CN106528293A (en) * 2016-11-04 2017-03-22 武汉斗鱼网络科技有限公司 Database access method and apparatus
CN106648682B (en) * 2016-12-29 2019-10-25 中南大学 A kind of dynamic data general framework of embedded system exploitation
CN107528974A (en) * 2017-08-22 2017-12-29 世纪禾光科技发展(北京)有限公司 request processing method, device, computing device and storage medium
CN108616597B (en) * 2018-05-09 2021-06-15 四川华创世纪科技有限公司 Distributed operation method for realizing service uninterrupted forever
CN109634573A (en) * 2018-12-18 2019-04-16 宁夏隆基宁光仪表股份有限公司 Android operation system App development approach, device and medium
CN111695072A (en) * 2019-03-12 2020-09-22 上海蔚来汽车有限公司 Method and device for converting HTTP (hyper text transport protocol) request

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750145A (en) * 2012-06-05 2012-10-24 怯肇乾 Network system software system framework and implementation method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120113145A1 (en) * 2010-11-08 2012-05-10 Suranjit Adhikari Augmented reality surveillance and rescue system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750145A (en) * 2012-06-05 2012-10-24 怯肇乾 Network system software system framework and implementation method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Android平台的电子阅读客户端的设计与实现;杨超;《中国优秀硕士学位论文全文数据库》;20121030;第23页第1-3段,第33页第2段,第37页第4段,第38页第1-10段,第40页第1-3段,第43页第1-5段,图4-2 *

Also Published As

Publication number Publication date
CN103064690A (en) 2013-04-24

Similar Documents

Publication Publication Date Title
CN103064690B (en) A kind of Development Framework based on Android operation system and the method for execution thereof
US10664348B2 (en) Fault recovery management in a cloud computing environment
CN105408873B (en) System and method for the sampling based on activity of diagnostic data
CN104303156B (en) Behavior characteristicss in the mobile multi processor platform of monitoring
CN110109768B (en) Data quality inspection method and device
CN113282795B (en) Data structure diagram generation and updating method and device, electronic equipment and storage medium
CN104166701B (en) machine learning method and system
CN106502770B (en) HMI state transition method based on finite state machine
CN106775689A (en) A kind of system and method for big data application and development
Shah et al. Reverse-engineering user interfaces to facilitateporting to and across mobile devices and platforms
US10902548B2 (en) Frame invalidation control with causality attribution
US20110072371A1 (en) Application programming interface for user interface creation
CN106843912A (en) Page info acquisition methods and device
CN102223396A (en) System and method for associating service logic with user interface in computer system based on cloud computing
CN108376066A (en) Code processing apparatus and code process method
CN105723339A (en) Techniques for portable computing device virtualization
CN105930166B (en) A method of based on WEB interface ejection layer
CN107368336A (en) A kind of cloud data center deployed with devices and the method and apparatus of management
US11508111B1 (en) Augmented reality shader programs
CN105917307B (en) User interface frame
CN112241373A (en) Automatic test method, test device, processor and test system
CN108536434A (en) A kind of method and device for realizing Hook Function based on high-level programming language
US10970055B2 (en) Identifying software and hardware bottlenecks
CN103777933B (en) The method of show process information and device
US8468537B2 (en) Systems and methods for distributing validation computations

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
CP03 Change of name, title or address

Address after: 100085 Haidian District, Beijing on the road to information on the road No., A7F

Patentee after: BEIJING HUDONG BAIKE NETWORK TECHNOLOGY CO.,LTD.

Address before: 100029 Chaoyang District, the stability of the door outside the court in the town of miracle Plaza, No. 1 Interactive Encyclopedia building, Fortune Plaza, Beijing

Patentee before: Hudong Online (Beijing) Technology Co.,Ltd.

CP03 Change of name, title or address
CP01 Change in the name or title of a patent holder

Address after: 100085 Haidian District, Beijing on the road to information on the road No., A7F

Patentee after: Beijing Interactive Encyclopedia Network Technology Co.,Ltd.

Address before: 100085 Haidian District, Beijing on the road to information on the road No., A7F

Patentee before: BEIJING HUDONG BAIKE NETWORK TECHNOLOGY CO.,LTD.

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20190924

Address after: 100041, room 2, building 3, building 30, Xing Xing street, Shijingshan District, Beijing,

Patentee after: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address before: 100085 Haidian District, Beijing on the road to information on the road No., A7F

Patentee before: Beijing Interactive Encyclopedia Network Technology Co.,Ltd.

TR01 Transfer of patent right