CN103929451A - Electronic device and data obtaining method - Google Patents

Electronic device and data obtaining method Download PDF

Info

Publication number
CN103929451A
CN103929451A CN201310013048.1A CN201310013048A CN103929451A CN 103929451 A CN103929451 A CN 103929451A CN 201310013048 A CN201310013048 A CN 201310013048A CN 103929451 A CN103929451 A CN 103929451A
Authority
CN
China
Prior art keywords
web application
request
access
web
application access
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
CN201310013048.1A
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201310013048.1A priority Critical patent/CN103929451A/en
Publication of CN103929451A publication Critical patent/CN103929451A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a data obtaining method and an electronic device. The data obtaining method is applied to the electronic device provided with a Web server, and a local agency application and multiple Web applications run on the Web server. The data obtaining method comprises the steps: the Web server receives a Web application access request, wherein the request is used for indicating the demand for data obtaining from one of the Web applications; the Web server directly sends the Web application access request to corresponding Web applications and obtains and returns the required data when an internal Web application inside the electronic device accesses the request, the Web server analyzes an external Web application access request, obtains a target address of the Web application accessed by the external Web application access request, forwards the target address to the external Web application access request and obtains and returns the request data when an Web application outside the electronic device accesses the request.

Description

Electronic equipment and data capture method
Technical field
The present invention relates to electronic device field, and be specifically related to the electronic equipment of a kind of data capture method and this data capture method of use.
Background technology
In recent years, more and more universal such as the electronic equipment of mobile phone, panel computer and personal digital assistant.Meanwhile, along with the interconnected maturation of the movement such as 3G technology and commercialization, the user of the mobile Internet business forward electronic equipment in 3G epoch provides the application of personalization, relevance and interjob widely.Increasing data access and shared demand between the electronic equipment of opposite, based on B/S(Browser/Server, browser/server) the web access mode access electronic equipment of pattern becomes important data access and sharing mode.In order to realize the data access for electronic equipment based on web access pattern, need on electronic equipment, build Web server.In the design of Web server, generally need to realize the modular access for interior business by Link redirect technology.Link redirect technology generally includes redirected (Redirect) and re-writes (Rewrite) two kinds of modes.(Redirect) mode of being redirected is by link is returned to 301, to turn in HTTP standard, by client (browser), uses new link to initiate access, and this is because needs client is initiated request again, thereby efficiency is relatively low.(Rewrite) mode that re-writes is directly at Web server, to be routed to corresponding module, does not need the parameter of client, so be the preferably selection that realizes Link redirect.
In traditional Web server framework, Link redirect function can be responsible for processing by the load-balanced server of front end or the Servlet server of rear end.Yet, under the current Android system extensively adopting such as the electronic equipment of mobile phone, panel computer and personal digital assistant, due to the restriction of processor resource, use traditional Web server framework can expend excess resource.Therefore, the electronic equipment of a kind of data capture method and this data capture method of use need to be provided, it reduces the number of the service module relating in data acquisition to greatest extent, to keep the lightweight Web framework of lower reason device resource to realize the data acquisition based on Link redirect.
Summary of the invention
Because above-mentioned situation the invention provides a kind of data capture method and the electronic equipment that uses this data capture method.
According to one embodiment of present invention, a kind of data capture method is provided, be applied to an electronic equipment, described electronic equipment has Web server unit, the operation of described Web server unit has a local agent application and a plurality of Web application, described data capture method comprises: described Web server unit receives the request of Web application access, and the request of described Web application access is used to indicate and need to obtains data from one of described a plurality of Web application, the response mode of the described Web application access of response request, according to the type of described Web application access request, is determined in described Web server unit, wherein, when determining that the request of described Web application access is the internal web application access request from described electronic equipment internal, described Web server unit directly sends to corresponding Web application by the request of described internal web application access, and obtain and return asked data, when determining that the request of described Web application access is the external web application access request from described electronic device exterior, external web application access request described in described local agent analytic application, obtain the destination address of the Web application of described external web application access request institute request access, to described destination address, forward the request of described external web application access, and obtain and return asked data.
In addition, data capture method according to an embodiment of the invention, wherein said Web server unit is I-Jetty server.
In addition, data capture method according to an embodiment of the invention, the request of wherein said external web application access comprises the function name of the Web application of institute's request access, described destination address is the physical address in described Web server unit, and external web application access request described in wherein said local agent analytic application, the destination address of obtaining the Web application of described external web application access request institute request access comprises: the function name of the Web application of described local agent analytic application institute request access, obtain the physical address in described Web server unit of the Web application of institute's request access.
In addition, data capture method according to an embodiment of the invention, wherein said physical address is the application programming interfaces address of described Web application.
According to another embodiment of the present invention, provide a kind of electronic equipment, having comprised: Web server unit, for Web service is provided, communication unit, for carrying out the communication via network, wherein, the operation of described Web server unit has a local agent application and a plurality of Web application, described Web server unit is used for receiving the request of Web application access, and the request of described Web application access is used to indicate and need to obtains data from one of described a plurality of Web application, the response mode of the described Web application access of response request also, for according to the type of described Web application access request, is determined in described Web server unit, wherein, when determining that the request of described Web application access is the internal web application access request from described electronic equipment internal, described Web server unit directly sends to corresponding Web application by the request of described internal web application access, and obtain and return asked data, when determining that the request of described Web application access is the external web application access request from described electronic device exterior via described communication unit, external web application access request described in described local agent analytic application, obtain the destination address of the Web application of described external web application access request institute request access, to described destination address, forward the request of described external web application access, and obtain and return to asked data via described communication unit.
In addition, electronic equipment according to another embodiment of the present invention, wherein said Web server unit is I-Jetty server.
In addition, electronic equipment according to another embodiment of the present invention, the request of wherein said external web application access comprises the function name of the Web application of institute's request access, described destination address is the physical address in described Web server unit, and external web application access request described in wherein said local agent analytic application, the destination address of obtaining the Web application of described external web application access request institute request access comprises: the function name of the Web application of described local agent analytic application institute request access, obtain the physical address in described Web server unit of the Web application of institute's request access.
In addition, electronic equipment according to another embodiment of the present invention, wherein said physical address is the application programming interfaces address of described Web application.
According to the electronic equipment of the embodiment of the present invention and data capture method thereof, it is applied by local agent being set in inside, Web server unit, reduce to greatest extent the number of the service module relating in data acquisition, thereby to keep the lightweight Web framework of lower reason device resource to realize the data acquisition based on Link redirect.
It being understood that general description and detailed description below are above both exemplary, and the further illustrating of the intention technology that is to provide claimed.
Accompanying drawing explanation
Fig. 1 is that diagram is according to the theory structure schematic diagram of the electronic equipment of the embodiment of the present invention;
Fig. 2 is that diagram is according to the flow chart of the data capture method of the embodiment of the present invention; And
Fig. 3 is that diagram is according to the view of the electronic equipment executing data acquisition methods of the embodiment of the present invention.
Embodiment
Hereinafter, a plurality of embodiment, application and modification are described with reference to the accompanying drawings.In addition, the embodiment the following describes is preferred particular example, and is provided with technical preferred various restrictions, but in the following description, the invention is not restricted to these embodiment.
First, with reference to Fig. 1, describe according to the electronic equipment of the embodiment of the present invention.Described electronic equipment is preferably such as being smart mobile phone, personal digital assistant, palmtop PC etc.
As shown in Figure 1, according to the electronic equipment 1 of the embodiment of the present invention, there is Web server unit 10 and communication unit 20.Hold intelligiblely, in Fig. 1, for simplified characterization only illustrates the assembly being closely related with the present invention, according to the electronic equipment 1 of the embodiment of the present invention, certainly can also comprise other assembly, such as display unit, communication unit etc.
Particularly, the Web server unit 10 of the electronic equipment shown in Fig. 11 is for providing Web service.In a preferred embodiment of the invention, described Web server unit 10 is I-Jetty servers.Described communication unit 20 can communicate via network and other electronic equipments and server in wired or wireless mode, so as with other electronic equipments and server exchange desired data and service.
In addition, as shown in Figure 1, the 10 interior operations of described Web server unit have local agent application 11 and a plurality of Web application 12 1, 12 2... 12 n.Described local agent application 11 is for resolving the external web application access request receiving via communication unit 20, obtain the destination address of the Web application of described external web application access request institute request access, to described destination address, forward the request of described external web application access, and obtain and return to asked data via described communication unit 20.In a preferred embodiment of the invention, a plurality of Web application 12 1, 12 2... 12 ninclude but not limited to camera applications, photo application, multimedia application etc.Below, with reference to Fig. 2, specifically describe according to the data capture method of the embodiment of the present invention.
Fig. 2 is that diagram is according to the flow chart of the data capture method of the embodiment of the present invention.As shown in Figure 2, according to the present invention, executing routine data capture method comprises the following steps:
In step S201, described Web server unit 10 receives the request of Web application access.After this, process and enter step S202.
In step S202, described Web server unit 10 determines whether the request of described Web application access is the request of internal web application access.In a preferred embodiment of the invention, the Web application access request receiving may be the internal web application access request from the Web application of electronic equipment 1 internal operation, or the external web application access request from devices in remote electronic via communication unit 20.
If obtain positive result in step S202, i.e. described Web application access request is the request of internal web application access, processes and enters step S203.
In step S203, described Web server unit 10 directly sends to corresponding Web application by the request of described internal web application access, and obtains and return asked data.
On the contrary, if obtain negative decision in step S202, i.e. described Web application access request is the request of external web application access, processes and enters step S204.
In step S204, the request of described external web application access is resolved in described local agent application 11, obtains the destination address of the Web application of described external web application access request institute request access.In a preferred embodiment of the invention, the request of described external web application access comprises the function name of the Web application of institute's request access, and described destination address is for the Web of institute's request access is applied in the physical address in described Web server unit 10.More specifically, described physical address is the application programming interfaces address of described Web application.After this, process and enter step S205.
In step S205, described local agent application 11 forwards the request of described external web application access to described destination address, and obtains and return to asked data via described communication unit 20.
By as shown in Figure 2 according to the data capture method of the embodiment of the present invention, by local agent application 11 is set in 10 inside, described Web server unit, realized the data feedback of parsing, forwarding and the response described request of the request of external web application access, and without increasing any extra service module.
Fig. 3 is that diagram is according to the view of the electronic equipment executing data acquisition methods of the embodiment of the present invention.The flow regime of signal and data when particularly, Fig. 3 shows the electronic equipment response external Web application access request according to the embodiment of the present invention.
As shown in Figure 3, the external web application access request that described electronic equipment 1 receives from external electronic device 2 via communication unit 20, and the external web application access request of reception is forwarded to described local agent application 11.The external web application access requests that receive via communication unit 20 are resolved in described local agent application 11, obtain the destination address of the Web application of described external web application access request institute request access, i.e. the application programming interfaces (API) of corresponding Web application.After this, described local agent application 11 is forwarded to this API by the request of external web application access, and obtains the Web application data as response from corresponding Web application.Finally, described local agent application 11 sends to via described communication unit 20 the Web application data of obtaining the external electronic device 2 of the request of sending.
Referring to figs. 1 through Fig. 3, described according to the electronic equipment of the embodiment of the present invention and data capture method thereof above, by local agent being set in inside, Web server unit, apply, reduce to greatest extent the number of the service module relating in data acquisition, thereby to keep the lightweight Web framework of lower reason device resource to realize the data acquisition based on Link redirect.
It should be noted that, in this manual, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Finally, also it should be noted that, above-mentioned a series of processing not only comprise the processing of carrying out by time series with order described here, and comprise parallel or respectively rather than the processing of carrying out in chronological order.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential hardware platform by software and realize, and can certainly all by hardware, implement.Understanding based on such, what technical scheme of the present invention contributed to background technology can embody with the form of software product in whole or in part, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the present invention or embodiment.
Above the present invention is described in detail, has applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.

