CN113419940B - Program log acquisition and regression method and corresponding device, equipment and medium thereof - Google Patents

Program log acquisition and regression method and corresponding device, equipment and medium thereof Download PDF

Info

Publication number
CN113419940B
CN113419940B CN202110768623.3A CN202110768623A CN113419940B CN 113419940 B CN113419940 B CN 113419940B CN 202110768623 A CN202110768623 A CN 202110768623A CN 113419940 B CN113419940 B CN 113419940B
Authority
CN
China
Prior art keywords
current
log
data
terminal
debugging
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
CN202110768623.3A
Other languages
Chinese (zh)
Other versions
CN113419940A (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.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Cubesili 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 Guangzhou Cubesili Information Technology Co Ltd filed Critical Guangzhou Cubesili Information Technology Co Ltd
Priority to CN202110768623.3A priority Critical patent/CN113419940B/en
Publication of CN113419940A publication Critical patent/CN113419940A/en
Application granted granted Critical
Publication of CN113419940B publication Critical patent/CN113419940B/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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3457Performance evaluation by simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a program log acquisition and regression method and corresponding devices, equipment and media thereof, wherein the acquisition method comprises the following steps: monitoring and collecting bidirectional communication data correspondingly generated in the process of executing remote interactive communication on a current service page of a current application program; querying one or more debug terminals that determine to have registered themselves as recipients; and responding to a log submitting event triggered under the current service page state, and respectively transmitting log data to each debugging terminal, wherein the log data comprises the bidirectional communication data and the page identification of the current service page. According to the application, the mechanism of application program fault and exception investigation is improved, the submitting of log data is changed from a point-to-point reporting and waiting mode to a point-to-many distributing customer service mode, the centralized dependence on a server cluster is reduced, the instant interaction response efficiency between a user terminal where an application program is located and a debugging terminal where a developer is located is facilitated, and the implementation experience of a software maintenance project is improved.

Description

Program log acquisition and regression method and corresponding device, equipment and medium thereof
Technical Field
The embodiment of the application relates to the technical field of software engineering, in particular to a program log acquisition and regression method and corresponding devices, equipment and media thereof.
Background
When the internet application program and the server interact based on the online service, one party of the internet application program and the server run depending on the data source provided by the other party, and the data sources in two directions form communication data in the interaction process. The developer often needs to master some abnormal situations encountered by the terminal application program so as to test, if the developer cannot learn about related data sources in the interaction process, the developer can hardly find potential vulnerabilities of the application program, and can not find the abnormality for the user reporting the fault. Particularly when the terminal application program performs the interaction based on the Web page, the interaction scene is more difficult to be maintained only by the self code of the application program. Although in the conventional method, the interactive scene can be saved through the screenshot of the graphical user interface of the application program, because a large amount of information is sent and received in the interaction process, a large amount of information is continuously brushed, and the screenshot can only acquire the interactive data in a short time, the means of intercepting the map and reporting the obstacle is difficult for the developer to effectively grasp the data stream formed by all relevant communication data in the interaction process, and the investigation is not facilitated.
In another common mode, the log data can be submitted manually through the terminal application program, so that a developer can conduct investigation according to the log data, the specific implementation of the means is very complicated, the terminal user is required to exit from the current service scene, enter a fault reporting page, manually fill in related information, drive tens of megabytes of log data, and assist in various encryption and decryption operations, the whole process is complicated and needless to say, a great deal of processing time is consumed, the whole investigation process is very time-consuming, and the original interaction scene is lost, so that the submitted log data can only be static historical data at best, the data volume is huge, and beneficial information is very limited.
It will be appreciated that this situation has more significant drawbacks for testing engineering of applications to be published: because the log data has huge information content and few correlation content, log screening is needed for reporting time points, and in order to acquire accurate information data sources, it is also necessary to ensure that the data sources are marked in advance, otherwise, the reported log data cannot be checked, so that the log data has no meaning. Under such a closed loop, recording, collecting and marking the data source from the development stage, reporting the client log of the tester and submitting the BUG, downloading the client log to the developer, analyzing the log, screening the data source information in huge log content, reorganizing the data for the screened data source, and returning to the site where the BUG appears to locate the problem. Such a closed loop is very cumbersome and tedious, and both the time costs and the screening costs are significant.
In addition, many services involved in anomaly investigation are different in identity cost presented by account grades of end users, for example, VIP members, noble members, common members and the like are different in respective grades, so that the identity cost is different, and data issued by data sources are correspondingly different due to the identity differences. In the existing abnormal report checking mode, a developer generally polls an account number of an end user to restore a service scene, the trouble of the mode is obvious, a software test process is often blocked, or an original scene cannot be clearly reproduced, a problem data source cannot be positioned, a back-end developer is required to assist in checking the data source aiming at the identification and the behavior of the end user to position the problem, the problem cannot be accurately restored to the original interaction scene, and even if the original interaction scene is barely restored to simulate the original interaction process, the reporting of the problem data source is performed, and the reporting of the problem data source is performed again.
From the above analysis, in the prior art, the failure reporting process of the application program has drawbacks of complexity and inefficiency, both on the user side and on the development side, and improvement is needed.
Disclosure of Invention
The object of the present application is to provide a program log collecting and returning method and corresponding apparatus, computer device and storage medium thereof, aiming at least one problem existing in the prior art.
In order to solve the technical problems, the application adopts a technical scheme that:
a program log acquisition method comprises the following steps:
monitoring and collecting bidirectional communication data correspondingly generated in the process of executing remote interactive communication on a current service page of a current application program;
querying one or more debug terminals that determine to have registered themselves as recipients;
and responding to a log submitting event triggered under the current service page state, and respectively transmitting log data to each debugging terminal, wherein the log data comprises the bidirectional communication data and the page identification of the current service page.
In a further embodiment, the step of monitoring and collecting bidirectional communication data correspondingly generated in the process of executing remote interactive communication on the current service page of the current application program includes the following steps:
automatically loading a preconfigured monitoring service in a background of the computer along with the starting of the current application program;
monitoring is carried out on the remote interactive communication process of each business page in the current application program by the monitoring service;
and caching the bidirectional communication data of each current service page in the running process of the current application program in real time, wherein the bidirectional communication data comprises communication data sent to a corresponding service server by the current service page and communication data sent to a local machine by the service server.
In a further embodied embodiment, the querying determines one or more debug terminals that have registered themselves as recipients, comprising the steps of:
submitting a query request to a remote server to query access addresses of one or more debug terminals pre-registered as receivers in a registration data table through the remote server;
receiving query result data returned by a remote server, and resolving access addresses of one or more debugging terminals;
the access address of the one or more debug terminals is configured as an access address of a recipient for delivering log data.
In a preferred embodiment, in response to a log submission event triggered in the current service page state, log data is respectively transmitted to each debug terminal, including the following steps:
detecting whether at least one debugging terminal registered as a receiver exists, if so, popping up a control panel view above a graphical user interface of a current service page, and displaying a log submitting control in the control panel view;
triggering a log submission event in response to a touch operation acting on the log submission control;
responding to the log submitting event and respectively transmitting log data containing the two-way communication data and the page identification of the current service page to each debugging terminal;
And automatically or passively hiding the control panel view after the response of the log submitting event is completed.
In order to solve the technical problems, the application adopts another technical scheme that:
a program log regression method comprising the steps of:
registering the current debugging terminal as one of the receivers of the log data of the target application program;
monitoring and receiving the log data transmitted by at least one remote operation instance of the target application program, analyzing the page identification of the service page and the two-way communication data required by the service page to execute remote interactive communication, and storing the two-way communication data as local data;
responding to a debugging instruction aiming at log data of at least one remote operation instance, loading and operating the target application program in a current debugging terminal, and entering a current service page pointed by the page identification;
and simulating and executing at least part of the process of the remote interactive communication in the current service page according to the two-way communication data.
In a further embodiment, registering the current debug terminal as one of the recipients of the log data of the target application includes the steps of:
Sending a registration request to a remote server, wherein the request comprises an access address of a current debugging terminal for receiving log data of the target application program;
the remote server is driven by the registration request to register the access address of the current debugging terminal in a registration data table, so that the current debugging terminal becomes one of the receivers suitable for receiving the log data.
In a further specific embodiment, in response to a debug instruction for log data of the at least one remote running instance, loading and running the target application program in a current debug terminal, and entering a current service page pointed to by the page identifier, the method comprises the following specific steps:
responding to a debugging instruction of log data of the at least one remote operation instance, and starting a preconfigured sandbox environment suitable for operating the target application program;
controlling the target application program to load and run in the sandbox environment;
and switching the target application program to a current business page pointed by the page identification contained in the log data.
In a preferred embodiment, at least part of the process of performing the remote interactive communication in the current service page according to the two-way communication data is simulated, including the following steps:
Responding to a simulation debugging event triggered by a control panel view in a graphical user interface of a current debugging terminal, and starting a process of executing the remote interactive communication in a simulation manner in a current service page according to the bidirectional communication data;
applying communication data belonging to a first communication sending direction contained in the two-way data communication in a current service page, and suspending the operation of the current service page;
and responding to a debugging flow continuing event, restoring the operation of the current service page, and applying communication data belonging to a second communication sending direction contained in the bidirectional data communication in the current service page to pause the operation of the current service page.
In order to solve the technical problems, the application adopts another technical scheme that:
a program log collection device, comprising:
the monitoring acquisition module is used for monitoring and acquiring bidirectional communication data correspondingly generated in the process of executing remote interactive communication on the current service page of the current application program;
the inquiry determining module is used for inquiring and determining one or more debugging terminals which have registered themselves as receivers;
the log submitting module is configured to respond to the log submitting event triggered under the current service page state and respectively transmit log data to each debugging terminal, wherein the log data comprises the bidirectional communication data and the page identification of the current service page.
In one embodiment, the monitoring acquisition module includes: a monitor loading sub-module configured to automatically load a preconfigured monitor service in a computer background along with the starting of a current application program; a monitoring implementation sub-module configured to implement monitoring by the monitoring service on the remote interactive communication process of each service page in the current application program; the data caching sub-module is used for caching the bidirectional communication data of each current service page in the running process of the current application program in real time, wherein the bidirectional communication data comprises communication data sent to a corresponding service server by the current service page and communication data sent to a local server by the service server.
In another embodiment, the query determination module includes: the remote inquiry sub-module is used for submitting an inquiry request to a remote server so as to inquire out access addresses of one or more debugging terminals pre-registered as receivers in the registration data table through the remote server; the address analysis sub-module is used for receiving the query result data returned by the remote server and analyzing the access addresses of the one or more debugging terminals; an address configuration sub-module, configured to configure the access address of the one or more debug terminals as an access address of a recipient for delivering log data.
In yet another embodiment, the log submission module includes: the panel display sub-module is used for detecting whether at least one debugging terminal registered as a receiver exists, if so, a control panel view is popped up above a graphical user interface of a current service page, and a log submitting control is displayed in the control panel view; the event triggering sub-module is used for responding to the touch operation acted on the log submitting control to trigger a log submitting event; the log distribution sub-module is used for responding to the log submitting event and respectively transmitting log data containing the bidirectional communication data and the page identification of the current service page to each debugging terminal; and the panel hiding sub-module is used for automatically or passively hiding the control panel view after the response of the log submitting event is completed.
In order to solve the technical problems, the application adopts another technical scheme that:
a program log regression apparatus, comprising:
the role registration module is used for registering the current debugging terminal as one of the receivers of the log data of the target application program;
the monitoring storage module is used for monitoring and receiving the log data transmitted by at least one remote operation instance of the target application program, analyzing the page identification of the service page and the two-way communication data required by the service page to execute remote interactive communication, and storing the two-way communication data as local data;
The debugging response module is used for responding to a debugging instruction aiming at log data of the at least one remote operation instance, loading and operating the target application program in the current debugging terminal, and entering a current service page pointed by the page identification;
and the simulation execution module is used for simulating and executing at least part of the process of the remote interactive communication in the current service page according to the two-way communication data.
In one embodiment, the character registration module includes: a registration request sub-module, configured to send a registration request to a remote server, where the request includes an access address of a current debug terminal that is used to receive log data of the target application program; and the registration realization sub-module is used for driving the remote server to register the access address of the current debugging terminal in a registration data table by using the registration request, so that the current debugging terminal becomes one of the receivers suitable for receiving the log data.
In another embodiment, the debug response module includes: an execution preparation sub-module configured to initiate a pre-configured sandboxed environment adapted to execute the target application in response to a debug instruction for log data of the at least one remote execution instance; the program running sub-module is used for controlling the loading and running of the target application program in the sandbox environment; and the page switching sub-module is used for switching the target application program to the current service page pointed by the page identifier contained in the log data.
In yet another embodiment, the simulation execution module includes: the simulation sub-module is configured to respond to a simulation debugging event triggered by a control panel view in the graphical user interface of the current debugging terminal, and start a process of executing the remote interactive communication in a simulation manner in the current service page according to the two-way communication data;
a first direction sub-module, configured to apply, in a current service page, communication data belonging to a first communication sending direction and included in the bidirectional data communication, and suspend operation of the current service page;
and the second direction submodule is used for responding to a debugging flow continuing event, resuming the operation of the current service page, and applying the communication data which belongs to the second communication sending direction and is contained in the bidirectional data communication in the current service page to pause the operation of the current service page.
In order to solve the above technical problem, the present application further provides a computer device, which includes a memory and a processor, where the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor is caused to execute the steps of the program log collection/regression method.
To solve the above technical problem, an embodiment of the present application further provides a storage medium storing computer readable instructions, where the computer readable instructions when executed by one or more processors cause the one or more processors to execute the steps of the program log collection/regression method.
Compared with the prior art, the application has the following advantages:
firstly, one or more debugging terminals are obtained at one side of an application program through inquiring a remote server and used as receivers for distributed uploading of log data, and then bidirectional communication data related to a current service page are distributed to the receivers, so that each receiver can obtain the log data related to the current service page, a developer of the receiver can conveniently utilize the full quantity of related communication data to conduct data source analysis in time, and abnormality caused by a data source is checked for the current service page. Therefore, the application program side can immediately report faults/anomalies based on the response of the current service page to a log submitting event, and submit the bidirectional communication data related to the interaction scene to the developer, so that the effective bidirectional communication data is used for assisting the development side to implement debugging, the operation is quick and timely, the transmission data quantity is small, and the fault reporting is real-time and efficient.
Secondly, the application can receive the log data submitted by each related application program for local storage by registering itself as a receiver in advance at one side of the debugging terminal, after responding to the debugging instruction triggered by a developer aiming at the log data submitted by a certain application program running instance (a certain terminal user runs the log data submitted by the application program), the application can start and run the application program in a sandbox environment to enter the current business page pointed by the log data, and the bidirectional communication data in the log data is applied to the current business page to realize the simulation and reproduction of the whole interaction process of the terminal user at the current business page, thus, the application can intuitively display various interfaces and data changes through the reproduction of the interaction process at the terminal user side, is convenient for the developer to quickly locate and troubleshoot or abnormal, can greatly improve the efficiency of the work such as testing, debugging and maintenance of the application program, and saves various time costs.
In addition, the application improves the mechanism of application program fault and abnormality investigation, changes the submitting of log data from a point-to-point reporting and waiting mode to a point-to-many distributing customer service mode, reduces the concentrated dependence on a server cluster, is beneficial to improving the work efficiency of the software engineering organization of an internet platform side, improves the instant interaction response efficiency between a user terminal where an application program is positioned and a debugging terminal where a developer is positioned, and improves the implementation experience of the software maintenance engineering.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a basic flow diagram of a program log collection method of the present application;
FIG. 2 is a flow chart illustrating a process of implementing a listening service by the program log collection method of the present application;
FIG. 3 is a flow chart of a process of querying a debug terminal by the program log acquisition method of the present application;
FIG. 4 is a flow chart of a process of submitting log data by the program log collection method of the present application;
FIG. 5 is a schematic diagram of an interface for operation of the program log collection method of the present application;
FIG. 6 is a basic flow chart of the program log regression method of the present application;
FIG. 7 is a flowchart illustrating a procedure of registering a receiver according to the program log regression method of the present application;
FIG. 8 is a flowchart illustrating a process of loading a target application program according to the program log regression method of the present application;
FIG. 9 is a schematic flow chart of a simulation execution of a current business page by the program log regression method of the present application;
FIG. 10 is a schematic diagram of an interface for running the program log regression method of the present application;
fig. 11 and fig. 12 are schematic diagrams of basic structures of the program log collecting and returning device according to the present application respectively;
fig. 13 is a basic structural block diagram of a computer device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As used herein, "client," "terminal device," and "terminal device" are understood by those skilled in the art to include both devices that include only wireless signal receivers without transmitting capabilities and devices that include receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such a device may include: a cellular or other communication device such as a personal computer, tablet, or the like, having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; a PCS (Personal Communications Service, personal communication system) that may combine voice, data processing, facsimile and/or data communication capabilities; a PDA (Personal Digital Assistant ) that can include a radio frequency receiver, pager, internet/intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System ) receiver; a conventional laptop and/or palmtop computer or other appliance that has and/or includes a radio frequency receiver. As used herein, "client," "terminal device" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or adapted and/or configured to operate locally and/or in a distributed fashion, at any other location(s) on earth and/or in space. As used herein, a "client," "terminal device," or "terminal device" may also be a communication terminal, an internet terminal, or a music/video playing terminal, for example, a PDA, a MID (Mobile Internet Device ), and/or a mobile phone with music/video playing function, or may also be a device such as a smart tv, a set top box, or the like.
The application refers to hardware such as a server, a client, a service node, and the like, which essentially is an electronic device with personal computer and other functions, and is a hardware device with necessary components disclosed by von neumann principles such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, an output device, and the like, wherein a computer program is stored in the memory, and the central processing unit calls the program stored in the memory to run, executes instructions in the program, and interacts with the input and output devices, thereby completing specific functions.
It should be noted that the concept of the present application, called "server", is equally applicable to the case of server clusters. The servers should be logically partitioned, physically separate from each other but interface-callable, or integrated into a physical computer or group of computers, according to network deployment principles understood by those skilled in the art. Those skilled in the art will appreciate this variation and should not be construed as limiting the implementation of the network deployment approach of the present application.
The cloud server can be deployed in part of the technical scheme, can realize data communication connection with a server related to business to coordinate online service, and can also form a logically related service cluster with other related servers to provide service for related terminal equipment such as smart phones, personal computers, third-party servers and the like. The smart phone and the personal computer can access the Internet through a well-known network access mode, and establish a data communication link with the server of the application so as to access and use the service provided by the server.
For the server, the service engine for providing the online service generally opens corresponding program interfaces for various terminal devices to remotely call, and the related technical scheme suitable for being deployed in the server in the application can be realized in the server in this way.
The computer program, i.e. the application program, referred to by the present application is developed in a computer program language, and is installed in a computer device, including a server, a terminal device, etc., for implementing the relevant functions defined by the present application, unless specified, irrespective of the development language used.
Those skilled in the art will appreciate that: although the various methods of the present application are described based on the same concepts so as to be common to each other, the methods may be performed independently of each other unless specifically indicated otherwise. Similarly, for the various embodiments disclosed herein, all concepts described herein are presented based on the same general inventive concept, and thus, concepts described herein with respect to the same general inventive concept, and concepts that are merely convenient and appropriately modified, although different, should be interpreted as equivalents.
Referring to fig. 1, which is a schematic diagram illustrating a basic flow of a program log collection method according to the present embodiment, in an exemplary embodiment, a program log collection method is implemented as a current application program, and generally operates on a computer device as a test end to construct an operation instance, and generally the operation instance operates to execute relevant steps, including the following steps:
step S1100, monitoring and collecting bidirectional communication data correspondingly generated in the process of executing remote interactive communication on a current service page of a current application program:
and when the application program is loaded into the memory by the terminal equipment where the application program is positioned to activate the operation, the current application program in the terminal equipment is formed. The application program is usually provided with a plurality of service pages, and the service pages can be interface components realized by using development languages adopted by the application program, such as Activity components under an Android system, or interface components of Webview architecture provided by local analysis and operation of remote webpages developed based on HTML5 and loaded by the application program through a built-in browser. When the application program runs and is switched to a service page, the service page is displayed on the foreground for man-machine interaction, and the service page forms the current service page of the application program.
The service page provides a man-machine interaction function, and the application program allows an operation user to realize remote interaction with the service server through the operation of the current service page, wherein the operation user is usually a logged-in user of the application program, and the operation user passes the pre-authentication of the online service erected by the service server. Therefore, on the current business page of the application program, the operation user can input communication data in a first direction for interaction, the background code of the application program sends the communication data in the first direction to the business server, after the business server processes the communication data in the first direction, the business server can reversely return the corresponding communication data in a second direction to the background code processing of the current business page, the background code of the current business page can respond to the business logic of the communication data in the second direction, and related information and the like can be output. And the communication data in the first direction and the communication data in the second direction form bidirectional communication data correspondingly generated in the process of executing interactive communication between the current application program and the service server.
It should be noted that, in the bidirectional communication data, the service server may first actively send the communication data in the second direction to the current service page of the application program, and then the current service page returns the communication data in the first direction.
It should be further clear that the communication data in the first direction and the communication data in the second direction are not necessarily associated in a one-to-one correspondence, for example, the service server may simply push the communication data in the plurality of second directions to the current service page, and the current service page does not need to return any data for the communication data. And vice versa.
In an application example, the application program is a network live broadcast application program, which comprises a service page for showing a live broadcast room so as to implement interactive communication, and an operation user switches the service page of the live broadcast room to a current service page to enter a live broadcast room environment to operate. In the live broadcasting room environment, the current business page displays corresponding interface components such as a live broadcasting stream playing component, a chat record stream displaying component, a virtual gift sending component, a chat speaking input component and the like.
When the operating user sends the virtual gift to the live broadcasting room anchor user through the virtual gift sending component of the current service page, communication data in the first direction submitted to the service server is correspondingly generated, and similarly, when the operating user sends chat speaking content through the chat speaking input component of the current service page, communication data in the first direction submitted to the service server is correspondingly generated.
In contrast, for the service server, when receiving information such as virtual gift, chat speaking content, etc. from other audience users in the living broadcast room to the anchor user or receiving a system notification, the service server may send the communication data in the second direction to the operating user in a unicast or broadcast mode.
Of course, the specific data content included in the communication data is not limited to the above examples, and should theoretically cover various forms of communication data processed in the whole memory life cycle of the current service page, which are processed between the current terminal device and the service server or even other associated servers. In view of the flexible variety of data formats and program business logic, it is not exhaustive and therefore will be appreciated by those skilled in the art.
The application program can realize the collection of the bidirectional communication data by starting a background monitoring service. Taking an application program developed under Android as an example, a Service component can be preset in the application program, and the monitoring Service is registered with the system during running so as to implement data acquisition on two-way communication data in the monitoring Service. For a webpage realized based on a Webview architecture, codes related to monitoring services can be built in the webpage in the same way, and when the webpage is loaded and analyzed, the related monitoring services are started to realize the acquisition of bidirectional communication data.
Step S1200, querying one or more debug terminals that determine that they have registered themselves as recipients:
because of the need of the present application to use the bi-directional communication data as log data for fault reporting, the application may query a pre-designated remote server to determine one or more pre-registered debug terminals, herein referred to as remote servers, which may theoretically also be integrated with the service server to operate in the same terminal device.
The debugging terminal is a terminal device where developers and customer service personnel of a development team of the application program are located, and the debugging terminal is disclosed later, registers with the remote server in advance, and registers itself as a receiver suitable for receiving the bidirectional communication data submitted by the application program. This query may be taken care of by the listening service or by further program code, without affecting the implementation of the application. If there may be multiple developers and clients who are online and preregistered at the same time, it will be appreciated that this query operation will be able to learn multiple debug terminals as recipients. After knowing the debugging terminals, the bidirectional communication data generated by the current service page can be respectively sent to each receiver.
Step 1300, in response to a log submitting event triggered in the current service page state, transmitting log data to each debug terminal, where the log data includes the bidirectional communication data and a page identifier of the current service page:
under the current service page, once the log submitting event is triggered, a service flow for sending the two-way communication data collected on the current service page to each debugging terminal as log data can be started.
The process of triggering the log submitting event can be flexibly realized according to the actual use scene of the application program and the interface design logic:
in one embodiment, for the purpose of building a self-maintenance mechanism of an application program, the background code logic of the current service page may trigger the log submitting event in the background when judging that any form of abnormality such as failure to resolve, failure to respond, etc. or any other form of operation fault occurs in communication data in any direction, so that a developer of the application program may timely master the use condition of each operation instance of the application program, and summarize experience in improving the application program, or timely interface to assist an operating user of the application program in solving the actual use problem.
In another embodiment, in order to facilitate software testing of an application program in a testing stage of software engineering, a control panel view is popped up above a view of a current page when a user call instruction or various anomalies and faults described in the previous embodiment are monitored in the application program, and a page for providing a report barrier of the application program is displayed in the control panel view so as to operate the user to prepare log data through the page, finally instruct to submit the log data, and trigger the log submitting event.
Regardless of the manner in which the log submission event is triggered, in response to which a background process of the application, typically the listening service, may transmit log data associated with the current service page to the respective debug terminal that has been determined to be the recipient. It can be understood that each debug terminal is an independent receiver, has a distribution characteristic, and when log data generated by a current service page is sent to a plurality of debug terminals, distributed submission of the log data is realized, and any one debug terminal can respond to the log data.
The log data generally includes a page identifier corresponding to the current service page, for example, when the page identifier is a web page, the page identifier may be a URL of the current service page, and when the page identifier is an Activity component, the page identifier may be a component name of the current service page, and further includes the collected bidirectional communication data that is monitored during the whole process of operating the user to enter the interaction process of the current service page and the service server. It can be understood that the submitted log data is mainly collected for the current business page, so that the data volume is small, the timeliness is high, and the debugging terminal is convenient to quickly locate the corresponding current business page when carrying the corresponding page identification for a developer to quickly and efficiently troubleshoot the abnormality and the fault.
Therefore, the application obtains one or more debugging terminals at one side of the application program by inquiring the remote server as receivers for the distributed uploading of the log data, and distributes the bidirectional communication data related to the current service page to the receivers, so that each receiver can obtain the log data related to the current service page, thereby facilitating the developers of the receivers to timely analyze the data sources by utilizing the full quantity of related communication data and checking the current service page for the abnormality caused by the data sources. Therefore, the application program side can immediately report faults/anomalies based on the response of the current service page to a log submitting event, and submit the bidirectional communication data related to the interaction scene to the developer, so that the effective bidirectional communication data is used for assisting the development side to implement debugging, the operation is quick and timely, the transmission data quantity is small, and the fault reporting is real-time and efficient.
Referring to fig. 2, in one embodiment, in order to accurately collect data, the step S1100 includes the following specific steps:
step S1111, automatically loading a preconfigured listening service in a computer background along with the starting of the current application program:
when the current application program is loaded to the memory for running, the monitoring service pre-configured in advance can be automatically loaded in the background of the computer.
Step S1112, implementing, by the listening service, listening to the remote interactive communication process of each service page in the current application program:
after the monitoring service is started, the monitoring service is responsible for monitoring the remote interactive communication process generated by the activity of each service page of the current application program entering the memory life cycle, and when one service page is activated to the top of a stack or is loaded as the current page, the current service page is formed.
Step S1113, caching, in real time, the bi-directional communication data of each current service page in the running process of the current application program, where the bi-directional communication data includes communication data sent by the current service page to a corresponding service server, and communication data sent by the service server to the local machine:
For convenience in subsequent log data transmission, the monitoring service may cache the collected communication data in a memory or a local cache of the computer device operated by the application program, where it may be understood that the bidirectional communication data includes communication data sent by the current service page to the corresponding service server, that is, communication data in the first direction, and communication data sent by the service server to the local, that is, communication data in the second direction.
It can be understood that, through the embodied embodiment, the implementation of the monitoring service is facilitated, and the accurate collection of relevant communication data required by the application is facilitated.
Referring to fig. 3, in another embodiment, to facilitate determining the receiving party, the step S1200 includes the following specific steps:
step S1211, submitting a query request to the remote server, so as to query, by the remote server, access addresses of one or more debug terminals pre-registered as recipients in the registration data table:
the remote server is used for storing a registration data table, and the registration data table is used for storing relevant registration information of each debugging terminal registered as a receiver, and mainly relates to access addresses of each debugging terminal, so that other computer equipment running the application program of the application can transmit log data to the corresponding debugging terminal through the access addresses. If necessary, the registration data table can store related token information besides the access address of the debug terminal, so that each debug terminal can realize authentication by whether the party transmitting the log data provides the matched token information or not, only receives the log data with legal identity, and reduces the probability of being attacked by the network. The registry data may also store the debug terminal's presence information so that only the inquirer is provided with the debug terminal in presence when the recipient should be polled. In addition, the registration data table can also store equipment abstract information and the like related to the debugging terminal, and a person skilled in the art can adapt to various requirements for flexibly defining each field in the registration data table, so that the method is not exhaustive.
When the debugging terminal needs to register itself as a receiver, the relevant registration information can be sent to the remote server, and the remote server can correspondingly store the relevant information into a registration data table after analyzing the relevant information. And the debugging terminal is judged by sending a heartbeat packet to the remote server at regular time, when the remote server receives the heartbeat packet smoothly according to the normal rhythm, the debugging terminal is marked to be in an on-line state, and otherwise, the debugging terminal is marked to be in an off-line state.
And after the monitoring service of the current application program is started, submitting the query request to the remote server, and inquiring the registration data table by the remote server in response to the query request to obtain access addresses corresponding to all debugging terminals matched with the current application program and obtaining corresponding token information if necessary. Of course, since the debug terminal registers with the remote server only after itself is online, in general, the debug terminal acquired by the remote server is an online debug terminal. Further, if necessary to ensure reliable connection, the remote server may also only filter out debug terminals that are not marked as being online in the registration data table, and only filter out access addresses (and token information) corresponding to the debug terminals that are online, and send the access addresses to the listening service of the current application program.
Step S1212, receiving query result data returned by the remote server, and resolving access addresses of the one or more debug terminals therein:
after receiving the query result data returned by the remote server, the monitoring service of the current application program analyzes the query result data to obtain all access addresses (and token information) which are contained in the query result data and are suitable for being used as debugging terminals of log data receivers.
Step S1213, configuring the access address of the one or more debug terminals as an access address of a recipient for delivering log data:
after all access addresses corresponding to the debug terminals suitable for being used as log data receivers are obtained, the access addresses can be configured into attribute data of log data to be sent by a subsequent monitoring service so as to be called subsequently.
According to the embodiment, the remote server is queried to obtain the debugging terminals suitable for receiving the log data, a technical basis is provided for constructing a distributed submitting log data architecture, the distributed submitting log data is enabled to be possible, each running instance of the application program running on the computer equipment can submit the log data to a plurality of distributed debugging terminals conveniently, any one debugging terminal can respond to the distributed debugging terminals when needed, and faults/anomalies reported by the application program can be responded timely.
Referring to fig. 4, in still another embodiment, to improve the interaction performance of the computer device running the application program of the present application, and in particular, to adapt to the requirement of the software testing project before the application program is released, the step S1300 includes the following specific steps:
step S1311, detecting whether at least one debug terminal registered as a receiver exists, if so, popping up a control panel view above a graphical user interface of a current service page, where a log submission control is displayed in the control panel view:
when the monitoring service of the present application needs to send log data, the number of debug terminals acquired before can be detected, if the remote server is queried before that the access address of at least one debug terminal cannot be acquired, it can be confirmed that any debug terminal suitable for receiving the bidirectional communication data generated by the current service page does not exist currently, and thus, no control component for controlling the log data submitting process is provided for the operation user of the current application program.
When the monitoring service detects that the number of the debugging terminals acquired before is greater than zero, namely one or more debugging terminals exist, the monitoring service can provide relevant control components for an operation user of the current application program. As shown in fig. 5, the control component is configured as a control panel view superimposed on the current service page, which is popped up after the listening service detects the presence of at least one debug terminal pre-registered as a recipient. In the pre-submission state of log data as shown in FIG. 5, it provides two controls, namely a log submission control identified as "reporting" and a panel hiding control identified as "hiding". The log submission control is used for responding to the touch of a user to execute business logic of log data submission, and the panel hiding control is used for responding to the touch of the user to execute business logic of hiding the control panel view.
Step S1312, triggering a log submission event in response to a touch operation acting on the log submission control:
when the user is operated to touch the submitting control, a log submitting event is correspondingly triggered so as to drive the execution of the background business logic.
Step S1313, in response to the log submission event, transmitting log data including the two-way communication data and the page identifier of the current service page to each of the debug terminals, respectively:
and the background business logic of the monitoring service responds to the log submitting event, constructs the page identification of the current business page and the relevant bidirectional communication data cached before the current business page into log data with an association relation, and submits the log data to each debugging terminal according to the access address of each debugging terminal.
When the method is implemented, the monitoring service can be realized by node. Js, and when the log data is submitted to each debugging terminal, the distribution and the submission of the log data can be realized in the form of HTTP request POST data.
Upon completion of the response to the log commit event, the control panel view may return relevant execution result information, which may be flexibly implemented by those skilled in the art.
Step S1314, automatically or passively hiding the control panel view after completing the response of the log submission event:
after the response logic of the log submission event is executed, in the embodiment shown in fig. 5, since the panel hiding control is provided in the control panel view, the operating user of the current application program may control the listening service to stow the control panel view through the touch panel hiding control so as not to affect the operating user to continue to perform the interaction on the current service page.
In another embodiment, the panel hiding control may not be provided in the control panel view, but the control panel view may be automatically hidden directly after the completion of the response to the log submission event. As for the recall of the control panel view, it is possible to pop up the realization by responding to a user touch operation such as "double click".
The embodiment is more convenient for interaction when the current application program is operated as the test program, and is more convenient for carrying out specific control through the control panel view so as to cooperate with the test of the developer and promote interaction experience.
Referring to fig. 6, in an exemplary embodiment of the present application, an application program in a computer device as a development-side debug terminal is implemented, and when the application program is loaded into a memory and runs, the method comprises the following steps:
Step S2100, registering the current debug terminal as one of the recipients of the log data of the target application:
in order to declare the computer device where the application program executing the method is located as the debug terminal, the relevant registration information of the current debug terminal needs to be registered with the remote server, and this registration information mainly plays a role of declaring the current debug device as one of the recipients of log data of a certain target application program, and the specific content of the registration information can be flexibly determined in combination with the disclosure above, and besides the access address of the current debug terminal which is used for implementing the submission of the log data and token information, online status information and the like can be included as required.
In particular, the registration information will also generally include the target application to which it is adapted, so as to declare that the debug terminal is only open to such a target application for submitting its log data. If the target application program is not specified, the implementation of the application is not affected, namely, the debug terminal defaults to the fact that the debug terminal is suitable for receiving log data submitted by any target application program.
The current debugging terminal is generally computer equipment used by developers and customer service personnel, so that the personnel can timely master abnormal and fault related log data reported by the target application program in the running process of different terminal equipment based on the development or service requirements, respond to the abnormal and fault related log data, timely check the problems and recover the operating users of the target application program.
Step S2200, monitoring and receiving the log data transmitted by at least one remote operation instance of the target application program, analyzing the page identification of the service page and the two-way communication data required by the service page to execute remote interactive communication, and storing the two-way communication data as local data:
the target application program is loaded into a memory to run in a computer device, so that a running instance is theoretically formed, and the running instance is a remote running instance for the current terminal device. It can be understood that according to the unified service logic implemented by the code of the target application program, each remote operation instance implements the same service processing logic, so as to collect and submit the bidirectional communication data generated by performing interactive communication on the service page thereof, and finally submit the collected bidirectional communication data, which is associated with the page identifier of the corresponding service page thereof, as log data to the current debug terminal in the access state.
Therefore, the application program of the method implemented by the current debugging terminal will start a service process in advance for monitoring log data submitted by each remote running instance received by the current debugging terminal. Analyzing the monitored and received log data, acquiring a page identifier and bidirectional communication data generated by executing interactive communication on a service page in a target application program pointed by the page identifier, and storing the bidirectional communication data in a local place for subsequent abnormality checking operation by corresponding management users of developers and clients.
Step S2300, responding to a debug instruction of log data for the at least one remote operation instance, loading and operating the target application program in a current debug terminal, and entering a current service page pointed by the page identifier:
when a developer and a customer service person need to process the log data of one remote operation instance to conduct exception checking, the corresponding log data can be found in the log data list, and then a debugging instruction is sent out in a targeted mode.
And responding to the debugging instruction, loading and running the target application program by the current debugging terminal, constructing an operation instance of the target application program in a computer memory of the local equipment, switching the operation instance to a service page pointed by the page identifier according to the page identifier carried by the specified log data, and setting the service page as the current service page.
Step S2400, performing at least part of the process of the remote interactive communication in the current service page according to the bidirectional communication data in a simulation manner:
when the running instance of the target application program is switched to the current service page, the bidirectional communication data carried by the appointed log data can be applied to the running instance of the target application program, so that the whole remote interactive communication process of the log data generated by the current service page at the testing end is simulated. Of course, in some embodiments, it is not necessary to apply the two-way communication data of each piece of the log data in full, so that only a process of executing a part of the remote interactive communication needs to be simulated, which is particularly limited to the problem investigation.
It will be appreciated that in the process of performing the remote interactive communication in a simulation, the debug terminal may reproduce the entire process seen by the current service page at the test-end operating user, the current service page being adapted to the feed of bi-directional communication data and constantly changing, the process being not essentially different from the theory seen in the remote running instance in which the log data was generated.
Those skilled in the art know how to return process data such as two-way communication data provided by different running instances of the same application program to the running process of another running instance, and therefore, how to implement the simulation does not affect the implementation of the present application, so this embodiment will not be described in detail, but will be given as an exemplary description in the following embodiments.
According to the application, on one side of the debugging terminal, the log data submitted by each related application program can be received and stored locally by registering the log data as a receiver in advance, after responding to a debugging instruction triggered by a developer aiming at the log data submitted by a certain application program operation example (the log data submitted by a certain terminal user operation application program), the application program can be started and operated in a sandbox environment to enter a current business page pointed by the log data, and the bidirectional communication data in the log data are applied to the current business page, so that the whole interaction process of the terminal user on the current business page is simulated and reproduced.
Referring to fig. 7, in one embodiment, to facilitate building a service architecture, the step S2100 includes the following steps:
step S2111, a registration request is sent to the remote server, and the request includes an access address of the current debug terminal for receiving log data of the target application program:
the remote server is used for storing a registration data table, and the registration data table is used for storing relevant registration information of each debugging terminal registered as a receiver, and mainly relates to access addresses of each debugging terminal, so that other computer equipment running the target application program of the application can transmit log data to the corresponding debugging terminal through the access addresses. If necessary, the registration data table can store related token information besides the access address of the debug terminal, so that each debug terminal can realize authentication by whether the party transmitting the log data provides the matched token information or not, only receives the log data with legal identity, and reduces the probability of being attacked by the network. The registry data may also store the debug terminal's presence information so that only the inquirer is provided with the debug terminal in presence when the recipient should be polled. In addition, the registration data table can also store equipment abstract information and the like related to the debugging terminal, and a person skilled in the art can adapt to various requirements for flexibly defining each field in the registration data table, so that the method is not exhaustive.
When the debugging terminal needs to register itself as a receiver, a registration request can be initiated to a remote server, the relevant registration information is contained in the registration request and sent to the remote server, and after the remote server analyzes the relevant information, the relevant information is correspondingly stored in a registration data table. And the debugging terminal is judged by sending a heartbeat packet to the remote server at regular time, when the remote server receives the heartbeat packet smoothly according to the normal rhythm, the debugging terminal is marked to be in an on-line state, and otherwise, the debugging terminal is marked to be in an off-line state.
It can be seen that the remote server is more convenient for deploying massive registration information of the tested application programs, can store registration information of the debugging terminals related to the tested application programs, and can realize the technical scheme of the application as long as the tested application programs inquire the debugging terminals corresponding to the tested application programs. This is effective to promote the service efficiency and service capability of the remote server.
After the tested application program is started, a query request is submitted to the remote server, the remote server responds to the query request, queries the registration data table, obtains access addresses corresponding to all debugging terminals matched with the tested application program, obtains corresponding token information if necessary, and the tested application program can obtain a receiver of log data according to the access addresses.
Of course, since the debug terminal registers with the remote server only after itself is online, in general, the debug terminal acquired by the remote server is an online debug terminal. Further, if necessary to ensure reliable connection, the remote server may also only filter out debug terminals that are not marked as being online in the registry, only filter out access addresses (and token information) corresponding to the debug terminals that are online, and send the access addresses (and token information) to the tested application program for receiving.
Step S2112, driving the remote server to register the access address of the current debug terminal in a registration data table with the registration request, so that the current debug terminal becomes one of the receivers adapted to receive the log data:
as described above, after receiving the registration request of the current debug terminal, the remote server parses the access address of the current debug terminal and other related information from the registration request under the driving of the registration request, and adds these registration information to the registration data table according to the registration information, so that the current debug terminal becomes one of the receivers suitable for receiving the log data.
According to the embodiment, the remote server is supported to be a unified service architecture by implementing a registration mechanism on the debugging terminal, so that the remote server is suitable for serving a plurality of tested application programs, and the debugging terminal implementing the technical scheme of the application is suitable for accessing the remote server at any time so as to serve each tested application program.
Referring to fig. 8, in another embodiment, to facilitate data regression, the step S2300 includes the following specific steps:
step S2311, in response to a debug instruction for the log data of the at least one remote running instance, starting a pre-configured sandboxed environment adapted to run the target application program:
when a user of the current debugging terminal needs to call certain log data to troubleshoot the abnormality/fault encountered by the terminal equipment to which the user belongs, initiating the debugging instruction, and a service process of the debugging terminal responds to the debugging instruction, and starting a pre-configured sandbox environment suitable for running the target application program so as to construct a running instance of the target application program in the sandbox environment.
The implementation of pre-configuring a sandbox environment for running applications to mask their interactions with native resources and external network resources is well known to those skilled in the art and is therefore not repeated here. Here, it is only necessary for a person skilled in the art to know that the present application needs to pre-configure a sandbox environment in the debug terminal for subsequent emulation, which is started for running the target application when the service process needs to perform emulation.
Step S2312, controlling the target application program to load and run in the sandboxed environment:
the service process of the current debugging terminal then calls logic according to the inherent sandbox environment, loads the target application program corresponding to the log data to be debugged in the sandbox environment, loads the target application program into the sandbox environment to operate, and constructs an operation instance of the target application program.
Step S2313, switching the target application program to the current service page pointed by the page identifier included in the log data:
because the log data contains the page identification of the service page when the abnormality occurs, the operation instance in the sandbox environment can be switched to the service page pointed by the page identification based on the page identification, and the service page is set as the current service page in the operation instance.
According to the method and the device, the operation instance of the target application program is constructed on the debugging terminal by utilizing the sandbox environment, so that the remote interaction process is simulated and executed to be ready, the operation instance is placed in a safer environment, the safety of the debugging terminal cannot be threatened, and the operation of the target application program and the debugging terminal are effectively decoupled and irrelevant to equipment due to the fact that the sandbox environment suitable for the operation of the target application program is virtualized.
Referring to fig. 9, in still another embodiment, in order to facilitate improving the troubleshooting execution efficiency of the debug terminal, an exemplary application is provided, for which the step S2400 includes the steps of:
step S2411, responding to a simulation debugging event triggered by a control panel view in a graphical user interface of a current debugging terminal, and starting a process of executing the remote interactive communication in a simulation manner in a current service page according to the two-way communication data:
to facilitate handling the simulation process, a control panel view may be pre-displayed above the current business page in a graphical user interface of the running instance built for the target application, the control panel view being configurable as a semi-transparent or fully transparent material. As shown in fig. 10, the control panel view may provide a start execution control identified as "play" for starting the simulation debugging process and a continue execution control identified as "next frame" for controlling the execution of the simulation debugging process by inputting the bi-directional communication data one by one.
And the user of the debugging terminal touches the start execution control to trigger a simulation debugging event, so that the process of simulating and executing the remote interactive communication in the current service page according to the bidirectional communication data can be started according to background service logic. It should be noted that, the background business logic corresponding to the start execution control may be configured to automatically and completely input all pieces of bidirectional communication data, or may be configured to only start input of the first piece of bidirectional communication data, and then input the next piece of data through the continuous execution control, which can be flexibly implemented by those skilled in the art. Of course, the user of the debug terminal can also touch the continuous execution control to realize the input of the piece-by-piece data.
Step S2412, applying the communication data belonging to the first communication sending direction and contained in the bidirectional data communication in the current service page, and suspending the operation of the current service page:
when a debugging terminal user controls a control, and starts simulation execution according to background business logic, in a link of the whole simulation execution, a situation that communication data belonging to a first communication sending direction is fed for a current business page of the running instance inevitably exists, the communication data of the first communication sending direction is taken from the bidirectional communication data, and the first communication sending direction can be the direction that a business server sends the communication data to an application program generating log data or the direction that the application program generating log data sends the communication data to the business server, and the two directions are just relative.
After the communication data in the first communication sending direction is fed to the current service page, the current service page executes the response according to the background service logic inherent in the target application program, the response is reflected to the graphical user interface, and the user of the debugging terminal can observe the display and response effects of the user, so that the problem is gradually checked. Therefore, in this case, the operation of the current service page will also be suspended, so as to facilitate observation.
Step S2413, responding to a debugging flow continuing event, resuming the operation of the current service page, and applying the communication data belonging to the second communication sending direction contained in the bidirectional data communication in the current service page to suspend the operation of the current service page:
similarly, in a link of the whole simulation execution, a situation that the current service page of the running instance is fed with a piece of communication data belonging to the second communication sending direction inevitably exists, and in this embodiment, the situation may occur, after the user of the debugging terminal completes the previous step, by continuing to touch the execution continuing control to trigger the execution.
After the user of the debugging terminal triggers the execution, the continuous operation of the operation instance is actually recovered, the operation of the current service page is recovered, the current service page acquires the communication data in the second communication sending direction, the corresponding response execution is reflected to the graphical user interface, and the user of the debugging terminal can observe the display and response effects of the user, so that the problem is gradually cleared.
It can be understood that this embodiment only abstracts a typical one-to-one interaction process in the simulation execution process, in which communication data respectively related to the first communication sending direction and the second communication sending direction are fed into the running instance of the target application program, and the running of the on-plane service page of the running instance is driven, so that the user of the debugging terminal can observe the interface change in the graphical user interface, and troubleshoot the problem. In fact, this one-to-one interaction is abundant and not necessarily corresponding to one another throughout the simulation execution, and thus, this embodiment is merely an exemplary disclosure, and one skilled in the art should understand this flexibility and should not be implemented in any way to negate the inventive spirit of the present application.
The implementation of the embodiment enriches the interaction details, obviously is more beneficial to the user of the debugging terminal to implement problem investigation, and improves the abnormality investigation efficiency.
In order to solve the technical problems, the embodiment of the application also provides a program log acquisition device.
As shown in fig. 11, a program log collecting device of the present application includes a monitor collecting module 1100, a query determining module 1200, and a log submitting module 1300, wherein: the monitoring and collecting module 1100 is configured to monitor and collect bidirectional communication data correspondingly generated in a process of executing remote interactive communication on a current service page of a current application program; the query determining module 1200 is configured to query one or more debug terminals that determine that the debug terminal has registered itself as a receiver; the log submitting module 1300 is configured to respond to the log submitting event triggered in the current service page state, and transmit log data to each debug terminal, where the log data includes the bidirectional communication data and the page identifier of the current service page.
In one embodiment, the listening acquisition module 1100 comprises: a monitor loading sub-module configured to automatically load a preconfigured monitor service in a computer background along with the starting of a current application program; a monitoring implementation sub-module configured to implement monitoring by the monitoring service on the remote interactive communication process of each service page in the current application program; the data caching sub-module is used for caching the bidirectional communication data of each current service page in the running process of the current application program in real time, wherein the bidirectional communication data comprises communication data sent to a corresponding service server by the current service page and communication data sent to a local server by the service server.
In another embodiment, the query determination module 1200 includes: the remote inquiry sub-module is used for submitting an inquiry request to a remote server so as to inquire out access addresses of one or more debugging terminals pre-registered as receivers in the registration data table through the remote server; the address analysis sub-module is used for receiving the query result data returned by the remote server and analyzing the access addresses of the one or more debugging terminals; an address configuration sub-module, configured to configure the access address of the one or more debug terminals as an access address of a recipient for delivering log data.
In yet another embodiment, the log submission module 1300 includes: the panel display sub-module is used for detecting whether at least one debugging terminal registered as a receiver exists, if so, a control panel view is popped up above a graphical user interface of a current service page, and a log submitting control is displayed in the control panel view; the event triggering sub-module is used for responding to the touch operation acted on the log submitting control to trigger a log submitting event; the log distribution sub-module is used for responding to the log submitting event and respectively transmitting log data containing the bidirectional communication data and the page identification of the current service page to each debugging terminal; and the panel hiding sub-module is used for automatically or passively hiding the control panel view after the response of the log submitting event is completed.
In order to solve the technical problems, the embodiment of the application also provides a program log regression device.
As shown in fig. 12, a program log regression apparatus of the present application includes: the system comprises a role registration module 2100, a monitoring storage module 2200, a debugging response module 2300 and a simulation execution module 2400, wherein the role registration module 2100 is used for registering a current debugging terminal as one of receivers of log data of a target application program; the monitoring storage module 2200 is configured to monitor and receive the log data transmitted by at least one remote running instance of the target application, parse out the page identifier of the service page therein and the bidirectional communication data required for executing remote interactive communication on the service page, and store the bidirectional communication data as local data; the debug response module 2300 is configured to respond to a debug instruction for log data of the at least one remote running instance, load and run the target application program in a current debug terminal, and enter a current service page pointed by the page identifier; the simulation execution module 2400 is configured to simulate and execute at least part of the remote interactive communication process in the current service page according to the two-way communication data.
In one embodiment, the role registration module 2100 includes: a registration request sub-module, configured to send a registration request to a remote server, where the request includes an access address of a current debug terminal that is used to receive log data of the target application program; and the registration realization sub-module is used for driving the remote server to register the access address of the current debugging terminal in a registration data table by using the registration request, so that the current debugging terminal becomes one of the receivers suitable for receiving the log data.
In another embodiment, the debug response module 2300 includes: an execution preparation sub-module configured to initiate a pre-configured sandboxed environment adapted to execute the target application in response to a debug instruction for log data of the at least one remote execution instance; the program running sub-module is used for controlling the loading and running of the target application program in the sandbox environment; and the page switching sub-module is used for switching the target application program to the current service page pointed by the page identifier contained in the log data.
In yet another embodiment, the simulation execution module 2400 includes: the simulation sub-module is configured to respond to a simulation debugging event triggered by a control panel view in the graphical user interface of the current debugging terminal, and start a process of executing the remote interactive communication in a simulation manner in the current service page according to the two-way communication data;
A first direction sub-module, configured to apply, in a current service page, communication data belonging to a first communication sending direction and included in the bidirectional data communication, and suspend operation of the current service page;
and the second direction submodule is used for responding to a debugging flow continuing event, resuming the operation of the current service page, and applying the communication data which belongs to the second communication sending direction and is contained in the bidirectional data communication in the current service page to pause the operation of the current service page.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 13, fig. 13 is a basic structural block diagram of a computer device according to the present embodiment.
As shown in fig. 13, the internal structure of the computer device is schematically shown. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. The nonvolatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store a control information sequence, and the computer readable instructions can enable the processor to realize a program log acquisition/regression method when the computer readable instructions are executed by the processor. The processor of the computer device is used to provide computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, cause the processor to perform a program log collection/regression method. The network interface of the computer device is for communicating with a terminal connection. It will be appreciated by those skilled in the art that the structure shown in FIG. 13 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The processor in this embodiment is configured to perform specific functions of each module/sub-module in fig. 11/12, and the memory stores program codes and various data required for executing the above modules. The network interface is used for data transmission between the user terminal or the server. The memory in this embodiment stores program codes and data required for executing all the sub-modules in the program log collecting/returning device, and the server can call the program codes and data of the server to execute the functions of all the sub-modules.
The present application also provides a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of any of the above-described implementation routine log acquisition/regression methods.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
In summary, the application improves the mechanism of troubleshooting the application program faults and anomalies, changes the submitting of log data from a point-to-point reporting and waiting mode to a point-to-many distributing customer service mode, reduces the concentrated dependence on a server cluster, is beneficial to improving the work efficiency of the software engineering organization of an internet platform side, improves the instant interactive response efficiency between a user terminal where the application program is positioned and a debugging terminal where a developer is positioned, and improves the implementation experience of the software maintenance engineering.
Those of skill in the art will appreciate that the various operations, methods, steps in the flow, acts, schemes, and alternatives discussed in the present application may be alternated, altered, combined, or eliminated. Further, other steps, means, or steps in a process having various operations, methods, or procedures discussed herein may be alternated, altered, rearranged, disassembled, combined, or eliminated. Further, steps, measures, schemes in the prior art with various operations, methods, flows disclosed in the present application may also be alternated, altered, rearranged, decomposed, combined, or deleted.
The foregoing is only a partial embodiment of the present application, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present application, and such modifications and adaptations are intended to be comprehended within the scope of the present application.

Claims (10)

1. The program log acquisition method is characterized by comprising the following steps of:
the method comprises the steps that a current terminal monitors and collects bidirectional communication data correspondingly generated in the process of executing remote interactive communication on a current service page of a current application program, wherein the bidirectional communication data comprise first communication data sent to a service server by the current terminal in response to a user operation event acting on the current service page or second communication data sent to the current terminal by the service server to execute a service execution event acting on the current service page;
the method comprises the steps that a current terminal inquires and determines one or more debugging terminals which are registered as receivers, wherein the current terminal submits an inquiry request to a remote server, so that access addresses of one or more debugging terminals which are preregistered as receivers in a registration data table are inquired through the remote server, inquiry result data returned by the remote server are received, the access addresses of the one or more debugging terminals are analyzed, and the access addresses of the one or more debugging terminals are configured to be the access addresses of the receivers for transmitting log data;
the current terminal responds to a log submitting event triggered under the abnormal state of the current service page, and transmits log data to each debugging terminal respectively, wherein the log data comprises the bidirectional communication data and the page identification of the current service page.
2. The program log collecting method according to claim 1, wherein the query determines one or more debug terminals which have registered themselves as recipients, comprising the steps of:
submitting a query request to a remote server to query access addresses of one or more debug terminals pre-registered as receivers in a registration data table through the remote server;
receiving query result data returned by a remote server, and resolving access addresses of one or more debugging terminals;
the access address of the one or more debug terminals is configured as an access address of a recipient for delivering log data.
3. The program log collection method according to claim 1, wherein the step of transmitting log data to each of the debug terminals in response to a log commit event triggered in a current service page state, respectively, comprises the steps of:
detecting whether at least one debugging terminal registered as a receiver exists, if so, popping up a control panel view above a graphical user interface of a current service page, and displaying a log submitting control in the control panel view;
triggering a log submission event in response to a touch operation acting on the log submission control;
Responding to the log submitting event and respectively transmitting log data containing the two-way communication data and the page identification of the current service page to each debugging terminal;
and automatically or passively hiding the control panel view after the response of the log submitting event is completed.
4. A program log regression method, comprising the steps of:
the current debugging terminal registers the current debugging terminal as one of the receivers of the log data of the target application program, wherein the current debugging terminal sends a registration request to a remote server, the request comprises an access address of the current debugging terminal for receiving the log data of the target application program, and the remote server is driven by the registration request to register the access address of the current debugging terminal in a registration data table, so that the current debugging terminal becomes one of the receivers suitable for receiving the log data;
the current debugging terminal monitors and receives the log data transmitted by at least one remote operation instance of the target application program, analyzes the page identification of a service page in the log data and bidirectional communication data required by the service page to execute remote interactive communication, and stores the bidirectional communication data as local data;
The current debugging terminal responds to a debugging instruction aiming at log data of the at least one remote operation instance, loads and operates the target application program in the current debugging terminal, and enters a current service page pointed by the page identification;
and the current debugging terminal performs at least part of the process of remote interactive communication in the current service page in a simulation mode according to the two-way communication data.
5. The program log regression method of claim 4 wherein loading and running the target application in the current debug terminal into the current service page to which the page identification points in response to a debug instruction for log data of the at least one remote run instance comprises the specific steps of:
responding to a debugging instruction of log data of the at least one remote operation instance, and starting a preconfigured sandbox environment suitable for operating the target application program;
controlling the target application program to load and run in the sandbox environment;
and switching the target application program to a current business page pointed by the page identification contained in the log data.
6. The program log regression method of claim 4 wherein simulating at least a portion of the process of executing the remote interactive communication in the current business page based on the bi-directional communication data comprises the steps of:
Responding to a simulation debugging event triggered by a control panel view in a graphical user interface of a current debugging terminal, and starting a process of executing the remote interactive communication in a simulation manner in a current service page according to the bidirectional communication data;
applying communication data belonging to a first communication sending direction contained in the bidirectional communication data in the current service page, and suspending the operation of the current service page;
and responding to a debugging flow continuing event, restoring the operation of the current service page, and applying the communication data belonging to the second communication sending direction and contained in the bidirectional communication data in the current service page to pause the operation of the current service page.
7. A program log collection device, comprising:
the monitoring acquisition module is used for monitoring and acquiring bidirectional communication data correspondingly generated in the process of executing remote interactive communication on a current service page of a current application program by the current terminal, wherein the bidirectional communication data comprises first communication data which are sent to a service server by the current terminal in response to a user operation event acting on the current service page or second communication data which are sent to the current terminal by the service server and used for executing a service execution event acting on the current service page;
The query determining module is used for querying and determining one or more debugging terminals which have registered themselves as receivers by the current terminal, wherein the current terminal submits a query request to the remote server so as to query access addresses of the one or more debugging terminals which have been preregistered as receivers in the registration data table by the remote server, receive query result data returned by the remote server, analyze the access addresses of the one or more debugging terminals, and configure the access addresses of the one or more debugging terminals as the access addresses of the receivers for transmitting log data;
the log submitting module is configured to respond to a log submitting event triggered under the abnormal state of the current service page by the current terminal and respectively transmit log data to each debugging terminal, wherein the log data comprises the bidirectional communication data and page identifiers of the current service page.
8. A program log regression apparatus, comprising:
the role registration module is used for registering the current debugging terminal as one of the receivers of the log data of the target application program, wherein the current debugging terminal sends a registration request to the remote server, the request comprises an access address of the current debugging terminal for receiving the log data of the target application program, and the remote server is driven by the registration request to register the access address of the current debugging terminal in the registration data table, so that the current debugging terminal becomes one of the receivers suitable for receiving the log data;
The monitoring storage module is used for monitoring and receiving the log data transmitted by at least one remote operation instance of the target application program by the current debugging terminal, analyzing the page identification of the service page and the bidirectional communication data required by the service page to execute remote interactive communication, and storing the bidirectional communication data as local data;
the debugging response module is used for responding to a debugging instruction aiming at log data of the at least one remote operation instance by the current debugging terminal, loading and operating the target application program in the current debugging terminal, and entering a current service page pointed by the page identifier;
and the simulation execution module is used for the current debugging terminal to simulate and execute at least part of the process of the remote interactive communication in the current service page according to the two-way communication data.
9. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the method of any of claims 1 to 6.
10. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of any of claims 1 to 6.
CN202110768623.3A 2021-07-07 2021-07-07 Program log acquisition and regression method and corresponding device, equipment and medium thereof Active CN113419940B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110768623.3A CN113419940B (en) 2021-07-07 2021-07-07 Program log acquisition and regression method and corresponding device, equipment and medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110768623.3A CN113419940B (en) 2021-07-07 2021-07-07 Program log acquisition and regression method and corresponding device, equipment and medium thereof

Publications (2)

Publication Number Publication Date
CN113419940A CN113419940A (en) 2021-09-21
CN113419940B true CN113419940B (en) 2023-08-15

Family

ID=77720460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110768623.3A Active CN113419940B (en) 2021-07-07 2021-07-07 Program log acquisition and regression method and corresponding device, equipment and medium thereof

Country Status (1)

Country Link
CN (1) CN113419940B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658545B (en) * 2022-11-14 2023-05-05 广州掌动智能科技有限公司 Software error reporting method and system
CN115998332B (en) * 2023-03-28 2023-07-28 北京轻松筹信息技术有限公司 Image acquisition method and device, electronic equipment and storage medium
CN116561015B (en) * 2023-07-07 2023-09-12 中关村科学城城市大脑股份有限公司 Map application testing method, electronic device and computer readable medium
CN116737598B (en) * 2023-08-14 2023-10-20 北京国电通网络技术有限公司 Page debugging method, device, electronic equipment and computer readable medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978277A (en) * 2015-07-30 2015-10-14 北京百度网讯科技有限公司 Method for debugging page, terminal and server
CN110347945A (en) * 2018-01-15 2019-10-18 北京京东金融科技控股有限公司 The method and apparatus for obtaining the data of the page
CN110442550A (en) * 2019-07-05 2019-11-12 北京邮电大学 The poly- screen real time visualized method of log and device
CN110446228A (en) * 2019-08-13 2019-11-12 腾讯科技(深圳)有限公司 Data transmission method, device, terminal device and storage medium
CN110442506A (en) * 2019-08-16 2019-11-12 上海智臻智能网络科技股份有限公司 A kind of journal obtaining method, device, service server, system and storage medium
CN111669447A (en) * 2020-06-16 2020-09-15 中国建设银行股份有限公司 Page display method, device, equipment and medium
CN111857928A (en) * 2020-07-23 2020-10-30 北京达佳互联信息技术有限公司 Page task access method, device and system, electronic equipment and storage medium
CN111880790A (en) * 2020-06-12 2020-11-03 北京三快在线科技有限公司 Page rendering method, page rendering system, and computer-readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9158657B2 (en) * 2013-02-19 2015-10-13 Audible, Inc. Architecture for remote access to content state

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978277A (en) * 2015-07-30 2015-10-14 北京百度网讯科技有限公司 Method for debugging page, terminal and server
CN110347945A (en) * 2018-01-15 2019-10-18 北京京东金融科技控股有限公司 The method and apparatus for obtaining the data of the page
CN110442550A (en) * 2019-07-05 2019-11-12 北京邮电大学 The poly- screen real time visualized method of log and device
CN110446228A (en) * 2019-08-13 2019-11-12 腾讯科技(深圳)有限公司 Data transmission method, device, terminal device and storage medium
CN110442506A (en) * 2019-08-16 2019-11-12 上海智臻智能网络科技股份有限公司 A kind of journal obtaining method, device, service server, system and storage medium
CN111880790A (en) * 2020-06-12 2020-11-03 北京三快在线科技有限公司 Page rendering method, page rendering system, and computer-readable storage medium
CN111669447A (en) * 2020-06-16 2020-09-15 中国建设银行股份有限公司 Page display method, device, equipment and medium
CN111857928A (en) * 2020-07-23 2020-10-30 北京达佳互联信息技术有限公司 Page task access method, device and system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113419940A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN113419940B (en) Program log acquisition and regression method and corresponding device, equipment and medium thereof
US10212059B2 (en) System and methods for recording and recreating interactive user-sessions involving an on-line server
US8584079B2 (en) Quality on submit process
US8510720B2 (en) System landscape trace
US9363134B1 (en) Lightweight browser monitoring and viewing
CN106603283B (en) A kind of method, apparatus and centralized management platform of analog service
US20090064173A1 (en) Content management
CN104636146A (en) Online visual customizing method and system
CN110825985B (en) Data acquisition system, method, device, control equipment and proxy equipment
CN112114865A (en) Version data processing method and device, storage medium and electronic device
GB2357679A (en) Monitoring of services provided over a network with recording and redisplay of user interactions with a web page
CN106776318A (en) A kind of test script method for recording and system
CN111400184A (en) Game testing method, device, system, equipment and cloud platform
CN107168844B (en) Performance monitoring method and device
CN111970166B (en) Test method, device, equipment, system and computer readable storage medium
CN111782525A (en) Java method remote debugging method and device
CN106815150B (en) Server-side interface test system and method
CN107844486B (en) Method and system for analyzing webpage problems for client
US8412808B2 (en) Method and framework for service-based remote support delivery
CN108399122A (en) Test script operation method and system
CN112911283B (en) Smart television testing method and device
CN106357466B (en) A kind of internet product monitoring method and monitoring system
CN113535668A (en) Log data processing method and device
CN112685301A (en) Fuzzy test method and device
CN112199283A (en) Program test control and execution method and corresponding device, equipment and 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