CN114491362A - Data acquisition method and device, storage medium and electronic equipment - Google Patents

Data acquisition method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114491362A
CN114491362A CN202210038302.2A CN202210038302A CN114491362A CN 114491362 A CN114491362 A CN 114491362A CN 202210038302 A CN202210038302 A CN 202210038302A CN 114491362 A CN114491362 A CN 114491362A
Authority
CN
China
Prior art keywords
target
webpage
event trigger
data
logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210038302.2A
Other languages
Chinese (zh)
Inventor
张超炯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202210038302.2A priority Critical patent/CN114491362A/en
Publication of CN114491362A publication Critical patent/CN114491362A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication

Landscapes

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

Abstract

The application discloses a data acquisition method, a data acquisition device, a storage medium and electronic equipment, and relates to the technical field of Internet, wherein the method comprises the following steps: acquiring target event trigger logic, wherein the target event trigger logic is used for simulating event trigger operation in a target webpage; injecting the target event trigger logic into the target webpage; simulating the event trigger operation in the target webpage through the target event trigger logic, and triggering the target webpage to obtain target data through a target interface for displaying; and acquiring the target data displayed in the target webpage. The method and the device can effectively improve the reliability and convenience of acquiring data from the webpage.

Description

Data acquisition method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a data acquisition method, apparatus, storage medium, and electronic device.
Background
Currently, many application terminals usually have a requirement for data resources acquired from some web pages, for example, a certain application requirement downloads valuable file resources from a web page. At present, when an application side acquires data from a webpage, parameters such as a signature or an encryption algorithm of a data request interface of the webpage generally need to be analyzed and cracked to use the data request interface, and then the data is acquired by constructing the requested parameters.
In the current mode, because the parameter cracking difficulty is high, data acquisition usually fails, the data acquisition reliability is low, and the convenience is poor.
Disclosure of Invention
The embodiment of the application provides a scheme, which can effectively improve the reliability and convenience of acquiring data from a webpage.
In order to solve the above technical problem, an embodiment of the present application provides the following technical solutions:
according to an embodiment of the present application, a data acquisition method includes: acquiring target event trigger logic, wherein the target event trigger logic is used for simulating event trigger operation in a target webpage; injecting the target event trigger logic into the target webpage; simulating the event trigger operation in the target webpage through the target event trigger logic, and triggering the target webpage to obtain target data through a target interface for displaying; and acquiring the target data displayed in the target webpage.
In some embodiments of the present application, the injecting the target event trigger logic into the target webpage includes: converting the target event trigger logic into an adaptive code block adapted to the target webpage through a browser, and injecting the adaptive code block into the target webpage.
In some embodiments of the present application, the injecting the target event trigger logic into the target webpage includes: converting the target event trigger logic into a target code block; placing the target code block at a specific position appointed with the target webpage; and triggering the target webpage to load the code block into the target webpage from the specific position.
In some embodiments of the present application, the simulating, by the target event trigger logic, the event trigger operation in the target webpage, and triggering the target webpage to obtain target data for presentation through a target interface includes: and simulating user input operation in the target webpage through the target event triggering logic so as to assign keywords in the input box, and simulating click operation so as to trigger the target webpage to obtain target data corresponding to the keywords in the input box through a target interface for displaying.
In some embodiments of the present application, the simulating, by the target event trigger logic, the event trigger operation in the target webpage, and triggering the target webpage to obtain target data for presentation through a target interface includes: and simulating to execute user authentication operation in the target webpage through the target event trigger logic so as to trigger the target webpage to perform authentication processing on a target client to obtain an authentication result, and obtaining the target data through a target interface to display when the authentication result is that the authentication is passed.
In some embodiments of the present application, the obtaining the target data shown in the target webpage includes: determining a data display position of the target data in the target webpage; and acquiring the target data from the data display position.
In some embodiments of the present application, the obtaining the target data shown in the target webpage includes: in response to displaying the target data in the target data, starting target data output logic to enable the target data output logic to output the target data to a predetermined position; and acquiring the target data from the preset position.
According to an embodiment of the present application, a data acquisition apparatus includes: the logic acquisition module is used for acquiring target event trigger logic, and the target event trigger logic is used for simulating event trigger operation in a target webpage; a logic injection module, configured to inject the target event trigger logic into the target webpage, so as to simulate, through the target event trigger logic, execution of the event trigger operation in the target webpage, and trigger the target webpage to obtain target data through a target interface for display; and the data acquisition module is used for acquiring the target data from the target webpage.
In some embodiments of the present application, the logic injection module comprises a first injection unit to: converting the target event trigger logic into an adaptive code block adapted to the target webpage through a browser, and injecting the adaptive code block into the target webpage.
In some embodiments of the present application, the logic injection module comprises a second injection unit to: converting the target event trigger logic into a target code block; placing the target code block at a specific position appointed with the target webpage; and triggering the target webpage to load the code block into the target webpage from the specific position.
In some embodiments of the present application, the simulating, by the target event trigger logic, the event trigger operation in the target webpage, and triggering the target webpage to obtain target data for presentation through a target interface includes: and simulating user input operation in the target webpage through the target event triggering logic so as to assign keywords in the input box, and simulating click operation so as to trigger the target webpage to obtain target data corresponding to the keywords in the input box through a target interface for displaying.
In some embodiments of the present application, the simulating, by the target event trigger logic, the event trigger operation in the target webpage, and triggering the target webpage to obtain target data for presentation through a target interface includes: and simulating to execute user authentication operation in the target webpage through the target event trigger logic so as to trigger the target webpage to perform authentication processing on a target client to obtain an authentication result, and obtaining the target data through a target interface to display when the authentication result is that the authentication is passed.
In some embodiments of the present application, the data acquisition module comprises a first acquisition unit configured to: determining a data display position of the target data in the target webpage; and acquiring the target data from the data display position.
In some embodiments of the present application, the data acquisition module comprises a second acquisition unit configured to: in response to displaying the target data in the target data, starting target data output logic to enable the target data output logic to output the target data to a predetermined position; and acquiring the target data from the preset position.
According to another embodiment of the present application, a storage medium has stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method of an embodiment of the present application.
According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and the processor reads the computer program stored in the memory to execute the method in the embodiment of the application.
In the embodiment of the application, target event trigger logic is obtained and used for simulating event trigger operation in a target webpage; injecting the target event trigger logic into the target webpage; simulating the event trigger operation in the target webpage through the target event trigger logic, and triggering the target webpage to obtain target data through a target interface for displaying; and acquiring the target data displayed in the target webpage.
In this way, the target event trigger logic for simulating the event trigger operation is injected into the target webpage, and the target data legally acquired through the target interface is triggered to be displayed through the simulation execution of the event trigger operation, so that the data displayed in the target webpage can be successfully acquired, and the reliability and convenience of data acquisition are effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 shows a schematic diagram of a system to which embodiments of the present application may be applied.
FIG. 2 shows a flow diagram of a data acquisition method according to an embodiment of the present application.
FIG. 3 shows a block diagram of a data acquisition device according to an embodiment of the present application.
FIG. 4 shows a block diagram of an electronic device according to an embodiment of the application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 shows a schematic diagram of a system 100 to which embodiments of the present application may be applied. As shown in fig. 1, system 100 may include a terminal 101. The terminal 101 may be any computer device, such as a computer, a mobile phone, a smart watch, a home appliance, and the like. A target application and a browser may be run in the terminal 101.
In an implementation manner of this example, the target application in the terminal 101 may: acquiring target event trigger logic, wherein the target event trigger logic is used for simulating event trigger operation in a target webpage; injecting the target event trigger logic into the target webpage (e.g., into the target webpage via a browser); simulating the event trigger operation in the target webpage through the target event trigger logic, and triggering the target webpage to obtain target data through a target interface for displaying; and acquiring the target data displayed in the target webpage.
FIG. 2 schematically shows a flow diagram of a data acquisition method according to an embodiment of the present application. The execution subject of the data acquisition method may be any device, such as the terminal 101 shown in fig. 1.
As shown in fig. 2, the data acquisition method may include steps S210 to S240.
Step S210, acquiring a target event trigger logic, wherein the target event trigger logic is used for simulating an event trigger operation in a target webpage;
step S220, injecting the target event trigger logic into the target webpage;
step S230, simulating the event trigger operation in the target webpage through the target event trigger logic, and triggering the target webpage to obtain target data through a target interface for displaying;
step S240, acquiring the target data displayed in the target webpage.
Target event trigger logic, i.e., logic for simulating event trigger operations in a target web page, may be logic code, such as js code. The event triggers an operation such as an input operation or a click operation. The acquisition of the target event trigger logic may be the acquired preset logic or the logic edited by the user in real time through the target application.
And injecting the target event trigger logic into the target webpage, wherein the target event trigger logic is a part of the running logic in the target webpage, further, the target event trigger logic can be started and executed according to requirements, the target event trigger operation is simulated and executed in the target webpage, the target webpage can be triggered to actively acquire target data through a legal target interface through the trigger operation, and the target data are displayed in the webpage. When the target data is displayed in the webpage, the displayed data can be easily obtained.
In this way, based on steps S210 to S240, the target event trigger logic for simulating the event trigger operation is injected into the target webpage, and the target data obtained through the target interface legally by triggering the target webpage through the simulation execution of the event trigger operation is displayed, so that the data displayed in the target webpage can be successfully obtained, and the reliability and convenience of data acquisition are effectively improved.
The following describes a specific procedure of each step performed when data acquisition is performed.
In step S210, a target event trigger logic is obtained, where the target event trigger logic is used to simulate an event trigger operation in a target web page.
Target event trigger logic, i.e., logic for simulating event trigger operations in a target web page, may be logic code, such as js code. The event triggers an operation such as an input operation or a click operation. The target event trigger logic may be acquired logic preset in the local or cloud or logic edited by the user in real time through the target application.
In step S220, the target event trigger logic is injected into the target web page.
In one embodiment, the step S220 of injecting the target event trigger logic into the target webpage includes: converting the target event trigger logic into an adaptive code block adapted to the target webpage through a browser, and injecting the adaptive code block into the target webpage.
After a target application in the terminal can trigger a code block adaptive to a target webpage converted by the logic through a browser, the adaptive code block is directly injected into the target webpage, and the code block can reliably run in the target webpage, so that an event in the target webpage is triggered in a simulated manner.
In one embodiment, the step S220 of injecting the target event trigger logic into the target webpage includes: converting the target event trigger logic into a target code block; placing the target code block at a specific position appointed with the target webpage; and triggering the target webpage to load the code block into the target webpage from the specific position.
The target position can be a specific position appointed by the target webpage, for example, a storage position of control data which must be added when the target webpage is started, and the target code block can be flexibly triggered to load the target code block from the specific position according to actual requirements after the target code block is stored at the target position.
In step S230, the target event trigger logic simulates the event trigger operation in the target webpage, and triggers the target webpage to obtain target data through a target interface for displaying.
In one embodiment, in step S230, simulating, by the target event trigger logic, the event trigger operation in the target web page, and triggering the target web page to obtain target data for displaying through a target interface includes:
and simulating user input operation in the target webpage through the target event triggering logic so as to assign keywords in the input box, and simulating click operation so as to trigger the target webpage to obtain target data corresponding to the keywords in the input box through a target interface for displaying.
Through the model input operation and the click operation in the target webpage by the target event trigger logic, on one hand, the event operation can be triggered and executed in the target webpage, and on the other hand, the limitation that a user needs to manually operate can be replaced in some scenes, and the target application is triggered to obtain data through a legal target interface for displaying.
In one embodiment, in step S230, simulating, by the target event trigger logic, the event trigger operation in the target web page, and triggering the target web page to obtain target data for displaying through a target interface includes:
and simulating to execute user authentication operation in the target webpage through the target event trigger logic so as to trigger the target webpage to perform authentication processing on a target client to obtain an authentication result, and obtaining the target data through a target interface to display when the authentication result is that the authentication is passed.
The method comprises the steps of simulating user authentication operation in a target webpage through target event trigger logic, triggering execution of an authentication processing flow in the target webpage to obtain an authentication result, obtaining target data through a legal target interface for displaying when the authentication passes according to the authentication result, wherein the target data which are required can be determined in the authentication processing flow at the same time, and the acquisition safety of the target data is further improved.
In step S240, the target data shown in the target webpage is acquired.
In one embodiment, in step S240, acquiring the target data shown in the target webpage includes: determining a data display position of the target data in the target webpage; and acquiring the target data from the data display position.
The data display position can be determined according to information such as a webpage type of the target webpage, and after the corresponding data display position is determined, the target data can be obtained through screen capture processing, copying operation and the like from the position.
In one embodiment, in step S240, acquiring the target data shown in the target webpage includes: in response to displaying the target data in the target data, starting target data output logic to enable the target data output logic to output the target data to a predetermined position; and acquiring the target data from the preset position.
The target event triggering logic may further include a target data output logic, and after the target data output logic is started, the target data may be intercepted from the logic layer in a data interception manner to obtain target data, and the target data may be output to a predetermined location, so that the target data may be obtained from the predetermined location, and the target data may be reliably obtained even when there is some data acquisition limitation in the target web page.
In order to better implement the data acquisition method provided by the embodiment of the present application, the embodiment of the present application further provides a data acquisition device based on the data acquisition method. The terms are the same as those in the data acquisition method, and specific implementation details can be referred to the description in the method embodiment. FIG. 3 shows a block diagram of a data acquisition device according to an embodiment of the present application.
As shown in fig. 3, the data acquisition device 300 may include a logic acquisition module 310, a logic injection module 320, and a data acquisition module 330. In one example, the data acquisition device 300 may be located in a target application as shown in FIG. 1.
The logic obtaining module 310 may be configured to obtain target event trigger logic, where the target event trigger logic is configured to simulate an event trigger operation in a target web page; the logic injection module 320 may be configured to inject the target event trigger logic into the target webpage, so as to simulate, through the target event trigger logic, the event trigger operation in the target webpage, and trigger the target webpage to obtain target data through a target interface for displaying; the data obtaining module 330 may be configured to obtain the target data from the target webpage.
In some embodiments of the present application, the logic injection module comprises a first injection unit to: converting the target event trigger logic into an adaptive code block adapted to the target webpage through a browser, and injecting the adaptive code block into the target webpage.
In some embodiments of the present application, the logic injection module comprises a second injection unit to: converting the target event trigger logic into a target code block; placing the target code block at a specific position appointed with the target webpage; and triggering the target webpage to load the code block into the target webpage from the specific position.
In some embodiments of the present application, the simulating, by the target event trigger logic, the event trigger operation in the target webpage, and triggering the target webpage to obtain target data for presentation through a target interface includes: and simulating user input operation in the target webpage through the target event triggering logic so as to assign keywords in the input box, and simulating click operation so as to trigger the target webpage to obtain target data corresponding to the keywords in the input box through a target interface for displaying.
In some embodiments of the present application, the simulating, by the target event trigger logic, the event trigger operation in the target webpage, and triggering the target webpage to obtain target data for presentation through a target interface includes: and simulating to execute user authentication operation in the target webpage through the target event trigger logic so as to trigger the target webpage to perform authentication processing on a target client to obtain an authentication result, and obtaining the target data through a target interface to display when the authentication result is that the authentication is passed.
In some embodiments of the present application, the data acquisition module comprises a first acquisition unit configured to: determining a data display position of the target data in the target webpage; and acquiring the target data from the data display position.
In some embodiments of the present application, the data acquisition module comprises a second acquisition unit configured to: in response to displaying the target data in the target data, starting target data output logic to enable the target data output logic to output the target data to a predetermined position; and acquiring the target data from the preset position.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, an embodiment of the present application further provides an electronic device, where the electronic device may be a terminal or a server, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the embodiment of the present application, and specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by operating or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby integrally monitoring the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user pages, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions in the foregoing embodiments of the present application, for example, the processor 401 may execute the following steps:
acquiring target event trigger logic, wherein the target event trigger logic is used for simulating event trigger operation in a target webpage; injecting the target event trigger logic into the target webpage; simulating the event trigger operation in the target webpage through the target event trigger logic, and triggering the target webpage to obtain target data through a target interface for displaying; and acquiring the target data displayed in the target webpage.
In some embodiments of the present application, when the target event triggering logic is injected into the target webpage, the processor 401 may execute: converting the target event trigger logic into an adaptive code block adapted to the target webpage through a browser, and injecting the adaptive code block into the target webpage.
In some embodiments of the present application, when the target event triggering logic is injected into the target webpage, the processor 401 may execute: converting the target event trigger logic into a target code block; placing the target code block at a specific position appointed with the target webpage; and triggering the target webpage to load the code block into the target webpage from the specific position.
In some embodiments of the present application, when the target web page is triggered to obtain target data for presentation through a target interface by simulating the event trigger operation in the target web page through the target event trigger logic, the processor 401 may perform: and simulating user input operation in the target webpage through the target event triggering logic so as to assign keywords in the input box, and simulating click operation so as to trigger the target webpage to obtain target data corresponding to the keywords in the input box through a target interface for displaying.
In some embodiments of the present application, when the target web page is triggered to obtain target data for presentation through a target interface by simulating the event trigger operation in the target web page through the target event trigger logic, the processor 401 may perform: and simulating to execute user authentication operation in the target webpage through the target event trigger logic so as to trigger the target webpage to perform authentication processing on a target client to obtain an authentication result, and obtaining the target data through a target interface to display when the authentication result is that the authentication is passed.
In some embodiments of the present application, when obtaining the target data shown in the target webpage, the processor 401 may perform: determining a data display position of the target data in the target webpage; and acquiring the target data from the data display position.
In some embodiments of the present application, when obtaining the target data shown in the target webpage, the processor 401 may perform: in response to displaying the target data in the target data, starting target data output logic to enable the target data output logic to output the target data to a predetermined position; and acquiring the target data from the preset position.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, the present application further provides a storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute the steps in any one of the methods provided in the present application.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the methods provided in the embodiments of the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the embodiments that have been described above and shown in the drawings, but that various modifications and changes can be made without departing from the scope thereof.