Claims (8)

1. a data capture method, is applied to an electronic equipment, and described electronic equipment has Web server unit, and the operation of described Web server unit has a local agent application and a plurality of Web application, and described data capture method comprises:
Described Web server unit receives the request of Web application access, and the request of described Web application access is used to indicate and need to obtains data from one of described a plurality of Web application;
The response mode of the described Web application access of response request, according to the type of described Web application access request, is determined in described Web server unit;
Wherein, when determining that the request of described Web application access is the internal web application access request from described electronic equipment internal, described Web server unit directly sends to corresponding Web application by the request of described internal web application access, and obtains and return asked data;
When determining that the request of described Web application access is the external web application access request from described electronic device exterior, external web application access request described in described local agent analytic application, obtain the destination address of the Web application of described external web application access request institute request access, to described destination address, forward the request of described external web application access, and obtain and return asked data.
2. data capture method as claimed in claim 1, wherein said Web server unit is I-Jetty server.
3. data capture method as claimed in claim 1 or 2, the request of wherein said external web application access comprises the function name of the Web application of institute's request access, described destination address is the physical address in described Web server unit, and external web application access request described in wherein said local agent analytic application, the destination address of obtaining the Web application of described external web application access request institute request access comprises:
The function name of the Web application of described local agent analytic application institute request access, obtains the physical address in described Web server unit of the Web application of institute's request access.
4. data capture method as claimed in claim 3, wherein said physical address is the application programming interfaces address of described Web application.
5. an electronic equipment, comprising:
Web server unit, for providing Web service;
Communication unit, for carrying out the communication via network,
Wherein, the operation of described Web server unit has a local agent application and a plurality of Web application,
Described Web server unit is used for receiving the request of Web application access, and the request of described Web application access is used to indicate and need to obtains data from one of described a plurality of Web application; The response mode of the described Web application access of response request also, for according to the type of described Web application access request, is determined in described Web server unit;
Wherein, when determining that the request of described Web application access is the internal web application access request from described electronic equipment internal, described Web server unit directly sends to corresponding Web application by the request of described internal web application access, and obtains and return asked data
When determining that the request of described Web application access is the external web application access request from described electronic device exterior via described communication unit, external web application access request described in described local agent analytic application, obtain the destination address of the Web application of described external web application access request institute request access, to described destination address, forward the request of described external web application access, and obtain and return to asked data via described communication unit.
6. electronic equipment as claimed in claim 5, wherein said Web server unit is I-Jetty server.
7. the electronic equipment as described in claim 5 or 6, the request of wherein said external web application access comprises the function name of the Web application of institute's request access, described destination address is the physical address in described Web server unit, and external web application access request described in wherein said local agent analytic application, the destination address of obtaining the Web application of described external web application access request institute request access comprises:
The function name of the Web application of described local agent analytic application institute request access, obtains the physical address in described Web server unit of the Web application of institute's request access.
8. electronic equipment as claimed in claim 7, wherein said physical address is the application programming interfaces address of described Web application.
CN201310013048.1A 2013-01-14 2013-01-14 Electronic device and data obtaining method Pending CN103929451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310013048.1A CN103929451A (en) 2013-01-14 2013-01-14 Electronic device and data obtaining method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310013048.1A CN103929451A (en) 2013-01-14 2013-01-14 Electronic device and data obtaining method

