CN111177013B - Log data acquisition method, device, computer equipment and storage medium - Google Patents

Log data acquisition method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN111177013B
CN111177013B CN202010011036.5A CN202010011036A CN111177013B CN 111177013 B CN111177013 B CN 111177013B CN 202010011036 A CN202010011036 A CN 202010011036A CN 111177013 B CN111177013 B CN 111177013B
Authority
CN
China
Prior art keywords
log data
target
application program
target application
interface
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.)
Active
Application number
CN202010011036.5A
Other languages
Chinese (zh)
Other versions
CN111177013A (en
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010011036.5A priority Critical patent/CN111177013B/en
Publication of CN111177013A publication Critical patent/CN111177013A/en
Application granted granted Critical
Publication of CN111177013B publication Critical patent/CN111177013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device

Abstract

The disclosure relates to a log data acquisition method, a log data acquisition device, computer equipment and a storage medium, and belongs to the technical field of computers. According to the method, the device and the system, the target bar code is generated based on the address information of the target application program in response to the received test instruction, the target bar code is used for indicating to report log data to the address information of the target application program, the target bar code is displayed, and after the second terminal scans the target bar code, the log data returned by the second terminal based on the address information is obtained. In the log data acquisition process, the second terminal can directly return the log data based on the address of the target application program without going through an online server, and a developer can acquire the log data in real time based on the target application program, so that the log data acquisition efficiency is improved, the accuracy of a test result is improved, and the test efficiency is improved.

Description

Log data acquisition method, device, computer equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a log data acquisition method, a log data acquisition device, a computer device and a storage medium.
Background
The acquisition of the log data of the client is an important link in the application program test, and a developer can analyze whether the application program has Bug or not according to the log data triggered by the client at a specific moment and under a specific action so as to optimize the application program. In the current log data acquisition process, the generated log data is generally reported to an online server for processing the log data by a client, and then the online server forwards the log data to a developer, when the developer needs to test a certain client, the online server also needs to forward the log data of the certain client, however, because the online server has a large load, sufficient computing resources cannot be provided for forwarding the log data in real time, and further delay occurs in forwarding the log data of the client, the developer cannot acquire the log data in real time, and accuracy and test efficiency of a test result are affected.
Disclosure of Invention
The embodiment of the disclosure provides a log data acquisition method, a log data acquisition device, computer equipment and a storage medium, which can solve the problem that log data are difficult to acquire in real time in the related technology. The technical scheme is as follows:
In one aspect, a log data obtaining method is provided and applied to a first terminal, and a target application program runs on the first terminal, where the method includes:
responding to the received test instruction, and generating a target bar code based on the address information of the target application program, wherein the target bar code is used for indicating to report log data to the address information of the target application program;
displaying the target bar code;
and after the second terminal scans the target bar code, acquiring log data returned by the second terminal based on the address information.
In one possible implementation, the generating, in response to the received test instruction, a target barcode based on address information of the target application program includes:
when the test instruction is received, the address information of the target application program is acquired;
taking at least one selected interface in the interface list as a target interface, acquiring interface identifiers of the target interfaces, and calling virtual resources stored in the target application program for realizing functions corresponding to the target interfaces;
and generating the target bar code based on the address information of the target application program and the interface identification of each target interface.
In one possible implementation, the generating, in response to the received test instruction, a target barcode based on address information of the target application program includes:
when the test instruction is received, the address information of the target application program is acquired;
acquiring user information of a current login user in the target application program;
and generating the target bar code based on the address information of the target application program and the user information.
In one possible implementation manner, after the second terminal scans the target bar code, acquiring log data returned by the second terminal based on the address information includes:
displaying a log data display interface after the second terminal scans the target bar code, wherein the log data display interface is used for displaying the log data;
when the log data returned by the second terminal is received, judging whether the log data display interface is closed or not;
when the log data display interface is not closed, displaying the log data in the log data display interface;
and when the log data display interface is closed, sending information of log data acquisition completion to the second terminal.
In one aspect, a log data acquisition method is provided and applied to a second terminal, and the method includes:
Scanning a target bar code, wherein the target bar code is generated by the first terminal based on address information of a target application program;
acquiring information carried by the target bar code, wherein the information comprises address information of the target application program;
and based on the address information of the target application program, sending the log data to a server of the target application program, and displaying the log data by the first terminal.
In one possible implementation, the sending the log data to the server of the target application program based on the address information of the target application program includes:
setting the address information of the target application program as a log data reporting address;
and sending the log data to the server of the target application program based on the log data reporting address.
In one aspect, there is provided a log data acquisition apparatus, the apparatus comprising:
the generating unit is configured to respond to the received test instruction, generate a target bar code based on the address information of the target application program, and the target bar code is used for indicating to report log data to the address information of the target application program;
a display unit configured to display the target bar code;
and the log acquisition unit is configured to acquire log data returned by the second terminal based on the address information after the second terminal scans the target bar code.
In one possible implementation, the generating unit is configured to:
when the test instruction is received, the address information of the target application program is acquired;
taking at least one selected interface in the interface list as a target interface, acquiring interface identifiers of the target interfaces, and calling virtual resources stored in the target application program for realizing functions corresponding to the target interfaces;
and generating the target bar code based on the address information of the target application program and the interface identification of each target interface.
In one possible implementation, the generating unit is configured to:
when the test instruction is received, the address information of the target application program is acquired;
acquiring user information of a current login user in the target application program;
and generating the target bar code based on the address information of the target application program and the user information.
In one possible implementation, the log obtaining unit is configured to:
displaying a log data display interface after the second terminal scans the target bar code, wherein the log data display interface is used for displaying the log data;
when the log data returned by the second terminal is received, judging whether the log data display interface is closed or not;
When the log data display interface is not closed, displaying the log data in the log data display interface;
and when the log data display interface is closed, sending information of log data acquisition completion to the second terminal.
In one aspect, there is provided a log data acquisition apparatus, the apparatus comprising:
a scanning unit configured to scan a target barcode generated by the first terminal based on address information of a target application;
the information acquisition unit is configured to acquire information carried by the target bar code, wherein the information comprises address information of the target application program;
and a transmitting unit configured to transmit the log data to a server of the target application based on the address information of the target application, the log data being displayed by the first terminal.
In one possible implementation, the transmitting unit is configured to:
setting the address information of the target application program as a log data reporting address;
and sending the log data to the server of the target application program based on the log data reporting address.
In one aspect, a computer device is provided that includes one or more processors and one or more memories having stored therein at least one piece of program code that is loaded and executed by the one or more processors to implement the operations performed by the log data acquisition method.
In one aspect, a computer readable storage medium having stored therein at least one program code loaded and executed by a processor to perform operations performed by the log data acquisition method is provided.
According to the technical scheme provided by the embodiment of the disclosure, the target bar code is generated based on the address information of the target application program by responding to the received test instruction, the target bar code is used for indicating the report of the log data to the address information of the target application program, the target bar code is displayed, and after the second terminal scans the target bar code, the log data returned by the second terminal based on the address information is obtained. In the log data acquisition process, the second terminal can directly return the log data based on the address of the target application program without going through an online server, and a developer can acquire the log data in real time based on the target application program, so that the log data acquisition efficiency is improved, the accuracy of a test result is improved, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flow chart illustrating a method of data processing according to an exemplary embodiment;
FIG. 2 is a flowchart illustrating a method of data processing according to an exemplary embodiment;
FIG. 3 is a schematic diagram of an implementation environment of a log data acquisition method, according to an example embodiment;
FIG. 4 is a flowchart showing a particular implementation of a log data acquisition method, according to an example embodiment;
FIG. 5 is a flowchart illustrating the acquisition of log data according to an exemplary embodiment;
FIG. 6 is a block diagram of a log data acquisition apparatus according to an example embodiment;
FIG. 7 is a block diagram of a log data acquisition apparatus according to an example embodiment;
fig. 8 is a schematic structural view of a terminal according to an exemplary embodiment;
fig. 9 is a schematic diagram illustrating a structure of a server according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart illustrating a data processing method according to an exemplary embodiment, and the log data acquisition method is used in a computer device as shown in fig. 1, and includes the following steps.
In step 101, in response to the received test instruction, a target barcode is generated based on the address information of the target application, where the target barcode is used to instruct reporting of log data to the address information of the target application.
In step 102, the target barcode is displayed.
In step 103, after the second terminal scans the target bar code, log data returned by the second terminal based on the address information is obtained.
According to the technical scheme provided by the embodiment of the disclosure, the target bar code is generated based on the address information of the target application program by responding to the received test instruction, the target bar code is used for indicating the report of the log data to the address information of the target application program, the target bar code is displayed, and after the second terminal scans the target bar code, the log data returned by the second terminal based on the address information is obtained. In the log data acquisition process, the second terminal can directly return the log data based on the address of the target application program without going through an online server, and a developer can acquire the log data in real time based on the target application program, so that the log data acquisition efficiency is improved, the accuracy of a test result is improved, and the test efficiency is improved.
In one possible implementation, the generating, in response to the received test instruction, a target barcode based on address information of the target application program includes:
when the test instruction is received, the address information of the target application program is acquired;
taking at least one selected interface in the interface list as a target interface, acquiring interface identifiers of the target interfaces, and calling virtual resources stored in the target application program for realizing functions corresponding to the target interfaces;
and generating the target bar code based on the address information of the target application program and the interface identification of each target interface.
In one possible implementation, the generating, in response to the received test instruction, a target barcode based on address information of the target application program includes:
when the test instruction is received, the address information of the target application program is acquired;
acquiring user information of a current login user in the target application program;
and generating the target bar code based on the address information of the target application program and the user information.
In one possible implementation manner, after the second terminal scans the target bar code, acquiring log data returned by the second terminal based on the address information includes:
Displaying a log data display interface after the second terminal scans the target bar code, wherein the log data display interface is used for displaying the log data;
when the log data returned by the second terminal is received, judging whether the log data display interface is closed or not;
when the log data display interface is not closed, displaying the log data in the log data display interface;
and when the log data display interface is closed, sending information of log data acquisition completion to the second terminal.
Fig. 2 is a flowchart illustrating a data processing method according to an exemplary embodiment, and the log data acquisition method is used in a computer device, as shown in fig. 2, and includes the following steps.
In step 201, a target barcode is scanned, which is generated by the first terminal based on address information of a target application.
In step 202, information carried by the target barcode is obtained, where the information includes address information of the target application.
In step 203, the log data is sent to the server of the target application program based on the address information of the target application program, and the log data is displayed by the first terminal.
In one possible implementation, the sending the log data to the server of the target application program based on the address information of the target application program includes:
setting the address information of the target application program as a log data reporting address;
and sending the log data to the server of the target application program based on the log data reporting address.
The above examples are only a brief description of embodiments of the present disclosure and of various possible implementations.
Fig. 3 is a schematic diagram of an implementation environment of a log data acquisition method according to an exemplary embodiment, and as shown in fig. 3, a first terminal 301 and a second terminal 302 may be included in the implementation environment. The first terminal 301 may be a development-side device, the first terminal 301 may be installed and operated with a target application program for acquiring log data, the target application program may have a user account logged in, and the first terminal 301 may be at least one of a smart phone, a tablet computer, a laptop computer, and a desktop computer. The second terminal 302 may be installed and run with an application client under test, and the second terminal 302 may be at least one of a smart phone, a tablet computer, an electronic book reader, an MP3 (Moving Picture Experts Group Audio Layer III, moving picture experts compression standard audio layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compression standard audio layer 4) player, a laptop portable computer, and a desktop computer. The first terminal 301 and the second terminal 302 may be connected through a wired network or a wireless network, so that data transmission between the first terminal 301 and the second terminal 302 may be performed.
Those skilled in the art will recognize that the number of terminals may be greater or lesser. Such as the above-mentioned terminals may be only one, or the above-mentioned terminals may be several tens or hundreds, or more. The embodiment of the present disclosure does not limit the number of terminals and the type of devices.
FIG. 4 is a flowchart showing a specific implementation of a log data acquisition method, which may be applied in the above-described implementation environment, referring to FIG. 4, and which may specifically include the following steps:
in step 401, the first terminal displays a log acquisition interface.
In one possible implementation, the first terminal may display a log acquisition interface with a target application, where the target application may be used to provide log data acquisition functionality.
In step 402, the first terminal generates a target barcode based on address information of the target application program in response to the received test instruction.
In the embodiment of the present disclosure, when the first terminal receives the test instruction, the address information of the target application program may be obtained, where the address information may be a domain name of a server corresponding to the target application program, and the embodiment of the present disclosure is not limited thereto. The first terminal may generate a target barcode based on the address information of the target application program, where the target barcode may be used to indicate reporting of log data to the address information of the target application program, and the target barcode may be a two-dimensional code, and the embodiment of the present disclosure does not limit a specific form of the target barcode.
In the embodiment of the disclosure, the triggering manner of the test instruction may include any one of the following possible implementations:
in one implementation, the test instruction may be triggered by a click operation on a target control in the log acquisition interface. Wherein the target control may be used to provide functionality that instructs the first terminal to generate a target barcode. In one possible implementation manner, when the first terminal detects a click operation of the target control by a user, an operation of acquiring address information of the target application program may be triggered, and the first terminal may perform a step of generating a target barcode based on the address information of the target application program.
In a second implementation manner, the test instruction is triggered based on the target character string input in the log acquisition interface. The specific content of the target character string may be set by a developer, which is not limited by the embodiment of the disclosure. In one possible implementation manner, the log obtaining interface may display an instruction input area, and the first terminal may obtain input information of the user in the instruction input area, and when the user inputs the target character string in the instruction input area, the test instruction may be triggered, so that the first terminal performs the steps of obtaining address information of the target application program and generating the target barcode.
In the embodiment of the present disclosure, the target barcode may further carry an interface identifier of at least one target interface, where the target interface is an interface that needs to obtain a virtual resource from a server of the target application, that is, the implementation of a function corresponding to each target interface needs to call the virtual resource stored in the target application, where the virtual resource may be mock (analog) data, etc., and virtual data corresponding to each target interface may be set by a developer. In one possible implementation manner, the log obtaining interface may display an interface list, where the interface list may include a plurality of interfaces required by the tested application program to run, and when receiving a test instruction, the first terminal may use at least one selected interface in the interface list as the target interface, obtain an interface identifier of each target interface, and generate the target barcode based on address information of the target application program and the interface identifier of each target interface.
In the embodiment of the disclosure, the target bar code may also carry user information of the currently logged-in user in the target application program. In one possible implementation manner, when receiving the test instruction, the first terminal may obtain user information of a current login user in the target application program, where the user information may be a user identifier, etc., and the embodiment of the disclosure does not limit this, and the first terminal may generate a target barcode based on address information of the target application program and the user information. In one possible implementation manner, the user information may be added in the form of a session identifier (session) to the data information carried by the target barcode, that is, when the first terminal receives the test instruction, a session identifier may be randomly generated, the session identifier is associated with the user information, and the target barcode is generated based on the address information of the target application program and the session identifier. In embodiments of the present disclosure, the session identifier may be used to distinguish between different users, and one session identifier may correspond to one user.
In step 403, the first terminal displays the target barcode.
In one possible implementation manner, the first terminal may display the target barcode in a target area of the log obtaining interface, where the target area may be any area in the log obtaining interface, and the embodiment of the disclosure is not limited to this.
In step 404, the second terminal scans the target bar code to obtain information carried by the target bar code.
In the embodiment of the disclosure, the second terminal may be installed and run with the application program under test. In one possible implementation manner, when the tested application program has a code scanning function, the second terminal can scan the target bar code through the tested application program; when the tested application program does not have the code scanning function, the second terminal can scan the target bar code through any other application program with the code scanning function.
The second terminal may acquire the data information carried by the target barcode after scanning the target barcode, including address information of the target application program, interface identifiers of all target interfaces, and session identifiers, and of course, the target barcode may also carry other information, which is not limited in the embodiment of the present disclosure.
In step 405, the second terminal modifies the report address of the log data based on the information carried by the target barcode.
In one possible implementation, the second terminal may set the address information of the target application program as a log data reporting address, and the second terminal may send the log data to the server of the target application program based on the log data reporting address.
In one possible implementation manner, the second terminal may perform serialization, encryption, compression and other processing on the generated log data, and send the processed log data to the server of the target application program.
In one possible implementation manner, when the information carried by the target bar code includes the interface identifier of the target interface, the second terminal may request the virtual resource from the server of the target application program based on the interface identifiers of the target interfaces, and the tested application program in the second terminal may operate based on the virtual resource. The virtual resource is applied in the test, so that a running environment which is difficult to reproduce or data which is difficult to construct and acquire can be conveniently simulated, and the test efficiency is improved.
In step 406, the first terminal obtains the log data returned by the second terminal based on the address information, and displays the log data on the log data display interface.
In one possible implementation manner, after the second terminal scans the target barcode, the information of the barcode scanning completion may be sent to the first terminal, and after the first terminal receives the information of the barcode scanning completion, a log data display interface may be displayed, where the log data display interface may be used to display log data obtained by the first terminal in real time.
In the embodiment of the present disclosure, the first terminal may acquire log data of the second terminal from the server of the target application, and the first terminal may perform processes such as decompression, decoding, and reverse serialization on the acquired log data, so that the log data becomes plaintext, and display the processed log data on the log data display interface. In one possible implementation manner, the log data display interface may display options of a plurality of data types, one data type may correspond to at least one piece of log data, and when the first terminal detects that the option of at least one data type is selected, only log data corresponding to the selected data type may be displayed on the log data display interface.
In one possible implementation manner, when the first terminal receives the log data returned by the second terminal, whether the log data display interface is closed or not can be judged, and when the log data display interface is not closed, the log data is displayed in the log data display interface; when the log data display interface is closed, sending information of log data acquisition completion to the second terminal, and after the second terminal receives the information of log data acquisition completion, modifying the report address of the log data back to a default address, for example, the report address can be a default online server address, and the second terminal does not report the log data to the target application program.
In the embodiment of the disclosure, the tested application program may request virtual resources required for running from a server of the target application program based on the interface identifier carried in the target barcode to meet the test requirement, for example, when the tested application program runs in a specific environment or based on specific data, the tested application program may report log data to the target application program in real time, and a developer may analyze and optimize the tested application program based on the log data displayed on the log data display interface in the target application program. In the process, log data acquisition does not need to pass through an online server, log data is reported, analyzed and displayed in real time, only few calculation resources are occupied, virtual resources do not need to pass through complicated proxy configuration, and the virtual resources can be shared and used only by uploading the virtual resources to a server of a target application program.
According to the technical scheme provided by the embodiment of the disclosure, the target bar code is generated based on the address information of the target application program by responding to the received test instruction, the target bar code is used for indicating the report of the log data to the address information of the target application program, the target bar code is displayed, and after the second terminal scans the target bar code, the log data returned by the second terminal based on the address information is obtained. In the log data acquisition process, the second terminal can directly return the log data based on the address of the target application program without going through an online server, and a developer can acquire the log data in real time based on the target application program, so that the log data acquisition efficiency is improved, the accuracy of a test result is improved, and the test efficiency is improved.
Fig. 5 is a flowchart of log data acquisition shown in an exemplary embodiment, referring to fig. 5, the first terminal may display a log acquisition interface, determine whether a virtual resource is needed for the test based on an interface selection operation of a user, when at least one target interface in the user selection is detected, that is, the virtual resource is needed for the test, the first terminal may generate a target barcode based on address information of the target application, user information of a current login user, and an interface identifier of each target interface, when any interface in the user selection is not detected, that is, the virtual resource is not needed for the test, the first terminal may generate a target barcode based on address information of the target application and user information of a current login user, a second terminal installed with the tested application may scan the target barcode, establish connection with the first terminal, and after the first terminal confirms that the second terminal has scanned the code, the first terminal may display a log data display interface, and when the second terminal reports the log, the second terminal may determine whether the connection is still in a log display state, that is still in an open state, when the connection is still in a log display state, the second terminal may not report the log data to the server based on the address information, and the second terminal may not display the default data to the first terminal. It should be noted that, the connection establishment between the first terminal and the second terminal by the target barcode is merely an exemplary illustration of one connection establishment manner, and the first terminal and the second terminal may also establish a connection based on other manners, which is not limited by the embodiments of the present disclosure. In the process, the address information reported by the log is transmitted to the second terminal through the target bar code, so that the second terminal can directly send the log data to the server of the tested application program instead of the default online server, the log data acquisition delay caused by insufficient calculation resources of the online server is avoided, and the testing efficiency is improved.
Any combination of the above-mentioned optional solutions may be adopted to form an optional embodiment of the present disclosure, which is not described herein in detail.
Fig. 6 is a block diagram of a log data acquisition apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes a generation unit 601, a display unit 602, and a log acquisition unit 603.
A generating unit 601, configured to respond to the received test instruction, and generate a target barcode based on the address information of the target application program, where the target barcode is used to instruct reporting of log data to the address information of the target application program;
a display unit 602 configured to display the target bar code;
and a log obtaining unit 603 configured to obtain log data returned by the second terminal based on the address information after the second terminal scans the target bar code.
In one possible implementation, the generating unit 601 is configured to:
when the test instruction is received, the address information of the target application program is acquired;
taking at least one selected interface in the interface list as a target interface, acquiring interface identifiers of the target interfaces, and calling virtual resources stored in the target application program for realizing functions corresponding to the target interfaces;
And generating the target bar code based on the address information of the target application program and the interface identification of each target interface.
In one possible implementation, the generating unit 601 is configured to:
when the test instruction is received, the address information of the target application program is acquired;
acquiring user information of a current login user in the target application program;
and generating the target bar code based on the address information of the target application program and the user information.
In one possible implementation, the log obtaining unit 603 is configured to:
displaying a log data display interface after the second terminal scans the target bar code, wherein the log data display interface is used for displaying the log data;
when the log data returned by the second terminal is received, judging whether the log data display interface is closed or not;
when the log data display interface is not closed, displaying the log data in the log data display interface;
and when the log data display interface is closed, sending information of log data acquisition completion to the second terminal.
According to the device provided by the embodiment of the disclosure, the target bar code is generated based on the address information of the target application program by responding to the received test instruction, the target bar code is used for indicating the report of the log data to the address information of the target application program, the target bar code is displayed, and when the second terminal scans the target bar code, the log data returned by the second terminal based on the address information is obtained. By using the log data acquisition device, the second terminal can directly return the log data based on the address of the target application program without going through an online server, and a developer can acquire the log data in real time based on the target application program, so that the log data acquisition efficiency is improved, the accuracy of a test result is improved, and the test efficiency is improved.
Fig. 7 is a block diagram of a log data acquisition apparatus according to an example embodiment. Referring to fig. 7, the apparatus includes a scanning unit 701, an information acquisition unit 702, and a transmission unit 703.
A scanning unit 701 configured to scan a target barcode generated by the first terminal based on address information of a target application;
an information obtaining unit 702 configured to obtain information carried by the target barcode, where the information includes address information of the target application;
and a transmitting unit 703 configured to transmit the log data to the server of the target application based on the address information of the target application, and display the log data by the first terminal.
In one possible implementation, the sending unit 703 is configured to:
setting the address information of the target application program as a log data reporting address;
and sending the log data to the server of the target application program based on the log data reporting address.
It should be noted that: in the log data acquisition apparatus provided in the above embodiment, only the division of the above functional modules is used for illustration, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the log data obtaining device and the log data obtaining method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the log data obtaining device and the log data obtaining method are detailed in the method embodiments and are not repeated here.
Fig. 8 is a schematic structural view of a terminal according to an exemplary embodiment. The terminal 800 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 800 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, and the like.
In general, the terminal 800 includes: one or more processors 801, and one or more memories 802.
Processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 801 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 801 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and rendering of content required to be displayed by the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 802 may include one or more computer-readable storage media, which may be non-transitory. Memory 802 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 802 is used to store at least one program code for execution by processor 801 to implement the log data acquisition method provided by the method embodiments in the present disclosure.
In some embodiments, the terminal 800 may further optionally include: a peripheral interface 803, and at least one peripheral. The processor 801, the memory 802, and the peripheral interface 803 may be connected by a bus or signal line. Individual peripheral devices may be connected to the peripheral device interface 803 by buses, signal lines, or a circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 804, a display 805, a camera assembly 806, audio circuitry 807, a positioning assembly 808, and a power supply 809.
Peripheral interface 803 may be used to connect at least one Input/Output (I/O) related peripheral to processor 801 and memory 802. In some embodiments, processor 801, memory 802, and peripheral interface 803 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 801, the memory 802, and the peripheral interface 803 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 804 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 804 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 804 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 804 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 804 may also include NFC (Near Field Communication, short range wireless communication) related circuitry, which is not limited by the present disclosure.
The display 805 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 805 is a touch display, the display 805 also has the ability to collect touch signals at or above the surface of the display 805. The touch signal may be input as a control signal to the processor 801 for processing. At this time, the display 805 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 805 may be one, providing a front panel of the terminal 800; in other embodiments, the display 805 may be at least two, respectively disposed on different surfaces of the terminal 800 or in a folded design; in some embodiments, the display 805 may be a flexible display disposed on a curved surface or a folded surface of the terminal 800. Even more, the display 805 may be arranged in an irregular pattern other than rectangular, i.e., a shaped screen. The display 805 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 806 is used to capture images or video. Optionally, the camera assembly 806 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
Audio circuitry 807 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and the environment, converting the sound waves into electric signals, inputting the electric signals to the processor 801 for processing, or inputting the electric signals to the radio frequency circuit 804 for voice communication. For stereo acquisition or noise reduction purposes, a plurality of microphones may be respectively disposed at different portions of the terminal 800. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuit 807 may also include a headphone jack.
The location component 808 is utilized to locate the current geographic location of the terminal 800 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 808 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
A power supply 809 is used to power the various components in the terminal 800. The power supply 809 may be an alternating current, direct current, disposable battery, or rechargeable battery. When the power supply 809 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 800 also includes one or more sensors 810. The one or more sensors 810 include, but are not limited to: acceleration sensor 811, gyroscope sensor 812, pressure sensor 813, fingerprint sensor 814, optical sensor 815, and proximity sensor 816.
The acceleration sensor 811 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 800. For example, the acceleration sensor 811 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 801 may control the display screen 805 to display a user interface in a landscape view or a portrait view based on the gravitational acceleration signal acquired by the acceleration sensor 811. Acceleration sensor 811 may also be used for the acquisition of motion data of a game or user.
The gyro sensor 812 may detect a body direction and a rotation angle of the terminal 800, and the gyro sensor 812 may collect a 3D motion of the user to the terminal 800 in cooperation with the acceleration sensor 811. The processor 801 may implement the following functions based on the data collected by the gyro sensor 812: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 813 may be disposed at a side frame of the terminal 800 and/or at a lower layer of the display 805. When the pressure sensor 813 is disposed on a side frame of the terminal 800, a grip signal of the terminal 800 by a user may be detected, and the processor 801 performs left-right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed at the lower layer of the display screen 805, the processor 801 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 805. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 814 is used to collect a fingerprint of a user, and the processor 801 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 801 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 814 may be provided on the front, back, or side of the terminal 800. When a physical key or vendor Logo is provided on the terminal 800, the fingerprint sensor 814 may be integrated with the physical key or vendor Logo.
The optical sensor 815 is used to collect the ambient light intensity. In one embodiment, the processor 801 may control the display brightness of the display screen 805 based on the intensity of ambient light collected by the optical sensor 815. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 805 is turned up; when the ambient light intensity is low, the display brightness of the display screen 805 is turned down. In another embodiment, the processor 801 may also dynamically adjust the shooting parameters of the camera module 806 based on the ambient light intensity collected by the optical sensor 815.
A proximity sensor 816, also referred to as a distance sensor, is typically provided on the front panel of the terminal 800. The proximity sensor 816 is used to collect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 gradually decreases, the processor 801 controls the display 805 to switch from the bright screen state to the off screen state; when the proximity sensor 816 detects that the distance between the user and the front surface of the terminal 800 gradually increases, the processor 801 controls the display 805 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 8 is not limiting and that more or fewer components than shown may be included or certain components may be combined or a different arrangement of components may be employed.
Fig. 9 is a schematic structural diagram of a server according to an exemplary embodiment, where the server 900 may have a relatively large difference due to configuration or performance, and may include one or more processors (Central Processing Units, CPU) 901 and one or more memories 902, where at least one program code is stored in the one or more memories 902, and the at least one program code is loaded and executed by the one or more processors 901 to implement the methods provided in the above-described method embodiments. Of course, the server 900 may also have a wired or wireless network interface, a keyboard, an input/output interface, and other components for implementing the functions of the device, which are not described herein.
In an exemplary embodiment, a computer readable storage medium, such as a memory, comprising at least one piece of program code executable by a processor to perform the log data acquisition method of the above embodiment is also provided. For example, the computer readable storage medium may be Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), compact disc Read-Only Memory (CD-ROM), magnetic tape, floppy disk, optical data storage device, and the like.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of implementing the above-described embodiments may be implemented by hardware, or may be implemented by at least one piece of hardware associated with a program, where the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or optical disk, etc.
The foregoing is illustrative of the present disclosure and is not to be construed as limiting thereof, but rather as various modifications, equivalent arrangements, improvements, etc., which are intended to be included within the spirit and principles of the present disclosure.