Claims (10)

1. A method of data acquisition, comprising:
acquiring target event trigger logic, wherein the target event trigger logic is used for simulating event trigger operation in a target webpage;
injecting the target event trigger logic into the target webpage;
simulating the event trigger operation in the target webpage through the target event trigger logic, and triggering the target webpage to obtain target data through a target interface for displaying;
and acquiring the target data displayed in the target webpage.
2. The method of claim 1, wherein the injecting the target event triggering logic into the target web page comprises:
converting the target event trigger logic into an adaptive code block adapted to the target webpage through a browser, and injecting the adaptive code block into the target webpage.
3. The method of claim 1, wherein the injecting the target event triggering logic into the target web page comprises:
converting the target event trigger logic into a target code block;
placing the target code block at a specific position appointed with the target webpage;
and triggering the target webpage to load the code block into the target webpage from the specific position.
4. The method of claim 1, wherein the simulating, by the target event trigger logic, the event trigger operation in the target webpage triggering the target webpage to obtain target data for presentation through a target interface comprises:
and simulating user input operation in the target webpage through the target event triggering logic so as to assign keywords in the input box, and simulating click operation so as to trigger the target webpage to obtain target data corresponding to the keywords in the input box through a target interface for displaying.
5. The method of claim 1, wherein the simulating, by the target event trigger logic, the event trigger operation in the target webpage triggering the target webpage to obtain target data for presentation through a target interface comprises:
and simulating to execute user authentication operation in the target webpage through the target event trigger logic so as to trigger the target webpage to perform authentication processing on a target client to obtain an authentication result, and obtaining the target data through a target interface to display when the authentication result is that the authentication is passed.
6. The method of claim 1, wherein the obtaining the target data shown in the target webpage comprises:
determining a data display position of the target data in the target webpage;
and acquiring the target data from the data display position.
7. The method of claim 1, wherein the obtaining the target data shown in the target webpage comprises:
in response to displaying the target data in the target data, starting target data output logic to enable the target data output logic to output the target data to a predetermined position;
and acquiring the target data from the preset position.
8. A data acquisition apparatus, comprising:
the logic acquisition module is used for acquiring target event trigger logic, and the target event trigger logic is used for simulating event trigger operation in a target webpage;
a logic injection module, configured to inject the target event trigger logic into the target webpage, so as to simulate, through the target event trigger logic, execution of the event trigger operation in the target webpage, and trigger the target webpage to obtain target data through a target interface for display;
and the data acquisition module is used for acquiring the target data from the target webpage.
9. A storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to carry out the method of any one of claims 1 to 7.
10. An electronic device, comprising: a memory storing a computer program; a processor reading a computer program stored in the memory to perform the method of any of claims 1 to 7.
CN202210038302.2A 2022-01-13 2022-01-13 Data acquisition method and device, storage medium and electronic equipment Pending CN114491362A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210038302.2A CN114491362A (en) 2022-01-13 2022-01-13 Data acquisition method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210038302.2A CN114491362A (en) 2022-01-13 2022-01-13 Data acquisition method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114491362A true CN114491362A (en) 2022-05-13

