WO2019056741A1 - 数据流分析方法、装置、设备及介质 - Google Patents

数据流分析方法、装置、设备及介质 Download PDF

Info

Publication number
WO2019056741A1
WO2019056741A1 PCT/CN2018/082822 CN2018082822W WO2019056741A1 WO 2019056741 A1 WO2019056741 A1 WO 2019056741A1 CN 2018082822 W CN2018082822 W CN 2018082822W WO 2019056741 A1 WO2019056741 A1 WO 2019056741A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
code
web application
interest
probe
Prior art date
Application number
PCT/CN2018/082822
Other languages
English (en)
French (fr)
Inventor
张颖
朱晓旻
苏星
黄罡
姚伟
Original Assignee
北京因特睿软件有限公司
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 北京因特睿软件有限公司 filed Critical 北京因特睿软件有限公司
Priority to US16/314,148 priority Critical patent/US20210224349A1/en
Publication of WO2019056741A1 publication Critical patent/WO2019056741A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis
    • 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/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/74Reverse engineering; Extracting design information from source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3005Arrangements for executing specific machine instructions to perform operations for flow control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms

Definitions

  • the present disclosure relates to data processing techniques, for example, to a data stream analysis method, apparatus, device, and medium.
  • the embodiment of the invention provides a data stream analysis method, device, device and medium, so as to implement data acquisition and analysis of a web application by using different browsers to implement code logic.
  • the embodiment of the invention provides a data stream analysis method, which is applied to a browser end, and the method includes:
  • Determining code logic of the JavaScript code inserting a probe into the JavaScript code according to the code logic, wherein the probe is a piece of code
  • Running the resource file of the insertion probe acquiring, according to the probe, the data in the code logic process by the web application by using the browser, and recording;
  • the web application is analyzed based on the recorded data.
  • obtaining, according to the probe, the data in the code logic process by using the browser by using the browser, and recording includes:
  • the data is normalized and stored.
  • analyzing the web application according to the recorded data includes:
  • the execution situation including the data of interest executing the browser mechanism a situation, wherein the data object of interest is any data object triggered during execution of the web application, the browser mechanism comprising any one of the following: a data cookie stored on a user's local device, asynchronous JavaScript Extensible Markup Language (XML), Web Storage, and DOM event mechanism.
  • XML JavaScript Extensible Markup Language
  • determining, according to the event tree and the acquired data object of interest, execution of the data object of interest in a running process of the web application, where the execution situation includes the data of interest performing the The browser mechanism includes:
  • determining, according to the event tree and the acquired data object of interest, that the execution of the data object in the running process of the web application includes:
  • determining code logic of the JavaScript code inserting a probe into the JavaScript code according to the code logic, including:
  • the resource file corresponding to the JavaScript code is a preset ignore resource file, and if not, determining code logic of the JavaScript code, inserting a probe into the JavaScript code according to the code logic, wherein
  • the default ignore resource file is a resource file that does not require a probe to be inserted.
  • the acquiring the JavaScript code in the resource file corresponding to the web application to be analyzed includes:
  • the embedded JavaScript code is determined according to the set identifier.
  • the embodiment of the invention further provides a data stream analyzing device, which is applied to a browser end, and the device comprises:
  • a code acquisition module configured to obtain a JavaScript code in a resource file corresponding to the web application to be analyzed
  • a logic determination module configured to determine code logic of the JavaScript code, inserting a probe into the JavaScript code according to the code logic, wherein the probe is a piece of code;
  • a data acquisition module configured to run the resource file of the insertion probe, obtain the data in the logic process of the web application by using the browser according to the probe, and record the data;
  • a data analysis module is configured to analyze the web application based on the recorded data.
  • An embodiment of the present invention further provides an apparatus, where the apparatus includes:
  • One or more processors are One or more processors;
  • a storage device for storing one or more programs
  • the one or more programs are executed by the one or more processors such that the one or more processors implement the data stream analysis method as described above.
  • Embodiments of the present invention also provide a computer storage medium having stored thereon a computer program that, when executed by a processor, implements the data stream analysis method as described above.
  • the web application is inserted into the JavaScript code corresponding to the web application to be analyzed, and the web application is used to implement data acquisition in the code logic process, and the web application is analyzed according to the acquired data. Because the probe is inserted in the source code, this method can be applied to browsers with different characteristics. Moreover, since the data in the corresponding code logic process is automatically acquired through the inserted probe, the problem of using the conventional insertion breakpoint, monitoring variables, etc. to track the debug data is solved, which causes inefficient and time-consuming problems.
  • FIG. 1 is a flowchart of a data flow analysis method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a data flow analysis method provided by an embodiment
  • FIG. 3 is a flowchart of a data stream acquisition part in another data stream analysis method according to an embodiment
  • FIG. 4 is a flowchart of a data flow analysis part in another data stream analysis method provided by an embodiment
  • FIG. 5 is a schematic structural diagram of a data stream analyzing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
  • the data flow analysis scheme is mainly divided into the following two types, and has the following defects:
  • the first scheme uses some methods in the field of program analysis and constraint solving to perform unified static analysis or dynamic analysis on JavaScript code.
  • the high dynamic nature of JavaScript code makes static program analysis techniques such as static program slicing and side-effect analysis techniques difficult to effectively apply to the analysis of JavaScript code.
  • static program analysis techniques such as static program slicing and side-effect analysis techniques difficult to effectively apply to the analysis of JavaScript code.
  • unified dynamic analysis methods cannot analyze different characteristics of the browser, which leads to limitations in the analysis of the program.
  • the second option is for developers to use the front-end debugging tools such as the Google Developer Toolkit or Firebug in the browser to track and debug the web application front end.
  • front-end debugging tools such as the Google Developer Toolkit or Firebug in the browser to track and debug the web application front end.
  • FIG. 1 is a flowchart of a data flow analysis method according to an embodiment of the present invention. This embodiment is applicable to the case of analyzing data in a code logic process by means of a browser. The method is applied to the browser side and can be executed by a data stream analyzing device, and the device can be implemented by at least one of software and hardware.
  • a data flow analysis method provided by this embodiment includes:
  • the process of acquiring the JavaScript code in the resource file corresponding to the web application to be analyzed may include:
  • the code therein may be obtained
  • the embedded JavaScript code can be determined according to the setting identifier.
  • HTML Hyper Text Markup Language
  • code logic of the JavaScript code is determined, and a probe is inserted in the JavaScript code according to the code logic.
  • the probe may be a piece of code for checking the execution of the JavaScript code, the change of the variable, and the like.
  • the code logic can be assignment logic, loop logic, judgment logic, etc.
  • code logic can be performed on the JavaScript code in all resources, and the probe is inserted. This enables coverage of all code logic, which in turn improves the integrity of data analysis.
  • determining code logic of the JavaScript code inserting a probe into the JavaScript code according to the code logic, comprising:
  • the preset ignore resource file may be a resource file that does not need to be inserted into the probe.
  • it may be a preset resource file that does not care, or a resource file that does not help analysis of the web application, or a resource file that already knows the data logic therein.
  • the resource file may be skipped and the judgment of other resource files may be continued.
  • the effect may be achieved: because the logic of the data in the default ignore resource file is not concerned, the default ignore resource file is The JavaScript code does not judge the logic of the code, nor does it insert the probe. This saves the JavaScript code in the default ignore resource file, the logic of the code and the time of probe insertion.
  • acquiring data in the code logic process by using the browser according to the probe may be data in the execution process of the code logic, and the data may include a function name, a method name, The parameters passed in the call and the statements in the callback function.
  • the web application is analyzed based on the recorded data.
  • the web application in the data acquired by the probe can implement data processing logic executed on the browser side by using the browser to implement data in the code logic process.
  • a data stream analysis method provided by an embodiment of the present invention, by inserting a probe into a JavaScript code corresponding to a web application to be analyzed, implementing a web application to obtain data in a code logic process by using a browser, according to the probe
  • the acquired data is analyzed for the web application. Because the probe is inserted in the source code, this method can be applied to browsers with different characteristics. Moreover, since the data in the corresponding code logic process is automatically acquired through the inserted probe, the problem of using traditional insertion breakpoints, monitoring variables, and the like to view the data is solved, which causes inefficient and time-consuming problems.
  • FIG. 2 is a flowchart of a data flow analysis method according to an embodiment of the present invention.
  • the data flow analysis method provided in this embodiment includes:
  • the type of the resource file is determined, and if the resource file is a JavaScript file, the code therein is obtained.
  • the embedded JavaScript code is determined according to the setting identifier.
  • the resource file of the insertion probe is run, and data included in the code logic process by the web application by using the browser is acquired according to the probe.
  • the web application is acquired according to the probe to implement data in the code logic process by using the browser.
  • the above data includes a Document Object Model (DOM) tree node of a user's operation event and operation event.
  • DOM Document Object Model
  • the preset analysis code can be set as needed, which is not limited in this embodiment.
  • normalization is to convert data of different formats into a unified data format.
  • the data is read, and the entire event tree is reconstructed based on the data object in the data, the generation time of the data object, the input of the data object, and the output of the data object.
  • the data source and the data direction can be associated, and the execution flow of the data can be determined by the data object generation time, and the entire event tree can be reconstructed according to the data direction and the data execution process.
  • the data object of interest may be any data object triggered during the execution of the web application, and may be set as needed.
  • the browser mechanism includes: a data cookie stored on a user's local device, asynchronous JavaScript, XML (Asynchronous JavaScript and XML, Ajax), Web Storage, Document Object Model (DOM) event mechanism.
  • determining, according to the event tree and the acquired data object of interest, the execution of the data object of interest in the running process of the web application comprises:
  • the reachable set is a series of associated data objects including the data object of interest.
  • the reachable set can determine the source and destination of the data object of interest. According to this, it is possible to analyze the data object of interest in the web application to be analyzed.
  • determining, according to the event tree and the acquired data object of interest, the execution of the data object of interest in the running process of the web application comprises:
  • the data of interest may be a certain parameter, which can be obtained through user input.
  • the execution of the data of interest in the running process of the web application may specifically be an object that the data of interest passes during the running of the web application, an operation performed, a function called, and the like. According to this, it is possible to analyze the data of interest in the web application to be analyzed.
  • the data flow analysis method may also be described as: determining a web application to be analyzed; obtaining a resource file returned by the server based on a web application's home page; determining a type of the resource file, if the resource is The file is a JavaScript file, and the JavaScript code is obtained; if the resource file is an HTML file, the embedded JavaScript code is determined according to the setting identifier; and the code logic of the JavaScript code is determined according to the code logic.
  • Insert the probe into the JavaScript code use the preset analysis code in the browser to parse the DOM tree, analyze and record the user operation events, user data and data flow direction; normalize the data generated by the preset analysis code;
  • the resource file returned by the server based on other associated pages of the web application is returned to continue execution, and the type of the resource file is determined. If the resource file is a JavaScript file, the step of acquiring the JavaScript code therein is performed.
  • the analysis process of the web application to be analyzed by using the data generated by the preset analysis code may be described as: reading data generated by the preset analysis code, according to the data object in the data, the generation time of the data object, and the data.
  • the input of the object and the output of the data object reconstruct the entire event tree; the data flow is enumerated in the event tree based on the data tag or data value, indicating the entire data flow process.
  • the data flow analysis method provided by the implementation of the invention can realize the custom analysis of the data acquired by the probe through the preset analysis code in the browser; and at the same time, reconstruct the entire event tree by using the data acquired by the probe, An overall analysis of the event of interest or data of interest can be achieved based on the entire event tree.
  • FIG. 5 is a schematic structural diagram of a data stream analyzing apparatus according to an embodiment of the present invention.
  • the data stream analyzing apparatus provided in this embodiment includes: a code acquiring module 10, a logic determining module 20, a data acquiring module 30, and a data analyzing module 40.
  • the code obtaining module 10 is configured to obtain a JavaScript code in a resource file corresponding to the web application to be analyzed;
  • a logic determining module 20 configured to determine code logic of the JavaScript code, inserting a probe into the JavaScript code according to the code logic, wherein the probe is a piece of code;
  • the data acquisition module 30 is configured to run the resource file of the insertion probe, obtain the data in the logic process of the web application by using the browser according to the probe, and record the data;
  • the data analysis module 40 is configured to analyze the web application based on the recorded data.
  • the data obtaining module 30 is specifically configured to:
  • the data analysis module 40 is specifically configured to:
  • the data reading unit 401 is configured to read the recorded data
  • the event tree reconstruction unit 402 is configured to reconstruct an entire event tree according to the data object in the data, the generation time of the data object, the input of the data object, and the output of the data object;
  • a situation determining unit 403 configured to determine an execution of the data object of interest in an operation process of the web application based on the event tree and the acquired data object of interest, the execution situation including the data of interest
  • the object executes the browser mechanism, wherein the data object of interest is any data object triggered during execution of the web application, and the browser mechanism includes any one of the following: stored in a user local device Data cookies, asynchronous JavaScript and XML, Web Storage, DOM event mechanisms.
  • the situation determining unit 403 is specifically configured to:
  • the node has a data object corresponding to the node of at least one of the direct relationship and the indirect relationship; determining, according to the data object, a reachable set of the data object of interest, wherein the reachable set is a data object including the data object of interest Associated data objects.
  • the situation determining unit 403 is specifically configured to:
  • the logic determining module 20 is specifically configured to:
  • the resource file corresponding to the JavaScript code is a preset ignore resource file, and if not, determining code logic of the JavaScript code, inserting a probe into the JavaScript code according to the code logic, wherein
  • the default ignore resource file is a resource file that does not require a probe to be inserted.
  • the code obtaining module 10 is specifically configured to:
  • a data stream analyzing apparatus by inserting a probe into a JavaScript code corresponding to a web application to be analyzed, implementing a web application to obtain data in a code logic process by using a browser, according to the acquired Data is analyzed for web applications. Because the probe is inserted in the source code, this method can be applied to browsers with different characteristics. Moreover, since the data in the corresponding code logic process is automatically acquired through the inserted probe, the problem of using the conventional insertion breakpoint, monitoring variables, etc. to track the debug data is solved, which causes inefficient and time-consuming problems.
  • FIG. 6 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
  • the apparatus includes a processor 70, a memory 71, an input device 72, and an output device 73.
  • the output device 73 includes the embodiment of the present invention. Any of the browsers; the number of processors 70 in the device may be one or more, and one processor 70 is taken as an example in FIG. 6; the processor 70, the memory 71, the input device 72, and the output device 73 in the device It can be connected by bus or other means, and the connection by bus is taken as an example in FIG.
  • the memory 71 is used as a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions or modules corresponding to the data stream analysis method in the embodiment of the present invention (for example, the data stream analyzing device includes The code acquisition module 10, the logic determination module 20, the data acquisition module 30, and the data analysis module 40).
  • the processor 70 executes various functional applications and data processing of the device by executing software programs, instructions, and modules stored in the memory 71, that is, implementing the above-described data stream analysis method.
  • the memory 71 may mainly include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the device, and the like. Further, the memory 71 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some examples, memory 71 may further include memory remotely located relative to processor 70, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • An apparatus by inserting a probe into a JavaScript code corresponding to a web application to be analyzed, implementing a web application to obtain data in a code logic process by using a browser, and using the acquired data to the web
  • the application is analyzed. Because the probe is inserted in the source code, this method can be applied to browsers with different characteristics. Moreover, since the data in the corresponding code logic process is automatically acquired through the inserted probe, the problem of using the conventional insertion breakpoint, monitoring variables, etc. to track the debug data is solved, which causes inefficient and time-consuming problems.
  • Embodiments of the present invention also provide a storage medium including computer executable instructions for performing a data stream analysis method when executed by a computer processor, the method comprising:
  • Determining code logic of the JavaScript code inserting a probe into the JavaScript code according to the code logic, wherein the probe is a piece of code
  • Running the resource file of the insertion probe acquiring, according to the probe, the data in the code logic process by the web application by using the browser, and recording;
  • the web application is analyzed based on the recorded data.
  • a storage medium containing computer executable instructions the computer executable instructions are not limited to the method operations as described above, and may also be executed in the data stream analysis method provided by any embodiment of the present invention. Related operations.
  • the present invention can be implemented by software and necessary general hardware, and can also be implemented by hardware, but in many cases, the former is a better implementation. .
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk of a computer. , Read-Only Memory (ROM), Random Access Memory (RAM), Flash (FLASH), hard disk or optical disk, etc., including a number of instructions to make a computer device (can be a personal computer)
  • the server, or network device, etc. performs the methods described in various embodiments of the present invention.
  • each unit and module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding function can be implemented;
  • the specific names of the units are also for convenience of distinguishing from each other and are not intended to limit the scope of the present invention.
  • the embodiment of the invention is applicable to browsers with different characteristics, and solves the problem of using the traditional insertion breakpoints, monitoring variables and the like to track the debugging data, resulting in inefficient and time-consuming problems, and realizing the web application by means of a browser. Acquisition and analysis of data in the code logic process.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Information Transfer Between Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