Claims (12)

1. The log data acquisition method is characterized by being applied to a first terminal, wherein a target application program is operated on the first terminal, and the method comprises the following steps:
responding to the received test instruction, and generating a target bar code based on the address information of the target application program, wherein the target bar code is used for indicating to report log data to the address information of the target application program; the target bar code is further used for indicating at least one of an interface identifier of at least one target interface or user information of a current login user in the target application program, wherein the target interface is an interface which needs to acquire virtual resources from a server of the target application program;
Displaying the target bar code;
displaying a log data display interface after the second terminal scans the target bar code, wherein the log data display interface is used for displaying log data;
when log data returned by the second terminal is received, judging whether the log data display interface is closed or not;
when the log data display interface is not closed, displaying the log data in the log data display interface;
and when the log data display interface is closed, sending information of log data acquisition completion to the second terminal.
2. The log data acquisition method of claim 1, wherein, in the case where the target barcode is further used to indicate an interface identifier of at least one target interface, the generating, in response to the received test instruction, the target barcode based on address information of the target application program includes:
when the test instruction is received, acquiring address information of the target application program;
taking at least one selected interface in the interface list as the target interface, acquiring interface identifiers of the target interfaces, and calling virtual resources stored in the target application program for realizing functions corresponding to the target interfaces;
And generating the target bar code based on the address information of the target application program and the interface identification of each target interface.
3. The log data acquisition method of claim 1, wherein, in a case where the target barcode is further used to indicate user information of a currently logged-in user in the target application, the generating the target barcode based on address information of the target application in response to the received test instruction comprises:
when the test instruction is received, acquiring address information of the target application program;
acquiring user information of a current login user in the target application program;
and generating the target bar code based on the address information of the target application program and the user information.
4. The log data acquisition method is characterized by being applied to a second terminal and comprising the following steps of:
scanning a target bar code, wherein the target bar code is generated by a first terminal based on address information of a target application program;
acquiring information carried by the target bar code, wherein the information comprises address information of the target application program;
and based on the address information of the target application program, sending the log data to a server of the target application program, and displaying the log data by the first terminal.
5. The log data acquisition method according to claim 4, wherein the transmitting the log data to the server of the target application program based on the address information of the target application program includes:
setting the address information of the target application program as a log data reporting address;
and sending the log data to a server of the target application program based on the log data reporting address.
6. A log data acquisition apparatus, wherein a target application is run on the apparatus, comprising:
the generating unit is configured to respond to the received test instruction, generate a target bar code based on the address information of the target application program, and the target bar code is used for indicating to report log data to the address information of the target application program; the target bar code is further used for indicating at least one of an interface identifier of at least one target interface or user information of a current login user in the target application program, wherein the target interface is an interface which needs to acquire virtual resources from a server of the target application program;
a display unit configured to display the target bar code;
The log acquisition unit is configured to display a log data display interface after the second terminal scans the target bar code, wherein the log data display interface is used for displaying log data; when log data returned by the second terminal is received, judging whether the log data display interface is closed or not; when the log data display interface is not closed, displaying the log data in the log data display interface; and when the log data display interface is closed, sending information of log data acquisition completion to the second terminal.
7. The log data acquisition apparatus of claim 6, wherein, in the case where the target barcode is further used to indicate an interface identification of at least one target interface, the generating unit is configured to:
when the test instruction is received, acquiring address information of the target application program;
taking at least one selected interface in the interface list as the target interface, acquiring interface identifiers of the target interfaces, and calling virtual resources stored in the target application program for realizing functions corresponding to the target interfaces;
And generating the target bar code based on the address information of the target application program and the interface identification of each target interface.
8. The log data acquisition apparatus according to claim 6, wherein in a case where the target barcode is further used to indicate user information of a currently logged-in user in the target application, the generation unit is configured to:
when the test instruction is received, acquiring address information of the target application program;
acquiring user information of a current login user in the target application program;
and generating the target bar code based on the address information of the target application program and the user information.
9. A log data acquisition apparatus, comprising:
a scanning unit configured to scan a target barcode generated by the first terminal based on address information of a target application;
the information acquisition unit is configured to acquire information carried by the target bar code, wherein the information comprises address information of the target application program;
and a transmitting unit configured to transmit the log data to a server of the target application based on the address information of the target application, the log data being displayed by the first terminal.
10. The log data acquisition apparatus according to claim 9, wherein the transmission unit is configured to:
setting the address information of the target application program as a log data reporting address;
and sending the log data to a server of the target application program based on the log data reporting address.
11. A computer device comprising one or more processors and one or more memories, the one or more memories having stored therein at least one piece of program code that is loaded and executed by the one or more processors to implement the operations performed by the log data acquisition method of any of claims 1-3; or operations performed by the log data acquisition method of any one of claims 4 to 5.
12. A computer readable storage medium having stored therein at least one program code loaded and executed by a processor to implement the operations performed by the log data acquisition method of any one of claims 1 to 3; or operations performed by the log data acquisition method of any one of claims 4 to 5.
CN202010011036.5A 2020-01-06 2020-01-06 Log data acquisition method, device, computer equipment and storage medium Active CN111177013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010011036.5A CN111177013B (en) 2020-01-06 2020-01-06 Log data acquisition method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010011036.5A CN111177013B (en) 2020-01-06 2020-01-06 Log data acquisition method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111177013A CN111177013A (en) 2020-05-19
CN111177013B true CN111177013B (en) 2023-09-26