Family

ID=81512533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210038302.2A Pending CN114491362A (en) 2022-01-13 2022-01-13 Data acquisition method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114491362A (en)

Similar Documents

Publication Publication Date Title
CN111596928B (en) Application control method and device and electronic equipment
CN110727575B (en) Information processing method, system, device and storage medium
CN115422063A (en) Low-code interface automation system, electronic equipment and storage medium
CN111666201A (en) Regression testing method, device, medium and electronic equipment
CN110750415B (en) Interface service configuration method, device, medium and computer equipment
CN110955438A (en) Method, device and equipment for monitoring performance of small program and storage medium
CN110825425B (en) Configuration data management method and device, electronic equipment and storage medium
CN111523676B (en) Method and device for assisting machine learning model to be online
CN113672340A (en) Incremental backup method, system and device of virtual machine and readable storage medium
CN113971191A (en) Data import method and device and computer readable storage medium
CN113220403A (en) Method and device for h5 intercepting Android return event and electronic equipment
CN103838651A (en) Mainboard function test management and control system and method
CN114764296A (en) Machine learning model training method and device, electronic equipment and storage medium
CN114491362A (en) Data acquisition method and device, storage medium and electronic equipment
CN112416747A (en) Test case execution method, device, equipment and medium
CN112491940A (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
CN102984282A (en) Method and device of intelligent terminal for acquiring media data of cloud storage file
CN115687129A (en) Coverage rate report generation method and device, storage medium and computer equipment
CN114003421B (en) Virtual machine timeout mechanism testing method, system, terminal and storage medium
CN115827457A (en) Browser compatibility testing method and related equipment
CN114610446A (en) Method, device and system for automatically injecting probe
CN114327709A (en) Control page generation method and device, intelligent device and storage medium
CN112632436A (en) Webpage display method and device, electronic equipment and storage medium
CN113590166B (en) Application program updating method and device and computer readable storage medium
CN113890825B (en) Interactive upgrade test method and device of equipment, storage medium and electronic equipment

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