CN108062371A - A kind of Android device web page data processing system and its data processing method - Google Patents

A kind of Android device web page data processing system and its data processing method Download PDF

Info

Publication number
CN108062371A
CN108062371A CN201711313707.8A CN201711313707A CN108062371A CN 108062371 A CN108062371 A CN 108062371A CN 201711313707 A CN201711313707 A CN 201711313707A CN 108062371 A CN108062371 A CN 108062371A
Authority
CN
China
Prior art keywords
page
module
data
webpage
data processing
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
CN201711313707.8A
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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201711313707.8A priority Critical patent/CN108062371A/en
Publication of CN108062371A publication Critical patent/CN108062371A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Abstract

The invention discloses a kind of Android device web page data processing system and its data processing methods, system includes webpage account management module, web data processing module, persistence module, each module can be realized corresponding software module by Java language, so as to fulfill the web page data processing system that can be run in Android device.Webpage account management module realizes the account and register that webpage is intelligently preserved in Android device;Parsing of the web data processing modules implement to web page code;Persistence module realizes the management in Android device to the web data downloaded.Based on above system, a kind of method for handling web data in Android device and showing is proposed.The present invention can handle the web data of incompatible mobile terminal, simplify user's operation, save system resource, reduce the time of webpage loading, improve the efficiency of mobile office.

Description

