CN109857963A - Local resource access method, device and electronic equipment - Google Patents

Local resource access method, device and electronic equipment Download PDF

Info

Publication number
CN109857963A
CN109857963A CN201710774688.2A CN201710774688A CN109857963A CN 109857963 A CN109857963 A CN 109857963A CN 201710774688 A CN201710774688 A CN 201710774688A CN 109857963 A CN109857963 A CN 109857963A
Authority
CN
China
Prior art keywords
access
local resource
local
browser
access request
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.)
Pending
Application number
CN201710774688.2A
Other languages
Chinese (zh)
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.)
Loongson Technology Corp Ltd
Original Assignee
Loongson Technology Corp 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 Loongson Technology Corp Ltd filed Critical Loongson Technology Corp Ltd
Priority to CN201710774688.2A priority Critical patent/CN109857963A/en
Publication of CN109857963A publication Critical patent/CN109857963A/en
Pending legal-status Critical Current

Links

Abstract

Local resource access method provided by the invention, device and electronic equipment are by using the access request for local resource access initiated by local network reception by browser, parsing is carried out to the access request and obtains the corresponding access content of the access request, according to the access content, it accesses to local resource, receive the access result that the local resource returns, and the access result is sent to the browser, so that browser can realize the access to local resource using local network connection, simultaneously, the implementation is to browser type, system type and without any restriction, efficiently solve the larger workload for being only capable of that browser exploitation caused by the access of local resource is realized by browser plug-in technology in the prior art, the higher problem of development cost.

Description