公开了一种数据流分析方法、装置、设备及介质,涉及数据处理技术。该方法包括:获取待分析的web应用对应的资源文件中的JavaScript代码;判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中所述探针是一段代码;运行插入探针的所述资源文件,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录;根据记录的数据对所述web应用进行分析。

Description

数据流分析方法、装置、设备及介质 技术领域
本公开涉及数据处理技术,例如涉及一种数据流分析方法、装置、设备及介质。
背景技术
现如今大型与复杂前端的网页全球广域网(World Wide Web,Web)应用非常普及,然而对于这些复杂Web应用,实现应用功能的一部分业务逻辑与数据处理逻辑是借助浏览器运行实现的,因此无法直接从服务器返回的网页文档中提取Web应用执行过程中的所有数据。例如,Web应用的视图就是通过浏览器中的JavaScript引擎对相应JavaScript代码的转译运行进行渲染得到,其中渲染数据是无法直接从服务器返回的网页文档中提取的。
因此,在相关数据流处理过程中,由于获取的数据缺乏完整性,导致了数据流分析工作无法正常进行。
发明内容
本发明实施例提供一种数据流分析方法、装置、设备及介质,以实现对web应用借助不同浏览器实现代码逻辑过程中的数据的获取和分析。
本发明实施例提供了一种数据流分析方法,应用于浏览器端,该方法包括:
获取待分析的web应用对应的资源文件中的JavaScript代码;
判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中所述探针是一段代码;
运行插入探针的所述资源文件,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录;
根据记录的数据对所述web应用进行分析。
可选的,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录包括:
基于浏览器中的预设分析代码,根据所述探针,获取所述web应用借助所述浏览器实现代码逻辑过程中的数据;
将所述数据进行归一化,并存储。
可选的,根据记录的数据对所述web应用进行分析包括:
读取记录的数据;
根据所述数据中的数据对象、数据对象的产生时间、数据对象的输入和数据对象的输出,重构整个事件树;
基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况,所述执行情况包括所述感兴趣数据执行所述浏览器机制的情况,其中,所述感兴趣数据对象为所述web应用执行过程中触发的任一数据对象,所述浏览器机制包括下述任意一项:储存在用户本地设备上的数据Cookie、异步的JavaScript、可扩展的标记语言(Extensible Markup Language,XML)、Web Storage、以及DOM事件机制。
可选的,基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况,所述执行情况包括所述感兴趣数据执行所述浏览器机制的情况包括:
确定所述感兴趣数据对象在所述事件树中对应的节点,并将所述节点作为当前节点;
基于所述事件树,以所述当前节点为基准,向前和向后遍历与所述当前节点存在直接关系和间接关系中至少一种的节点对应的数据对象;
根据所述数据对象确定所述感兴趣数据对象的可达集合,其中,所述可达集合为包含感兴趣数据对象在内的关联数据对象。
可选的,基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况包括:
获取感兴趣数据;
根据所述感兴趣数据,确定所述感兴趣数据所在的感兴趣数据对象对应的节点;
根据所述节点和所述事件树,确定所述感兴趣数据在所述web应用的运行过程中的执行情况。
可选的,判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,包括:
判断所述JavaScript代码对应的资源文件是否是预设的忽略资源文件,若否,则判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代 码中插入探针,其中,所述预设的忽略资源文件为不需要插入探针的资源文件。
可选的,所述获取待分析的web应用对应的资源文件中的JavaScript代码包括:
获取待分析的web应用对应的服务器返回的相关的资源文件;
判断所述资源文件的类型,若所述资源文件是JavaScript文件,则获取其中的代码;
若所述资源文件是超文本标记语言HTML文件,则根据设定标识确定内嵌的JavaScript代码。
本发明实施例还提供了一种数据流分析装置,应用于浏览器端,该装置包括:
代码获取模块,设置为获取待分析的web应用对应的资源文件中的JavaScript代码;
逻辑判断模块,设置为判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中所述探针是一段代码;
数据获取模块,设置为运行插入探针的所述资源文件,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录;
数据分析模块,设置为根据记录的数据对所述web应用进行分析。
本发明实施例还提供了一种设备,所述设备包括:
一个或多个处理器;
如上所述的浏览器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上所述的数据流分析方法。
本发明实施例还提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上所述的数据流分析方法。
本发明实施例通过在获取的待分析的web应用对应的JavaScript代码中,插入探针实现web应用借助浏览器实现代码逻辑过程中的数据的获取,根据获取的数据对web应用进行分析。因为是在源代码中插入探针,所以该方法能适用于具有不同特性的浏览器。又因为通过插入的探针自动获取对应代码逻辑过程中的数据,所以解决了使用传统的插入断点、监视变量等方式来跟踪调试数 据,造成的低效和耗时的问题。
附图说明
图1为一发明实施例提供的一种数据流分析方法的流程图;
图2是另一发明是实施例提供的一种数据流分析方法的流程图;
图3是一发明是实施例提供的另一种数据流分析方法中的数据流获取部分的流程图;
图4是一发明是实施例提供的另一种数据流分析方法中的数据流分析部分的流程图;
图5是一发明实施例提供的一种数据流分析装置的结构示意图;
图6为一发明实施例提供的一种设备的结构示意图。
具体实施方式
目前,数据流分析方案主要分为以下两种,存在如下缺陷:
第一种方案使用了程序分析与约束求解领域中的一些方法,对JavaScript代码进行统一的静态分析或者动态分析。JavaScript代码的高度动态性使得静态程序分析手段如静态程序切片技术与副作用分析技术难以有效应用于JavaScript代码的分析。因为不同浏览器具有不同的特性,统一的动态分析手段无法针对浏览器的不同特性进行分析,从而导致该方案的分析存在局限性。
第二种方案是让开发者在浏览器中使用前端调试工具如谷歌开发者工具包或Firebug对Web应用前端进行跟踪调试。但使用传统的插入断点、监视变量等方式跟踪查看数据的流向以进行调试的方法,也非常低效与耗时。
图1为一发明实施例提供的一种数据流分析方法的流程图。本实施例可适用于对借助浏览器实现代码逻辑过程中的数据进行分析的情况。该方法应用于浏览器端,可以由一种数据流分析装置来执行,该装置可以由软件和硬件中至少一项的方式实现。参见图1,本实施例提供的一种数据流分析方法包括:
在S110中,获取待分析的web应用对应的资源文件中的JavaScript代码。
在一实施例中,获取待分析的web应用对应的资源文件中的JavaScript代码过程可以包括:
获取用户确定的待分析web应用的统一资源标识符;
根据上述统一资源标识符,发送请求给上述web应用对应的服务器;
接收所述服务器返回的网页数据;
解析所述网页数据,根据解析结果请求相关的资源文件;
接收服务器返回的所述资源文件;
判断所述资源文件的类型,若所述资源文件是JavaScript文件,则可以获取其中的代码;
若所述资源文件是超文本标记语言(Hyper Text Markup Language,HTML)文件,则可以根据设定标识确定内嵌的JavaScript代码。
在S120中,判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针。
其中,所述探针可以是一段代码,用于实现对JavaScript代码的执行、变量的变化等情况进行检查。代码逻辑可以是赋值逻辑、循环逻辑、判断逻辑等,代码逻辑可以通过对应函数或符号进行判断,例如识别到“=”的符号,则判断为赋值逻辑;识别到“if”,则判断为判断逻辑。
可选的,为了提高覆盖率,可以对全部资源中的JavaScript代码进行代码逻辑的判断,并进行探针的插入。从而实现对所有代码逻辑的覆盖,进而提高数据分析的完整性。
在一实施例中,判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,包括:
判断所述JavaScript代码对应的资源文件是否是预设的忽略资源文件,若否,则判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针。
可选的,预设的忽略资源文件可以是不需要插入探针的资源文件。例如可以是预设的不关心的资源文件,或者对web应用的分析没有帮助的资源文件,或者已经知道其中的数据逻辑的资源文件。在判断所述JavaScript代码对应的资源文件是预设的忽略资源文件后,可以将该资源文件跳过,继续执行对其他资源文件的判断。
通过判断所述JavaScript代码对应的资源文件是否是预设的忽略资源文件,可以是实现这样的效果:因为对预设的忽略资源文件中的数据逻辑不关心,所以对预设的忽略资源文件中的JavaScript代码不进行代码逻辑的判断,也不进行探针的插入。从而节省了对预设的忽略资源文件中的JavaScript代码,进行代码 逻辑的判断和探针插入的时间。
在S130中,运行插入探针的所述资源文件,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录。
在一实施例中,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,可以是上述代码逻辑执行过程中的数据,该数据可以包括函数名、方法名、调用中传递的参数及回调函数中的语句。
在S140中,根据记录的数据对所述web应用进行分析。
在一实施例中,通过所述探针获取的数据中的所述web应用借助所述浏览器实现代码逻辑过程中的数据,可以实现对在浏览器端执行的数据处理逻辑进行分析。
本发明实施例提供的一种数据流分析方法,通过在获取的待分析的web应用对应的JavaScript代码中,插入探针实现web应用借助浏览器实现代码逻辑过程中的数据的获取,根据探针获取的数据进行对web应用进行分析。因为是在源代码中插入探针,所以该方法能适用于具有不同特性的浏览器。又因为通过插入的探针自动获取对应代码逻辑过程中的数据,所以解决了使用传统的插入断点、监视变量等方式来查看数据,造成的低效和耗时的问题。
图2是一本发明是实施例提供的一种数据流分析方法的流程图。参见图2,本实施例提供的数据流分析方法包括:
在S210中,获取待分析web应用对应的服务器返回的资源文件。
在S220中,判断所述资源文件的类型,若所述资源文件是JavaScript文件,则获取其中的代码。
在S230中,若所述资源文件是HTML文件,则根据设定标识确定内嵌的JavaScript代码。
在S240中,判断所述JavaScript代码对应的资源文件是否是预设的忽略资源文件,若否,则判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针。
在S250中,运行插入探针的所述资源文件,根据所述探针获取包括所述web应用借助所述浏览器实现代码逻辑过程中的数据。
在S260中,基于浏览器中的预设分析代码,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据。
其中,上述数据包括用户的操作事件和操作事件的文档对象模型(Document Object Model,DOM)树节点。预设分析代码可以根据需要进行设定,本实施例对此并不进行限定。
在S270中,将所述数据进行归一化,并存储。
其中,归一化为将不同格式的数据转为统一的数据格式。
在S280中,读取所述数据,根据所述数据中的数据对象、数据对象的产生时间、数据对象的输入和数据对象的输出,重构整个事件树。
在一实施例中,通过数据对象的输入和输出,可以关联出数据来源和数据去向,通过数据对象的产生时间可以确定数据的执行流程,根据数据去向和数据的执行流程可以重构整个事件树。
在S290中,基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况,所述执行情况包括所述感兴趣数据对象执行所述浏览器机制的情况。
其中,感兴趣数据对象可以是上述web应用执行过程中触发的任一数据对象,具体可以根据需要设定。所述浏览器机制包括:储存在用户本地设备上的数据Cookie、异步的JavaScript、XML(Asynchronous JavaScript and XML,Ajax)、Web Storage、文档对象模型(Document Object Model,DOM)事件机制。
在一实施例中,基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况包括:
确定所述感兴趣数据对象在所述事件树中对应的节点,并将所述节点作为当前节点;
基于所述事件树,以所述当前节点为基准,向前和向后遍历与所述当前节点存在直接关系和间接关系中至少一种的节点对应的数据对象;
根据所述数据对象确定所述感兴趣数据对象的可达集合。
其中,可达集合为包含感兴趣数据对象在内的一系列关联数据对象。通过可达集合可以确定感兴趣数据对象的来源和去向。据此,可以实现对待分析web应用中的感兴趣数据对象进行分析。
在一实施例中,基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况包括:
获取感兴趣数据;
根据所述感兴趣数据,确定所述感兴趣数据所在的感兴趣数据对象对应的节点;
根据所述节点和所述事件树,确定所述感兴趣数据在所述web应用的运行过程中的执行情况。
其中,感兴趣数据可以具体是某个参数,可以通过用户的输入获得。所述感兴趣数据在所述web应用的运行过程中的执行情况,具体可以是所述感兴趣数据在所述web应用的运行过程中经过的对象、进行的运算、调用的函数等。据此,可以实现对待分析web应用中的感兴趣数据进行分析。
在实际应用中,参见图3,数据流分析方法还可以描述为:确定待分析web应用;获取服务器返回的,基于web应用的首页的资源文件;判断所述资源文件的类型,若所述资源文件是JavaScript文件,则获取其中的JavaScript代码;若所述资源文件是HTML文件,则根据设定标识确定内嵌的JavaScript代码;判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针;利用浏览器中的预设分析代码,解析DOM树,分析记录用户操作事件、用户数据及数据流向;将预设分析代码产生的数据进行归一化存储;若获取到服务器返回的,基于web应用的其他关联页面的资源文件,则返回继续执行,判断所述资源文件的类型,若所述资源文件是JavaScript文件,则获取其中的JavaScript代码的步骤。
参见图4,在利用预设分析代码产生的数据对待分析web应用的分析过程可以描述为:读取预设分析代码产生的数据,根据所述数据中的数据对象、数据对象的产生时间、数据对象的输入和数据对象的输出,重构整个事件树;根据数据标记或数据值在事件树中枚举数据流向,表明整个数据流过程。从而实现对待分析web应用中数据流的分析。
本发明实施提供的一种数据流分析方法,通过浏览器中的预设分析代码可以实现对探针获取的数据进行自定义分析;同时,通过根据探针获取的数据,重构整个事件树,基于整个事件树可以实现对感兴趣事件或感兴趣数据的整体分析。
图5是一本发明实施例提供的一种数据流分析装置的结构示意图。参见图5,本实施例提供的数据流分析装置包括:代码获取模块10、逻辑判断模块20、数据获取模块30和数据分析模块40。
代码获取模块10,设置为获取待分析的web应用对应的资源文件中的JavaScript代码;
逻辑判断模块20,设置为判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中所述探针是一段代码;
数据获取模块30,设置为运行插入探针的所述资源文件,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录;
数据分析模块40,设置为根据记录的数据对所述web应用进行分析。
可选的,所述数据获取模块30具体设置为:
基于所述浏览器中的预设分析代码,根据所述探针,获取所述web应用借助所述浏览器实现代码逻辑过程中的数据;将所述数据进行归一化,并存储。
可选的,所述数据分析模块40具体设置为:
数据读取单元401,设置为读取记录的数据;
事件树重构单元402,设置为根据所述数据中的数据对象、数据对象的产生时间、数据对象的输入和数据对象的输出,重构整个事件树;
情况确定单元403,设置为基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况,所述执行情况包括所述感兴趣数据对象执行所述浏览器机制的情况,其中,所述感兴趣数据对象为所述web应用执行过程中触发的任一数据对象,所述浏览器机制包括下述任意一项:储存在用户本地设备上的数据Cookie、异步的JavaScript和XML、Web Storage、DOM事件机制。
可选的,情况确定单元403具体设置为:
确定所述感兴趣数据对象在所述事件树中对应的节点,并将所述节点作为当前节点;基于所述事件树,以所述当前节点为基准,向前和向后遍历与所述当前节点存在直接关系和间接关系中至少一种的节点对应的数据对象;根据所述数据对象确定所述感兴趣数据对象的可达集合,其中,所述可达集合为包含感兴趣数据对象在内的关联数据对象。
可选的,情况确定单元403具体设置为:
获取感兴趣数据;根据所述感兴趣数据,确定所述感兴趣数据所在的感兴趣数据对象对应的节点;根据所述节点和所述事件树,确定所述感兴趣数据在所述web应用的运行过程中的执行情况。
可选的,所述逻辑判断模块20具体设置为:
判断所述JavaScript代码对应的资源文件是否是预设的忽略资源文件,若否,则判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中,所述预设的忽略资源文件为不需要插入探针的资源文件。
可选的,所述代码获取模块10具体设置为:
获取待分析的web应用对应的服务器返回的相关的资源文件;判断所述资源文件的类型,若所述资源文件是JavaScript文件,则获取其中的代码;若所述资源文件是超文本标记语言HTML文件,则根据设定标识确定内嵌的JavaScript代码。
本发明实施例提供的一种数据流分析装置,通过在获取的待分析的web应用对应的JavaScript代码中,插入探针实现web应用借助浏览器实现代码逻辑过程中的数据的获取,根据获取的数据对web应用进行分析。因为是在源代码中插入探针,所以该方法能适用于具有不同特性的浏览器。又因为通过插入的探针自动获取对应代码逻辑过程中的数据,所以解决了使用传统的插入断点、监视变量等方式来跟踪调试数据,造成的低效和耗时的问题。
图6为一发明实施例提供的一种设备的结构示意图,如图6所示,该设备包括处理器70、存储器71、输入装置72和输出装置73,其中输出装置73包括本发明实施例中任一所述的浏览器;设备中处理器70的数量可以是一个或多个,图6中以一个处理器70为例;设备中的处理器70、存储器71、输入装置72和输出装置73可以通过总线或其他方式连接,图6中以通过总线连接为例。
存储器71作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本发明实施例中的数据流分析方法对应的程序指令或模块(例如,数据流分析装置中包括的代码获取模块10、逻辑判断模块20、数据获取模块30和数据分析模块40)。处理器70通过运行存储在存储器71中的软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述的数据流分析方法。
存储器71可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据设备的使用所创建的数据等。此外,存储器71可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固 态存储器件。在一些实例中,存储器71可进一步包括相对于处理器70远程设置的存储器,这些远程存储器可以通过网络连接至设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
本发明实施例提供的一种设备,通过在获取的待分析的web应用对应的JavaScript代码中,插入探针实现web应用借助浏览器实现代码逻辑过程中的数据的获取,根据获取的数据对web应用进行分析。因为是在源代码中插入探针,所以该方法能适用于具有不同特性的浏览器。又因为通过插入的探针自动获取对应代码逻辑过程中的数据,所以解决了使用传统的插入断点、监视变量等方式来跟踪调试数据,造成的低效和耗时的问题。
本发明实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种数据流分析方法,该方法包括:
获取待分析的web应用对应的资源文件中的JavaScript代码;
判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中所述探针是一段代码;
运行插入探针的所述资源文件,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录;
根据记录的数据对所述web应用进行分析。
当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本发明任意实施例所提供的数据流分析方法中的相关操作。
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本发明可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
值得注意的是,上述搜索装置的实施例中,所包括的各个单元和模块只是 按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。
工业实用性
本发明实施例适用于具有不同特性的浏览器,解决了使用传统的插入断点、监视变量等方式来跟踪调试数据,造成的低效和耗时的问题,实现了对web应用借助浏览器实现代码逻辑过程中的数据的获取和分析。