A kind of Android device web page data processing system and its data processing method
Technical field
The present invention relates to technical field of the computer network, refer in particular to a kind of Android device web page data processing system And its data processing method.
Background technology
At present, the website of many colleges and universities, scientific research institution and government and enterprises' unit is still using for the stability of system Out-of-date browser access technology and old server log authentication method.And development and ripe, people with mobile Internet Want to access these webpages on smart mobile phone, carry out mobile office.By taking Android intelligent as an example, system is certainly Although the browser and WebView components of band can access the data on these servers, there are compatibility issues:For PC Hold the front end page write that may show incomplete or entanglement in Android phone, user needs to carry out complicated scaling Operation, the word and picture of browsing pages are very inconvenient, click on button and submission form also error-prone.
In face of problems, a solution is the front-end code of upgrade server, is adapted to for Android device, This scheme needs that the framework and page code of system is reconstructed.In the Internet company of iteratively faster, this scheme is Feasible;But for pursuing government and enterprises of the colleges and universities unit of system stability, the upgrading of server is updated there are hysteresis quality, it is only right The adaptation that a small number of information displayed pages carry out mobile terminal can also accomplish that the core business of some early stages is difficult to provide mobile terminal Compatibility this scheme and does not apply at this time.Another scheme is to develop a Android applications for server custom, is used for Data in parsing and access particular server.This scheme solves the page compatibility issue of general browser, but deposits In following two problems.First, an Android application is individually developed if each server to access data, the people of exploitation Power cost is very big;2nd, the memory space of Android device and network traffics resource are limited, are installed in Android device a large amount of The application program of homogeneity is also infeasible.In summary the problem of, for government and enterprises of colleges and universities unit mobile office, it is necessary to carry Go out it is a kind of to access server data have it is compatible, mobile device resource can be saved, to user's operation with convenience Solution.
The content of the invention
The shortcomings that it is an object of the invention to overcome the prior art and deficiency, it is proposed that a kind of Android device webpage number According to processing system and its data processing method, earlier version server system is solved because not being adapted to Android device Caused webpage shows incomplete on Android device general browser, and user's input is cumbersome or even the problem of failure, energy The function that the WebView components that android system carries are short of in this respect is enough improved, automatically processes the login of different server Certification, according to the data that the rule parsing display server of setting returns, optimization user carries in Android device to server The input mode of list is handed over, simplifies user's operation.
To achieve the above object, technical solution provided by the present invention is as follows:
A kind of Android device web page data processing system, including:
Webpage account management module is used to implement the account and register that webpage is intelligently preserved in Android device;
Web data processing module is used to implement in Android device special according to the keyword of web page code and address It levies, strategy used by determination data display loading and display webpage, the parsing to web page code, according to the regular by number of setting It polymerize according to classification, to be adapted to the rule process of mobile terminal and show all types of data;
Persistence module is used to implement in Android device and establishes local data base, preserves the account number cipher letter of webpage Breath and the web data downloaded provide above-mentioned two module the function of data persistence.
The webpage account management module includes configuration file read module, network request modules, web page parsing mould Block, cookie management modules, path optimization's module, wherein:
The configuration file read module read from database need the corresponding account number cipher information of webpage that logs in And the page path logged in;
The network request modules are responsible for sending the response of network request and processing server;
The web page parsing module be responsible for parse login process in html codes and network request modules it is complete together Into login process;
The cookie management modules are responsible for preserving the url addresses of the final page and session cookie;
Path optimization's module is realized by the way that login process is performed a plurality of times and removes unnecessary page jump to logging in The http request and page jump of process optimize.
It is defeated that the web data processing module includes data type judgment module, graph text information display module, click component Enter module, form component input module, download resource management module, wherein:
The data type judgment module handles the resource page Jing Guo login authentication process;By to page url addresses It is analyzed with webpage html code characteristics, if the second level domain of the page is to contain specific key in m and html labels Word, instruction page data have been Android device adaptation, are carried out at this time using the general WebView components of Android device Loading and display webpage, otherwise load and show webpage using the web data display module of customization;
The graph text information display module parses webpage html codes, according to the regular by page number of system configuration It polymerize according to classification, data are following four classes by default rule:1. word paragraph, 2. picture group, 3. can click on component, 4. need to fill List;For word paragraph, the text information centralized displaying that belong to same paragraph word can be slided into display at one Text layout view;For picture group, link and the grouping of picture are preserved, every group shows to meet the picture layout view of characteristic Show;For clicking on component and filling form, it is necessary to generate corresponding layout view and bind the code of processing event;Html codes In data be converted into the view component of Android platform, realize the display in Android device and input operation optimization;
The click component input module parses corresponding html code datas, obtains the js function names of component binding And the content information that component is shown, according to above- mentioned information, the TextView view components of an Android platform are generated, if Corresponding display content is put, and adds corresponding Android and clicks on monitoring event, the content of event is calling WebView groups Part performs above-mentioned js functions;
The form component input module parses corresponding html code datas, reads the form marks in html codes Input elements in label, parsing obtain the key-value pair of variable in list, each corresponding key-value pair generates an Android and puts down The EditView view components of platform, the prompt value of wherein EditView components are arranged to the key of key-value pair, and EditView components obtain To input value be arranged to the value of key-value pair, be shown in a layout view that can be slided and click on;
The download resource management module is responsible for interacting with persistence module, is first looked into before sending network request and downloading resource Whether have corresponding caching, if had existed, directly read caching, save system resource and network if asking in persistence module Flow.
The persistence module establishes local data base in Android device, is webpage account management module and webpage Data processing module provides the function of data persistence, and local data base includes account information database, server info data Storehouse, page path database and local cache database, wherein:
The corresponding account number cipher information of the account information database purchase webpage, when being manually entered account number cipher information simultaneously After logining successfully, relevant information is stored in account information database, and login afterwards can be directly from local data library inquiry Account number cipher information, it is no longer necessary to be manually entered;
The corresponding login page of the server info database purchase webpage and the URL of resource page and page parsing knot Fruit, wherein login page are page when first switching on webpage, and the analysis result of preservation is input account and encrypted message Page code keyword, resource page are the final page after login authentication success, and the analysis result of preservation is resource page generation The keyword of code;
The page jump path of the page path database purchase login process, this path is by the webpage account management The path of module redirects optimization module and is formed and stored in when system first logs into certification webpage in page path database, it Login process afterwards is performed with reference to the page jump path in database;
The cache file downloaded during the local cache database storage browsing webpage, cache file needs to record to be made recently Time and out-of-service time, before the web data processing module initiates network request to a certain resource, first from local The cache file not failed is checked in cache database, is had, directly reads cache file, works as local cache data When the space in storehouse exceeds the threshold value specified, caching is cleared up according to least recently used principle is preferentially eliminated.
The data processing method of above-mentioned Android device web page data processing system, comprises the following steps:
S1, the runtime in Android device, account management module of entering the Web page set the webpage for needing to access, first Secondary login needs to configure account number cipher information, and system performs login process on backstage, records the response of server and the optimization page It redirects, and key message in the process is preserved in the database;Non- first log into need not input account number cipher information, system Login process is performed according to the information of preservation;After login authentication success, the Cookie after certification and page URL are obtained, by number According to passing to web data processing module;
Data type judgment module passes through to page url addresses and webpage html codes in S2, web data processing module Feature is analyzed, if page code meets specific characteristic:Second level domain is to contain specific label, explanation in m, html label The page data page belongs to the response type layout page at compatible PC ends and mobile terminal or belongs to mobile terminal customized web page, for Android device is adapted to, and is loaded and shown webpage using the general WebView components of Android device at this time, otherwise net Page data display module voluntarily loads and shows webpage;
Page info is polymerize classification display by S3, web data display module loading page data according to the rule of setting, Data are following four classes by default rule:1. word paragraph, 2. picture group, 3. can click on component, the list of filling is 4. needed;For Word paragraph, the text layout that the text information centralized displaying for belonging to same paragraph word can be slided to display at one regard Figure;For picture group, link and the grouping of picture are preserved, every group shows to meet the picture layout view of characteristic;For clicking on Component and filling form are, it is necessary to generate corresponding layout view and bind the code of processing event;Data in html codes turn The view component of Android platform is turned to, realizes the display in Android device and input operation optimization;
Local cache and the resource downloading behaviour of S4, persistence module unified management WebView components and data disaply moudle Make;First, the network of one local proxy server of persistence module initialization, WebView components and data disaply moudle please It seeks unification and is sent to local proxy server, when sending network request, persistence module intercepts this request, and by URL processing For the correspondence URL of local proxy server, if containing relevant resource and provided under the file directory of local proxy server Source has not expired, then the data of caching directly is returned to the module of request and update the nearest by usage time of the data; Otherwise real network request is carried out, to server request data;After obtaining new data, local proxy server gives data mark Note by usage time and is stored in corresponding cache file folder recently, all data cached sizes is checked afterwards, if exceeded The threshold value of setting, then according to recently by the earliest caching of the information cleaning of usage time.
Login process in step S1 is divided into first logging into first logs into two kinds of situations, configuration file when first logging into non- Read module reads the corresponding account number cipher information of webpage for needing to log in, and is performed on backstage and logs in and generate optimal page jump Path, it is non-to first log into reading account number cipher information and first log into the optimal page jump path successfully generated afterwards.
Page info polymerization classification in step S3 shows that rule can be configured according to webpage specific code feature, writes from memory Recognize the regular word paragraph that can be handled in common webpage, picture group, component and submission form can be clicked on, if webpage contains it The code of its feature, can be by setting corresponding rule to carry out web data processing and display.
Compared with prior art, the present invention having the following advantages that and advantageous effect:
1st, by intelligently preserving the data and login process of webpage and account in Android device, realize to different nets It stands and carries out automated log on;It avoids and is manually entered the cumbersome of account and password on a web browser;For being met during login authentication To page jump optimized in system background, improve the loading velocity of the page, reduce the operating lag of program interface.
2nd, different data display strategies is taken by the keyword and address feature of web page code;It runs into and is not adapted to shifting During the web data of moved end, page data is handled by the parsing module of system configuration:With WebView components touching by user It touches operation and reduces amplification manually to show that the mode of page data is different, system entire page will not be presented completely in a screen Face, but the content of the page is classified and polymerize in the form of word paragraph, picture group, filling form and submitting button etc.; Sorted data are shown in suitable size in mobile device screen, and key message is more clearly found convenient for user; If necessary to browse key message is not found in current screen or switch data is needed to classify, user can pass through Slide in Android device carrys out easily switch data classification, shows remaining content.
3rd, by applying for that a certain size memory space caches web data in Android device, loading Caching is read during web data, the speed for opening webpage is accelerated, avoids repeated downloads Large Volume Data, saved network traffics Consumption.
Description of the drawings
Fig. 1 is the relation schematic diagram of system modules.
Fig. 2 is the calling process schematic diagram of system modules.
Fig. 3 is the flow diagram of webpage account management part.
Fig. 4 is the page parsing key instance figure of login authentication process.
Fig. 5 is the default rule instance graph of data handling procedure.
Specific embodiment
With reference to specific embodiment, the invention will be further described.
The Android device web page data processing system that the present embodiment is provided, be using AndroidStudio softwares and The web page data processing system run in Android device of Java language exploitation, as depicted in figs. 1 and 2, system passes through interior Portion's module and WebView components realize the web data processing in Android device.It includes:
Webpage account management module is primarily implemented in the account and register that webpage is intelligently preserved in Android device;
Web data display module, the main parsing realized to web page code, sorts data into poly- according to the rule of setting It closes, to be adapted to the rule process of mobile terminal and show all types of data;
Persistence module is primarily implemented in Android device the management to the web data downloaded, and saves system money The time loaded during startup next time is reduced in source.
The webpage account management module includes configuration file read module, network request modules, web page parsing mould Block, cookie management modules, path optimization's module, wherein:
The configuration file read module read from database need the corresponding account number cipher information of webpage that logs in And the page path logged in;
The network request modules are responsible for sending the response of network request and processing server;
The web page parsing module be responsible for parse login process in html codes and network request modules it is complete together Into login process;
The cookie management modules are responsible for preserving the url addresses of the final page and session cookie;
Path optimization's module is realized by the way that login process is performed a plurality of times and removes unnecessary page jump to logging in The http request and page jump of process optimize.
It is defeated that the web data processing module includes data type judgment module, graph text information display module, click component Enter module, form component input module, download resource management module, wherein:
The data type judgment module handles the resource page Jing Guo login authentication process;By to page url addresses It is analyzed with webpage html code characteristics, if the second level domain of the page is to contain specific key in m and html labels Word, instruction page data have been Android device adaptation, are carried out at this time using the general WebView components of Android device Loading and display webpage, otherwise load and show webpage using the web data display module of customization;
The graph text information display module parses webpage html codes, according to the regular by page number of system configuration It polymerize according to classification, data are following four classes by default rule:1. word paragraph, 2. picture group, 3. can click on component, 4. need to fill List;For word paragraph, the text information centralized displaying that belong to same paragraph word can be slided into display at one Text layout view;For picture group, link and the grouping of picture are preserved, every group shows to meet the picture layout view of characteristic Show;For clicking on component and filling form, it is necessary to generate corresponding layout view and bind the code of processing event;Html codes In data be converted into the view component of Android platform, realize the display in Android device and input operation optimization;
The click component input module parses corresponding html code datas, obtains the js function names of component binding And the content information that component is shown, according to above- mentioned information, the TextView view components of an Android platform are generated, if Corresponding display content is put, and adds corresponding Android and clicks on monitoring event, the content of event is calling WebView groups Part performs above-mentioned js functions;
The form component input module parses corresponding html code datas, reads the form marks in html codes Input elements in label, parsing obtain the key-value pair of variable in list, each corresponding key-value pair generates an Android and puts down The EditView view components of platform, the prompt value of wherein EditView components are arranged to the key of key-value pair, and EditView components obtain To input value be arranged to the value of key-value pair, be shown in a layout view that can be slided and click on;
The download resource management module is responsible for interacting with persistence module, is first looked into before sending network request and downloading resource Whether have corresponding caching, if had existed, directly read caching, save system resource and network if asking in persistence module Flow.
The persistence module establishes local data base in Android device, is webpage account management module and webpage Data processing module provides the function of data persistence, and local data base includes account information database, server info data Storehouse, page path database and local cache database, wherein:
The corresponding account number cipher information of the account information database purchase webpage, when being manually entered account number cipher information simultaneously After logining successfully, relevant information is stored in account information database, and login afterwards can be directly from local data library inquiry Account number cipher information, it is no longer necessary to be manually entered;
The corresponding login page of the server info database purchase webpage and the URL of resource page and page parsing knot Fruit, wherein login page are page when first switching on webpage, and the analysis result of preservation is input account and encrypted message Page code keyword, resource page are the final page after login authentication success, and the analysis result of preservation is resource page generation The keyword of code;
The page jump path of the page path database purchase login process, this path is by the webpage account management The path of module redirects optimization module and is formed and stored in when system first logs into certification webpage in page path database, it Login process afterwards is performed with reference to the page jump path in database;
The cache file downloaded during the local cache database storage browsing webpage, cache file needs to record to be made recently Time and out-of-service time, before the web data processing module initiates network request to a certain resource, first from local The cache file not failed is checked in cache database, is had, directly reads cache file, works as local cache data When the space in storehouse exceeds the threshold value specified, caching is cleared up according to least recently used principle is preferentially eliminated.
The present embodiment disclose it is a kind of based on above system realize Android device web data processing method, including with Lower step:
S1, above system is run in Android device first, selection needs the server accessed.First log into needs Account and encrypted message are configured, system performs login process on backstage, records response and the page jump of server, and by process In key message preserve.Login afterwards is not required user to input account and password, and system is stepped on according to the execution of the information of preservation Record process.After login authentication success, the Cookie after certification and page URL are obtained, passes data to WebView components. Login authentication flow is as shown in figure 3, refinement step is as follows:1.1st, configuration file is read, obtains destination server address and account Number and encrypted message;1.2nd, request is sent to destination server, as shown in figure 4, answer code is in parsing different editions server Js codes in 302 redirections or the page that answer code is 200, obtain the login page of central authentication service;1.3rd, parsing is stepped on The code of the page is recorded, obtains the parameter of the submission of form lists or the logging request of AJAX, is submitted and logged in the account number cipher of configuration Request;1.4th, after submitting request, the response of server may include multiple page jump.The Cookie that server returns is recorded, And the resource page of configuration is accessed, if successful access resource, explanation login successfully;1.5th, using successful access resource page before It carries, optimizes page jump process.
S2, type of webpage determining program are by analyzing page url addresses and webpage html code characteristics, if page The second level domain in face is to contain specific label in m and html labels<Meta name=" viewport " content=" Initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width ">, say The bright page data page belongs to the response type layout page at compatible PC ends and mobile terminal or belongs to mobile terminal customized web page, It is adapted to for Android device, is loaded and shown webpage using the general WebView components of Android device at this time;At this Under kind situation, WebView component synchronization Cookie load the page after certification;Otherwise added using web data display module Carry and show webpage.
Page info is polymerize classification display by S3, data disaply moudle loading page data according to the rule of setting.Rule Setting have the scalability, can be server add specified rule.If without specified rule, using default rule.Such as Shown in Fig. 5, default rule is as follows:It reads in html codes<p>The content of label is analysed whether according to the value of character and quantity For word paragraph.The text layout that the text information centralized displaying for belonging to same paragraph word can be slided to display at one regards Figure, acquiescence use the component ScrollView of corresponding A ndroid platforms;It reads in html codes<img>The url of label is protected The link of picture and grouping are deposited, every group shows to meet the picture layout view of characteristic.It is (corresponding that default rule includes carousel figure The component ViewPager of Android platform) and grid chart (the component GridView of corresponding A ndroid platforms), if picture group Quantity be less than 5, shown using the carousel figure slid laterally, otherwise using can show the grid charts of a large amount of pictures.To receiving The js function names of the component of click event, first reading assembly binding, such as the code of a button assembly is read,<button Type=" button " class=" btn btn-primary btn-sm " onclick=" login () ">It logs in</button >, corresponding js functions are learnt as login (), and the content that component is shown is " login ".Data disaply moudle is according to above-mentioned at this time Information generates the TextView of an Android platform, and the content of display is " login ", and adds corresponding click on and monitor Event, the content of event perform login () function in js codes for calling WebView components.For submission form component, The input elements in the form labels in html codes are read, parsing obtains the key-value pair of variable in list, for each change Amount generation EditText components.The hint values of EditText components is the keys of key-value pair, the content that user inputs EditText Save as the value of key-value pair.So far, TextView the and EditText components of all generations are amplified to suitable dimension, be shown in It (is formed in one layout view that can be slided and click on by EditView, TextView are compound in corresponding A ndroid platforms ListView).So far, complete classification according to default rule to the information of full page to polymerize, the data in html codes turn The view component of Android platform is turned to, realizes the display in Android device and input operation optimization.
Local cache and the resource downloading behaviour of S4, persistence module unified management WebView components and data disaply moudle Make.First, persistence module initializes a local proxy server, and ip addresses are arranged to 127.0.0.1, and default port is 5556.The network request of WebView components and data disaply moudle is uniformly sent to local proxy server, such as sends one Network request http://www.server.com/resource, persistence module intercept this request, and are this by URL processing The correspondence URL of ground proxy server:http://127.0.0.1:5556/resource, if the file of local proxy server Contain relevant resource resources under catalogue and resource is also within the time as defined in expires, then directly by the number of caching According to the module for returning to request and update the nearest by usage time of the data;Otherwise real network request is carried out, to clothes Business device request data.After obtaining new data, local proxy server by usage time and is stored in pair recently to data markers The cache file folder answered, checks all data cached sizes afterwards, if beyond the threshold value of setting, basis is made recently Earliest caching is cleared up with the information of time.By unified management of the persistence module to caching, the anti-of same asset is avoided It is multiple to download, network traffics are saved, while improve the loading velocity of webpage.
Embodiment described above is only the preferred embodiments of the invention, and but not intended to limit the scope of the present invention, therefore The variation that all shape, principles according to the present invention are made should all be covered within the scope of the present invention.