Family

ID=70657907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010011036.5A Active CN111177013B (en) 2020-01-06 2020-01-06 Log data acquisition method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111177013B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806212A (en) * 2020-06-17 2021-12-17 北京字节跳动网络技术有限公司 Application program exception positioning method and device and electronic equipment
CN111797017A (en) * 2020-07-01 2020-10-20 北京梧桐车联科技有限责任公司 Method and device for storing log, test equipment and storage medium
CN112035329A (en) * 2020-09-17 2020-12-04 中国银行股份有限公司 Method and device for acquiring application log of mobile terminal, computer equipment and medium
CN112768046A (en) * 2021-01-27 2021-05-07 深圳市智莱科技股份有限公司 Data processing method, medical management system and terminal
CN112817849A (en) * 2021-01-28 2021-05-18 北京达佳互联信息技术有限公司 Test data processing method, device, equipment and storage medium
CN114067456A (en) * 2021-10-13 2022-02-18 北京梧桐车联科技有限责任公司 Log processing method, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015046060A (en) * 2013-08-28 2015-03-12 キヤノンマーケティングジャパン株式会社 Log management device, log management system, control method therefor, and program
WO2016187967A1 (en) * 2015-05-28 2016-12-01 中兴通讯股份有限公司 Method and apparatus for realizing log transmission
CN106528404A (en) * 2016-09-30 2017-03-22 腾讯科技(深圳)有限公司 Mobile application test method and apparatus
CN109710490A (en) * 2018-12-20 2019-05-03 网易(杭州)网络有限公司 Acquisition method, device, storage medium and the electronic equipment of client log
CN109901972A (en) * 2019-02-27 2019-06-18 苏州浪潮智能科技有限公司 A kind of monitoring journal obtaining method, device, equipment and medium based on BMC
CN110457195A (en) * 2019-08-05 2019-11-15 深圳乐信软件技术有限公司 Acquisition methods, device, server and the storage medium of client local log

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015046060A (en) * 2013-08-28 2015-03-12 キヤノンマーケティングジャパン株式会社 Log management device, log management system, control method therefor, and program
WO2016187967A1 (en) * 2015-05-28 2016-12-01 中兴通讯股份有限公司 Method and apparatus for realizing log transmission
CN106528404A (en) * 2016-09-30 2017-03-22 腾讯科技(深圳)有限公司 Mobile application test method and apparatus
CN109710490A (en) * 2018-12-20 2019-05-03 网易(杭州)网络有限公司 Acquisition method, device, storage medium and the electronic equipment of client log
CN109901972A (en) * 2019-02-27 2019-06-18 苏州浪潮智能科技有限公司 A kind of monitoring journal obtaining method, device, equipment and medium based on BMC
CN110457195A (en) * 2019-08-05 2019-11-15 深圳乐信软件技术有限公司 Acquisition methods, device, server and the storage medium of client local log