Claims (10)

  1. 一种数据流分析方法,应用于浏览器端,包括:
    获取待分析的网页web应用对应的资源文件中的直译式脚本语言JavaScript代码;
    判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中所述探针是一段代码;
    运行插入探针的所述资源文件,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录;
    根据记录的数据对所述web应用进行分析。
  2. 根据权利要求1所述的方法,其中,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录包括:
    基于所述浏览器中的预设分析代码,根据所述探针,获取所述web应用借助所述浏览器实现代码逻辑过程中的数据;
    将所述数据进行归一化,并存储。
  3. 根据权利要求1或2所述的方法,其中,根据记录的数据对所述web应用进行分析包括:
    读取记录的数据;
    根据所述数据中的数据对象、数据对象的产生时间、数据对象的输入和数据对象的输出,重构整个事件树;
    基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况,所述执行情况包括所述感兴趣数据对象执行所述浏览器机制的情况,其中,所述感兴趣数据对象为所述web应用执行过程中触发的任一数据对象,所述浏览器机制包括下述任意一项:储存在用户本地设备上的数据Cookie、异步JavaScript、XML、Web Storage、以及DOM事件机制。
  4. 根据权利要求3所述的方法,其中,基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况包括:
    确定所述感兴趣数据对象在所述事件树中对应的节点,并将所述节点作为当前节点;
    基于所述事件树,以所述当前节点为基准,向前和向后遍历与所述当前节 点存在直接关系和间接关系中至少一种的节点对应的数据对象;
    根据所述数据对象确定所述感兴趣数据对象的可达集合,其中,所述可达集合为包含感兴趣数据对象在内的关联数据对象。
  5. 根据权利要求3所述的方法,其中,基于所述事件树和获取的感兴趣数据对象,确定所述感兴趣数据对象在所述web应用的运行过程中的执行情况包括:
    获取感兴趣数据;
    根据所述感兴趣数据,确定所述感兴趣数据所在的感兴趣数据对象对应的节点;
    根据所述节点和所述事件树,确定所述感兴趣数据在所述web应用的运行过程中的执行情况。
  6. 根据权利要求1-5中任一所述的方法,其中,判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,包括:
    判断所述JavaScript代码对应的资源文件是否是预设的忽略资源文件,若否,则判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中,所述预设的忽略资源文件为不需要插入探针的资源文件。
  7. 根据权利要求1-6中任一所述的方法,其中,所述获取待分析的web应用对应的资源文件中的JavaScript代码包括:
    获取待分析的web应用对应的服务器返回的相关的资源文件;
    判断所述资源文件的类型,若所述资源文件是JavaScript文件,则获取其中的代码;
    若所述资源文件是超文本标记语言HTML文件,则根据设定标识确定内嵌的JavaScript代码。
  8. 一种数据流分析装置,应用于浏览器端,包括:
    代码获取模块,设置为获取待分析的网页web应用对应的资源文件中的直译式脚本语言JavaScript代码;
    逻辑判断模块,设置为判断所述JavaScript代码的代码逻辑,根据所述代码逻辑在所述JavaScript代码中插入探针,其中所述探针是一段代码;
    数据获取模块,设置为运行插入探针的所述资源文件,根据所述探针获取所述web应用借助所述浏览器实现代码逻辑过程中的数据,并记录;
    数据分析模块,设置为根据记录的数据对所述web应用进行分析。
  9. 一种设备,所述设备包括:
    一个或多个处理器;
    如权利要求2-5中任一所述的浏览器;
    存储装置,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的数据流分析方法。
  10. 一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-7中任一所述的数据流分析方法。
