CN105242960A - Method for processing system function call request and browser - Google Patents
Method for processing system function call request and browser Download PDFInfo
- Publication number
- CN105242960A CN105242960A CN201510603986.6A CN201510603986A CN105242960A CN 105242960 A CN105242960 A CN 105242960A CN 201510603986 A CN201510603986 A CN 201510603986A CN 105242960 A CN105242960 A CN 105242960A
- Authority
- CN
- China
- Prior art keywords
- information
- cache
- browser
- buffer unit
- recalls
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000012545 processing Methods 0.000 title claims abstract description 9
- 230000008569 process Effects 0.000 claims abstract description 11
- 230000006870 function Effects 0.000 claims description 155
- 230000015654 memory Effects 0.000 claims description 65
- 230000008859 change Effects 0.000 claims description 11
- 230000009471 action Effects 0.000 claims description 6
- 230000001960 triggered effect Effects 0.000 claims description 5
- 238000012544 monitoring process Methods 0.000 claims description 2
- 230000007423 decrease Effects 0.000 description 16
- 230000007595 memory recall Effects 0.000 description 10
- 241000208340 Araliaceae Species 0.000 description 7
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 7
- 235000003140 Panax quinquefolius Nutrition 0.000 description 7
- 235000008434 ginseng Nutrition 0.000 description 7
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 230000009897 systematic effect Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 241000406668 Loxodonta cyclotis Species 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
Embodiments of the present invention provide a method for processing a system function call request and a browser, and relates to the field of internet applications. Resource occupancy of the browser to a system can be reduced. The specific scheme comprises: receiving the system function call request sent by a Web application; determining call information, wherein the call information comprises at least one piece of system information required for the browser to process the system function call request; when it is determined that cached information comprises the call information, obtaining the call information from the cached information, wherein the cached information comprises at least one piece of system information obtained and cached by performing the call of a system function before the system function call request is received by the browser; and according to the system function call request and the call information, returning a calling result to the Web application. The method provided by the present invention is used for development and design of the browser.
Description
Technical field
The present invention relates to internet, applications field, particularly relate to method and the browser of the request of a kind of disposal system funcall.
Background technology
Along with popularizing of smart machine, increasing domestic consumer downloads and installs various application in smart machine.Web application uses HyperText Markup Language (English full name: HyperTextMarkupLanguage, English abbreviation: HTML), JavaScript, CSS (cascading style sheet) (English full name: CascadingStyleSheets, English abbreviation: CSS) etc. exploitation and based on browser execution, Web application with the advantage of its cross-platform operation be subject to increasing developer favor.
Browser, as the platform supporting Web application operation, can provide systemic-function interface to Web application, and such Web application just can pass through browser calling system function.But if Web applies frequent calling system function, each all executive system functions of browser are called, and can cause white elephant undoubtedly to system simultaneously.
In prior art, Web application is by while browser calling system function, and browser carries out buffer memory to returning results of system function call.When a certain moment Web application needs again to obtain same returning results, just carry out system function call to browse request, now browser can directly find from data cached this return results and return to Web application, thus call without the need to executive system function again, thus decrease the number of times that the actual executive system function of browser calls, namely decrease the burden that system function call causes system.But inventor finds in the scheme of above prior art, as long as different the returning results of Web application request, browser will executive system function call, and still needs to take comparatively multi-system resource.Simultaneously, after each executive system function of browser is called, all to carry out buffer memory to new returning results, thus carry out caching often, and buffer data size is large, to carry out system resource that maintenance and management consumes also more to data cached to make browser.
Summary of the invention
Embodiments of the invention provide method and the browser of the request of a kind of disposal system funcall, can reduce the resource occupation of browser to system.
For achieving the above object, embodiments of the invention adopt following technical scheme:
On the one hand, the method for a kind of disposal system funcall request, comprising:
Receive Web and apply the system function call request sent, described system function call request is for asking described browser calling system function, the function that the operating system that described systemic-function is installed for described browser provides;
Determine recalls information, described recalls information comprises at least one system information described in described browser process required for system function call request, the information that described system information is preserved when performing described systemic-function for described operating system under system directory;
When determining that cache information comprises described recalls information, from described cache information, obtain described recalls information; Wherein, described cache information comprised described browser before the described system function call request of reception, is called obtain and at least one system information of buffer memory by executive system function;
To return to described Web application according to described system function call request and described recalls information and call result.
On the other hand, a kind of browser, comprising:
Receiver module, apply for receiving Web the system function call request sent, described system function call request is for asking described browser calling system function, the function that the operating system that described systemic-function is installed for described browser provides;
Processing module, for determining recalls information, described recalls information comprises at least one system information described in described browser process required for system function call request, the information that described system information is preserved when performing described systemic-function for described operating system under system directory;
Cache module, for when determining that cache information comprises described recalls information, obtains described recalls information from described cache information; Wherein, described cache information comprised described browser before the described system function call request of reception, is called obtain and at least one system information of buffer memory by executive system function;
Respond module, calls result for returning to described Web application according to described system function call request and described recalls information.
The method of the disposal system funcall request that embodiments of the invention provide and browser, by carrying out buffer memory to system information, multiple system function call requests of corresponding identical recalls information, browser calls without the need to executive system function respectively, thus decreases the number of times that executive system function calls.Meanwhile, multiple system function call requests of corresponding identical recalls information, when returning results difference, browser also without the need to carrying out buffer memory to various different returning results, thus decreases buffer memory number of times and buffer data size.Because browser decreases the number of times that executive system function calls, decrease buffer memory number of times and buffer data size simultaneously, thus reduce taking system resource.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The method flow schematic diagram of a kind of disposal system funcall request that Fig. 1 provides for embodiments of the invention one;
The method flow schematic diagram of a kind of disposal system funcall request that Fig. 2 provides for embodiments of the invention two;
The schematic diagram of recalls information is obtained when Fig. 3 is the method 1 in Web application call JavaScript object;
The illustrative view of functional configuration of a kind of browser that Fig. 4 provides for embodiments of the invention three.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiments of the invention provide the method for a kind of disposal system funcall request, be applied to browser (English full name: Webbrowser), browser is as the platform supporting Web application operation, can provide systemic-function interface to Web application, such Web application just can pass through browser calling system function.If but the frequent executive system function of browser calls the burden that can increase system, while the object of the invention is how to provide systemic-function to Web application, reduce because the burden that causes system of system function call.
Embodiment one
Embodiments of the invention provide the method for a kind of disposal system funcall request, are applied to browser, with reference to shown in Fig. 1, comprise the following steps:
101, browser receives Web and applies the system function call request sent.
Web application can be the various various application programs based on browser execution, comprises html web page, JavaScript script etc.Web application can on-line operation, the such as various online game based on browser.In addition, Web application also can off-line operation, and such as user is kept at local various html files etc.
Browser is as the platform supporting Web application operation, and be the application program being installed on operating system, its hardware platform can be PC, smart mobile phone, intelligent television, E-book reader etc., and the present invention does not limit for the hardware platform of operating system.
The function that the operating system that systemic-function is installed for browser provides to user, the concrete systemic-function of different hardware platforms can be different, such as, the managing contact information function in smart mobile phone, the rendition list management function, parental control function etc. in intelligent television.Operating system performs in the process of various systemic-function concrete, can generate, preserve various system information, comprise the information of various attribute information, status information and other purposes under system directory.Such as, the associated person information preserved in smart mobile phone, the program list information in intelligent television, the head of a family that user is arranged controls password etc., under being all kept at system directory, read and write when performing corresponding system function for operating system, and carry out operand when certain processes as operating system.
Browser provides systemic-function interface to Web application, and namely browser can obtain the system information under system directory.Web application, by the request of browser transmitting system funcall, asks browser to call certain systemic-function, namely asks browser to obtain system information from system directory, and is that operand processes with system information, returns result eventually to Web application.
102, determine recalls information, recalls information comprises at least one system information required for the request of browser disposal system funcall.
Be described for the account management function of E-book reader, the server of eBook content supplier is to the database of user's Open book information, Web application to provide the content in database to user with html web page form, user can buy e-book by this server of access, the functions such as the backup using it to provide, reading progress record.User can create multiple user account, and such as each kinsfolk has oneself a user account, manages respective eBook content independently by respective user account.
Browser provides to Web application and obtains the functional interface of user account information, and obtains the functional interface of e-book catalogue under each user account.Web application is to the request of browser transmitting system funcall, the e-book catalogue that acquisition request different user account is corresponding, thus Web application for the user account of current login, according to the books that user reads recently, can be carried out book recommendation, server backup content is had access to.In this case, after browser receives call request, determine that browing record three system informations of the e-book catalogue that the user account name of current login, this account are corresponding and user are recalls information.
103, when determining that cache information comprises recalls information, from cache information, recalls information is obtained.
In a kind of concrete application scenarios, browser determines recalls information after receiving system function call request, and judges whether comprise recalls information in cache information.
If now browser is also without any the system information of buffer memory, or do not comprise recalls information in cache information, then executive system function is called, and obtains recalls information from system, and buffer memory recalls information.If cache information comprises recalls information, then from cache information, obtain recalls information, and call without the need to executive system function.
When browser receives system function call request, cache information comprised browser before receiving this system function call request, is called obtain and at least one system information of buffer memory by executive system function.
104, to return to Web application according to system function call request and recalls information and call result.
Recalls information is the system information required for the request of browser disposal system funcall, and browser processes system function call request and returns and call result after obtaining recalls information from cache information.
In conjunction with the above-mentioned citing about E-book reader, browser is by reading cache information or after being called obtained recalls information (browing record three system informations of the e-book catalogue that the user account name of current login, this account are corresponding and user) by executive system function, from e-book catalogue corresponding to this account, select M bar record (recording a book in corresponding e-book catalogue) wherein according to the logical condition (reading time amount to or reading frequency etc.) preset, this M bar record is returned to Web application as calling result.
Certainly, the method of the disposal system funcall request that embodiments of the invention provide, be not limited to this kind of concrete hardware platform of E-book reader, for intelligent television, the recommended program catalogue that user can be determined according to the broadcasting record of user by Web application query video content provider, arrange in the application scenarios of parental control function at intelligent television, when Web application request obtain certain be provided with the broadcasting record of the channel of access code time, need through password authentification.Then browser can obtain the original password that user is arranged from system information, and verifies the password that user inputs at Web application interface, and is returned as calling result to Web application by the result.
It should be noted that, same Web application or different Web application can send multiple system function call request to browser, as long as it is identical to process these system informations required for system function call request, namely these recalls information corresponding to system function call request are identical, browser just calls without the need to executive system function, and the system information of needs only need be obtained from cache information, finally return and call result.
Further, the result of calling returned for multiple system function call request can be identical, also can be different, depends on the content that system function call request is concrete asked.Such as, in a kind of concrete application scenarios, browser is installed in intelligent television, preserves local program list in the system directory of intelligent television, and this list comprises some pages.When browser receives the request of first systematic funcall, during acquisition request first page the rendition list, browser obtains and the list of buffer memory complete programs, and returns first page the rendition list according to system function call request.After the list of browser rs cache complete programs, when browser receives second system function call request, during acquisition request second page the rendition list, recalls information the rendition list that browser is determined according to second system function call request, therefore browser only need obtain complete programs list from buffer memory, and returns second page the rendition list according to second system function call request.So, the request of first systematic funcall and recalls information corresponding to second system function call request are complete programs list, but the content of specifically asking due to two system function call requests is different, thus return to call result not identical.If the content that two system function call requests are specifically asked is identical, such as acquisition request is with one page the rendition list, or the list of acquisition request complete programs, then calling of returning comes to the same thing, after the same request that just browser continues upon receipt, call without the need to executive system function.
In prior art, browser carries out buffer memory to calling to return results, and returns results difference and then separates buffer memory.For the situation that the information of the current buffer memory of browser is sky, when browser receives the request of first systematic funcall, browser executive system function is called, and returns and buffer memory first page the rendition list.When browser receives second system function call request, executive system function is called again, returns and buffer memory second page the rendition list.If browser receives the 3rd system function call request, again during acquisition request first page the rendition list, first page the rendition list of buffer memory as returning results, calls without the need to executive system function by browser.
By above more known, in prior art, as long as what Web application was asked returns results difference, browser will executive system function call, and after each executive system function of browser is called, all will carry out buffer memory to new returning results, thus executive system function is called often, carry out caching often, and buffer data size is large, to carry out system resource that maintenance and management consumes also more to data cached to make browser.In embodiments of the invention, browser carries out buffer memory to system information, multiple system function call requests of corresponding identical recalls information, and browser calls without the need to executive system function respectively, thus decreases the number of times that executive system function calls.Meanwhile, multiple system function call requests of corresponding identical recalls information, when returning results difference, browser also without the need to carrying out buffer memory to various different returning results, thus decreases buffer memory number of times and buffer data size.
The method of the disposal system funcall request that embodiments of the invention provide, browser applies by receiving Web the system function call request sent, determine recalls information, recalls information comprises at least one system information required for the request of browser disposal system funcall, when determining that cache information comprises recalls information, from cache information, obtain recalls information, to return to Web application according to system function call request and recalls information and call result.Because browser decreases the number of times that executive system function calls, decrease buffer memory number of times and buffer data size simultaneously, thus reduce taking system resource.
Embodiment two
Based on the embodiment that Fig. 1 is corresponding, the embodiment of the present invention two provides the method for a kind of disposal system funcall request, is applied to browser, with reference to shown in Fig. 1, comprise the following steps, wherein part steps is identical with step corresponding in embodiment one, therefore repeats no more in embodiment two.
201, browser receives Web and applies the system function call request sent.
Browser, as the platform supporting Web application operation, can provide systemic-function interface to Web application, and such Web application just can pass through browser calling system function.Such as, in a kind of concrete application scenarios, browser provides system function call interface by JavaScript EXPANDING DISPLAY AREA, and now, it can be specifically the request of JavaScript method call that Web applies the system function call request sent.Wherein, the request of JavaScript method call is for calling the method (English name: Method) in JavaScript object.Web application, just can completion system funcall by calling the method in JavaScript object.
202, determine recalls information, recalls information comprises at least one system information required for the request of browser disposal system funcall.
Optionally, browser is installed in intelligent television, preserves local program list in the system directory of intelligent television, and this list comprises some pages.Local program list is obtained for Web application, when Web application obtains certain one page content of local program list by the request of JavaScript method call to browse request, after the request of browser resolves JavaScript method call, determine that local program list is recalls information.
203, when determining not comprise recalls information in cache information, acquisition recalls information is called by executive system function, and buffer memory recalls information.
Browser determines recalls information after receiving system function call request, and judges whether comprise recalls information in cache information.Wherein, cache information comprised browser before the request of receiving system funcall, is called obtain and at least one system information of buffer memory by executive system function.
If now browser is also without any the system information of buffer memory, or do not comprise recalls information in cache information, then executive system function is called, and obtains recalls information from system, and buffer memory recalls information.Concrete, browser is by buffer unit buffer memory cache information.Cache information comprises at least one system information, and wherein each system information takies a buffer unit, integrating step 202, and recalls information is local program list, then using local program list as a system information cache in a buffer unit.
204, when determining that cache information comprises recalls information, from cache information, recalls information is obtained.
Browser can manage buffer unit according to caching record, and caching record is used to indicate the buffer unit in cache information corresponding to each bar system information.Particularly, browser is that each buffer unit distributes different identification information (English full name: identification, English abbreviation: ID), and to the name of every system information, in caching record, the buffer unit ID of every system information institute buffer memory in cache information is recorded.A system information in cache information takies a buffer unit.When browser needs to obtain a certain item system information from cache information, in caching record, find the buffer unit ID that this system information is corresponding, then from buffer unit, read this system information.
Buffer unit can be divided into different field, comprising system message field, for caching system information.Optionally, buffer unit can also comprise named fields, for caching system name of the information.For a system information, its title in buffer unit and its title one_to_one corresponding in caching record or identical.
In a kind of concrete application scenarios, browser is after determining recalls information, and query caching record, determines that the buffer unit of buffer memory recalls information is the first buffer unit, then read the system message field of the first buffer unit, obtains recalls information.
Optionally, buffer unit also comprises cache invalidation time field, is used to indicate the out-of-service time point of the system information of buffer unit institute buffer memory.For the first buffer unit, browser by a system information stored in the first buffer unit time, be expire time field assignment, this value is used to indicate out-of-service time point.After out-of-service time point, the system information of the first buffer unit institute buffer memory lost efficacy, and can not be re-used as recalls information.The assignment of expire time field can be central processing unit (English full name: CentralProcessingUnit, English abbreviation: CPU) present clock and effective time length sum.It should be noted that, during the first buffer unit buffer memory different system information, corresponding effective time, length can be different.
Further alternative, in a kind of concrete application scenarios, the structure of buffer unit as shown in Table 1:
Named fields | Creation-time field | Expire time field | System message field |
Table one
Buffer unit also comprises buffer memory creation-time field, is used to indicate current time when being stored in system information to buffer unit.Browser is after determining recalls information, query caching record, determine that the buffer unit of buffer memory recalls information is the first buffer unit, then the cache invalidation time field of the first buffer unit is read, if current point in time is before the out-of-service time point indicated by the cache invalidation time field of the first buffer unit, read the system message field of the first buffer unit, obtain recalls information.
It should be noted that, recalls information can comprise at least one system information.Such as, shown in composition graphs 3, cache information comprises three system informations, and wherein each system information takies a buffer unit, and three buffer units are respectively buffer unit ID_1, buffer unit ID_2 and buffer unit ID_3.During method 1 in Web application call JavaScript object, browser only obtains recalls information from buffer unit ID_1.During method 2 in Web application call JavaScript object, browser obtains two system informations as recalls information from buffer unit ID_1 and buffer unit ID_2.For follow-up JavaScript method call request, no matter be call separately any one in above three system informations, or three system informations are all called, and can obtain from cache information.If cache information comprises the part system information in recalls information, so only need to be called by executive system function, obtain and buffer memory recalls information in another part system information.
205, to return to Web application according to system function call request and recalls information and call result.
In embodiments of the invention, buffer memory is carried out to system information, same Web application or different Web application can send multiple system function call request to browser, as long as these recalls information corresponding to system function call request are identical, browser just calls without the need to executive system function, and the system information of needs only need be obtained from cache information, finally return and call result.For the situation that the information of the current buffer memory of browser is sky, call the method 1 in JavaScript object before and after Web application for twice, that calls for twice enters ginseng difference, then browser enters the different execution results of ginseng to Web application return method 1 according to different.But it is identical to call corresponding recalls information for twice, therefore browser only executive system function need call and buffer memory recalls information when first time calls.Wherein, enter ginseng and refer to Web application according to business demand for the restrictive condition set by a certain item system information.Such as, Web application request obtains the partial content in local program list, and Web is applied in system function call request and sets into ginseng, specifies first 10 that obtain in local program list.Then browser is local program list according to system function call request determination recalls information, and resolves recalls information according to entering ginseng, and result is called in front 10 conducts obtained in local program list.
In prior art, browser carries out buffer memory to calling to return results, and returns results difference and then separates buffer memory.For the situation that the information of the current buffer memory of browser is sky, call the method 1 in JavaScript object before and after Web application for twice, that calls for twice enters ginseng difference, then when Web application first time calls, browser executive system function is called, and buffer memory first time calls and returns results.Web application second time is when calling, and different owing to entering ginseng, browser needs executive system function again to call, and buffer memory second time is called and returned results.
By above more known, in prior art, as long as what Web application was asked returns results difference, browser will executive system function call, and after each executive system function of browser is called, all will carry out buffer memory to new returning results, thus executive system function is called often, carry out caching often, and buffer data size is large, to carry out system resource that maintenance and management consumes also more to data cached to make browser.In embodiments of the invention, browser carries out buffer memory to system information, multiple system function call requests of corresponding identical recalls information, and browser calls without the need to executive system function respectively, thus decreases the number of times that executive system function calls.Meanwhile, multiple system function call requests of corresponding identical recalls information, when returning results difference, browser also without the need to carrying out buffer memory to various different returning results, thus decreases buffer memory number of times and buffer data size.
206, browser is monitored system information event, and system information event is triggered by operating system when system information changes.
Wherein, operating system is for having installed the operating system of the browser described in embodiments of the invention.In browser rs cache after a system information, if this system information changes, then there will be the situation that cache information is inconsistent with actual system information.Therefore when system information changes, system triggers system information event.Wherein, system information event is used to indicate the system information changed.Optionally, system information event can carry the title of the system information changed.
207, when browser listens to system information event, the system information after obtaining change is called by executive system function.
When browser listens to system information event, determine which system information there occurs change, if the title of this system information is recorded in caching record, executive system function is called, and obtains the system information after change.
208, the system information changed in cache information is refreshed.
After system information after obtaining change, according to the buffer unit of the system information before the change of caching record determination buffer memory, the system information after the system message field write change of this buffer unit, upgrades creation-time field and expire time field simultaneously.
The method of the disposal system funcall request that embodiments of the invention provide, browser applies by receiving Web the system function call request sent, determine recalls information, recalls information comprises at least one system information required for the request of browser disposal system funcall, when determining not comprise recalls information in cache information, acquisition recalls information is called by executive system function, and buffer memory recalls information, when determining that cache information comprises recalls information, recalls information is obtained from cache information, to return to Web application according to system function call request and recalls information and call result.In addition, browser is monitored system information event, system information event is triggered by operating system when system information changes, when browser listens to system information event, the system information after obtaining change is called by executive system function, and the system information changed in refreshing cache information, thus when system information changes, caching system is newly refreshed.Because browser decreases the number of times that executive system function calls, decrease buffer memory number of times and buffer data size simultaneously, thus reduce taking system resource.
Embodiment three
Embodiments of the invention three provide a kind of browser, and for performing the function that in embodiment one and embodiment two, browser completes, with reference to shown in Fig. 3, browser 40 comprises:
Receiver module 401, apply for receiving Web the system function call request sent, system function call request is for asking browser calling system function, the function that the operating system that systemic-function is installed for browser provides.
Processing module 402, for determining recalls information, recalls information comprises at least one system information required for the request of browser 40 disposal system funcall, the information that system information is preserved when executive system function for operating system under system directory.
Cache module 403, for when determining that cache information comprises recalls information, obtains recalls information from cache information.Wherein, cache information comprised browser 40 before the request of receiving system funcall, is called obtain and at least one system information of buffer memory by executive system function.
Respond module 404, calls result for returning to Web application according to system function call request and recalls information.
Optionally, browser 40 also comprises calling module 405, during for determining when cache module 403 not comprise recalls information in cache information, calls acquisition recalls information by executive system function,
Cache module 403, also for buffer memory recalls information.
Optionally, browser 40 also comprises action listener module 406 and calling module 405,
Action listener module 406, for monitoring system information event, system information event is triggered by operating system when system information changes, and system information event is used to indicate the system information changed.
Calling module 405, for when action listener module 406 listens to system information event, calls the system information after obtaining change by executive system function.
Cache module 403, also for refreshing the system information changed in cache information.
Optionally, cache module 403 comprises at least one buffer unit, and browser 40 is by buffer unit buffer memory cache information, and a system information in cache information takies a buffer unit.Wherein buffer unit comprises system message field.
Processing module 402, specifically for determining the first buffer unit according to caching record, caching record is used to indicate the buffer unit in cache information corresponding to each bar system information, and the first buffer unit is the buffer unit of buffer memory recalls information.
Cache module 403, also for reading the system message field of the first buffer unit, obtains recalls information.
Optionally, buffer unit also comprises cache invalidation time field, is used to indicate the out-of-service time point of the system information of buffer unit institute buffer memory.
Cache module 403, also for reading the cache invalidation time field of the first buffer unit.
Cache module 403, also for when current point in time is before the out-of-service time point indicated by the cache invalidation time field of the first buffer unit, reads the system message field of the first buffer unit, obtains recalls information.
Optionally, browser 40 provides system function call interface by JavaScript EXPANDING DISPLAY AREA.
Receiver module 401, apply specifically for receiving Web the JavaScript method call request sent, the request of JavaScript method call is for calling the method in JavaScript EXPANDING DISPLAY AREA.
Respond module 404, specifically for returning the execution result of invoked method to Web application according to recalls information.
The browser of the disposal system funcall request that embodiments of the invention provide, the system function call request sent is applied by receiving Web, determine recalls information, described recalls information comprises at least one system information described in described browser process required for system function call request, when determining that cache information comprises described recalls information, from described cache information, obtain described recalls information, to return to described Web application according to described system function call request and described recalls information and call result.Because browser decreases the number of times that executive system function calls, decrease buffer memory number of times and buffer data size simultaneously, thus reduce taking system resource.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention can use hardware implementing, or firmware realizes, or their array mode realizes.When implemented in software, above-mentioned functions can be buffered in computer-readable medium or as the one or more instruction on computer-readable medium or code and transmit.Computer-readable medium comprises Computer Cache medium and communication media, and wherein communication media comprises any medium being convenient to transmit computer program from a place to another place.Buffer memory medium can be any usable medium that computing machine can access.As example but be not limited to: computer-readable medium can comprise random cache device (English full name: RandomAccessMemory, English abbreviation: RAM), read-only buffer (English full name: ReadOnlyMemory, English abbreviation: ROM), the read-only buffer of electric erazable programmable (English full name: ElectricallyErasableProgrammableReadOnlyMemory, English abbreviation: EEPROM), read-only optical disc (English full name: CompactDiscReadOnlyMemory, English abbreviation: CD-ROM) or other CD buffer memorys, disk buffering medium or other magnetic buffer memory devices, or can be used in carrying or buffer memory have the expectation of instruction or data structure form program code and can by any other medium of computer access.In addition.Any connection can be suitable become computer-readable medium.Such as, if software uses concentric cable, optical fiber cable, twisted-pair feeder, digital subscriber line (English full name: DigitalSubscriberLine, English abbreviation: DSL) or the wireless technology of such as infrared ray, radio and microwave and so on from website, server or other remote source, so the wireless technology of concentric cable, optical fiber cable, twisted-pair feeder, DSL or such as infrared ray, wireless and microwave and so on be included in affiliated medium fixing in.As used in the present invention, plate and dish comprises compression laser disc (English full name: CompactDisc, English abbreviation: CD), laser dish, laser disc, Digital Versatile Disc (English full name: DigitalVersatileDisc, English abbreviation: DVD), floppy disk and Blu-ray Disc, the usual magnetic of its mid-game copy data, what dish then carried out optics with laser copies data.Combination above also should be included within the protection domain of computer-readable medium.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with the protection domain of claim.
Claims (12)
1. a method for disposal system funcall request, is applied to browser, it is characterized in that, comprising:
Receive Web and apply the system function call request sent, described system function call request is for asking described browser calling system function, the function that the operating system that described systemic-function is installed for described browser provides;
Determine recalls information, described recalls information comprises at least one system information described in described browser process required for system function call request, the information that described system information is preserved when performing described systemic-function for described operating system under system directory;
When determining that cache information comprises described recalls information, from described cache information, obtain described recalls information; Wherein, described cache information comprised described browser before the described system function call request of reception, is called obtain and at least one system information of buffer memory by executive system function;
To return to described Web application according to described system function call request and described recalls information and call result.
2. method according to claim 1, is characterized in that, described return according to described system function call request and described recalls information call result to described Web application before, described method also comprises:
When not comprising described recalls information in cache information described in determining, being called by executive system function and obtaining described recalls information, and recalls information described in buffer memory.
3. method according to claim 1, is characterized in that, described method also comprises:
Monitor system information event, described system information event is triggered by operating system when system information changes, and described system information event is used to indicate the system information changed;
When listening to described system information event, call the system information after obtaining change by executive system function;
The system information changed in cache information described in refreshing.
4. method according to claim 1, is characterized in that,
By cache information described in buffer unit buffer memory, a system information in described cache information takies a buffer unit; Wherein buffer unit comprises system message field;
Described when determining that cache information comprises described recalls information, from described cache information, obtain described recalls information, comprising:
The first buffer unit is determined, the buffer unit described in described caching record is used to indicate in cache information corresponding to each bar system information, the buffer unit that described first buffer unit is recalls information described in buffer memory according to caching record;
Read the system message field of described first buffer unit, obtain described recalls information.
5. method according to claim 1, is characterized in that,
By cache information described in buffer unit buffer memory, a system information in described cache information takies a buffer unit; Wherein buffer unit comprises system message field and buffer memory expire time field, and the field of described cache invalidation time is used to indicate the out-of-service time point of the system information of buffer unit institute buffer memory;
Described when determining that cache information comprises described recalls information, from described cache information, obtain described recalls information, comprising:
Described first buffer unit is determined according to described caching record;
Read the cache invalidation time field of described first buffer unit;
If current point in time, before the out-of-service time point indicated by the cache invalidation time field of described first buffer unit, reads the system message field of described first buffer unit, obtains described recalls information.
6. the method according to any one of claim 1-5, is characterized in that,
Described browser provides system function call interface by JavaScript EXPANDING DISPLAY AREA;
Described reception Web applies the system function call request sent, and comprising:
Receive described Web and apply the JavaScript method call request sent, the request of described JavaScript method call is for calling the method in JavaScript object;
Described returning to described Web application according to described system function call request and described recalls information calls result, comprising:
According to the request of described JavaScript method call and described recalls information, call JavaScript method, and return the execution result of invoked JavaScript method to described Web application.
7. a browser, is characterized in that, comprising:
Receiver module, apply for receiving Web the system function call request sent, described system function call request is for asking described browser calling system function, the function that the operating system that described systemic-function is installed for described browser provides;
Processing module, for determining recalls information, described recalls information comprises at least one system information described in described browser process required for system function call request, the information that described system information is preserved when performing described systemic-function for described operating system under system directory;
Cache module, for when determining that cache information comprises described recalls information, obtains described recalls information from described cache information; Wherein, described cache information comprised described browser before the described system function call request of reception, is called obtain and at least one system information of buffer memory by executive system function;
Respond module, calls result for returning to described Web application according to described system function call request and described recalls information.
8. browser according to claim 7, is characterized in that, described browser also comprises:
Calling module, during for not comprising described recalls information in cache information described in determining when described cache module, being called by executive system function and obtaining described recalls information;
Described cache module, also for recalls information described in buffer memory.
9. browser according to claim 7, is characterized in that, described browser also comprises action listener module and calling module;
Described action listener module, for monitoring system information event, described system information event is triggered by operating system when system information changes, and described system information event is used to indicate the system information changed;
Described calling module, for when described action listener module listens to described system information event, calls the system information after obtaining change by executive system function;
Described cache module, the system information also for having changed in cache information described in refreshing.
10. browser according to claim 7, is characterized in that,
Described cache module comprises at least one buffer unit, and described browser is by cache information described in buffer unit buffer memory, and a system information in described cache information takies a buffer unit; Wherein buffer unit comprises system message field;
Described processing module, specifically for determining the first buffer unit according to caching record, buffer unit described in described caching record is used to indicate in cache information corresponding to each bar system information, the buffer unit that described first buffer unit is recalls information described in buffer memory;
Described cache module, also for reading the system message field of described first buffer unit, obtains described recalls information.
11. browsers according to claim 7, is characterized in that,
Described cache module comprises at least one buffer unit, and described browser is by cache information described in buffer unit buffer memory, and a system information in described cache information takies a buffer unit; Wherein buffer unit comprises system message field and cache invalidation time field, and the field of described cache invalidation time is used to indicate the out-of-service time point of the system information of buffer unit institute buffer memory;
Described processing module, specifically for determining the first buffer unit according to caching record, buffer unit described in described caching record is used to indicate in cache information corresponding to each bar system information, the buffer unit that described first buffer unit is recalls information described in buffer memory;
Described cache module, also for reading the cache invalidation time field of described first buffer unit;
Described cache module, also for when current point in time is before the out-of-service time point indicated by the cache invalidation time field of described first buffer unit, reads the system message field of described first buffer unit, obtains described recalls information.
12. browsers according to any one of claim 7-11, is characterized in that,
Described browser provides system function call interface by JavaScript EXPANDING DISPLAY AREA;
Described receiver module, apply specifically for receiving described Web the JavaScript method call request sent, the request of described JavaScript method call is for calling the method in JavaScript object;
Described respond module, specifically for according to the request of described JavaScript method call and described recalls information, calls JavaScript method, and returns the execution result of invoked JavaScript method to described Web application.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510603986.6A CN105242960B (en) | 2015-09-21 | 2015-09-21 | Method for processing system function call request and browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510603986.6A CN105242960B (en) | 2015-09-21 | 2015-09-21 | Method for processing system function call request and browser |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105242960A true CN105242960A (en) | 2016-01-13 |
CN105242960B CN105242960B (en) | 2020-02-18 |
Family
ID=55040615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510603986.6A Active CN105242960B (en) | 2015-09-21 | 2015-09-21 | Method for processing system function call request and browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105242960B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107911418A (en) * | 2017-10-27 | 2018-04-13 | 努比亚技术有限公司 | One kind application control method, server and computer-readable recording medium on probation |
CN109144579A (en) * | 2018-07-17 | 2019-01-04 | 广州睿本信息科技有限公司 | A kind of Web system reads the method and computer readable storage medium of hardware |
CN109947517A (en) * | 2019-03-22 | 2019-06-28 | 青岛海信电器股份有限公司 | A kind of method that the input method of UI is called in Web application in display equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6968539B1 (en) * | 1999-09-30 | 2005-11-22 | International Business Machines Corporation | Methods and apparatus for a web application processing system |
CN102012907A (en) * | 2010-11-10 | 2011-04-13 | 上海光芒科技有限公司 | Method and system for cache at browser client side |
CN102446222A (en) * | 2011-12-22 | 2012-05-09 | 华为技术有限公司 | Webpage content preloading method, device and system |
CN102665127A (en) * | 2012-04-23 | 2012-09-12 | 中山大学 | Browser system of digital television |
CN104503752A (en) * | 2014-12-17 | 2015-04-08 | 青岛海信电器股份有限公司 | Method and device for controlling webpage to call system functions in intelligent equipment |
CN104572981A (en) * | 2014-12-31 | 2015-04-29 | 广东欧珀移动通信有限公司 | Web page caching method and mobile terminal device |
-
2015
- 2015-09-21 CN CN201510603986.6A patent/CN105242960B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6968539B1 (en) * | 1999-09-30 | 2005-11-22 | International Business Machines Corporation | Methods and apparatus for a web application processing system |
CN102012907A (en) * | 2010-11-10 | 2011-04-13 | 上海光芒科技有限公司 | Method and system for cache at browser client side |
CN102446222A (en) * | 2011-12-22 | 2012-05-09 | 华为技术有限公司 | Webpage content preloading method, device and system |
CN102665127A (en) * | 2012-04-23 | 2012-09-12 | 中山大学 | Browser system of digital television |
CN104503752A (en) * | 2014-12-17 | 2015-04-08 | 青岛海信电器股份有限公司 | Method and device for controlling webpage to call system functions in intelligent equipment |
CN104572981A (en) * | 2014-12-31 | 2015-04-29 | 广东欧珀移动通信有限公司 | Web page caching method and mobile terminal device |
Non-Patent Citations (4)
Title |
---|
COSMO89929: "What really happens when you navigate to a URL", 《HTTP://WWW.CNBLOGS.COM/COSMO89929/ARCHIVE/2013/02/24/2923959.HTML》 * |
IGOR OSTROVSKY: "what-really-happens-when-you-navigate-to-a-url", 《HTTPS://WEB.ARCHIVE.ORG/WEB/20100221142139/IGORO.COM/ARCHIVE/WHAT-REALLY-HAPPENS-WHEN-YOU-NAVIGATE-TO-A-URL/》 * |
LINTONG: "一次完整的浏览器请求流程", 《HTTPS://WWW.JIANSHU.COM/P/FBE0E9FA45A6》 * |
杨素敏: "《Windows 2000组网与系统管理》", 31 March 2001 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107911418A (en) * | 2017-10-27 | 2018-04-13 | 努比亚技术有限公司 | One kind application control method, server and computer-readable recording medium on probation |
CN107911418B (en) * | 2017-10-27 | 2020-09-25 | 努比亚技术有限公司 | Application trial control method, server and computer readable storage medium |
CN109144579A (en) * | 2018-07-17 | 2019-01-04 | 广州睿本信息科技有限公司 | A kind of Web system reads the method and computer readable storage medium of hardware |
CN109144579B (en) * | 2018-07-17 | 2023-09-29 | 广州睿本信息科技有限公司 | Method for reading hardware by Web system and computer readable storage medium |
CN109947517A (en) * | 2019-03-22 | 2019-06-28 | 青岛海信电器股份有限公司 | A kind of method that the input method of UI is called in Web application in display equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105242960B (en) | 2020-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107943594B (en) | Data acquisition method and device | |
US9027100B2 (en) | Client-side ad caching for lower ad serving latency | |
CN106598972B (en) | Information display method and device and intelligent terminal | |
CN104426925B (en) | Web page resources acquisition methods and device | |
CN103368986A (en) | Information recommendation method and information recommendation device | |
CN113094136A (en) | Page display control method and device, storage medium and electronic equipment | |
CN107291744A (en) | It is determined that and with the method and device of the relationship between application program | |
CN104268229A (en) | Resource obtaining method and device based on multi-process browser | |
CN110535901A (en) | Service degradation method, apparatus, computer equipment and storage medium | |
JP2005530258A (en) | System and method for resynchronization while refreshing a client device from a server | |
CN103150363A (en) | Method and device for accessing web pages | |
CN105242960A (en) | Method for processing system function call request and browser | |
CN103618799A (en) | Browser caching processing method and system and proxy server | |
CN109446445B (en) | Resource acquisition method and device | |
CN107220260B (en) | Page display method and device | |
CN111008865A (en) | Coupon synchronous display method and device, server and storage medium | |
CN116595047A (en) | Rights management method, rights management device, electronic device and computer-readable storage medium | |
JP4852326B2 (en) | Server device | |
CN102316443A (en) | Storage system for use information of mobile terminal and method | |
CN111240750B (en) | Awakening method and device for target application program | |
CN115858978A (en) | Page loading method and device based on updated resources | |
CN104717286A (en) | Data processing method, terminal, server and system | |
CN107103001B (en) | Method, device and system for acquiring target front-end resource file based on browser | |
CN115048392A (en) | Data deletion method and device, storage medium and electronic device | |
US11288336B2 (en) | Systems and methods for providing content items in situations involving suboptimal network conditions |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No. Patentee after: Hisense Visual Technology Co., Ltd. Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No. Patentee before: QINGDAO HISENSE ELECTRONICS Co.,Ltd. |