Claims (7)

1. a kind of Android device web page data processing system, which is characterized in that including:
Webpage account management module is used to implement the account and register that webpage is intelligently preserved in Android device;
Web data processing module is used to implement in Android device according to the keyword of web page code and address feature, determines Fixed number according to display load and display webpage used by strategy, the parsing to web page code, according to the rule of setting by data point Type of Collective, to be adapted to the rule process of mobile terminal and show all types of data;
Persistence module is used to implement in Android device and establishes local data base, preserve the account number cipher information of webpage with And the web data downloaded, to the function of above-mentioned two module offer data persistence.
2. a kind of Android device web page data processing system according to claim 1, it is characterised in that:The webpage Account management module includes configuration file read module, network request modules, web page parsing module, cookie management moulds Block, path optimization's module, wherein:
The configuration file read module reads the corresponding account number cipher information of webpage for needing to log in and is stepped on from database The page path of record;
The network request modules are responsible for sending the response of network request and processing server;
The html codes and network request modules that the web page parsing module is responsible in parsing login process are completed to step on together Record process;
The cookie management modules are responsible for preserving the url addresses of the final page and session cookie;
Path optimization's module is realized by the way that login process is performed a plurality of times and removes unnecessary page jump to login process Http request and page jump optimize.
3. a kind of Android device web page data processing system according to claim 1, it is characterised in that:The webpage It is defeated that data processing module includes data type judgment module, graph text information display module, click component input module, form component Enter module, download resource management module, wherein:
The data type judgment module handles the resource page Jing Guo login authentication process;By to page url addresses and net Page html code characteristics are analyzed, if the second level domain of the page is said to contain special key words in m and html labels Bright page data has been Android device adaptation, is loaded at this time using the general WebView components of Android device With display webpage, otherwise webpage is loaded and shows using the web data display module of customization;
The graph text information display module parses webpage html codes, divides page data according to the rule of system configuration Data are following four classes by Type of Collective, default rule:1. word paragraph, 2. picture group, 3. can click on component, the table of filling is 4. needed It is single;For word paragraph, the word that the text information centralized displaying that belong to same paragraph word can be slided into display at one Layout view;For picture group, link and the grouping of picture are preserved, every group shows to meet the picture layout view of characteristic;It is right In click component and filling form, it is necessary to generate corresponding layout view and bind the code of processing event;In html codes Data are converted into the view component of Android platform, realize the display in Android device and input operation optimization;
The click component input module parses corresponding html code datas, obtain component binding js function names and The content information that component is shown according to above- mentioned information, generates the TextView view components of an Android platform, sets phase The display content answered, and add corresponding Android and click on monitoring event, the content of event is held for calling WebView components The above-mentioned js functions of row;
The form component input module parses corresponding html code datas, reads in the form labels in html codes Input elements, parsing obtains the key-value pair of variable in list, each corresponding key-value pair generates Android platform EditView view components, the prompt value of wherein EditView components are arranged to the key of key-value pair, and EditView components obtain Input value is arranged to the value of key-value pair, is shown in a layout view that can be slided and click on;
The download resource management module is responsible for interacting with persistence module, first inquires about and holds before sending network request and downloading resource Whether there is corresponding caching in longization module, if had existed, directly read caching, save system resource and network flow Amount.
4. a kind of Android device web page data processing system according to claim 1, it is characterised in that:It is described lasting Change module and local data base is established in Android device, provided for webpage account management module and web data processing module The function of data persistence, local data base include account information database, server info database, page path database And local cache database, wherein:
The corresponding account number cipher information of the account information database purchase webpage, when being manually entered account number cipher information and log in After success, relevant information is stored in account information database, and login afterwards can be directly from local data library inquiry account Encrypted message, it is no longer necessary to be manually entered;
URL and the page parsing of the corresponding login page of the server info database purchase webpage and resource page as a result, Wherein login page is page when first switching on webpage, and the analysis result of preservation is input account and the page of encrypted message Code keyword, resource page are the final page after login authentication success, and the analysis result of preservation is resource page code Keyword;
The page jump path of the page path database purchase login process, this path is by the webpage account management module Path redirect optimization module and be formed and stored in when system first logs into certification webpage in page path database, afterwards Login process is performed with reference to the page jump path in database;
The cache file downloaded during the local cache database storage browsing webpage, cache file need to record most recently used Time and out-of-service time, before the web data processing module initiates network request to a certain resource, first from local cache The cache file not failed is checked in database, is had, directly reads cache file, when local cache database When space exceeds the threshold value specified, caching is cleared up according to least recently used principle is preferentially eliminated.
5. the data processing method of Android device web page data processing system described in a kind of Claims 1-4 any one, It is characterised in that it includes following steps:
S1, the runtime in Android device, account management module of entering the Web page set the webpage for needing to access, step on for the first time Record needs to configure account number cipher information, and system performs login process on backstage, records the response of server and optimization page jump, And key message in the process is preserved in the database;Non- first log into need not input account number cipher information, system according to The information of preservation performs login process;After login authentication success, the Cookie after certification and page URL are obtained, data are passed Pass web data processing module;
Data type judgment module passes through to page url addresses and webpage html code characteristics in S2, web data processing module It is analyzed, if page code meets specific characteristic:Second level domain is to contain specific label, instruction page in m, html label Page of data belongs to the response type layout page at compatible PC ends and mobile terminal or belongs to mobile terminal customized web page, for Android device is adapted to, and is loaded and shown webpage using the general WebView components of Android device at this time, otherwise net Page data display module voluntarily loads and shows webpage;
Page info is polymerize classification display, acquiescence by S3, web data display module loading page data according to the rule of setting Data are following four classes by rule:1. word paragraph, 2. picture group, 3. can click on component, the list of filling is 4. needed;For word Paragraph, the text layout view that the text information centralized displaying for belonging to same paragraph word can be slided into display at one;It is right In picture group, link and the grouping of picture are preserved, every group shows to meet the picture layout view of characteristic;For click on component and Filling form is, it is necessary to generate corresponding layout view and bind the code of processing event;Data in html codes are converted into The view component of Android platform realizes the display in Android device and input operation optimization;
Local cache and the resource downloading operation of S4, persistence module unified management WebView components and data disaply moudle;It is first First, persistence module initializes a local proxy server, the network request unification of WebView components and data disaply moudle Local proxy server is sent to, when sending network request, persistence module intercepts this request, and is local by URL processing The correspondence URL of proxy server, if under the file directory of local proxy server containing relevant resource and resource also not Failure, then directly return to the module of request by the data of caching and update the nearest by usage time of the data;Otherwise into The real network request of row, to server request data;After obtaining new data, local proxy server is nearest to data markers By usage time and corresponding cache file folder is stored in, all data cached sizes are checked afterwards, if beyond setting Threshold value, then according to recently by the earliest caching of the information cleaning of usage time.
6. a kind of data processing method of Android device web page data processing system according to claim 5, feature It is:Login process in step S1 is divided into first logging into first logs into two kinds of situations with non-, and configuration file is read when first logging into Modulus block reads the corresponding account number cipher information of webpage for needing to log in, and is performed on backstage and logs in and generate optimal page jump road Footpath, it is non-to first log into reading account number cipher information and first log into the optimal page jump path successfully generated afterwards.
7. a kind of data processing method of Android device web page data processing system according to claim 5, feature It is:Page info polymerization classification in step S3 shows that rule can be configured according to webpage specific code feature, gives tacit consent to Rule can handle word paragraph in common webpage, picture group, can click on component and submission form, if webpage contain it is other The code of feature, can be by setting corresponding rule to carry out web data processing and display.
CN201711313707.8A 2017-12-12 2017-12-12 A kind of Android device web page data processing system and its data processing method Pending CN108062371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711313707.8A CN108062371A (en) 2017-12-12 2017-12-12 A kind of Android device web page data processing system and its data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711313707.8A CN108062371A (en) 2017-12-12 2017-12-12 A kind of Android device web page data processing system and its data processing method