Publications (1)

Publication Number Publication Date
CN103929451A true CN103929451A (en) 2014-07-16

Family

ID=51147528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310013048.1A Pending CN103929451A (en) 2013-01-14 2013-01-14 Electronic device and data obtaining method

Country Status (1)

Country Link
CN (1) CN103929451A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108053341A (en) * 2017-12-27 2018-05-18 深圳市赛为智能股份有限公司 Marketing management method, server, client and the system of smart travel
CN109947839A (en) * 2019-03-27 2019-06-28 苏州浪潮智能科技有限公司 Hybrid cloud platform database access method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1143522A (en) * 1996-06-20 1997-02-26 徐久安 Health ointment for copiopia producing technique thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1143522A (en) * 1996-06-20 1997-02-26 徐久安 Health ointment for copiopia producing technique thereof

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DONGWEIQQ: "Android端jetty服务器开发(一)", 《百度文库》 *
王概凯 等: "Servlet Container的分析与设计", 《电脑开发与应用》 *
罗红飞 等: "基于Jetty的网页防篡改技术的设计与实现", 《网络安全》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108053341A (en) * 2017-12-27 2018-05-18 深圳市赛为智能股份有限公司 Marketing management method, server, client and the system of smart travel
CN109947839A (en) * 2019-03-27 2019-06-28 苏州浪潮智能科技有限公司 Hybrid cloud platform database access method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9544355B2 (en) Methods and apparatus for realizing short URL service
EP3399435A1 (en) Method and device for processing short link, and short link server
KR102513998B1 (en) Communication methods and devices, entities and computer readable storage media
CN108432200B (en) Method for protecting and controlling access to private personal information
CN102970284B (en) User profile processing method and server
CN105337787A (en) Multi-server monitoring method, device and system
CN104125208A (en) Data transmission method and data transmission device
CN103268319A (en) Cloud browser based on webpages
KR20100048571A (en) Method, apparatus and system for providing muti user-multi service
US9280402B2 (en) System and method for updating a dual layer browser
CN106339267B (en) A kind of Object Query method and server-side
US20170289243A1 (en) Domain name resolution method and electronic device
CN110442805A (en) Data entry method, system, equipment and storage medium
CN113839977A (en) Message pushing method and device, computer equipment and storage medium
CN110650209A (en) Method and device for realizing load balance
CN109561167A (en) A kind of domain name analytic method and device
CN106028311B (en) A kind of terminal registration method and device
CN107105004B (en) Cross-platform service calling method and device
CN103929451A (en) Electronic device and data obtaining method
US10348800B2 (en) Invocation context caching
CN102780730A (en) Method and system for integrating web applications and mashup server
CN111953718A (en) Page debugging method and device
CN109710604A (en) Data processing method, device, system, computer readable storage medium
CN105721398A (en) Data access method and device
CN102664959A (en) Mobile platform wireless middleware

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140716

RJ01 Rejection of invention patent application after publication