PCT/CN2018/082822 2017-09-25 2018-04-12 数据流分析方法、装置、设备及介质 WO2019056741A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/314,148 US20210224349A1 (en) 2017-09-25 2018-04-12 Method and apparatus for analyzing data flow, device, and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710874992.4A CN107622015B (zh) 2017-09-25 2017-09-25 一种数据流分析方法、装置、设备及介质
CN201710874992.4 2017-09-25

Publications (1)

Publication Number Publication Date
WO2019056741A1 true WO2019056741A1 (zh) 2019-03-28

Family

ID=61090590

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/082822 WO2019056741A1 (zh) 2017-09-25 2018-04-12 数据流分析方法、装置、设备及介质

Country Status (3)

Country Link
US (1) US20210224349A1 (zh)
CN (1) CN107622015B (zh)
WO (1) WO2019056741A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622015B (zh) * 2017-09-25 2021-05-04 北京因特睿软件有限公司 一种数据流分析方法、装置、设备及介质
KR101891140B1 (ko) * 2017-12-16 2018-08-23 세타랩 주식회사 테스트 자동화를 위한 기법
CN109240700B (zh) * 2018-07-06 2021-04-23 北京大学 关键代码定位方法与系统
CN110334302B (zh) * 2019-05-24 2021-09-10 北京因特睿软件有限公司 复杂Web应用前端运行时分析方法
CN110262804A (zh) * 2019-06-13 2019-09-20 南京邮电大学 基于程序切片的JavaScript延续传递风格转化方法
CN110472178A (zh) * 2019-08-20 2019-11-19 北京博睿宏远数据科技股份有限公司 一种探针注入方法、装置、计算机设备及存储介质
CN110781058B (zh) * 2019-11-05 2023-07-18 北京博睿宏远数据科技股份有限公司 一种移动端应用性能数据采集方法、装置、设备及介质
CN111538635B (zh) * 2020-04-14 2023-11-17 北京宝兰德软件股份有限公司 系统资源画像的生成方法、装置、电子设备和存储介质
CN112860543A (zh) * 2021-01-20 2021-05-28 维沃移动通信(深圳)有限公司 检测页面运行的方法和电子设备
CN112783734A (zh) * 2021-02-02 2021-05-11 北京比特易湃信息技术有限公司 一种适用于前端页面性能和错误指标采集的系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252409A (zh) * 2013-06-26 2014-12-31 阿里巴巴集团控股有限公司 一种获取WebApp执行过程的方法及系统
US20150169434A1 (en) * 2013-12-18 2015-06-18 Software Ag White-box testing systems and/or methods in web applications
CN105095092A (zh) * 2015-09-25 2015-11-25 南京大学 基于静态分析和动态运行的Web应用JavaScript代码原子性违反检测
CN106897215A (zh) * 2017-01-20 2017-06-27 华南理工大学 一种基于WebView网页加载性能及用户行为流数据采集的方法
CN107622015A (zh) * 2017-09-25 2018-01-23 北京因特睿软件有限公司 一种数据流分析方法、装置、设备及介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1831796A4 (en) * 2004-11-22 2010-01-27 Truveo Inc METHOD AND DEVICE FOR AN APPLICATION CRAWLER
CN103279567A (zh) * 2013-06-18 2013-09-04 重庆邮电大学 一种基于AJAX的Web数据采集方法及系统
CN104598378B (zh) * 2014-12-31 2018-01-30 天津橙子科技有限公司 一种web工程自动化测试探针

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252409A (zh) * 2013-06-26 2014-12-31 阿里巴巴集团控股有限公司 一种获取WebApp执行过程的方法及系统
US20150169434A1 (en) * 2013-12-18 2015-06-18 Software Ag White-box testing systems and/or methods in web applications
CN105095092A (zh) * 2015-09-25 2015-11-25 南京大学 基于静态分析和动态运行的Web应用JavaScript代码原子性违反检测
CN106897215A (zh) * 2017-01-20 2017-06-27 华南理工大学 一种基于WebView网页加载性能及用户行为流数据采集的方法
CN107622015A (zh) * 2017-09-25 2018-01-23 北京因特睿软件有限公司 一种数据流分析方法、装置、设备及介质