Local resource access method, device and electronic equipment
Technical field
The present invention relates to a kind of computer technology more particularly to a kind of local resource access methods, device and electronic equipment.
Background technique
Browser is the platform of operational network application program, shows an application program by display html page Interface.With the development of browser technology, the function of browser is effectively extended, and is not only able to achieve such as browsing net Page watches video, game on line etc. based on the function of accessing to Internet resources online, moreover it is possible to realize and carry out to local resource The function of access, such as: the read-write to fixed disk file, the installation to application software and downloading, to operating system configuration file into Row reads and modifies and the access etc. to hardware device.
Existing browser accesses to local resource and usually utilizes the realization of browser plug-in technology.It is specific next It says, a plug-in component operation file for the local resource of access operation system can be prestored under the plug-in unit catalogue that browser is specified, And the plug-in unit is registered in a browser.When browser needs local resource access, being somebody's turn to do under plug-in unit catalogue is first loaded Plug-in unit then can call the plug-in unit by the Javascript shell script in browser to realize the visit to local resource indirectly It asks.
But since package types are numerous, some kinds of plug-in unit is only capable of the load operating in certain types of browser, For example, the plug-in unit of ActiveX type is only capable of running in IE browser.Therefore, for for a certain local resource access function, Developer needs according to browser type, and a plurality of types of plug-in units of overlapping development are to guarantee the reality of the local resource access function It is existing.Therefore, it is realized in access method of the browser to local resource existing based on browser plug-in technology, the work of exploitation Work amount is larger, and development cost is higher.
Summary of the invention
For being only capable of realizing access of the browser to local resource by browser plug-in technology, and caused by exploitation work Work amount is larger, the higher technical problem of development cost, and the present invention provides a kind of local resource access method, device and electronics to set It is standby.
A kind of local resource access method provided by the invention, comprising:
The access request for local resource access initiated by browser is received by local network;
Parsing is carried out to the access request and obtains the corresponding access content of the access request;
According to the access content, access to local resource;
The access of the local resource return is received as a result, and the access result is sent to the browser.
Further, described that the access request for local resource access initiated by browser is received by local network Before, further includes: to whether receiving the access request and monitor on loop-back address, wherein the loop-back address is For receiving the interface IP address of the local network of the access request.
Further, described that the access for local resource access initiated by the browser is received by local network Request, comprising:
The access request sent by the Javascript shell script that local network receives the browser;
Correspondingly, described be sent to the browser for the access result, comprising:
The access result is sent to the Javascript shell script, so that the Javascript shell script The access is read as a result, and accessing described as the result is shown on the page of the browser.
Further, described that the access request for local resource access initiated by browser is received by local network Before, further includes:
It is bound with preset local resource access port;
Correspondingly, it is described according to the access content, it accesses to local resource, comprising:
Using the local resource access port, corresponding local resource is called according to the access content.
Further, the local resource includes local software resource and local hardware resources;The access request is used for The local resource is read out, stored, deleted, modifies, installs or unloaded.
A kind of device of local resource access provided by the invention, comprising:
Communication unit is asked for being received by local network by the access for local resource access that browser is initiated It asks;It is also used to receive the access of the local resource return as a result, and the access result is sent to the browser;
Resolution unit obtains the corresponding access content of the access request for carrying out parsing to the access request;
Access unit, for being accessed to local resource according to the access content.
Further, the local resource access mechanism, further includes: monitoring unit;
The monitoring unit is used to access for receiving in the communication unit by local network by what browser was initiated Before the access request of local resource, loop-back address is monitored;Wherein, the loop-back address is that the communication unit is used for Receive the interface IP address of the local network of the access request.
Further, the communication unit, specifically for receiving the Javascript of the browser by local network The access request that shell script is sent;It is also used to the access result being sent to the Javascript shell script, So that the Javascript shell script reads the access as a result, and by the access as the result is shown in the browser On the page.
Further, it is received in the communication unit by local network and is used for local resource access by what browser was initiated Access request before, the access unit is also used to be bound with preset local resource access port;
The access unit be specifically used for utilize the local resource access port, according to the access content calling with it is right The local resource answered.
The present invention provides a kind of local resource access mechanisms, comprising: processor and can hold for storing the processor The memory of row instruction;
Wherein, the processor is configured to:
The access request for local resource access initiated by browser is received by local network;
Parsing is carried out to the access request and obtains the corresponding access content of the access request;
According to the access content, access to local resource;
The access of the local resource return is received as a result, and the access result is sent to the browser.
A kind of electronic equipment provided by the invention, comprising:
Browser and local resource access mechanism;
The browser and the local resource access mechanism are communicatively coupled by local network;
The access request is sent to institute for generating the access request for being used for local resource access by the browser State local resource access mechanism;
The local resource access mechanism accesses locally for receiving the access request, and according to the access request Resource;
Wherein, the local resource access mechanism includes:
Communication unit is asked for being received by local network by the access for local resource access that browser is initiated It asks;It is also used to receive the access of the local resource return as a result, and the access result is sent to the browser;
Resolution unit obtains the corresponding access content of the access request for carrying out parsing to the access request;
Access unit, for being accessed to local resource according to the access content.
Local resource access method, device and electronic equipment provided by the invention by using by local network receive by The access request for local resource access that browser is initiated carries out parsing to the access request and obtains the access request Corresponding access content accesses to local resource according to the access content, receives the access that the local resource returns As a result, and the access result is sent to the browser so that browser can using local network connection realize pair The access of local resource, meanwhile, which effectively solves browser type, system type and without any restriction It is only capable of realizing the work of browser exploitation caused by the access of local resource by browser plug-in technology in the prior art Work amount is larger, the higher problem of development cost.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow diagram for local resource access method that the embodiment of the present invention one provides;
Fig. 2 is a kind of structural schematic diagram of local resource access mechanism provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of hardware structural diagram of local resource access mechanism provided by Embodiment 2 of the present invention;
Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention three provides.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Browser is the platform of operational network application program, shows an application program by display html page Interface.In general, in order to guarantee that operating system is safe, operating system carries out the permission of browser local resource access Strict control, that is to say, that operating system do not allow the direct local resource access of Javascript shell script of browser.
And with the development of browser technology, browser can realize the access to local resource by browser plug-in.When When web application needs to access to local resource, one can be prestored under the plug-in unit catalogue that browser is specified for accessing The plug-in component operation file of the local resource of operating system, and the plug-in unit is registered in a browser.Then, browser will add The plug-in unit under plug-in unit catalogue is carried, and the plug-in unit is called by the Javascript shell script of browser, to realize to local The access of resource.
But on the market the major browsers operator such as IE, Firefox, Chrome respectively define it is some from The plug-in unit standard for the plug-in unit that body browser can be supported, for example, ActiveX, PPAPI, NPAPI, Java Applet, Flash, Chrome Native Client etc..Be difficult to be compatible between its each plug-in unit standard: some plug-in unit standards are only for certain types of Browser, such as ActiveX are only capable of running in IE;Some plug-in units mark only supports specific development language, such as Java Applet only supports Java language to carry out developing plug.Further, since the needs of technology development, the browser execution chamber of commerce are irregular Plug-in unit standard is updated, such as from 2017, Chrome browser no longer supports the plug-in unit standard of NPAPI, and changes For the plug-in unit standard for supporting PPAPI.For the plug-in unit for realizing same function, developer needs to be carried out according to different plug-in unit standards Overlapping development, and also need accordingly to safeguard plug-in unit according to the update of plug-in unit standard, it just can guarantee that plug-in unit can normally exist It is run on different types of browser.Based on the above situation, a kind of technical solution that versatile development amount is small is needed, with Meets the needs of browser accesses local resource.
How to be solved with technical solution of the specifically embodiment to technical solution of the present invention and the application below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
Fig. 1 is a kind of flow diagram for local resource access method that the embodiment of the present invention one provides.As shown in Figure 1, The local resource access method includes:
Step 101 receives the access request for local resource access initiated by browser by local network.
It should be noted that the executing subject of local resource access method provided by the invention is local resource access dress It sets, which can be applied to various to run in the electronic equipment of browser application.In addition, local money Source access mechanism can be used the language such as C/C++, Java, Shell or Python and write;Browser can then browse for any type Device, such as IE, Firefox, Chrome etc.;Electronic equipment then can such as desktop computer, tablet computer, smart phone, and this Invention is to the operating system and hardware device of electronic equipment without any restriction.
Specifically, when installing browser execution in the electronic device, user can be defeated by the address in browser Enter the network address of frame input web application, alternatively, user can pass through the web application on the page of click browser Website links, so that the browser execution web application.It is needed during browser execution web application pair When the local resource of electronic equipment accesses, an access request will be generated, and pass through the Javascript script journey of browser Access request is sent directly to local resource access mechanism by local network by sequence.
Furthermore, it is understood that local resource access mechanism can directly initiate and on loop-back address in electronic equipment booting It is monitored, wherein the loop-back address is the interface IP address for receiving the local network of the access request, be may be, for example, 127.0.X.X, aloow local resource access mechanism when listening to access request to the access by the monitoring mechanism Request carries out quick response, and starts to receive access request.In further example, the access for the access request that browser generates Address is loop-back address, can be according to the ring when local resource access mechanism will listen to the access request on loop-back address It goes back to address and determines corresponding local network interface in the home network, and access request is received by the local network interface, from And it realizes and the access request sent by browser is received by local network.
Meanwhile the local resource access mechanism is bound with preset local resource access port, wherein this is preset Local resource access port can be used between local resource access mechanism and local resource interacting.
In addition, local resource includes local software resource and local hardware resources, and access request can be to meet HTTP association The request for discussing format is used to indicate the access behaviour such as to be read out local resource, store, delete, modify, install or unload Make.For example, access request, which is particularly used in, is read out fixed disk file and/or stores and/or delete, to locally applied Software is installed and/or is unloaded;The system configuration file such as such as registry information are read out and/or are modified;To such as mobile Storage equipment, audio frequency apparatus, the hardware devices such as serial equipment carry out etc..
Step 102 carries out the corresponding access content of parsing acquisition access request to access request.
Specifically, after local resource access mechanism receives the access request, which will be solved Analysis, to obtain access content corresponding to the access request.By the parsing to access request, need to access so as to obtain The address of local resource and specific access operation.
Step 103, according to access content, access to local resource.
Specifically, local resource access mechanism can utilize pre-set local resource access port, according to acquisition The address of local resource and specific access operation, call corresponding local resource.For example, access content can be for local hard Part resource is read out, and can also be to unload to local software resource.
Step 104 receives the access of local resource return as a result, and access result is sent to browser.
For example, if access content is to be read out to local hardware resources, which is being read At later, data can will be directly read as access result and return to local resource access mechanism;If accessing content is to local Software resource is unloaded, then unloading can be completed message as access result after completing unloading by the local software resource Return to local resource access mechanism.And after local resource access mechanism receives the access result, local network will be passed through The access result is sent to the Javascript shell script of browser, so that Javascript shell script read access knot Fruit, and by the access as the result is shown on the page of browser.
The local resource access method that the embodiment of the present invention one provides can possess access by setting one in the electronic device The local resource access mechanism of local resource access authority in electronic equipment, and the local resource access mechanism is passed through into local Network is connected to the network with the browser in electronic equipment.When browser needs to visit the local resource in electronic equipment It, then can be by initiating access request to local resource access mechanism when asking.At this point, the local resource access mechanism will be to the access Request is parsed to obtain access content, and is accessed accordingly according to access content local resource.Meanwhile local money The access result is also sent to browser when receiving from the access result that local resource returns by source access mechanism, for Browser carries out subsequent processing.Embodiment in this way is so that browser also can be real in the case where not using plug-in unit Now to the access of local resource, meanwhile, based on be between local resource access mechanism and browser by local network establish connect Connect and interact, this to write the language of the local resource access mechanism not with browser type, browser model with And OS Type binding, development efficiency can be effectively improved, development cost is reduced.
Fig. 2 is a kind of structural schematic diagram of local resource access mechanism provided by Embodiment 2 of the present invention, as shown in Fig. 2, The local resource access mechanism includes:
Communication unit 11 is asked for being received by local network by the access for local resource access that browser is initiated It asks;It is also used to receive the access of the local resource return as a result, and the access result is sent to the browser.
Resolution unit 12 obtains the corresponding access content of the access request for carrying out parsing to the access request.
Access unit 13, for being accessed to local resource according to the access content.
It is set it should be noted that local resource access mechanism can be applied to the various electronics that can run browser application In standby, the language such as C/C++, Java, Shell or Python can be used and write.Browser then can be any type browser, example Such as IE, Firefox, Chrome;Electronic equipment then can be such as desktop computer, tablet computer, smart phone, and the present invention couple The operating system and hardware device of electronic equipment are without any restriction.
Specifically, when installing browser execution in the electronic device, user can be defeated by the address in browser Enter the network address of frame input web application, alternatively, user can pass through the web application on the page of click browser Website links, so that the browser execution web application.It is needed during browser execution web application pair When the local resource of electronic equipment accesses, an access request will be generated, and pass through the Javascript script journey of browser Sequence sends the access request, and the communication unit 11 of local resource access mechanism receives the access request by local network.
Wherein, local resource includes local software resource and local hardware resources, and access request can be to meet HTTP association The request for discussing format is used to indicate the access behaviour such as to be read out local resource, store, delete, modify, install or unload Make.For example, access request, which is particularly used in, is read out fixed disk file and/or stores and/or delete, to locally applied Software is installed and/or is unloaded;The system configuration file such as such as registry information are read out and/or are modified;To such as mobile Storage equipment, audio frequency apparatus, the hardware devices such as serial equipment carry out etc..
After communication unit 11 receives the access request, resolution unit 12 will parse the access request, with Obtain access content corresponding to the access request.Parsing by resolution unit 12 to access request, so as to obtain needs The address of the local resource of access and specific access operation.
Access unit 13 can utilize pre-set local resource access port, according to acquisition local resource address and Specific access operation calls corresponding local resource.For example, access content can be to be read out to local hardware resources, It can also be to be unloaded to local software resource.Wherein, which is access unit 13 in communication unit 11 It is bound before receiving the access request for local resource access initiated by browser by local network.
In further example, if access content is to be read out to local hardware resources, which exists It reads after completing, can will directly read data and be returned to as access result;If access content be to local software resource into Row unloading, then unloading can be completed message as access result and return to communication by the local software resource after completing unloading Unit 11.And after communication unit 11 receives the access result, the access result will be sent to browsing by local network The Javascript shell script of device, so that Javascript shell script read access is as a result, and as the result is shown by the access On the page of browser.
Preferably, on the basis of the above embodiment, which may also include that monitoring unit.It should Monitoring unit, on loop-back address to whether receiving the access request and monitor.
Specifically, when electronic equipment is switched on, local resource access mechanism can be directly initiated, and the monitoring unit is in loopback It is monitored on address, wherein the loop-back address is the interface IP address for receiving the local network of the access request, such as It can be 127.0.X.X, aloow local resource access mechanism when listening to access request to this by the monitoring mechanism Access request carries out quick response, and starts to receive access request.Furthermore, it is understood that the access for the access request that browser generates Address is loop-back address, when the monitoring unit listens to the access request on loop-back address, be may be notified that in communication unit, with So that communication unit is determined corresponding local network interface in the home network according to the loop-back address, and is connect by the local network Mouth receives access request.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description Specific work process and corresponding beneficial effect, can refer to corresponding processes in the foregoing method embodiment, herein no longer It repeats.
In other embodiments, Fig. 3 is a kind of hardware of local resource access mechanism provided by Embodiment 2 of the present invention Structural schematic diagram.As shown in figure 3, concretely a kind of non-transitory computer including instruction can for the local resource access mechanism Read storage medium, comprising:
Processor 32 and memory 31 for storing the processor-executable instruction;
Wherein, the processor 32 is configured as: being received by local network and is used to access local by what browser was initiated The access request of resource;Parsing is carried out to the access request and obtains the corresponding access content of the access request;According to described Content is accessed, is accessed to local resource;The access that the local resource returns is received as a result, and sending out the access result It send to the browser.
Wherein, above-mentioned memory 31 can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light number According to storage equipment etc..And processor 32 can be by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), control Device, microcontroller, microprocessor or other electronic components are realized.
Above-metioned instruction can be used the language such as C/C++, Java, Shell or Python and write, and the present embodiment is to this without limit System.
Local resource access mechanism provided by Embodiment 2 of the present invention can be possessed in access electronic equipment by setting one The device of local resource access authority, and the local resource access mechanism is passed through into the browser in local network and electronic equipment It is connected to the network.It, then can be by local resource when browser needs to access to the local resource in electronic equipment Access mechanism initiates access request.At this point, the local resource access mechanism will parse the access request to be accessed Content, and local resource is accessed accordingly according to access content.Meanwhile local resource access mechanism is being received from this When the access result that ground resource returns, the access result is also sent to browser, so that browser carries out subsequent processing.Pass through Such embodiment is so that browser is also able to achieve the access to local resource in the case where not using plug-in unit, together When, based on being to establish connection by local network and interact between local resource access mechanism and browser, this makes The language for writing the local resource access mechanism is not bound with browser type, browser model and OS Type, energy Development efficiency is enough effectively improved, development cost is reduced.
Fig. 4 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention three provides, as shown in figure 4, the electronics is set It is standby to include:
Browser 2 and local resource access mechanism 1;Wherein, browser 2 and local resource access mechanism 1 pass through local network Network is communicatively coupled.Browser 2 is used to generate the access request for local resource access, and access request is sent to local Resource access device 1.Local resource access mechanism 1 is used to receive access request, and according to access request local resource access 3. Specifically, local resource access mechanism 1 includes: communication unit 11, resolution unit 12 and access unit 13.Wherein, communication unit Member 11 is for receiving the access request for local resource access initiated by browser by local network;It is also used to receive this Access that ground resource 3 returns as a result, and access result is sent to browser 2, resolution unit 12 is used to carry out access request Parsing obtains the corresponding access content of access request.Access unit 13 is used to visit local resource 3 according to access content It asks.
It should be noted that local resource access mechanism 1 can be applied to the various electronics that can run the application of browser 2 In equipment, operation method can be found in scheme disclosed in above-described embodiment one, and it is public that structure can be found in two institute of above-described embodiment The scheme opened.It is write in addition, the language such as C/C++, Java, Shell or Python can be used in local resource access mechanism 1;Browsing Device 2 then can be any type browser, such as IE, Firefox, Chrome etc.;Electronic equipment then can such as desktop computer, plate Computer, smart phone etc., and the present invention to the operating system and hardware device of electronic equipment without any restriction.
Wherein, local resource 3 includes local software resource and local hardware resources, and access request can be to meet HTTP association The request for discussing format is used to indicate the access behaviour such as to be read out local resource, store, delete, modify, install or unload Make.For example, access request, which is particularly used in, is read out fixed disk file and/or stores and/or delete, to locally applied Software is installed and/or is unloaded;The system configuration file such as such as registry information are read out and/or are modified;To such as mobile Storage equipment, audio frequency apparatus, the hardware devices such as serial equipment carry out etc..
The electronic equipment that the embodiment of the present invention three provides, setting can possess the local resource in access electronic equipment by one and visit It asks the local resource access mechanism of permission, and the local resource access mechanism is passed through into the browsing in local network and electronic equipment Device is connected to the network.It, then can be by local money when browser needs to access to the local resource in electronic equipment Source access mechanism initiates access request.At this point, the local resource access mechanism will parse the access request to be visited It asks content, and local resource is accessed accordingly according to access content.Meanwhile local resource access mechanism comes from receiving When the access result that local resource returns, the access result is also sent to browser, so that browser carries out subsequent processing.It is logical Such embodiment is crossed so that browser is also able to achieve the access to local resource without using plug-in unit, together When, based on being to establish connection by local network and interact between local resource access mechanism and browser, this makes The language for writing the local resource access mechanism is not bound with browser type, browser model and OS Type, energy Development efficiency is enough effectively improved, development cost is reduced.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.The present invention is directed to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claims are pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by appended claims System.

