CN110162687A - Data grab method and system in a kind of application of Android - Google Patents
Data grab method and system in a kind of application of Android Download PDFInfo
- Publication number
- CN110162687A CN110162687A CN201910371675.XA CN201910371675A CN110162687A CN 110162687 A CN110162687 A CN 110162687A CN 201910371675 A CN201910371675 A CN 201910371675A CN 110162687 A CN110162687 A CN 110162687A
- Authority
- CN
- China
- Prior art keywords
- storage container
- data
- android application
- adapter
- android
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 230000008569 process Effects 0.000 claims description 4
- 238000000151 deposition Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 6
- 241001269238 Data Species 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000005055 memory storage Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000000547 structure data Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9532—Query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
Abstract
The invention discloses the data grab methods and system in a kind of application of Android, the Android application that Internet side provided in an embodiment of the present invention will grab data is loaded into memory, adapter (adapter) from being applied in memory based on the Android, traversal obtain with the associated storage container of the adapter, from grabbing the data stored in the storage container in storage container by the way of corresponding storage container rule.In this way, the embodiment of the present invention is grabbed based on the structural data stored in memory for constituting the page in Android application example, and it is grabbed in real time in the indirect display page from Android application example, so effectively universally realizing the data grabber in Android application again without being bound by the different page structures of different Android application examples.
Description
Technical field
Data grab method and system the present invention relates to field of computer technology, in particular in a kind of Android application.
Background technique
With the development of Internet technology and computer technology, carries more next more grasped based on Android on the mobile apparatus
Make the various applications of system, provides various Internet services for user.In this case, Internet side is in order to protect
Demonstrate,prove the safe operation of Android application or the service condition of monitoring Android application, it is often necessary to grab to the data in Android application
It takes, whether in violation of rules and regulations to analyze the operation conditions that Android is applied or the data run in Android application.It grabs Internet side
The data technique in Android application is taken, the data technique with Internet side crawl internet (web) page has huge
Difference.This is because the format of web page carrying data is relatively more fixed, there is the specification such as similar hypertext markup language (HTML)
It determines, so the data in crawl web page can be grabbed according to HTML specification.But for based on Android operation system
System is applied when carrying data, then not similar carrying specification, and the interface setting in each Android application is multifarious, and
Cause the rule when loading data also different, so how effectively universally to realize that the data grabber in Android application becomes again
One urgent problem to be solved.
Summary of the invention
In view of this, the embodiment of the present invention provides the data grab method in a kind of application of Android, this method is effectively again logical
Land used realizes the data grabber in Android application.
The embodiment of the present invention provides the data grabber system in a kind of application of Android, which effectively universally realizes peace again
Data grabber in Zhuo Yingyong.
The embodiments of the present invention are implemented as follows:
A kind of data grab method in Android application, comprising:
The Android application that data will be grabbed is loaded into the memory of Internet side;
From, based on the adapter adapter in Android application, traversal obtains associated with the adapter in the memory
Storage container, from grabbing the data stored in the storage container in storage container by the way of corresponding storage container rule.
The Internet side is the cloud system of setting, the Android application that the cloud system is applied by that can run Android
Example composition.
The traversal obtains and the associated storage container process of the adapter are as follows:
Traversal obtains the storage container with the associated data object type of the adapter, and the data object type includes
List, map, set and/or array;
The mode for using corresponding storage container rule for be respectively adopted corresponding objects type be list, map, set and/
Or the storage container rule of array.
The storage container with the associated data object type of the adapter further include:
With the storage container of the affiliated attribute of the associated data object type of the adapter.
Adapter in the Android application is by the crawl data and between the view control in Android application page
It is bound, the view control includes: the list view of List View ListView, grid view GridView and/or upgrading
Scheme RecycleView.
The data stored in the crawl storage container are carried out by the way of linking up with hook.
Data grabber system in a kind of application of Android, comprising: loading unit and picking unit, wherein
Loading unit, the Android application for that will grab data are loaded into the memory of Internet side;
Picking unit, for from, based on the adapter adapter in Android application, traversal is obtained and is somebody's turn to do in the memory
The associated storage container of adapter grabs the storage container by the way of corresponding storage container rule from storage container
The data of middle storage.
The Internet side is the cloud system of setting, the Android application that the cloud system is applied by that can run Android
Example composition.
As seen from above, in the Android application that Internet side provided in an embodiment of the present invention will grab data is loaded into
In depositing, from, based on the adapter (adapter) in Android application, traversal obtains and the adapter is associated deposits in memory
Storage container, from grabbing the data stored in the storage container in storage container by the way of corresponding storage container rule.This
Sample, the embodiment of the present invention are grabbed based on the structural data stored in memory for constituting the page in Android application example, and
It is grabbed in real time in the indirect display page from Android application example, so without being bound by the not same page of different Android application examples
Face structure effectively universally realizes the data grabber in Android application again.
Detailed description of the invention
Fig. 1 is the data grab method flow chart in Android provided in an embodiment of the present invention application;
Fig. 2 is Android application page schematic diagram provided in an embodiment of the present invention;
Fig. 3 is the data run direction schematic diagram in Android provided in an embodiment of the present invention application;
Fig. 4 is that the association of storage container associated with adapter in Android application provided in an embodiment of the present invention is shown
It is intended to;
Fig. 5 is the data grabber system structure diagram in Android provided in an embodiment of the present invention application.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention more comprehensible, right hereinafter, referring to the drawings and the embodiments,
The present invention is further described.
It is broken when the greatest problem of the data in the application of crawl Android in background technique is exactly Android application carrying data
Piece, each Android application are difficult to complete the data that different types of Android is applied to love by general and effectively mode
It crawls.
Internet side can grab the number of Android application carrying by the auxiliary mode function of Android application setting
According to, network side run Android application example after, by Android application example each page carry data grabbed one by one
It takes, has the disadvantage that in this way: first, crawl data are slower, need to run Android application example in network side
Afterwards, the data that each page in Android application example carries are grabbed, if it is the Android application of some live streaming classes, together
Shi Keneng has thousands of a users just in live data, can just grab after the thousands of a pages for carrying all live datas are all run
It takes, it is cumbersome, time-consuming and is not easily accomplished;Second, the page for the application of some Androids is not using preset rule
Data are then carried, but have modified the rule of setting, in this case, run the reality of Android application in Internet side
After example, then the data of page carrying can not be obtained.
In addition, Internet side can also grab the clear data for being transferred to Android application from internet, still
For other data, for example using the encryption data of hypertext transfer protocol (HTTPS) this transmission mode transmission, then it is difficult to solve
It is close, grab the data of Android application.In addition, being transferred to Android from internet for Internet side one by one and answering
Data packet, to grab the data of Android application, it is also difficult to realize and be a very big burden.
In order to overcome the above problem, the Internet side of the embodiment of the present invention is provided with cloud system, the cloud system by
The Android application example composition of Android application can be run, Internet side provided in an embodiment of the present invention, i.e. cloud system will
The Android application for grabbing data is loaded into the memory of cloud system, from being applied in the memory based on the Android
Adapter, traversal obtain with the associated storage container of the adapter, held by the way of corresponding storage container rule from storage
The data stored in the storage container are grabbed in device.
In this way, the embodiment of the present invention based on constitute Android application example in the page structural data stored in memory into
Row crawl, and grabbed in real time in the indirect display page from Android application example, so real without being bound by the application of different Androids
The different page structures of example effectively universally realize the data grabber in Android application again.
Fig. 1 is the data grab method flow chart in Android provided in an embodiment of the present invention application, the specific steps are that:
Step 101, the Android application that will grab data are loaded into the memory of Internet side;
Step 102, the adapter from being applied in the memory based on the Android, traversal obtain being associated with the adapter
Storage container, from grabbing the number stored in the storage container in storage container by the way of corresponding storage container rule
According to.
In the method, the Internet side is the cloud system of setting, and the cloud system is answered by that can run Android
Android application example composition.
For Android application, before loading data into Android application and being presented to the user, it is necessary to by data to tie
The mode of structure is loaded into memory.Structural data in the memory is often the combination of a pile data, in Android application
Be broadcast live user it is some it is basic description etc., these structural datas be rendered into Android application the page before, centainly
It is to be crossed by batch processing, for example carry out batch decryption, if do not handled, can not be resolved on the page of Android application, or
Person is not batch processing, then will affect the speed being rendered on the page of Android application, and the page that may cause Android application exists
Application program cannot respond the problems such as (ANR) when rendering.Therefore, these structural datas be rendered into Android application the page it
Before, after just classifying according to data object type, it is saved in the storage container in corresponding data object type, is being rendered into Android
When the page of application, the structural data of corresponding data object type is extracted from corresponding storage container using adapter.
In embodiments of the present invention, the storage container of Android application includes but is not limited to list storage container, map storage appearance
The length of device, set storage container or/and storage of array container, the data of first three storage container storage is variable, and storage of array is held
Device storage data length be it is fixed, use inconvenience.For first three storage container, storage of array is held
The probability that device uses is relatively low.
In order to enable the data in the storage container of Android application can be rendered into the page of Android application, need to adopt
With Android apply in adapter call, that is to say, that adapter is the bridge between the view in data and the page,
View in the page can be bound with data.For example, as shown in Fig. 2, Fig. 2 is peace provided in an embodiment of the present invention
Tall and erect application page schematic diagram, as shown, if the structural data in memory is rendered into Android in the manner shown in figure 2
In application page, it is necessary to form various view controls and be loaded on the page of Android application, such as including but not limited to list
View (ListView), grid view (GridView) or/and List View (RecycleView) of upgrading etc., and it is these types of
View control is all that after being bound the data in storage container with view control by adapter, will be stored by adapter
Data in container are converted to view control data to be loaded, the corresponding positions being then rendered into again in the page in Android application
It sets, whole process is as shown in figure 3, Fig. 3 is the data run direction schematic diagram in Android provided in an embodiment of the present invention application.
Page setup for Android application has ccf layer, and the view control of Android application display can be grabbed from ccf layer
Part.Android is applied when the page to be presented to the user, and view control therein is by measurement, layout and the operation drawn.Into
In these operating process of row, by the reflection technology of Java computer language, is searched out by adapter and be stored in different data
Data in the storage container of object type.Therefore, the embodiment of the present invention is just using adapter as contract access point, determining and adapter
The storage container of associated data object type determines there is an associated storage container, for example the data object of list is deposited
Then storage container analyzes the data structure for being stored in the data of the storage container again, obtain storing data structure.Herein, by
It is typically all that Android is applied and obtained from the server of distal end in these data, if storing data structure will change on a large scale
Biggish cost can be paid, will not be changed on a large scale under normal circumstances.In this way, the embodiment of the present invention can be based on the storage
The storing data structure of container obtains the data of storage from the storage container, and the mode used will deposit for hook (hook) mode
Interface in storage container hangs up hook, when the storage container has the data of storage, then directly grabs.
That is, the embodiment of the present invention is in storage Android in the data of page load for grabbing Android application
Using in the memory of data, using the adapter of Android application as clue, breadth traversal data object type associated there
Storage container, and disposably being grabbed from storage container, without need to run as background technique Android application and from
It is directly grabbed in the page.As shown in figure 4, Fig. 4 is provided in an embodiment of the present invention associated with adapter in Android application
The association schematic diagram of storage container.As shown, data object type A, B, C and D that first traversal is directly linked with adapter are
It is no to have storage container, if it is, directly grabbing the data of storage from these storage containers;If it is not, judging data again
Whether the attribute of object type A, B, C and D have storage container, if it is, the crawl storage directly from these storage containers
Data;If not, judge whether next layer of attribute has storage container again, and so on, it has traversed all straight with adapter
Until connecing the multilayer attribute under associated data object type A, B, C and D and data object type A, B, C and D.
Fig. 5 be Android provided in an embodiment of the present invention application in data grabber system schematic, comprising: loading unit and
Picking unit, wherein
Loading unit, the Android application for that will grab data are loaded into the memory of Internet side;
Picking unit, for from, based on the adapter adapter in Android application, traversal is obtained and is somebody's turn to do in the memory
The associated storage container of adapter grabs the storage container by the way of corresponding storage container rule from storage container
The data of middle storage.
Within the system, the Internet side is the cloud system of setting, and the cloud system is answered by that can run Android
Android application example composition.
Rule of the embodiment of the present invention using Android application at runtime, directly storage Android application structure data is interior
Middle crawl data are deposited, so that the grasp speed of Android application is faster, data grabber is more acurrate and richer.It avoids and runs one by one
The page of Android application also significantly reduces the page for entering Android application repeatedly from the troublesome operation of each page crawl data
Probability of the face to break down, greatly improves the data grabber efficiency of Android application.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.
Claims (8)
1. the data grab method in a kind of Android application characterized by comprising
The Android application that data will be grabbed is loaded into the memory of Internet side;
From, based on the adapter adapter in Android application, traversal obtains and the associated storage of the adapter in the memory
Container, from grabbing the data stored in the storage container in storage container by the way of corresponding storage container rule.
2. the method as described in claim 1, which is characterized in that the Internet side is the cloud system of setting, the cloud
System is made of the Android application example that can run Android application.
3. the method as described in claim 1, which is characterized in that the traversal obtains and the associated storage container of the adapter
Process are as follows:
Traversal obtains the storage container with the associated data object type of the adapter, the data object type include list,
Map, set and/or array;
The mode for using corresponding storage container rule is list, map, set and/or number for corresponding objects type is respectively adopted
The storage container rule of group.
4. method as claimed in claim 3, which is characterized in that the depositing with the associated data object type of the adapter
Storage container further include:
With the storage container of the affiliated attribute of the associated data object type of the adapter.
5. the method as described in claim 1, which is characterized in that adapter in Android application is by the crawl data
It is bound between the view control in Android application page, the view control includes: List View ListView, net
The lattice view GridView and/or List View RecycleView of upgrading.
6. the method as described in claim 1, which is characterized in that the data stored in the crawl storage container are using extension
The mode of hook hook carries out.
7. the data grabber system in a kind of Android application characterized by comprising loading unit and picking unit, wherein
Loading unit, the Android application for that will grab data are loaded into the memory of Internet side;
Picking unit, for from, based on the adapter adapter in Android application, traversal is obtained and is somebody's turn to do in the memory
The associated storage container of adapter grabs the storage container by the way of corresponding storage container rule from storage container
The data of middle storage.
8. system as claimed in claim 7, which is characterized in that the Internet side is the cloud system of setting, the cloud
System is made of the Android application example that can run Android application.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910371675.XA CN110162687B (en) | 2019-05-06 | 2019-05-06 | Data capture method and system in android application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910371675.XA CN110162687B (en) | 2019-05-06 | 2019-05-06 | Data capture method and system in android application |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110162687A true CN110162687A (en) | 2019-08-23 |
CN110162687B CN110162687B (en) | 2022-08-19 |
Family
ID=67633662
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910371675.XA Active CN110162687B (en) | 2019-05-06 | 2019-05-06 | Data capture method and system in android application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110162687B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114257628A (en) * | 2021-11-03 | 2022-03-29 | 北京思特奇信息技术股份有限公司 | Registration response type data pushing method and system, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150033219A1 (en) * | 2013-07-28 | 2015-01-29 | Oded Haim Breiner | Method and system for displaying a non-installed android application and for requesting an action from a non-installed android application |
CN105094783A (en) * | 2014-05-19 | 2015-11-25 | 腾讯科技(深圳)有限公司 | Method and device for testing Android application stability |
US9225799B1 (en) * | 2013-05-21 | 2015-12-29 | Trend Micro Incorporated | Client-side rendering for virtual mobile infrastructure |
CN107273277A (en) * | 2017-05-11 | 2017-10-20 | 珠海金山网络游戏科技有限公司 | A kind of depth captures the method and device of mobile phone application runnability data |
-
2019
- 2019-05-06 CN CN201910371675.XA patent/CN110162687B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9225799B1 (en) * | 2013-05-21 | 2015-12-29 | Trend Micro Incorporated | Client-side rendering for virtual mobile infrastructure |
US20150033219A1 (en) * | 2013-07-28 | 2015-01-29 | Oded Haim Breiner | Method and system for displaying a non-installed android application and for requesting an action from a non-installed android application |
CN105094783A (en) * | 2014-05-19 | 2015-11-25 | 腾讯科技(深圳)有限公司 | Method and device for testing Android application stability |
CN107273277A (en) * | 2017-05-11 | 2017-10-20 | 珠海金山网络游戏科技有限公司 | A kind of depth captures the method and device of mobile phone application runnability data |
Non-Patent Citations (1)
Title |
---|
李侠等: "Android存储机制的应用研究", 《电脑知识与技术》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114257628A (en) * | 2021-11-03 | 2022-03-29 | 北京思特奇信息技术股份有限公司 | Registration response type data pushing method and system, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110162687B (en) | 2022-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106534244A (en) | Scheduling method and device for proxy resources | |
CN105956138B (en) | The control method and device of database connection | |
CN104915717B (en) | Data processing method, Analysis of Knowledge Bases Reasoning method and relevant apparatus | |
CN103176804B (en) | A kind of user interface implementation method | |
CN107590188A (en) | A kind of reptile crawling method and its management system for automating vertical subdivision field | |
CN106033428B (en) | The selection method of uniform resource locator and the selection device of uniform resource locator | |
Sannella | The SkyBlue Constraint Solver and Its Applications. | |
GB2389680A (en) | Dynamic custom wizard interface generation over a network system and method | |
CN106873952B (en) | Data processing system and method for mobile terminal webpage development and application device | |
CN102486799A (en) | World wide web (WWW) page processing method and device | |
CN112699040B (en) | Pressure testing method, device, equipment and computer readable storage medium | |
CN103177115A (en) | Method and device of extracting page link of webpage | |
CN108011894A (en) | Botnet detecting system and method under a kind of software defined network | |
CN110162687A (en) | Data grab method and system in a kind of application of Android | |
CN109710831A (en) | A kind of network crawler system based on browser plug-in | |
CN113568604B (en) | Method and device for updating wind control strategy and computer readable storage medium | |
CN106156361A (en) | Law enforcement supervision method and device | |
CN109977139A (en) | Data processing method and device based on type of structured query statement | |
CN103886033B (en) | Intelligent vertical searching device and method for safety industry chain | |
CN104462322B (en) | Character string comparison method and device | |
CN108289080A (en) | A kind of methods, devices and systems accessing file system | |
CN109522282A (en) | Picture management method, device, computer installation and storage medium | |
CN103036895B (en) | A kind of status tracking method and system | |
CN116546025A (en) | Cloud computing-based edge data management system | |
US7366722B2 (en) | System and method for specifying application services and distributing them across multiple processors using XML |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231218 Address after: Building A3A4, 6th Floor, Zhong'an Chuanggu Science and Technology Park, No. 900 Wangjiang West Road, Hefei High tech Zone, China (Anhui) Pilot Free Trade Zone, Hefei City, Anhui Province, 230031 Patentee after: Anhui Haima Cloud Technology Co.,Ltd. Address before: Room 2D25, Building 29, No. 89, Heyuan Road, Beijing-Tianjin Science and Technology Valley Industrial Park, Wuqing District, Tianjin 301740 Patentee before: HAIMAYUN (TIANJIN) INFORMATION TECHNOLOGY CO.,LTD. |