The content of the invention
It is a primary object of the present invention to provide a kind of data access control method and device based on browser, to browse
Device server is bridge, and the browser control part that the client that solution prior art is present is used is not supported, the respective wire for causing
The problem that page can not show.
In order to solve the above-mentioned technical problem, the purpose of the present invention is to be achieved through the following technical solutions:
The invention provides a kind of data access control method based on browser, comprise the following steps:For client is carried
For a control module, one or more interfaces are shown in the client by the control module, and detect user in interface
Input and/or selection;When the default trigger event for betiding default interface is detected, it is defeated that the control module collects user
The customer parameter for entering and/or selecting, and the customer parameter is sent to browser server end, the customer parameter includes generation
The parameter of table entry address and corresponding log-on message;The browser server end after the customer parameter is received, root
According to the entry address that the parameter is represented, a browser control part that can support the entry address content character is built, accessed
The entry address, and perform login using the log-on message;After logining successfully, the browser server end controls institute
The default web page address being associated with the entry address of browser access is stated, and obtains the data file of corresponding web page;Institute
Browser server end is stated according to the data positional information corresponding with institute accession page is pre-configured with, from the page for obtaining
The data of relevant position are extracted in the data file of face, and sends aobvious in respective interface to the client control module
Show.
Wherein, the extra-code information required for the log-on message includes the entry address content character.
Wherein, the method for the invention is further included:The browser server end after the entry address is accessed,
Extra-code picture is obtained from the login page for obtaining, and the extra-code picture is sent to client is shown, for user
Input.
Wherein, it is described from the login page for obtaining obtain extra-code picture the step of, including:The browser server
End obtains extra-code picture after accessing the entry address and obtaining login page from cache file.
Wherein, it is described from the login page for obtaining obtain extra-code picture the step of, including:The browser server
Hold after accessing the entry address and obtaining login page, according to default positional information, by extra-code picture region
Screenshotss obtain the extra-code picture.
Wherein, the basis is pre-configured with the data positional information corresponding with institute accession page, obtains from described
The data of relevant position are extracted in page data file the step of, including:According to being pre-configured with and institute's accession page
Corresponding file tag information, positions the position of the label for matching in the page data file;According to the label
Position, the data corresponding with the label position are extracted.
Wherein, it is described the step of the data corresponding with the label position are extracted, including:Operation and label position
Corresponding script data is put, and operation result data are extracted.
Wherein, the method for the invention is further included:The client logs in portal server, obtains and the user
The information of relating to parameters.
Present invention also offers a kind of data access control device based on browser, including:
Control module, for client provides a control module, by the control module the client show one or
Multiple interfaces, and detect input and/or selection of the user in interface;When detecting the default triggering thing that betides default interface
During part, the control module collects the customer parameter of user input and/or selection, and the customer parameter is sent to browser
Server end, the customer parameter includes representing the parameter of entry address and corresponding log-on message;
Login module, for the browser server end after the customer parameter is received, according to the parameter generation
The entry address of table, builds a browser control part that can support the entry address content character, accesses the entry address,
And perform login using the log-on message;
Access modules, for after logining successfully, the browser server end to control the browser access default
The web page address being associated with the entry address, and obtain the data file of corresponding web page;
Extraction module, for the browser server end according to being pre-configured with the data corresponding with institute accession page
Positional information, extracts the data of relevant position from the page data file for obtaining, and sends to the client
End control module shows in respective interface.
Wherein, the extra-code information required for the log-on message includes the entry address content character.
Wherein, the access modules, for the browser server end after the entry address is accessed, from what is obtained
Extra-code picture is obtained in login page, and the extra-code picture is sent to client is shown, for user input.
Wherein, the access modules, are accessing the entry address and are being logged in for the browser server end
After the page, extra-code picture is obtained from cache file.
Wherein, the access modules, are accessing the entry address and are being logged in for the browser server end
After the page, according to default positional information, extra-code picture region screenshotss are obtained into the extra-code picture.
Wherein, the extraction module:According to the file tag information corresponding with institute accession page is pre-configured with, in institute
State the position that the label for matching is positioned in page data file;According to the label position, will be corresponding with the label position
Data extract.
Wherein, the extraction module, for running the script data corresponding with the label position, and by operation result number
According to extracting.
Wherein, the control module, portal server is logged in for the client, is obtained relevant with the customer parameter
Information.
Using embodiments of the invention, during data access, a data, services are built by browser server
The browser control part that device end is supported conducts interviews to data server, no matter on the one hand avoids the limitation to terminal type
It is that desktop terminal or mobile terminal all no longer need to consider support issue of the operating system to browser control part, on the other hand
Limitation of the data server to browser type is avoided, client no longer needs to consider that accessing some data servers should make
Browser type problem;Meanwhile, during data access, using data positional information, improve the effect of data access
Rate and accuracy.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with drawings and the specific embodiments, to this
Invention is described in further detail.
With reference to Fig. 1, Fig. 1 is the system schematic of the control of the data access based on browser of the embodiment of the present invention.
The embodiment of the present invention builds a browser server, the browser server between client and data server
The browser control part of data server support can be built, client passes through the browser server, with the side of browser access
Formula accesses data server, and the corresponding data of acquisition is returned to client and is shown in respective interface by the browser server
In.It is different from the mode that the client of prior art directly accesses data server, the system of the invention, in data access
During, the browser control part that data server is supported is built by browser server, so as to avoid data server pair
The limitation of the browser type that client or client are used;And during browser access data server, profit
With the default data positional information corresponding with institute accession page, required data are accurately positioned and extract, so that, improve
The efficiency and accuracy of data access.
A kind of embodiments in accordance with the present invention, there is provided data access control method based on browser.
Fig. 2 show the flow chart of the method for the control of the data access based on browser of the embodiment of the present invention.
At step S202, for client provides a control module, one is shown in the client by the control module
Individual or multiple interfaces, and detect input and/or selection of the user in interface.
During the control module resides at client in the form of being applied with one, multiple display circles are displayed for a user
Face, to show different page infos, is input into or selects for user in respective interface.For example, the client can be mobile phone
Deng mobile terminal, the control module in the mobile terminal can first log into a portal server, in the portal server
In can prestore user profile, including:The information such as user name, password, ID.The information is used to log in corresponding data
Server, and the customer parameter for being input into and/or selecting in the display interface of terminal with user is associated.The client is logged in
Portal server, you can obtain the information relevant with the customer parameter.The user profile prestored in portal server can be
Pass through desktop terminal logon data server and the interactive log-on message etc. that conducts interviews before user.
After portal server is logged in, the control module can show one or more interfaces, in default interface
Default trigger event can be triggered, is used to obtain the data in corresponding data server by browser server.Wherein, institute
Default trigger event is stated, for example, it may be obtaining extra-code picture event, data synchronization event, data manipulation event etc..
At step S204, when the default trigger event for betiding default interface is detected, the control module is collected
User input and/or the customer parameter of selection, and the customer parameter is sent to browser server end, the customer parameter
Parameter including representing entry address and corresponding log-on message.
For example, showing multigroup log-on message and corresponding web site name of user in the user interface(It can be one
Hyperlinked picture), these information can be obtained by logging in portal server, or user directly in current interface
Middle input.When user have selected the web site name to be accessed, you can think to trigger a data update event, at this moment,
The control module starts to collect the entry address parameter representated by the web site name, and corresponding log-on message.These are stepped on
Record information can include user name, password, and may need the information such as the extra-code of user input.
At step S206, the browser server end after the customer parameter is received, according to the parameter generation
The entry address of table, builds a browser control part that can support the entry address content character, accesses the entry address,
And perform login using the log-on message.
Wherein, the extra-code information required for the log-on message can include the entry address content character.Due to this
Extra-code information is that the data server by being accessed is distributed, and is present in the login page corresponding to entry address, this meaning
Taste in client(Control module)In without annex code information, so, the browser server end is accessing described
After entry address, extra-code picture can be obtained from the login page for obtaining, and the extra-code picture is sent to client
End display, for user input.
Further, when default trigger event is detected, such as:When pressing the button of " acquisition extra-code ", the control
Module can collect the corresponding customer parameter, the entry address of such as data server, and the customer parameter is sent to clear
Look at device server, the browser can be obtained and corresponding with the entry address include additional after the entry address is accessed
The login page of code picture, and be stored in locally as cache file, so, accessing described at the browser server end
Entry address and after obtaining login page, can obtain extra-code picture from cache file.
In another embodiment, browser server end, can be in browser server after the entry address is accessed
The login page that end display is obtained, at this moment, according to the position for analyzing the extra-code known in advance, by extra-code picture region
Screenshotss obtain the extra-code picture.
After user is input into extra-code in the client based on the extra-code picture, be also sent to for extra-code clear by control module
Look at device server end, browser server end group is accessed in the customer parameter for receiving and the information relevant with the customer parameter
The entry address of corresponding data server, and perform login using log-on message.
It should be noted that browser server end is when the entry address is accessed, function according to browser, it is necessary to
A browser control part that can support the entry address content character is built, to ensure that login page can show, at this
During one, client no longer needs to consider normally access described entry address using which type of browser, and
It is that structure is carried out according to the browser control part type corresponding with particular login address for prestoring by browser server end completely
Build, this is favorably improved Consumer's Experience.
At step S208, after logining successfully, the browser server end controls the browser access default
The web page address being associated with the entry address, and obtain the data file of corresponding web page.
In order to improve access efficiency, the embodiment of the present invention controls the browser to be associated with the entry address to default
Web page address performs access, the data file where being rapidly obtained the data to be obtained.For example logging in certain society
After handing over website, browser access can be directly controlled to there is the page of data of interest;After for example logging in certain Net silver again, can be with
Directly there is the page of product introduction in control browser access.
Specifically, the default web page address being associated with the entry address can include single web page address
And/or web page address stream.
Further, it is to access one that browser server controls the default single web page address of browser access
Default web page address, and access web page address stream, then be according in the web page address stream comprising orderly multiple webpages ground
Location, and when the access is carried out, based on the order of orderly multiple web page addresses, in performing the plurality of web page address successively
Each web page address, be used to obtain the data file of corresponding web page, wherein, the data file be located at it is described orderly many
Last web page address row in individual web page address is corresponding.
At step S210, the browser server end is according to being pre-configured with the data corresponding with institute accession page
Positional information, extracts the data of relevant position from the page data file for obtaining, and sends to the client
End control module shows in respective interface.
In the data file, according to the data positional information corresponding with accession page known in advance, can equally carry
Execution efficiency high, it is possible to increase the accuracy for accessing, for example, the file tag information in being pre-configured with data file, according to
The file tag information corresponding with institute accession page being pre-configured with, positions the mark for matching in the page data file
The position of label, and according to the label position, the data corresponding with the label position are extracted.
Due to executable script data may be included in the data file, it is impossible to directly extract data, then, Ke Yiyun
The row script data corresponding with the label position, and operation result data are extracted.
Present invention also offers a kind of data access control device based on browser, Fig. 3 is the base of the embodiment of the present invention
The module map of the device controlled in the data access of browser.
The apparatus according to the invention, can include control module 301, login module 303, access modules 305, extraction module
307。
Control module 301, is provided in client, for showing one or more interfaces in the client, and detects
Input and/or selection of the user in interface;When the default trigger event for betiding default interface is detected, the control mould
Block 301 collects the customer parameter of user input and/or selection, and the customer parameter is sent to browser server end, institute
Stating customer parameter includes representing the parameter of entry address and corresponding log-on message.
The control module 301 can be used for the client and log in portal server, after client login, the door
Family server sends the information relevant with the customer parameter to the client.The packet relevant with the customer parameter
Include:User name, password, ID etc..
Login module 303, for the browser server end after the customer parameter is received, according to the parameter
The entry address of representative, builds a browser control part that can support the entry address content character, accesses the login ground
Location, and perform login using the log-on message.
Access modules 305, for after logining successfully, the browser server end to control the browser access to preset
The web page address being associated with the entry address, and obtain the data file of corresponding web page.
The log-on message can be including the extra-code information required for the entry address content character, because this is additional
Code information is distributed by data server, so, the browser server end, can be from obtaining after the entry address is accessed
Login page in obtain extra-code picture, and the extra-code picture sent to client show, for user input.
Further, the data file that the access modules 305 are obtained is stored in locally as cache file, described to browse
Device server end can obtain extra-code picture after accessing the entry address and obtaining login page from cache file.
In another embodiment, position of the extra-code picture in login page, the browser clothes can in advance be learnt
Extra-code picture region screenshotss, according to the positional information known in advance, are obtained institute by business device end after login page is obtained
State extra-code picture.
Control module 301 sends to browser clothes the extra-code of user input and the information related to the customer parameter
Business device, browser server performs login using customer parameter and the information related to the customer parameter.
Extraction module 307, it is corresponding with institute accession page according to being pre-configured with for the browser server end
Data positional information, extracts the data of relevant position from the page data file for obtaining, and sends to described
Client control module shows in respective interface.
Wherein, the extraction module 307 can also include positioning unit(It is not shown)And extraction unit(It is not shown), it is based on
The default data positional information corresponding with the web page address that the entry address is associated and default and institute's accession page, it is described
Positioning unit is fixed in the page data file according to the file tag information corresponding with institute accession page is pre-configured with
The position of the label of non-colinear position;The extraction unit according to the label position, by the data corresponding with the label position
Extract.
When the corresponding data of label position are script data, executable file during due to the script data, it is impossible to straight
Extraction data are connect, so, the extraction unit can run the script data corresponding with the label position, and by operation result
Data are extracted.
Specific embodiment and side of the invention due to the modules included by the device of the invention described by Fig. 3
The specific embodiment of the step in method is corresponding, due to being described in detail to Fig. 2, so for not mould
The application is pasted, the detail no longer to modules is described herein.
Embodiments of the invention are the foregoing is only, is not intended to limit the invention, for those skilled in the art
For member, the present invention can have various modifications and variations.All any modifications within the spirit and principles in the present invention, made,
Equivalent, improvement etc., should be included within scope of the presently claimed invention.