Claims (11)

1. a kind of local resource access method characterized by comprising
The access request for local resource access initiated by browser is received by local network;
Parsing is carried out to the access request and obtains the corresponding access content of the access request;
According to the access content, access to local resource;
The access of the local resource return is received as a result, and the access result is sent to the browser.
2. local resource access method according to claim 1, which is characterized in that described to be received by local network by clear Before the access request for local resource access that device of looking at is initiated, further includes:
To whether receiving the access request and monitor on loop-back address, wherein the loop-back address is for receiving The interface IP address of the local network of the access request.
3. local resource access method according to claim 1, which is characterized in that described to be received by local network by clear The access request for local resource access that device of looking at is initiated, comprising:
The access request sent by the Javascript shell script that local network receives the browser;
Correspondingly, described be sent to the browser for the access result, comprising:
The access result is sent to the Javascript shell script, so that the Javascript shell script is read The access by described as a result, and access as the result is shown on the page of the browser.
4. local resource access method according to claim 1, which is characterized in that described to be received by local network by clear Before the access request for local resource access that device of looking at is initiated, further includes:
It is bound with preset local resource access port;
Correspondingly, it is described according to the access content, it accesses to local resource, comprising:
Using the local resource access port, corresponding local resource is called according to the access content.
5. local resource access method according to claim 1-4, which is characterized in that the local resource includes Local software resource and local hardware resources;The access request for the local resource is read out, is stored, is deleted, Modification, installation or unloading.
6. a kind of local resource access mechanism characterized by comprising
Communication unit, for receiving the access request for local resource access initiated by browser by local network;Also For receiving the access of the local resource return as a result, and the access result is sent to the browser;
Resolution unit obtains the corresponding access content of the access request for carrying out parsing to the access request;
Access unit, for being accessed to local resource according to the access content.
7. local resource access mechanism according to claim 6, which is characterized in that further include: monitoring unit;
The monitoring unit is used to access local for receiving in the communication unit by local network by what browser was initiated Between the access request of resource, loop-back address is monitored;Wherein, the loop-back address is the communication unit for receiving The interface IP address of the local network of the access request.
8. local resource access mechanism according to claim 6, which is characterized in that the communication unit is specifically used for logical It crosses local network and receives the access request that the Javascript shell script of the browser is sent;It is also used to the visit Ask that result is sent to the Javascript shell script, so that the Javascript shell script reads the access knot Fruit, and accessed described as the result is shown on the page of the browser.
9. local resource access mechanism according to claim 6, which is characterized in that pass through local network in the communication unit Before network receives the access request for local resource access initiated by browser, the access unit be also used to it is preset Local resource access port is bound;
The access unit be specifically used for utilize the local resource access port, according to the access content calling with it is corresponding Local resource.
10. a kind of local resource access mechanism characterized by comprising processor and executable for storing the processor The memory of instruction;
Wherein, the processor is configured to:
The access request for local resource access initiated by browser is received by local network;
Parsing is carried out to the access request and obtains the corresponding access content of the access request;
According to the access content, access to local resource;
The access of the local resource return is received as a result, and the access result is sent to the browser.
11. a kind of electronic equipment characterized by comprising browser and local resource access mechanism;The browser and described Local resource access mechanism is communicatively coupled by local network;
The access request is sent to described for generating the access request for being used for local resource access by the browser Ground resource access device;
The local resource access mechanism, for receiving the access request, and according to the access request local resource access;
Wherein, the local resource access mechanism includes:
Communication unit, for receiving the access request for local resource access initiated by browser by local network;Also For receiving the access of the local resource return as a result, and the access result is sent to the browser;
Resolution unit obtains the corresponding access content of the access request for carrying out parsing to the access request;
Access unit, for being accessed to local resource according to the access content.
CN201710774688.2A 2017-08-31 2017-08-31 Local resource access method, device and electronic equipment Pending CN109857963A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710774688.2A CN109857963A (en) 2017-08-31 2017-08-31 Local resource access method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710774688.2A CN109857963A (en) 2017-08-31 2017-08-31 Local resource access method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN109857963A true CN109857963A (en) 2019-06-07

Family

ID=66887469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710774688.2A Pending CN109857963A (en) 2017-08-31 2017-08-31 Local resource access method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109857963A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143742A (en) * 2019-12-24 2020-05-12 联想(北京)有限公司 Processing method and processing apparatus
CN112269959A (en) * 2020-11-19 2021-01-26 北京有竹居网络技术有限公司 Display content control method and device, readable medium and electronic equipment
CN112291206A (en) * 2020-10-14 2021-01-29 北京安石科技有限公司 Method for improving operating system security through main control chip
CN116760812A (en) * 2023-08-17 2023-09-15 福建博思软件股份有限公司 Function component-based local resource access method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308465A (en) * 2008-05-08 2008-11-19 华为技术有限公司 Local resource access method and device
US20140025726A1 (en) * 2012-07-23 2014-01-23 Via Technologies, Inc. Hardware resource accessing systems and methods for accessing hardware resources in browser-based operating systems and machine-readable storage medium thereof
CN103914453A (en) * 2012-12-31 2014-07-09 联想(北京)有限公司 Method and device for local resource access and electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308465A (en) * 2008-05-08 2008-11-19 华为技术有限公司 Local resource access method and device
US20140025726A1 (en) * 2012-07-23 2014-01-23 Via Technologies, Inc. Hardware resource accessing systems and methods for accessing hardware resources in browser-based operating systems and machine-readable storage medium thereof
CN103914453A (en) * 2012-12-31 2014-07-09 联想(北京)有限公司 Method and device for local resource access and electronic device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143742A (en) * 2019-12-24 2020-05-12 联想(北京)有限公司 Processing method and processing apparatus
CN112291206A (en) * 2020-10-14 2021-01-29 北京安石科技有限公司 Method for improving operating system security through main control chip
CN112291206B (en) * 2020-10-14 2023-08-15 北京安石科技有限公司 Method for improving operating system safety through main control chip
CN112269959A (en) * 2020-11-19 2021-01-26 北京有竹居网络技术有限公司 Display content control method and device, readable medium and electronic equipment
CN116760812A (en) * 2023-08-17 2023-09-15 福建博思软件股份有限公司 Function component-based local resource access method and system