Also Published As

Publication number Publication date
CN107622015B (zh) 2021-05-04
CN107622015A (zh) 2018-01-23
US20210224349A1 (en) 2021-07-22

Similar Documents

Publication Publication Date Title
WO2019056741A1 (zh) 数据流分析方法、装置、设备及介质
TWI753887B (zh) 前端用戶行為統計方法及裝置
CN110442330B (zh) 列表组件转换方法、装置、电子设备及存储介质
US20160328314A1 (en) System and method for providing code coverage
US10699017B2 (en) Determining coverage of dynamic security scans using runtime and static code analyses
US20120324422A1 (en) Live browser tooling in an integrated development environment
CN108415804B (zh) 获取信息的方法、终端设备及计算机可读存储介质
CN107665170B (zh) 一种流程测试方法及装置
US11977934B2 (en) Automation solutions for event logging and debugging on KUBERNETES
US20190286687A1 (en) Identification of sequential browsing operations
CN110347954B (zh) 面向复杂Web应用的服务化方法
CN110263070A (zh) 事件上报方法及装置
CN110598135A (zh) 网络请求处理方法、装置、计算机可读介质及电子设备
CN110334302B (zh) 复杂Web应用前端运行时分析方法
CN108306918B (zh) 一种基于程序动态分析的网站访问信息自动获取方法
US9003378B2 (en) Client-side application script error processing
CN111078217A (zh) 脑图生成方法、装置和计算机可读存储介质
CN112346981A (zh) 联调测试覆盖率检测方法及系统
Wang et al. Fast reproducing web application errors
CN111580821B (zh) 脚本绑定方法、装置、电子设备及计算机可读存储介质
CN109062784B (zh) 接口参数约束代码入口定位方法与系统
CN113190235B (zh) 一种代码的分析方法、装置、电子终端及存储介质
Fadel Techniques for the abstraction of system call traces to facilitate the understanding of the behavioural aspects of the Linux kernel
CN109062785B (zh) 接口参数约束代码定位方法与系统
CN113360373A (zh) 一种移动应用Activity页面全遍历的测试方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18859729

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18859729

Country of ref document: EP

Kind code of ref document: A1