Mobile application software release site data acquisition and analysis method
By loading configuration files and initializing multi-process pools, and using asynchronous technology and task queue management, data collection and hierarchical task scheduling for multiple sites with different structures are realized, solving the problem of insufficient data sources and providing convenience for network data analysis. .
Patent Information
- Application Number
- CN202410753560.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-17
AI Technical Summary
The existing technology is difficult to collect data from multiple mobile application software publishing sites with different structures at the same time, and lacks the ability to manage hierarchical task scheduling and large file downloads, leading to the problem of insufficient data sources.
Create global objects by loading configuration files, initialize multi-process process pools and task execution sub-processes, use asynchronous technology and multi-module dynamic loading technology to implement data collection for multiple sites with different structures, and use task queues and coroutine management to collect data. processing and uploading.
It realizes simultaneous data collection and hierarchical task scheduling management for multiple sites with different structures, provides persistent storage of data and uploads to designated platforms, solves the problem of insufficient data sources, and facilitates network data analysis.
Smart Images

Figure CN118656266A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data collection and analysis, and in particular to a method for collecting and analyzing data from a mobile application software publishing site. Background Art
[0002] With the development of mobile smart terminals, the number of corresponding mobile application software continues to grow. While these mobile application software enrich the smart terminal ecosystem, there are also illegal applications mixed in, waiting for opportunities to steal user personal information, spread illegal information, and promote information crimes. In order to promote the rectification of the network environment and crack down on illegal applications, the relevant departments have prepared a mobile application software analysis platform that can identify malicious software, but due to the lack of data sources, there is a dilemma of having production equipment but no production materials.
[0003] Most of the existing data collection solutions can only complete the data collection of a single fixed mobile application software publishing site. Most of the available implementation solutions are simply traversing the site data, and the code becomes invalid due to the update iteration of the target site. Therefore, there is an urgent need for a data collection method that can collect and analyze data from multiple mobile application software publishing sites at the same time and upload qualified mobile application software to the mobile application software analysis platform. Summary of the invention
[0004] The purpose of the present invention is to provide a method for collecting and analyzing data from mobile application software publishing sites, so as to solve the technical problems that the prior art lacks the ability to collect data from multiple mobile application software publishing sites with different structures at the same time, and lacks task hierarchical scheduling management and large file download management.
[0005] It is possible to obtain specific data from multiple mobile application software publishing sites with different structures, download the qualified data for persistent storage, and finally upload the data to the designated platform for analysis.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] A method for collecting and analyzing data from a mobile application software publishing site, the method comprising the following steps:
[0008] Step 101, core control initialization, load configuration files to create global configuration management objects, create system global MySQL access objects through parameters such as database link / connection pool timeout / connection pool size / connection pool polling interval, create system global Redis access objects through parameters such as host address / port / connection password / encoding format / timeout retry interval / idle check interval, create system global FTP operation objects through parameters such as FTP service address / FTP user name / FTP password / FTP storage folder name, create system Web service objects through parameters such as host address / port / SSL certificate / access log / auto-reload to provide data visualization services, create system global log record objects through parameters such as terminal log output level / file log output level / terminal log output format / file log output format, etc.;
[0009] Step 102, loading the main controller, initializing the multi-process pool according to the multi-process pool parallelism set in the system configuration, creating one or more task execution sub-processes and one data processing sub-process;
[0010] Step 103, the task execution subprocess loads the respective control modules according to the configuration files of different targets, checks the database initialization, and instantiates the task queue module, preprocessing module, task concurrent management module, execution module and post-processing module;
[0011] Step 104, the data processing sub-process waits to obtain the return data submitted by the task execution sub-process from the data return queue, stores the return data persistently, saves the ordinary text data to the database and uploads the binary file to FTP, obtains the keyword list from the database, confirms whether the target data contains the keyword, and uploads the data to the specified platform if it contains the keyword.
[0012] Furthermore, the specific process of step 104 is as follows:
[0013] Step 202, execute the preprocessing module, create a starting task list according to the monitoring point list configured by the system and add it to the task queue. The starting task has parameters such as simulation request header / browser operation object / request proxy address / callback function / callback additional parameters / request mode / request body / SSL verification / execution delay / request timeout according to the requirements of different tasks;
[0014] Step 203, enter the task concurrency management module, and create one or more task execution coroutines, a data recovery coroutine, and a queue status reporting coroutine according to the concurrency configuration;
[0015] Step 204, the task execution coroutine obtains the highest priority task in the current queue from the task queue and executes it, the main purpose of which is to obtain the target monitoring point page raw data or the target binary file download link through browser automation request / terminal emulation request and pass it to the post-processing module;
[0016] Step 205, the post-processing module parses the task execution result, extracts valid data with the help of tools such as regular expressions / HTML text parser / JSON encoder / JSON decoder, analyzes and organizes it into a unified format and returns it to the result queue, and creates a new crawling task based on the result and adds it to the task queue, obtains a keyword list from the database for data screening, and if it is found that the data contains keywords and meets the file download requirements, creates one or more high-priority file download tasks and adds them to the queue, and finally adds the newly added data to the Bloom filter according to the uniqueness principle to prevent duplicate tasks;
[0017] Step 206, the post-processing module obtains the network connection of the file download task, reads relevant data, creates a file stream, opens the local temporary cache file IO, reads data through the file stream and directly writes it into the local temporary cache file, verifies the data integrity according to the relevant data after the data is written, and uploads the file to the designated FTP server for persistent storage;
[0018] Step 207, the data recovery coroutine obtains the returned data from the result queue and stores it directly in the local database or submits it to the result queue of the upper process according to the module settings;
[0019] Step 208, the queue status reporting coroutine periodically obtains the task queue status and saves the result to a log file. If the task queue does not change for a long time, an alarm log is issued.
[0020] It can realize data collection for multiple sites with different structures at the same time, and carry out hierarchical task scheduling management.
[0021] The present invention has the following beneficial effects due to the adoption of the above technical solution:
[0022] The present invention creates targeted data collection subprocesses by preparing corresponding configuration files for different targets, thereby realizing a method for a single system to simultaneously collect data from multiple mobile application software publishing sites with different structures. The asynchronous technology is used in the subprocess to realize the concurrent execution of multiple tasks, and the multi-module dynamic loading technology is used to realize the execution of corresponding post-processing modules for different task contents, which provides great flexibility for program execution. At the same time, the present invention has the functions of data interaction between upper and lower processes and task queue status monitoring. The present invention can quickly realize the function of simultaneously collecting data from multiple network sites with different structures, solves the problem of insufficient data source when doing data analysis, and provides great convenience for network data analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart of the method of the present invention;
[0024] Figure 2 It is a flow chart of executing sub-processes of the present invention.
[0025] Figure 3 It is the terminal monitoring diagram of the present invention.
[0026] Figure 4 It is a data visualization diagram of the present invention.
[0027] Figure 5 It is a table diagram of output data of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and preferred embodiments. However, it should be noted that many details listed in the specification are only for the purpose of enabling the reader to have a thorough understanding of one or more aspects of the present invention, and these aspects of the present invention can be implemented even without these specific details.
[0029] like Figure 1 As shown, a method for collecting and analyzing data from a mobile application software publishing site comprises the following steps:
[0030] Step 101, core control initialization, load configuration files to create global configuration management objects, create system global MySQL access objects through parameters such as database link / connection pool timeout / connection pool size / connection pool polling interval, create system global Redis access objects through parameters such as host address / port / connection password / encoding format / timeout retry interval / idle check interval, create system global FTP operation objects through parameters such as FTP service address / FTP user name / FTP password / FTP storage folder name, create system Web service objects through parameters such as host address / port / SSL certificate / access log / auto-reload to provide data visualization services, create system global log record objects through parameters such as terminal log output level / file log output level / terminal log output format / file log output format, etc.;
[0031] Step 102, loading the main controller, initializing the multi-process pool according to the multi-process pool parallelism set in the system configuration, creating one or more task execution sub-processes and one data processing sub-process;
[0032] Step 103, the task execution subprocess loads the respective control modules according to the configuration files of different targets, checks the database initialization, and instantiates the task queue module, preprocessing module, task concurrent management module, execution module and post-processing module;
[0033] Step 104, the data processing sub-process waits to obtain the return data submitted by the task execution sub-process from the data return queue, stores the return data persistently, saves the ordinary text data to the database and uploads the binary file to FTP, obtains the keyword list from the database, confirms whether the target data contains the keyword, and uploads the data to the specified platform if it contains the keyword.
[0034] The specific process of step 104 is:
[0035] Step 202, execute the preprocessing module, create a starting task list according to the monitoring point list configured by the system and add it to the task queue. The starting task has parameters such as simulation request header / browser operation object / request proxy address / callback function / callback additional parameters / request mode / request body / SSL verification / execution delay / request timeout according to the requirements of different tasks;
[0036] Step 203, enter the task concurrency management module, and create one or more task execution coroutines, a data recovery coroutine, and a queue status reporting coroutine according to the concurrency configuration;
[0037] Step 204, the task execution coroutine obtains the highest priority task in the current queue from the task queue and executes it, the main purpose of which is to obtain the target monitoring point page raw data or the target binary file download link through browser automation request / terminal emulation request and pass it to the post-processing module;
[0038] Step 205, the post-processing module parses the task execution result, extracts valid data with the help of tools such as regular expressions / HTML text parser / JSON encoder / JSON decoder, analyzes and organizes it into a unified format and returns it to the result queue, and creates a new crawling task based on the result and adds it to the task queue, obtains a keyword list from the database for data screening, and if it is found that the data contains keywords and meets the file download requirements, creates one or more high-priority file download tasks and adds them to the queue, and finally adds the newly added data to the Bloom filter according to the uniqueness principle to prevent duplicate tasks;
[0039] Step 206, the post-processing module obtains the network connection of the file download task, reads relevant data, creates a file stream, opens the local temporary cache file IO, reads data through the file stream and directly writes it into the local temporary cache file, verifies the data integrity according to the relevant data after the data is written, and uploads the file to the designated FTP server for persistent storage;
[0040] Step 207, the data recovery coroutine obtains the returned data from the result queue and stores it directly in the local database or submits it to the result queue of the upper process according to the module settings;
[0041] Step 208, the queue status reporting coroutine periodically obtains the task queue status and saves the result to a log file. If the task queue does not change for a long time, an alarm log is issued.
[0042] like Figure 3 This is the terminal monitoring diagram. Figure 4 It is a data visualization diagram. Figure 5 It is an output data list chart. By preparing corresponding configuration files for different targets to create targeted data collection sub-processes, a method is implemented in which a single system simultaneously collects data from multiple mobile application software publishing sites with different structures. In the sub-process, asynchronous technology is used to implement multi-task concurrent execution, and multi-module dynamic loading technology is used to implement the execution of corresponding post-processing modules for different task contents, which provides great flexibility for program execution. At the same time, the present invention has the functions of data interaction between upper and lower processes and task queue status monitoring. The present invention can quickly realize the function of simultaneously collecting data from multiple network sites with different structures, solves the problem of insufficient data sources when doing data analysis, and provides great convenience for network data analysis.
[0043] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for collecting and analyzing data from mobile application software publishing sites, characterized by: The method comprises the following steps: Step 101: Initialize the core control and load the system configuration. Step 102: Create one or more task execution subprocesses and one data processing subprocess according to the system configuration; Step 103: The task execution sub-process loads the respective control modules according to the configuration files of different targets, checks the database initialization, and instantiates the task queue module, pre-processing module, task concurrency management module, execution module, and post-processing module; In step 104 , the data processing sub-process waits to obtain the return data submitted by the task execution sub-process from the data return queue, stores the return data persistently, and uploads the data that meets the conditions to the designated platform.
2. The method for collecting and analyzing data from a mobile application software publishing site according to claim 1, characterized in that: The specific process of step 104 is: Step 202: Execute the pre-processing module, create a start task and add it to the task queue; Step 203: Enter the task concurrency management module and create one or more task execution coroutines, a data recovery coroutine, and a queue status reporting coroutine according to the concurrency configuration; Step 204: The task execution coroutine obtains the highest priority task in the current queue from the task queue and executes it; Step 205: The post-processing module parses the task execution results, extracts valid data, analyzes and organizes it into a unified format, and returns it to the result queue. Based on the results, a new task is created and added to the task queue. If eligible data is found and meets the file download requirements, one or more high-priority file download tasks are created and added to the queue. Finally, the newly added data is added to the Bloom filter according to the uniqueness principle to prevent duplicate tasks. Step 206: The post-processing module obtains the network connection for the file download task, reads the relevant data, creates a file stream, opens the local temporary cache file IO, reads the data through the file stream and writes it directly to the local temporary cache file. After the data is written, the data integrity is verified based on the relevant data, and the file is uploaded to the designated FTP server for persistent storage. Step 207: The data recovery process obtains the returned data from the result queue and stores it directly in the database or submits it to the result queue of the parent process according to the module settings; Step 208: The queue status reporting coroutine periodically obtains the task queue status and saves the result to a log file.
3. The method for collecting and analyzing data from a mobile application software publishing site according to claim 1, wherein: The specific process of step 101 is: load the configuration file to create a global configuration management object, create a system-global MySQL access object through the parameters of database link, connection pool timeout, connection pool size and connection pool polling interval, create a system-global Redis access object through the parameters of host address, port, connection password, encoding format, timeout retry interval, and idle check interval, create a system-global FTP operation object through the parameters of FTP service address / FTP user name, FTP password, and FTP storage folder name, create a system-global Web service object to provide data visualization services through the parameters of host address, port, SSL certificate, access log, and automatic reload, and create a system-global log recording object through the parameters of terminal log output level, file log output level, terminal log output format, and file log output format.
4. The method for collecting and analyzing data from a mobile application software publishing site according to claim 1, wherein: In step 102: first load the master controller and initialize the multi-process pool according to the multi-process pool parallelism set in the system configuration.
5. The method for collecting and analyzing data from a mobile application software publishing site according to claim 1, wherein: In step 104: save the ordinary text data to the database and upload the binary file to FTP, obtain the keyword list from the database, confirm whether the target data contains the keyword, and if it does, upload the data to the designated platform.
6. The method for collecting and analyzing data from a mobile application software publishing site according to claim 2, wherein: In step 204, the original data of the target monitoring point page or the download link of the target binary file is obtained through a browser automation request or a terminal emulation request and is passed to the post-processing module.