Similar Documents

Publication Publication Date Title
CN107133180B (en) Dynamic page testing method, testing device and storage medium
CN109165050B (en) Program running method and device, computing equipment and storage medium
CN106569856B (en) A kind of loading method and device of application view resource file
CN109857963A (en) Local resource access method, device and electronic equipment
US10866884B2 (en) Stateless injected script debugging
CN107741844B (en) Method and device for generating application installation package
CN110780930B (en) Method and device for starting Android system, electronic equipment and storage medium
CN104965723B (en) The operation method and device of application program
AU2013213683B2 (en) A method and system of application development for multiple device client platforms
CN107181779A (en) Processing method, the device and system of access request
US20170033980A1 (en) Agent manager for distributed transaction monitoring system
CN113190464A (en) mock testing method, mock testing device, electronic equipment and mock testing medium
CN111666199B (en) Debugging method executed on intelligent terminal and software debugger
CN109343908B (en) Method and device for delaying loading of JS script
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium
CN104978378B (en) A kind of Web access method and device
CN109347951A (en) File deriving method, device, computer equipment and computer readable storage medium
CN114385124A (en) Independent page jumping method, device and equipment based on Vue framework
CN115080109A (en) Multi-cloud-end environment joint debugging method, device, system and equipment based on hybrid development
CN113434384B (en) Pressure testing method and device
CN110324345B (en) Server login method and device, storage medium and terminal
KR20220049334A (en) Method and system for application test
CN111078209B (en) Development processing method, device and equipment for business page
CN111885194B (en) Communication method and device for communication application and electronic equipment
CN113992645B (en) Request processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100095 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing

Applicant after: Loongson Zhongke Technology Co.,Ltd.

Address before: 100095 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing

Applicant before: LOONGSON TECHNOLOGY Corp.,Ltd.