Publications (1)

Publication Number Publication Date
CN108062371A true CN108062371A (en) 2018-05-22

Family

ID=62138154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711313707.8A Pending CN108062371A (en) 2017-12-12 2017-12-12 A kind of Android device web page data processing system and its data processing method

Country Status (1)

Country Link
CN (1) CN108062371A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597950A (en) * 2018-10-25 2019-04-09 北京辰森世纪科技股份有限公司 Web Page Processing, web page data providing method and the device of application program
CN110209982A (en) * 2019-05-28 2019-09-06 北京金堤科技有限公司 Page data processing and device
CN110267077A (en) * 2019-04-26 2019-09-20 阿里巴巴集团控股有限公司 Offline cache method, apparatus, terminal and readable storage medium storing program for executing
CN110704767A (en) * 2019-09-30 2020-01-17 北京字节跳动网络技术有限公司 Page opening method and device, electronic equipment and storage medium
US10880583B2 (en) 2019-04-26 2020-12-29 Advanced New Technologies Co., Ltd. Method, apparatus, terminal, and readable storage medium for offline caching

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102202044A (en) * 2011-02-25 2011-09-28 北京兴宇中科科技开发股份有限公司 Portable cloud storage method and device
CN102314428A (en) * 2010-06-30 2012-01-11 上海视加信息科技有限公司 Method for distributively creating webpage
CN102495855A (en) * 2011-11-21 2012-06-13 奇智软件(北京)有限公司 Automatic login method and device
US20140053058A1 (en) * 2012-08-16 2014-02-20 Qualcomm Incorporated Predicting the usage of document resources
CN104392009A (en) * 2014-12-19 2015-03-04 北京奇虎科技有限公司 Method and device for acquiring mobile site link address
CN104573001A (en) * 2015-01-07 2015-04-29 北京联合大学 Mobile terminal-based webpage data acqusition and classification method
CN104660688A (en) * 2015-02-03 2015-05-27 百度在线网络技术(北京)有限公司 Method and device for acquiring login information
CN106202179A (en) * 2016-06-27 2016-12-07 北京奇虎科技有限公司 A kind of page loading method and device
CN106547833A (en) * 2016-10-11 2017-03-29 乐视控股(北京)有限公司 Web browser method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314428A (en) * 2010-06-30 2012-01-11 上海视加信息科技有限公司 Method for distributively creating webpage
CN102202044A (en) * 2011-02-25 2011-09-28 北京兴宇中科科技开发股份有限公司 Portable cloud storage method and device
CN102495855A (en) * 2011-11-21 2012-06-13 奇智软件(北京)有限公司 Automatic login method and device
US20140053058A1 (en) * 2012-08-16 2014-02-20 Qualcomm Incorporated Predicting the usage of document resources
CN104392009A (en) * 2014-12-19 2015-03-04 北京奇虎科技有限公司 Method and device for acquiring mobile site link address
CN104573001A (en) * 2015-01-07 2015-04-29 北京联合大学 Mobile terminal-based webpage data acqusition and classification method
CN104660688A (en) * 2015-02-03 2015-05-27 百度在线网络技术(北京)有限公司 Method and device for acquiring login information
CN106202179A (en) * 2016-06-27 2016-12-07 北京奇虎科技有限公司 A kind of page loading method and device
CN106547833A (en) * 2016-10-11 2017-03-29 乐视控股(北京)有限公司 Web browser method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597950A (en) * 2018-10-25 2019-04-09 北京辰森世纪科技股份有限公司 Web Page Processing, web page data providing method and the device of application program
CN110267077A (en) * 2019-04-26 2019-09-20 阿里巴巴集团控股有限公司 Offline cache method, apparatus, terminal and readable storage medium storing program for executing
CN110267077B (en) * 2019-04-26 2020-11-06 创新先进技术有限公司 Offline caching method, device, terminal and readable storage medium
US10880583B2 (en) 2019-04-26 2020-12-29 Advanced New Technologies Co., Ltd. Method, apparatus, terminal, and readable storage medium for offline caching
CN110209982A (en) * 2019-05-28 2019-09-06 北京金堤科技有限公司 Page data processing and device
CN110704767A (en) * 2019-09-30 2020-01-17 北京字节跳动网络技术有限公司 Page opening method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108062371A (en) A kind of Android device web page data processing system and its data processing method
CN104111944B (en) Page processing method and device and page generation method and device
CN103150513B (en) The method of the implantation information in interception application program and device
US7599956B2 (en) Reusable online survey engine
US8725794B2 (en) Enhanced website tracking system and method
CA2734774C (en) A user-transparent system for uniquely identifying network-distributed devices without explicitly provided device or user identifying information
CN102812452B (en) Be used for system, server, terminal, the method for display buffer webpage and record the computer readable recording medium storing program for performing of the method
US9911143B2 (en) Methods and systems that categorize and summarize instrumentation-generated events
US10564960B2 (en) Elastic application framework for deploying software
CN102597993B (en) Managing application state information by means of uniform resource identifier (URI)
US20120151329A1 (en) On-page manipulation and real-time replacement of content
US20130136253A1 (en) System and method for tracking web interactions with real time analytics
KR102504075B1 (en) Matching and attributes of user device events
US20150046425A1 (en) Methods and systems for searching software applications
EP2399209A1 (en) Content access platform and methods and apparatus providing access to internet content for heterogeneous devices
US9225834B2 (en) Contact center skills modeling using customer relationship management (CRM) incident categorization structure
CN108805694A (en) Credit consultation method of servicing, device, equipment and computer readable storage medium
CN107809383A (en) A kind of map paths method and device based on MVC
Al-Masri et al. MobiEureka: an approach for enhancing the discovery of mobile web services
CN104317570B (en) The apparatus and method of dynamic analysis Web applications
CN108701130A (en) Hints model is updated using auto-browsing cluster
CN102968428A (en) Efficient data extraction by a remote application
KR101035327B1 (en) Method and System for Providing Auto Evolution Type Webpage Using Log Analysis
WO2021072742A1 (en) Assessing an impact of an upgrade to computer software
CN108334619A (en) A kind of collecting method, device, computing device and storage medium

Legal Events

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

Application publication date: 20180522

RJ01 Rejection of invention patent application after publication