Also Published As

Publication number Publication date
CN111177013A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN111177013B (en) Log data acquisition method, device, computer equipment and storage medium
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN113204298B (en) Method and device for displaying release progress, electronic equipment and storage medium
CN110278464B (en) Method and device for displaying list
CN113098755B (en) Group chat creating method, device, terminal and storage medium
CN108874496B (en) Application management method, device, terminal, server and storage medium
CN109327608B (en) Song sharing method, terminal, server and system
CN110837473B (en) Application program debugging method, device, terminal and storage medium
CN110784370B (en) Method and device for testing equipment, electronic equipment and medium
CN112751679A (en) Instant messaging message processing method, terminal and server
CN111858382A (en) Application program testing method, device, server, system and storage medium
CN111510482B (en) Method and device for determining failed network request and computer storage medium
CN113076051A (en) Slave control terminal synchronization method, device, terminal and storage medium
CN110827830B (en) Voiceprint recognition method, voiceprint recognition device, terminal and storage medium based on voice data
CN114143280B (en) Session display method and device, electronic equipment and storage medium
CN113485596B (en) Virtual model processing method and device, electronic equipment and storage medium
CN113051015B (en) Page rendering method and device, electronic equipment and storage medium
CN114816600B (en) Session message display method, device, terminal and storage medium
CN112764824B (en) Method, device, equipment and storage medium for triggering identity verification in application program
CN112988254B (en) Method, device and equipment for managing hardware equipment
CN113076452A (en) Application classification method, device, equipment and computer readable storage medium
CN112000576A (en) Code data detection method, device, equipment and storage medium
CN111275561B (en) Method, device, computer equipment and storage medium for acquiring association relation
CN112260845A (en) Method and device for accelerating data transmission
CN111414563B (en) Webpage interaction method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant