CN113419940A - Program log collecting and returning method and corresponding device, equipment and medium - Google Patents

Program log collecting and returning method and corresponding device, equipment and medium Download PDF

Info

Publication number
CN113419940A
CN113419940A CN202110768623.3A CN202110768623A CN113419940A CN 113419940 A CN113419940 A CN 113419940A CN 202110768623 A CN202110768623 A CN 202110768623A CN 113419940 A CN113419940 A CN 113419940A
Authority
CN
China
Prior art keywords
log
data
current
debugging
application program
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.)
Granted
Application number
CN202110768623.3A
Other languages
Chinese (zh)
Other versions
CN113419940B (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

Images

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 collecting and returning method and a corresponding device, equipment and medium thereof, wherein the collecting method comprises the following steps: monitoring and collecting two-way communication data correspondingly generated in the process of executing remote interactive communication by a current service page of a current application program; inquiring and determining one or more debugging terminals which register themselves as a receiving party; and responding to a log submitting event triggered in 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 identifier of the current service page. According to the method and the device, the mechanism of troubleshooting of the application program is improved, the submission of the log data is changed from a point-to-point reporting and reviewing mode to a point-to-many customer service distribution mode, the centralized dependence on the server cluster is reduced, the instant interactive response efficiency between the user terminal where the application program is located and the debugging terminal where developers are located is improved, and the implementation experience of software maintenance engineering is improved.

Description

Program log collecting and returning method and corresponding device, equipment and medium
Technical Field
The embodiment of the application relates to the technical field of software engineering, in particular to a program log collecting and returning method and a corresponding device, equipment and medium thereof.
Background
When the internet application program and the server are interacted based on the online service, the operation of one party depends on the data source provided by the other party, and the data sources in the two directions form communication data in the interaction process. The developer often needs to master some abnormal conditions encountered by the terminal application program for testing, and if the developer cannot know the related data source in the interaction process, the developer is difficult to find the potential bugs of the application program, and even cannot troubleshoot the abnormality for the user reporting the fault. Especially when the terminal application performs the interaction based on the Web page, it is more difficult to preserve the interaction scenario by relying only on the application's own code. Although in a traditional method, an interactive scene can be saved by screenshot on a graphical user interface of an application program, because a large amount of information comes and goes, a large amount of information is continuously brushed, and the screenshot can only acquire interactive data in a short time, the screenshot is difficult to allow a developer to effectively master data streams formed by all related communication data in the interactive process, and is not helpful for troubleshooting.
Another common way is that log data can be manually submitted through a terminal application program so that developers can conveniently check according to the log data, the specific implementation of the current method is very complicated, a terminal user needs to quit the current service scene, enter a fault report page, manually fill related information, upload log data which move dozens of megabytes frequently, and various encryption and decryption operations are used, the whole process is tedious, and not much, and the most important thing is that a large amount of processing time is consumed, so that the whole checking process is very time-consuming, and the original interactive scene is lost, therefore, submitted log data can only be static historical data at best, the data volume is huge, and beneficial information is very limited.
It can be understood that this situation is more obvious for the test engineering of the application program to be released: because log data has huge information content and few related content, log screening needs to be carried out aiming at reporting time points, and in order to acquire accurate information data sources, it is necessary to ensure that data source marking is carried out on data sources in advance, otherwise reported log data is meaningless because the reported log data cannot be checked. Under the closed loop, the records of the data source are collected and marked from the development stage, the client log of a tester is reported and the BUG is submitted, then the developer downloads the client log, analyzes the log, screens the data source information in huge log content, regroups the data aiming at the screened data source, and returns the site where the BUG appears to locate the problem. Such a closed loop is very cumbersome and tedious, with high time and screening costs.
In addition, many services involved in abnormal investigation are identity costs presented by the account number level of the terminal user, for example, if the levels of the VIP member, the noble member, and the common member are different, the identity costs are different, and data issued by the data source is correspondingly different due to the identity difference. In the existing abnormal reporting and troubleshooting mode, developers generally inquire the account number of a terminal user to restore a service scene, the trouble of the mode is obvious, a software testing process is blocked frequently, or an original scene cannot be reproduced clearly, a problem data source cannot be positioned, a back-end developer is required to assist in checking the data source and positioning the problem aiming at the identification and the behavior of the terminal user, the original interactive scene cannot be restored accurately, and even if the original interactive scene is simulated reluctantly, the reported positioning closed loop is returned to the original complicated reporting closed loop.
As can be seen from the above analysis, in the prior art, the failure reporting processing flow of the application program has disadvantages of complexity and inefficiency for both the user side and the development side, and improvement is needed.
Disclosure of Invention
The present application is directed to at least one problem in the prior art, and provides a program log collection and regression method, and a corresponding apparatus, computer device, and storage medium.
In order to solve the technical problem, the application adopts a technical scheme that:
a program log collection method comprises the following steps:
monitoring and collecting two-way communication data correspondingly generated in the process of executing remote interactive communication by a current service page of a current application program;
inquiring and determining one or more debugging terminals which register themselves as a receiving party;
and responding to a log submitting event triggered in 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 identifier of the current service page.
In a further embodiment, the step of monitoring and collecting bidirectional communication data correspondingly generated in the process of performing remote interactive communication on the current service page of the current application program comprises the following steps:
automatically loading a pre-configured monitoring service in a computer background along with the starting of the current application program;
the monitoring service monitors the remote interactive communication process of each business page in the current application program;
caching the two-way communication data of each current service page in the running process of the current application program in real time, wherein the two-way communication data comprise communication data sent to a corresponding service server by the current service page and communication data sent to the local machine by the service server.
In one embodiment, the method for querying one or more debugging terminals that determine that the debugging terminal or terminals have registered themselves as the receiving party comprises the steps of:
submitting a query request to a remote server so as to query the access addresses of one or more debugging terminals which are pre-registered as receivers in a registration data table through the remote server;
receiving query result data returned by the remote server, and analyzing the access addresses of the one or more debugging terminals;
configuring the access address of the one or more debugging terminals as an access address for reaching a recipient of the log data.
In a preferred embodiment, the step of transmitting the log data to each of the debugging terminals in response to the log submitting event triggered in the current service page state includes 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 the current business page, and displaying a log submission control in the control panel view;
triggering a log submitting event in response to a touch operation acting on the log submitting control;
responding to the log submitting event and respectively transmitting log data containing the bidirectional communication data and the page identifier of the current service page to each debugging terminal;
automatically or passively hiding the control panel view upon completion of the response to the log-commit event.
In order to solve the above technical problem, another technical solution adopted by the present application is:
a program log regression method, comprising the steps of:
registering a current debugging terminal as one of receivers of log data of a 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 a service page and bidirectional 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 of the log data of the at least one remote operation instance, loading 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 remote interactive communication process in the current service page according to the two-way communication data.
In a further embodiment, registering the current debugging terminal as one of the receivers of the log data of the target application program includes the following steps:
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;
and driving the remote server to register the access address of the current debugging terminal in a registration data table by the registration request, so that the current debugging terminal becomes one of receivers suitable for receiving the log data.
In a further embodiment, in response to a debugging instruction for the log data of the at least one remote operation instance, the target application program is loaded in a current debugging terminal, and a current service page pointed by the page identifier is entered, including the following specific steps:
starting a pre-configured sandbox environment suitable for running the target application program in response to a debugging instruction of log data of the at least one remote running instance;
controlling the target application program to be loaded and run in the sandbox environment;
and switching the target application program to a current business page pointed by a page identification contained in the log data.
In a preferred embodiment, simulating at least a part of the process of performing the remote interactive communication in the current service page according to the two-way communication data includes 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 performing the remote interactive communication in a simulation mode in a current service page according to the two-way communication data;
applying communication data which belongs to a first communication sending direction and is contained in the bidirectional data communication in a current service page, and suspending the operation of the current service page;
and responding to the debugging flow continuing event, recovering the operation of the current service page, 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, and suspending the operation of the current service page.
In order to solve the above technical problem, another technical solution adopted by the present application is:
a program log collection device, comprising:
the monitoring acquisition module is used for monitoring and acquiring two-way communication data correspondingly generated in the process of executing remote interactive communication by the current service page of the current application program;
the query determining module is used for querying and determining one or more debugging terminals which register the debugging terminals as the receiving party;
and the log submitting module is configured to respond to a log submitting event triggered in 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 identifier of the current service page.
In one embodiment, the intercept acquisition module comprises: the monitoring loading submodule is configured to automatically load a preconfigured monitoring service in the background of the computer along with the starting of the current application program; the monitoring implementation sub-module is configured to implement monitoring on the remote interactive communication process of each business page in the current application program by the monitoring service; and the data caching submodule 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 comprise communication data sent by the current service page to a corresponding service server and communication data sent by the service server to the local computer.
In another embodiment, the query determination module comprises: the remote query submodule is used for submitting a query request to a remote server so as to query the access addresses of one or more debugging terminals which are pre-registered as a receiver in a registration data table through the remote server; the address resolution submodule is used for receiving query result data returned by the remote server and resolving access addresses of the one or more debugging terminals in the query result data; and the address configuration submodule is used for configuring the access address of the one or more debugging terminals as the access address of a receiver for sending the log data.
In yet another embodiment, the log committing module comprises: 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 pops up above a graphical user interface of the current business 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 acting on the log submitting control to trigger the log submitting event; the log distribution submodule is used for responding to the log submitting event and respectively transmitting the log data containing the bidirectional communication data and the page identification of the current service page to each debugging terminal; and the panel hiding submodule 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 above technical problem, another technical solution adopted by the present application is:
a program log regression device, comprising:
the role registration module is used for registering the current debugging terminal as one of 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 example of the target application program, analyzing the page identifier of the service page and the bidirectional 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 of the log data of the at least one remote operation instance, loading the target application program in a 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 role registration module comprises: the registration request submodule is used for sending a registration request to a remote server, and the request contains an access address of the current debugging terminal, which is used for receiving the log data of the target application program; and the registration realization submodule is used for driving the remote server to register the access address of the current debugging terminal in a registration data table by the registration request so that the current debugging terminal becomes one of receivers suitable for receiving the log data.
In another embodiment, the debug response module includes: a run preparation submodule configured to start a preconfigured sandbox environment adapted to run the target application in response to a debug instruction for log data of the at least one remote run instance; the program operation sub-module is used for controlling the target application program to be loaded and operated in the sandbox environment; and the page switching submodule is used for switching the target application program to the current service page pointed by the page identification contained in the log data.
In another embodiment, the simulation execution module includes: the simulation starting sub-module is configured to respond to a simulation debugging event triggered by a control panel view in a graphical user interface of a current debugging terminal and start a process of performing the remote interactive communication in a simulation mode in a current service page according to the two-way communication data;
the first direction submodule is used for applying communication data which belongs to a first communication sending direction and is contained in the bidirectional data communication in a current service page and suspending the operation of the current service page;
and the second direction sub-module is used for responding to the debugging flow continuing event, recovering the operation of the current service page, 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, and suspending the operation of the current service page.
In order to solve the above technical problem, the present application further provides a computer device, including a memory and a processor, where the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to execute the steps of the program log collection/regression method.
In order to solve the above technical problem, an embodiment of the present invention further provides a storage medium storing computer readable instructions, which 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 method has the following advantages:
firstly, one or more debugging terminals are obtained by inquiring a remote server at one side of an application program and serve as receivers for log data distributed uploading, 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, developers of the receivers can conveniently utilize the full amount of related communication data to conduct data source analysis in time, and abnormity caused by data sources is checked for the current service page. Therefore, one side of the application program can respond to a log submitting event based on the current business page and immediately report the fault/abnormity, and the two-way communication data related to the interactive scene is submitted to developers, so that the development side is assisted by effective two-way communication data to carry out debugging, the operation is fast and timely, the transmission data volume is small, and the fault reporting is real-time and efficient.
Secondly, the application can receive log data submitted by each related application program for local storage by registering the application itself as a receiver in advance at one side of a debugging terminal, after responding to a debugging instruction triggered by a developer aiming at the log data submitted by an application program running instance (log data submitted by a terminal user running the application program), the application program can be started and run in a sandbox environment, the current business page pointed by the log data is entered, and the whole interaction process of a simulation reproduction terminal user at the current business page is realized by applying the bidirectional communication data in the log data to the current business page, so that the debugging terminal side can intuitively display various interfaces and data changes by reproducing the interaction process at the terminal user side, and the rapid positioning of the developer are facilitated, And faults or exceptions are eliminated, so that the efficiency of the work of testing, debugging, maintaining and the like of the application program can be greatly improved, and various time costs are saved.
In addition, viewed from all sides, the application improves the mechanism of troubleshooting the application program, changes the submission of log data from a point-to-point reporting and reviewing mode to a point-to-many customer service distribution mode, reduces the centralized dependence on a server cluster, is beneficial to improving the work efficiency of software engineering organization on an internet platform side, improves the instant interactive response efficiency between the user terminal where the application program is located and the debugging terminal where developers are located, and improves the implementation experience of software maintenance engineering.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic diagram of a basic flow of a program log collection method according to the present application;
FIG. 2 is a schematic flow chart illustrating a process of implementing a listening service by the program log collection method of the present application;
FIG. 3 is a schematic flow chart illustrating a process of querying a debugging terminal according to the program log collection method of the present application;
FIG. 4 is a schematic flow chart illustrating a process of submitting log data according to the log collection method of the application;
FIG. 5 is a schematic diagram of an operation interface of the program log collection method of the present application;
FIG. 6 is a schematic diagram of a basic flow of a regression method for program logs according to the present application;
FIG. 7 is a flowchart illustrating a process of registering a recipient according to the log regression method of the present application;
FIG. 8 is a flowchart illustrating a process of loading a target application according to the method for program log regression of the present application;
FIG. 9 is a schematic view of a process of executing a current service page in a log regression method according to the application;
FIG. 10 is a schematic view of an operating interface of the log regression method of the present application;
fig. 11 and 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 block diagram of a basic structure of a computer device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. 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. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, 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. 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 will be appreciated by those skilled in the art, "client," "terminal," and "terminal device" as used herein include both devices that are wireless signal receivers, which are devices having only wireless signal receivers without transmit capability, and devices that are receive and transmit hardware, which have receive and transmit hardware capable of two-way communication over a two-way communication link. Such a device may include: cellular or other communication devices such as personal computers, tablets, etc. having single or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, facsimile and/or data communication capabilities; a PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, internet/intranet access, a web browser, a notepad, a calendar and/or a GPS (Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "client," "terminal device" can be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or situated and/or configured to operate locally and/or in a distributed fashion at any other location(s) on earth and/or in space. The "client", "terminal Device" used herein may also be a communication terminal, a web terminal, a music/video playing terminal, such as a PDA, an MID (Mobile Internet Device) and/or a Mobile phone with music/video playing function, and may also be a smart tv, a set-top box, and the like.
The hardware referred to by the names "server", "client", "service node", etc. is essentially an electronic device with the performance of a personal computer, and is a hardware device having necessary components disclosed by the von neumann principle such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, an output device, etc., a computer program is stored in the memory, and the central processing unit calls a program stored in an external memory into the internal memory to run, executes instructions in the program, and interacts with the input and output devices, thereby completing a specific function.
It should be noted that the concept of "server" as referred to in this application can be extended to the case of a server cluster. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided, and in physical space, the servers may be independent from each other but can be called through an interface, or may be integrated into one physical computer or a set of computer clusters. Those skilled in the art will appreciate this variation and should not be so limited as to restrict the implementation of the network deployment of the present application.
According to the technical scheme, the cloud server can be deployed, data communication connection can be achieved between the cloud server and servers related to business so as to coordinate online service, and a logically related server cluster can be formed between the cloud server and other related servers so as to provide service for related terminal equipment such as a smart phone, a personal computer and a third-party server. The smart phone and the personal computer can both access the internet through a 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, a corresponding program interface is opened by a service engine providing an online service for remote invocation by various terminal devices, and the related technical solution applicable to be deployed in the server in the present application can be implemented in the server in this way.
The computer program, i.e., the application program, referred to in the present application, is developed in a computer program language, and is installed in a computer device, including a server, a terminal device, and the like, to implement the relevant functions defined in the present application, regardless of the development language used therein unless otherwise specified.
The person skilled in the art will know this: although the various methods of the present application are described based on the same concept so as to be common to each other, they may be independently performed unless otherwise specified. In the same way, for each embodiment disclosed in the present application, it is proposed based on the same inventive concept, and therefore, concepts of the same expression and concepts of which expressions are different but are appropriately changed only for convenience should be equally understood.
Referring to fig. 1, a basic flow diagram of a program log collection method according to this embodiment is shown, in an exemplary embodiment of the program log collection method, the program log collection method is implemented as a current application program, generally runs on a computer device serving as a test end to construct an operation instance, and generally runs the operation instance to execute relevant steps, and specifically includes the following steps:
step S1100, monitoring and collecting two-way communication data correspondingly generated in the process of executing remote interactive communication by the current service page of the current application program:
when the application program is loaded into the memory by the terminal equipment where the application program is located and activated to run, the current application program in the terminal equipment is formed. The application program usually has a plurality of service pages, and the service pages may be interface components implemented by using a development language adopted by the application program, such as Activity components under an Android system, or interface components of a Webview architecture provided by the application program locally analyzing and running through a remote web page developed based on HTML5 loaded by a built-in browser. When the application program runs and is switched to a service page, and the service page is displayed in the foreground for man-machine interaction, the service page forms the current service page of the application program.
The service page provides a man-machine interaction function, the application program allows an operating user to control through the current service page to realize remote interaction with the service server, and the operating user is usually a logged-in user of the application program and passes the pre-authentication of the online service established by the service server. Therefore, on the current service page of the application program, an 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 service server, after the service server processes the communication data in the first direction, the service server can reversely return corresponding communication data in a second direction to the background code of the current service page for processing, and the background code of the current service page can respond to the service logic of the communication data in the second direction and can output related information and the like. The communication data in the first direction and the communication data in the second direction form two-way communication data correspondingly generated in the process that the current application program and the service server execute interactive communication.
It should be noted that, in the bidirectional communication data, the service server may also 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 sends back the communication data in the first direction.
It should be further understood that the communication data in the first direction and the communication data in the second direction are not necessarily in a one-to-one correspondence relationship, 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 live webcast application program which comprises a service page used for showing a live webcast room so as to implement interactive communication, and an operation user switches the service page of the live webcast room into a current service page to enter a live webcast room environment for operation. In the live broadcast room environment, the current business page displays corresponding interface components such as a live broadcast stream playing component, a chat record stream display component, a virtual gift sending component, a chat speech input component and the like.
When the operation user sends the virtual gift to the live broadcast room host user through the virtual gift sending component of the current service page, the communication data in the first direction submitted to the service server is correspondingly generated.
On the contrary, for the service server, when receiving information such as virtual gifts and chat speaking contents sent by other live broadcast room audience users to the anchor user or receiving system notification, the communication data in the second direction can be sent to the operation user in a unicast or broadcast mode.
Of course, the specific data content included in the communication data is not limited to the above example, and theoretically, the communication data in various forms processed in the whole memory life cycle of the current service page and sent between the current terminal device and the service server or other associated servers should be covered. It should be understood by those skilled in the art that the data format and program business logic are flexible and non-exhaustive.
The application program may enable collection of the two-way communication data by launching a background listening service. Taking an application developed under Android as an example, a Service component can be preset in the application, and the monitoring Service is registered in the system during running so as to implement data acquisition on bidirectional communication data in the application. For a web page realized based on a Webview architecture, codes related to monitoring services can be built in the web page, and when the web page is loaded and analyzed, the related monitoring services are started to realize the acquisition of bidirectional communication data.
Step S1200, inquiring to determine one or more debug terminals that have registered themselves as recipients:
due to the requirement of the application to use the bidirectional communication data as log data required for fault reporting, the application may query a pre-specified remote server to determine one or more pre-registered debugging terminals, which may also be referred to herein as a remote server, and theoretically run in the same terminal device in combination with the service server.
The debugging terminal is generally a terminal device where developers and customer service staff of a development team of the application program are located, and as will be disclosed later in the application, the debugging terminal 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 handled by the listening service as described, or by another program code, without affecting the implementation of the present application. If there may be many developers and clients who are online and pre-registered at the same time, it can be understood that this query operation will be able to learn a plurality of debug terminals as recipients. After learning the debugging terminals, the bidirectional communication data generated by the current service page can be respectively sent to each receiver.
Step S1300, in response to a log submitting event triggered in the current service page state, respectively transmitting log data to each of the debugging terminals, where the log data includes the bidirectional communication data and a page identifier of the current service page:
in the current service page, once the log submitting event is triggered, the service process of sending the bidirectional communication data acquired in the current service page to each debugging terminal as log data can be started.
And triggering the flow of the log submitting event, wherein the flow can be flexibly realized according to the actual use scene and the interface design logic of the application program:
in an embodiment, for the need of constructing a self-maintenance mechanism of an application program, when it is determined that communication data in any direction has any form of abnormality such as incapability of parsing and response or any other form of operation failure, background code logic of a current business page may trigger the log submitting event in the background, so that a developer of the application program can timely master the use conditions of each operation instance of the application program, and the summary experience is also used for improving the application program or timely interface assisting an operation user of the application program to solve the actual use problem.
In another embodiment, in order to facilitate the software testing of the application program in the testing stage of the software engineering, a user call instruction or various exceptions and faults as described in the previous embodiment may be monitored in the application program, when the user call instruction is monitored or the exceptions and faults are generated, a control panel view pops up above the view of the current page, a page for providing an application fault is displayed in the control panel view, so that the user is operated to prepare log data through the page, finally the log data is instructed to be submitted, and the log submitting event is triggered.
No matter what kind of method triggers the log submitting event, in response to the event, the background process of the application program, generally the monitoring service, can transmit the log data related to the current service page to each of the debugging terminals determined as the receiving party. It can be understood that each debugging terminal is an independent receiver and has a distribution characteristic, when the log data generated by the current service page is sent to a plurality of debugging terminals, the distributed submission of the log data is realized, and any debugging terminal can respond to the log data.
The log data usually includes a page identifier corresponding to the current service page, for example, when the log data is a web page, the page identifier may be a URL of the current service page, and when the log data is an Activity component, the page identifier may be a component name of the current service page, and of course, the log data also includes two-way communication data collected by the operation user entering the current service page and being monitored in the whole process of interaction with 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 strong, and the corresponding page identifier is carried, so that the debugging terminal can be conveniently and quickly positioned to the corresponding current business page when performing data regression, and developers can quickly and efficiently troubleshoot abnormalities and faults.
Therefore, according to the method and the device, one or more debugging terminals are obtained on one side of an application program through inquiring a remote server and serve as receivers for log data distributed uploading, and then bidirectional communication data related to the current service page are distributed to the receivers, so that each receiver can obtain the log data related to the current service page, developers of the receivers can conveniently utilize the full amount of related communication data to conduct data source analysis in time, and abnormity caused by the data source is checked for the current service page. Therefore, one side of the application program can respond to a log submitting event based on the current business page and immediately report the fault/abnormity, and the two-way communication data related to the interactive scene is submitted to developers, so that the development side is assisted by effective two-way communication data to carry out debugging, the operation is fast and timely, the transmission data volume is small, and the fault reporting is real-time and efficient.
Referring to fig. 2, in an embodiment, in order to accurately collect data, the step S1100 includes the following specific steps:
step S1111, automatically loading the pre-configured monitoring service in the computer background along with the starting of the current application program:
when the terminal device is loaded into the memory to run, the current application program can automatically load the monitoring service pre-configured in the background of the computer.
Step S1112, the monitoring service monitors 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 business page of the current application program entering the memory life cycle, and when one business page is activated to the top of a stack or loaded as the current page, the current business page is formed.
Step S1113, caching the bidirectional communication data of each current service page in the running process of the current application program in real time, where the bidirectional 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 computer:
for convenience of subsequent sending of log data, the listening service may cache the communication data collected by the listening service in a memory or a local cache of a computer device on which the application program operates, and it is understood that the bidirectional communication data includes both 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 computer, that is, communication data in the second direction.
It can be understood that, through the embodied embodiment, the implementation of the listening service is facilitated, and the related communication data required by the application is conveniently and accurately acquired.
Referring to fig. 3, in another embodiment, in order to determine the receiving party, the step S1200 includes the following specific steps:
step S1211, submitting a query request to the remote server to query the access addresses of one or more debugging terminals pre-registered as the receiving party in the registration data table through the remote server:
the remote server is used for storing a registration data table, the registration data table is used for storing relevant registration information of each debugging terminal registered as a receiver, and mainly relates to an access address of each debugging terminal, so that other computer equipment running the application program of the application program can transmit log data to the corresponding debugging terminal through the access address. If necessary, the registration data table can store the access address of the debugging terminal and the related token information, so that in the subsequent process, each debugging terminal can realize authentication by judging whether the party transmitting the log data provides the matched token information or not, only the log data with legal identity is received, and the probability of being attacked by the network is reduced. The registry may also store presence information for the debug terminal so that only the debug terminal is provided to the querier in the presence when the recipient is to be queried. In addition, the registration data table may further store device summary information and the like related to the debugging terminal, and those skilled in the art may flexibly define each field in the registration data table according to various needs, which is forbidden to be exhaustive.
When the debugging terminal needs to register itself as a receiving party, the relevant registration information can be sent to the remote server, and the remote server analyzes the relevant information and then correspondingly stores the relevant information into the registration data table. And as for whether the debugging terminal is in an online state or not, judging by sending a heartbeat packet to the remote server at regular time through the debugging terminal, marking the debugging terminal in the online state when the remote server successfully receives the heartbeat packet according to a normal rhythm, and otherwise marking the debugging terminal in the offline state.
And the monitoring service of the current application program submits the query request to the remote server after the monitoring service is started, the remote server responds to the query request, queries the registration data table, acquires access addresses corresponding to all debugging terminals matched with the current application program, and acquires corresponding token information of the debugging terminals if necessary. Of course, since the debug terminal registers with the remote server only after the debug terminal is online, the debug terminal acquired by the remote server is an online debug terminal in general. Further, for example, to ensure reliable connection, the remote server may also filter out only the debug terminals that are not marked as being in the online state in the registry table, and only filter out the access addresses (and token information) corresponding to the debug terminals that are in the online state, and send the access addresses (and token information) to the listening service of the current application program for reception.
Step S1212, receiving the query result data returned by the remote server, and analyzing the access address of the one or more debugging terminals:
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 the access addresses (and token information) which are contained in the query result data and suitable for being used as the corresponding debugging terminals of log data receivers.
Step S1213, configuring the access address of the one or more debugging terminals as an access address for reaching a recipient of the log data:
after all the access addresses corresponding to the debugging terminals suitable for being used as log data receivers are obtained, the access addresses can be configured to be the attribute data of the log data to be sent by the subsequent monitoring service for subsequent calling.
In the embodiment, the remote server is queried to obtain the debugging terminal suitable for receiving the log data, so that a technical basis is actually provided for constructing a framework for submitting the log data in a distributed manner, the log data can be submitted in a distributed manner, the running instance of each application program running on the computer equipment can conveniently submit the log data of the application program to a plurality of distributed debugging terminals, any one debugging terminal can be ensured to respond to the distributed debugging terminal when needed, and the fault/abnormality reported by the application program can be responded to in time.
Referring to fig. 4, in another embodiment, in order to improve the interaction performance of the computer device running the application program of the present application, especially to meet the requirement of the software testing engineering before the application program of the present application is released, the step S1300 includes the following specific steps:
step S1311, 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 the current service page, and displaying a log submitting control in the control panel view:
when the monitoring service of the application needs to send log data, the number of the debugging terminals acquired before can be detected, if the remote server is inquired before and the access address of at least one debugging terminal cannot be acquired, it can be known that no debugging terminal suitable for receiving the bidirectional communication data generated by the current business page exists currently, and therefore, any control component for controlling the log data submission process does not need to be provided for an operation user of the current application program.
When the monitoring service detects that the number of the debugging terminals acquired before is more than zero, namely one or more debugging terminals exist, the monitoring service can provide the relevant control components for the 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 business page, which is popped up after the listening service detects the existence of at least one debug terminal pre-registered as a receiver. In the pre-commit state of the log data as shown in fig. 5, two controls are provided, namely, a log commit control identified as "reporting" and a panel hide control identified as "hiding". The log submitting 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 submitting event in response to the touch operation acting on the log submitting control:
when the operation user touches the submission control, the log submission event is correspondingly triggered to drive the execution of the background business logic.
Step S1313, responding to the log submitting event, and respectively transmitting log data including the bidirectional communication data and the page identifier of the current service page to each debugging terminal:
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 related bidirectional communication data cached in the current business page before as log data with an incidence relation, and submits the log data to each debugging terminal according to the access address of each debugging terminal.
In specific implementation, the monitoring service can be realized by node.
After the response to the log submitting event is completed, the control panel view can return the related execution result information, and the implementation can be flexibly performed by the technical personnel in the field.
Step S1314, after completing the response of the log submitting event, automatically or passively hiding the control panel view:
after the response logic of the log submitting event is executed, as shown 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 can control the listening service to pack up the control panel view through the touch panel hiding control, so that the operating user is not influenced to continue to execute interaction on the current business page.
In another embodiment, the panel hiding control may not be provided in the control panel view, and the control panel view may be automatically hidden directly after the response of the log submitting event is completed. As for the evoking of the control panel view, this may be achieved by popping up in response to a user touch operation such as a "double click".
The embodiment is more convenient for the interaction of the current application program as the test program when the test program is operated, and is more convenient for carrying out the specific control through the control panel view, so that the test of developers is matched, and the interaction experience is improved.
Referring to fig. 6, in an exemplary embodiment of a program log regression method implemented as an application program in a computer device serving as a development-side debugging terminal, when the application program is loaded into a memory and runs, the method performs the following steps:
step S2100, register the current debug terminal as one of the recipients of the log data of the target application:
in order to declare that the computer device where the application program executing the method is located is the debugging terminal, the relevant registration information of the current debugging terminal needs to be registered with the remote server, the registration information mainly plays a role in declaring that the current debugging device is one of receivers of log data of a certain target application program, and in combination with the above disclosure, the specific content of the registration information can be flexibly determined, and besides the access address of the debugging terminal which is necessary to be provided for realizing the submission of the log data, the registration information can also include token information, online state information and the like as required.
In particular, the registration information will typically also include the target application to which it is adapted, so as to declare that the debug terminal is only open to submitting its log data to this target application. If the target application program is not specified, the implementation of the application is not influenced, namely the default is that the debugging terminal of the application is suitable for receiving log data submitted by any target application program.
The current debugging terminal is generally a computer device used by developers and customer service staff, so that the developers can timely master log data related to abnormity and faults reported in the running process of the target application program in different terminal devices based on the development or service requirements, respond to the log data, timely troubleshoot problems, and reply to an operating user 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, resolving a page identifier of a service page and bidirectional communication data required for the service page to perform remote interactive communication, and storing the two-way communication data as local data:
the target application program is loaded into the memory in a computer device and runs, theoretically, a running instance is formed, and for the current terminal device, the running instance is a remote running instance. It can be understood that, according to the unified service logic implemented by the code of the target application program, each of the remote operation instances of the target application program implements the same service processing logic, so as to implement the acquisition and submission of the bidirectional communication data generated by performing interactive communication on the service page of the target application program, and finally, the acquired bidirectional communication data is associated with the page identifier of the corresponding service page as log data and submitted to the current debugging terminal in the access state.
Therefore, the application program of the method implemented by the current debugging terminal starts a service process in advance for monitoring the received log data submitted by each remote operation instance. And analyzing the monitored and received log data, acquiring the page identifier and bidirectional communication data generated by interactive communication executed by the service page in the target application program pointed by the page identifier, and storing the bidirectional communication data in the local for subsequent abnormal troubleshooting operation of corresponding management users of developers and clients.
Step S2300, responding to a debugging instruction of log data for the at least one remote operation instance, loading the target application program in a current debugging terminal, and entering a current service page pointed by the page identifier:
when a developer and a customer service staff need to process log data of one remote operation instance and perform exception checking, corresponding log data can be found in a log data list, and then a debugging instruction is sent out in a targeted manner.
In response to the debugging instruction, the current debugging terminal loads and runs the target application program, constructs a running instance of the target application program in a computer memory of the local device, switches the running instance to a service page pointed by the page identifier according to the page identifier carried by the designated log data, and sets the service page as the current service page.
Step S2400, 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:
when the running instance of the target application program is switched to the current service page, the specified bidirectional communication data carried by the log data can be applied to the target application program, so that the whole remote interactive communication process of generating the log data at the test end by the current service page is simulated. Of course, in some embodiments, it is not necessary to apply all of the bidirectional communication data in the log data, so that only a process of executing one part of the remote interactive communication needs to be simulated, specifically, the requirement for troubleshooting is limited.
It will be appreciated that in the course of the simulation of the execution of the remote interactive communication, the debugging terminal can reproduce the entire process seen by the current service page at the site of the test end operating user, the current service page being adapted to the feed of the bi-directional communication data and changing constantly, the process of which is theoretically not substantially different from that seen in the remote run instance in which the log data is generated.
Those skilled in the art know how to utilize process data such as two-way communication data provided by different running instances of the same application program to simulate back and forth as a running process of another running instance, so how to implement simulation does not affect the implementation of the present application, and therefore, detailed description cannot be provided in the present embodiment, but an exemplary description will be given in the following embodiments.
According to the method, log data submitted by each related application program can be received and locally stored by registering the debugging terminal as a receiving party in advance, after a debugging instruction triggered by responding to the log data submitted by a developer aiming at an application program running instance (log data submitted by a terminal user running the application program), the application program can be started and run in a sandbox environment, a current business page pointed by the log data is entered, the two-way communication data in the log data is applied to the current business page, and the whole interaction process of a simulation reproduction terminal user on the current business page is realized, so that the debugging terminal side intuitively displays various interfaces and data changes through reproduction of the interaction process on the terminal user side, and the rapid positioning of the developer are facilitated, And faults or exceptions are eliminated, so that the efficiency of the work of testing, debugging, maintaining and the like of the application program can be greatly improved, and various time costs are saved.
Referring to fig. 7, in an embodiment, to facilitate building a service architecture, the step S2100 includes the following steps:
step S2111, sending a registration request to a remote server, wherein the request comprises an access address of the current debugging terminal for receiving the log data of the target application program:
the remote server is used for storing a registration data table, the registration data table is used for storing relevant registration information of each debugging terminal registered as a receiver, and mainly relates to an access address 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 address. If necessary, the registration data table can store the access address of the debugging terminal and the related token information, so that in the subsequent process, each debugging terminal can realize authentication by judging whether the party transmitting the log data provides the matched token information or not, only the log data with legal identity is received, and the probability of being attacked by the network is reduced. The registry may also store presence information for the debug terminal so that only the debug terminal is provided to the querier in the presence when the recipient is to be queried. In addition, the registration data table may further store device summary information and the like related to the debugging terminal, and those skilled in the art may flexibly define each field in the registration data table according to various needs, which is forbidden to be exhaustive.
When the debugging terminal needs to register itself as a receiver, a registration request can be sent to the remote server, the relevant registration information is included in the registration request and sent to the remote server, and the remote server analyzes the relevant information and then correspondingly stores the relevant information into the registration data table. And as for whether the debugging terminal is in an online state or not, judging by sending a heartbeat packet to the remote server at regular time through the debugging terminal, marking the debugging terminal in the online state when the remote server successfully receives the heartbeat packet according to a normal rhythm, and otherwise marking the debugging terminal in the offline state.
The remote server can be used for more conveniently deploying mass registration information of the application program to be tested, storing the registration information of the debugging terminals related to the application program to be tested, and realizing the technical scheme of the application as long as the application program to be tested inquires the debugging terminals corresponding to the application program to be tested. This is effective for improving the service efficiency and service capability of the remote server to the off state.
The tested application program submits a query request to the remote server after being started, 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, and obtains corresponding token information of the debugging terminals 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 the debug terminal is online, the debug terminal acquired by the remote server is an online debug terminal in general. Further, for example, to ensure reliable connection, the remote server may also filter out only the debug terminals that are not marked as being in an online state in the registry table, and only filter out the access addresses (and token information) corresponding to the debug terminals that are in the online state, and send the access addresses (and token information) to the application under test for reception.
Step S2112, 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:
as described above, after the remote server receives the registration request of the current debug terminal, the access address of the current debug terminal and other related information are analyzed from the registration request under the drive of the registration request, and the registration information is added 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.
In this embodiment, a registration mechanism is implemented at the debug terminal, so as to support the remote server to become a unified service architecture, which not only enables the remote server to be suitable for serving multiple application programs under test, but also enables the debug terminal implementing the technical solution of the present application to be suitable for accessing the remote server at any time to serve each application program under test.
Referring to fig. 8, in another embodiment, in order to facilitate data regression, the step S2300 includes the following specific steps:
step S2311, in response to a debugging instruction for log data of the at least one remote operation instance, starting a preconfigured sandbox environment suitable for operating the target application:
when a user of the current debugging terminal needs to call certain log data to check the abnormity/fault encountered by the terminal equipment to which the user belongs, the debugging instruction is initiated, and the service process of the debugging terminal responds to the debugging instruction and starts a pre-configured sandbox environment suitable for running the target application program so as to construct a running example of the target application program in the sandbox environment.
The implementation of pre-configuring the sandbox environment for running the application to shield the interaction between the sandbox environment and the native resources and the external network resources is well known to those skilled in the art, and therefore, it will not be described herein any further. Here, it is only necessary for those skilled in the art to know that, in the present application, a sandbox environment is pre-configured in the debugging terminal for subsequent simulation, and is started to run the target application when the service process needs to perform simulation.
Step S2312, controlling the target application program to load and run in the sandbox environment:
and the service process of the current debugging terminal further calls the 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 run, and constructs a running example 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 identifier of the corresponding service page when the abnormality occurs, the running instance in the sandbox environment can be switched to the service page pointed by the page identifier according to the page identifier, so that the service page is set as the current service page in the running instance.
In the embodiment, the sandbox environment is utilized to construct the running example of the target application program at the debugging terminal so as to prepare for simulation execution of the remote interaction process, the running example is placed in a relatively safe environment, no threat is caused to the safety of the debugging terminal, and the sandbox environment suitable for the running of the target application program is virtualized, so that the running of the target application program is effectively decoupled from the debugging terminal and is irrelevant to equipment, and therefore the sandbox environment has higher universality.
Referring to fig. 9, in another embodiment, in order to improve the troubleshooting execution efficiency of the debugging terminal, an exemplary application is provided, and for this purpose, the step S2400 includes the following steps:
step S2411, responding to a simulation debugging event triggered by a control panel view in a graphical user interface of a current debugging terminal, starting a process of performing the remote interactive communication in a simulation mode in a current service page according to the two-way communication data:
in order to facilitate the operation and control of the simulation process, a control panel view can be displayed in advance on the current business page in the graphical user interface of the running instance constructed for the target application program, and the control panel view can be configured to be made of a semitransparent or fully transparent material. As shown in fig. 10, the control panel view may provide an initiate execution control, identified as "play", for initiating the emulated debugging process and a continue execution control, identified as "next frame", for controlling the execution of the emulated debugging process by entering said bi-directional communication data on a per-entry basis.
And a user of the debugging terminal touches the starting execution control to trigger a simulation debugging event, so that the process of performing the remote interactive communication in a simulation manner in the current service page according to the bidirectional communication data can be started according to the 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 bidirectional communication data item by item, or may be configured to start only the input of the first data item of the bidirectional communication data, and then input the next data item through the continuous execution control, which may be flexibly implemented by those skilled in the art. Certainly, the user of the debugging terminal can touch the continuous execution control to input data item by item.
Step S2412, applying the communication data belonging to the first communication sending direction included in the bidirectional data communication in the current service page, and suspending the operation of the current service page:
after a debugging terminal user starts simulation execution according to background business logic no matter what control is touched, in one link of the whole simulation execution, a condition that communication data belonging to a first communication sending direction is fed into a current business page of the running instance inevitably exists, the communication data in the first communication sending direction is taken from the two-way communication data, and the first communication sending direction can be the direction from a business server to an application program generating log data or the direction from the application program generating the log data to the business server, and the two directions are only 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 inherent background service logic of 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 current service page, so that the problems are gradually checked. Therefore, in this case, the running of the current business page will also be suspended to facilitate viewing.
Step S2413, responding to the debugging flow continuation event, resuming the operation of the current service page, applying communication data belonging to the second communication transmission direction included in the bidirectional data communication in the current service page, and suspending the operation of the current service page:
similarly, in a link of the whole simulation execution, there will inevitably be a situation that a piece of communication data belonging to the second communication sending direction is fed into the current service page of the running instance, and in this embodiment, the situation may occur by continuing to touch the continuous execution control to trigger execution after the user of the debugging terminal completes the previous step.
After the user of the debugging terminal triggers execution, the continuous operation of the operation example is actually recovered, the operation of the current service page of the debugging terminal 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 debugging terminal, so that the problems are gradually checked.
It can be understood that, in this embodiment, only a typical one-to-one interaction process in the simulation execution process is abstracted, in the interaction process, 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-the-spot service page of the running instance is driven, so that a user of the debugging terminal can observe interface changes in the graphical user interface to troubleshoot problems. Indeed, such a one-to-one interaction is abundant throughout the execution of the simulation, and there is no necessarily correspondence between the former and the latter, and therefore the present embodiment is merely an exemplary disclosure, and those skilled in the art should understand this flexibility without in any way implementing the inventive spirit of the present application.
The implementation of the embodiment enriches the interaction details, is obviously more beneficial to the problem troubleshooting of the user of the debugging terminal, and improves the abnormal troubleshooting efficiency.
In order to solve the above technical problem, an embodiment of the present application further provides a program log collecting device.
As shown in fig. 11, a program log collection apparatus of the present application includes a monitoring collection module 1100, a query determination module 1200, and a log submission module 1300, where: the monitoring acquisition module 1100 is configured to monitor and acquire bidirectional communication data correspondingly generated in a process of performing remote interactive communication on a current service page of a current application program; the query determining module 1200 is configured to query and determine one or more debugging terminals that have registered themselves as a receiving party; the log submitting module 1300 is configured to respond to a log submitting event triggered in a current service page state, and transmit log data to each of the debugging terminals, where the log data includes the bidirectional communication data and a page identifier of the current service page.
In one embodiment, the intercept acquisition module 1100 comprises: the monitoring loading submodule is configured to automatically load a preconfigured monitoring service in the background of the computer along with the starting of the current application program; the monitoring implementation sub-module is configured to implement monitoring on the remote interactive communication process of each business page in the current application program by the monitoring service; and the data caching submodule 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 comprise communication data sent by the current service page to a corresponding service server and communication data sent by the service server to the local computer.
In another embodiment, the query determination module 1200 includes: the remote query submodule is used for submitting a query request to a remote server so as to query the access addresses of one or more debugging terminals which are pre-registered as a receiver in a registration data table through the remote server; the address resolution submodule is used for receiving query result data returned by the remote server and resolving access addresses of the one or more debugging terminals in the query result data; and the address configuration submodule is used for configuring the access address of the one or more debugging terminals as the access address of a receiver for sending the log data.
In yet another embodiment, the log committing module 1300 comprises: 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 pops up above a graphical user interface of the current business 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 acting on the log submitting control to trigger the log submitting event; the log distribution submodule is used for responding to the log submitting event and respectively transmitting the log data containing the bidirectional communication data and the page identification of the current service page to each debugging terminal; and the panel hiding submodule 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 above technical problem, an embodiment of the present application further provides a program log regression device.
As shown in fig. 12, a program log regression device 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 configured to register a current debugging terminal as one of recipients 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 operation instance of the target application program, analyze a page identifier of a service page therein and bidirectional communication data required for the service page to perform remote interactive communication, and store the two-way communication data as local data; the debugging response module 2300 is configured to respond to a debugging instruction of log data for the at least one remote operation instance, load the target application program in a current debugging terminal, and enter a current service page pointed by the page identifier; the simulation execution module 2400 is configured to perform at least part of the process of the remote interactive communication in a simulation manner in the current service page according to the bidirectional communication data.
In one embodiment, the role registration module 2100 includes: the registration request submodule is used for sending a registration request to a remote server, and the request contains an access address of the current debugging terminal, which is used for receiving the log data of the target application program; and the registration realization submodule is used for driving the remote server to register the access address of the current debugging terminal in a registration data table by the registration request so that the current debugging terminal becomes one of receivers suitable for receiving the log data.
In another embodiment, the debug response module 2300 comprises: a run preparation submodule configured to start a preconfigured sandbox environment adapted to run the target application in response to a debug instruction for log data of the at least one remote run instance; the program operation sub-module is used for controlling the target application program to be loaded and operated in the sandbox environment; and the page switching submodule is used for switching the target application program to the current service page pointed by the page identification contained in the log data.
In another embodiment, the simulation execution module 2400 includes: the simulation starting sub-module is configured to respond to a simulation debugging event triggered by a control panel view in a graphical user interface of a current debugging terminal and start a process of performing the remote interactive communication in a simulation mode in a current service page according to the two-way communication data;
the first direction submodule is used for applying communication data which belongs to a first communication sending direction and is contained in the bidirectional data communication in a current service page and suspending the operation of the current service page;
and the second direction sub-module is used for responding to the debugging flow continuing event, recovering the operation of the current service page, 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, and suspending the operation of the current service page.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 13, fig. 13 is a block diagram of a basic structure of a computer device according to the present embodiment.
As shown in fig. 13, the internal structure of the computer device is schematically illustrated. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. The non-volatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions when executed by the processor can enable the processor to realize a program log collection/regression method. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, may cause the processor to perform a program log collection/regression method. The network interface of the computer device is used for connecting and communicating with the terminal. Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In this embodiment, the processor is configured to execute specific functions of each module/sub-module in fig. 11/fig. 12, and the memory stores program codes and various types of data required for executing the modules. The network interface is used for data transmission to and from a user terminal or a server. The memory in this embodiment stores program codes and data required for executing all the submodules in the program log collection/regression device, and the server can call the program codes and data of the server to execute the functions of all the submodules.
The present application further provides a storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform any of the above-described steps for implementing a routine sequential log collection/regression method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
In summary, the application improves the mechanism of troubleshooting the application program failures and abnormalities, changes the submission of log data from a point-to-point reporting and reviewing mode to a point-to-many customer service distribution mode, reduces the centralized dependence on a server cluster, is beneficial to improving the work efficiency of software engineering organization on the internet platform side, improves the instant interactive response efficiency between the user terminal where the application program is located and the debugging terminal where a developer is located, and improves the implementation experience of software maintenance engineering.
Those of skill in the art will appreciate that the various operations, methods, steps in the processes, acts, or solutions discussed in this application can be interchanged, modified, combined, or eliminated. Further, other steps, measures, or schemes in various operations, methods, or flows that have been discussed in this application can be alternated, altered, rearranged, broken down, combined, or deleted. Further, steps, measures, schemes in the prior art having various operations, methods, procedures disclosed in the present application may also be alternated, modified, rearranged, decomposed, combined, or deleted.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (12)

1. A program log collection method is characterized by comprising the following steps:
monitoring and collecting two-way communication data correspondingly generated in the process of executing remote interactive communication by a current service page of a current application program;
inquiring and determining one or more debugging terminals which register themselves as a receiving party;
and responding to a log submitting event triggered in 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 identifier of the current service page.
2. The program log collecting method of claim 1, wherein the step of monitoring and collecting bidirectional communication data correspondingly generated in the process of performing remote interactive communication on the current service page of the current application program comprises the steps of:
automatically loading a pre-configured monitoring service in a computer background along with the starting of the current application program;
the monitoring service monitors the remote interactive communication process of each business page in the current application program;
caching the two-way communication data of each current service page in the running process of the current application program in real time, wherein the two-way communication data comprise communication data sent to a corresponding service server by the current service page and communication data sent to the local machine by the service server.
3. The program log collecting method according to claim 1, wherein the querying of the one or more debugging terminals that determine that they have registered themselves as the receiving party, comprises the steps of:
submitting a query request to a remote server so as to query the access addresses of one or more debugging terminals which are pre-registered as receivers in a registration data table through the remote server;
receiving query result data returned by the remote server, and analyzing the access addresses of the one or more debugging terminals;
configuring the access address of the one or more debugging terminals as an access address for reaching a recipient of the log data.
4. The program log collection method according to claim 1, wherein the log data is transmitted to each of the debugging terminals in response to a log submission event triggered in a current service page state, respectively, comprising 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 the current business page, and displaying a log submission control in the control panel view;
triggering a log submitting event in response to a touch operation acting on the log submitting control;
responding to the log submitting event and respectively transmitting log data containing the bidirectional communication data and the page identifier of the current service page to each debugging terminal;
automatically or passively hiding the control panel view upon completion of the response to the log-commit event.
5. A program log regression method is characterized by comprising the following steps:
registering a current debugging terminal as one of receivers of log data of a 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 a service page and bidirectional 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 of the log data of the at least one remote operation instance, loading 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 remote interactive communication process in the current service page according to the two-way communication data.
6. The program log regression method according to claim 5, wherein registering a current debugging terminal as one of recipients of log data of a target application program comprises 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;
and driving the remote server to register the access address of the current debugging terminal in a registration data table by the registration request, so that the current debugging terminal becomes one of receivers suitable for receiving the log data.
7. The program log regression method according to claim 5, wherein the step of loading the target application program in a current debugging terminal in response to a debugging instruction for the log data of the at least one remote operation instance and entering a current service page pointed by the page identifier comprises the following specific steps:
starting a pre-configured sandbox environment suitable for running the target application program in response to a debugging instruction of log data of the at least one remote running instance;
controlling the target application program to be loaded and run in the sandbox environment;
and switching the target application program to a current business page pointed by a page identification contained in the log data.
8. The program log regression method of claim 5, wherein simulating execution of at least part of said remote interactive communication in a current service page according to said two-way communication data comprises:
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 performing the remote interactive communication in a simulation mode in a current service page according to the two-way communication data;
applying communication data which belongs to a first communication sending direction and is contained in the bidirectional data communication in a current service page, and suspending the operation of the current service page;
and responding to the debugging flow continuing event, recovering the operation of the current service page, 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, and suspending the operation of the current service page.
9. A program log collection device, comprising:
the monitoring acquisition module is used for monitoring and acquiring two-way communication data correspondingly generated in the process of executing remote interactive communication by the current service page of the current application program;
the query determining module is used for querying and determining one or more debugging terminals which register the debugging terminals as the receiving party;
and the log submitting module is configured to respond to a log submitting event triggered in 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 identifier of the current service page.
10. A program log regression apparatus, comprising:
the role registration module is used for registering the current debugging terminal as one of 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 example of the target application program, analyzing the page identifier of the service page and the bidirectional 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 of the log data of the at least one remote operation instance, loading the target application program in a 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.
11. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of the method of any one of claims 1 to 8.
12. A storage medium having computer-readable instructions stored thereon, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of any one of claims 1 to 8.
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 true CN113419940A (en) 2021-09-21
CN113419940B 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)

Cited By (4)

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

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140237296A1 (en) * 2013-02-19 2014-08-21 Audible, Inc. Architecture for remote access to content state
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

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140237296A1 (en) * 2013-02-19 2014-08-21 Audible, Inc. Architecture for remote access to content state
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

Cited By (7)

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

Also Published As

Publication number Publication date
CN113419940B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
CN113419940B (en) Program log acquisition and regression method and corresponding device, equipment and medium thereof
US9323647B2 (en) Request-based activation of debugging and tracing
US9471474B2 (en) Cloud deployment infrastructure validation engine
US8510720B2 (en) System landscape trace
US8584079B2 (en) Quality on submit process
US8863085B1 (en) Monitoring web applications
US9189367B2 (en) Methods and systems for debugging bytecode in an on-demand service environment
US9363134B1 (en) Lightweight browser monitoring and viewing
CN112187585B (en) Network protocol testing method and device
CN106603283B (en) A kind of method, apparatus and centralized management platform of analog service
US20030028513A1 (en) System and method for providing help services
US11907734B2 (en) Dynamic linking of content elements to development tool resources
US20200133829A1 (en) Methods and systems for performance testing
CN104536890A (en) Testing system, method and device
CN107395747B (en) High-expansion method based on STF platform
CN111159039A (en) Service simulation method, system, device and storage medium
CN106776318A (en) A kind of test script method for recording and system
CN112115038A (en) Application testing method and device and storage medium
CN107844486B (en) Method and system for analyzing webpage problems for client
CN106815150B (en) Server-side interface test system and method
US8762780B2 (en) Conducting an application-aware test in a virtual environment
CN115203054A (en) Virtual chip test system
CN112911283B (en) Smart television testing method and device
EP0430708B1 (en) Architecture for server extension
CN111245917B (en) Katalon-based work order entry device and implementation method thereof

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