CN113204445A - Information transmission method, device, equipment and storage medium for crash location - Google Patents

Information transmission method, device, equipment and storage medium for crash location Download PDF

Info

Publication number
CN113204445A
CN113204445A CN202110504272.5A CN202110504272A CN113204445A CN 113204445 A CN113204445 A CN 113204445A CN 202110504272 A CN202110504272 A CN 202110504272A CN 113204445 A CN113204445 A CN 113204445A
Authority
CN
China
Prior art keywords
view
crash
touch event
type
information
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
CN202110504272.5A
Other languages
Chinese (zh)
Other versions
CN113204445B (en
Inventor
彭瑶
韩直彬
王亦梁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110504272.5A priority Critical patent/CN113204445B/en
Publication of CN113204445A publication Critical patent/CN113204445A/en
Application granted granted Critical
Publication of CN113204445B publication Critical patent/CN113204445B/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/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides an information transmission method, a device, equipment and a storage medium for crash positioning, which relate to the technical field of computer application, wherein the information transmission method for crash positioning is suitable for client equipment and comprises the following steps: capturing a touch event; obtaining view information corresponding to the touch event, wherein the view information is used for representing the operation behavior of the view corresponding to the touch event; and after the crash event is detected, sending the view information to a crash analysis server so that the crash analysis server can perform crash positioning based on the view information. Thus, the crash scene can be reproduced based on the view information, and the crash can be positioned by reproducing the crash scene.

Description

Information transmission method, device, equipment and storage medium for crash location
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to an information transmission method, apparatus, device, and storage medium for crash location.
Background
Service scenarios applied by an operating system (for example, an ios system) are becoming complex, and continuous switching among a plurality of service scenarios in the application process of the operating system can cause variable disorder and mutual interference, so that unexpected errors occur, and the operating system is broken down. In the conventional crash mechanism, a crash log generally records less information for a simpler application scenario, such as recording a crash type, for example, when a group is out of bounds, and a crash caused by a cross service scenario cannot be reproduced only by the crash type, which may result in that the crash cannot be located by reproducing the crash scenario, i.e., a situation where a plurality of service scenarios are continuously switched.
Disclosure of Invention
The embodiment of the invention aims to provide an information transmission method, an information transmission device, information transmission equipment and a storage medium for crash positioning, so that a crash scene can be reproduced, and crash positioning can be performed by reproducing the crash scene. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided an information delivery method for crash location, where the method is applied to a client device, and includes:
capturing a touch event;
obtaining view information corresponding to a touch event, wherein the view information is used for representing an operation behavior aiming at a view corresponding to the touch event;
and after a crash event is detected, sending the view information to a crash analysis server so that the crash analysis server performs crash positioning based on the view information.
Optionally, the type of the view includes at least one of: a configuration level view, a container level view, and an element level view;
the obtaining of the view information corresponding to the touch event includes:
obtaining a view corresponding to the touch event;
judging the type of the view, and determining the view information corresponding to the view of the type of the view based on the type of the view.
Optionally, the determining the type of the view includes:
acquiring a class name corresponding to the view;
determining a type of the view based on the class name.
Optionally, the obtaining a view corresponding to the touch event includes:
and obtaining a view corresponding to the touch event through a responder chain, wherein the responder chain is a hierarchical structure formed by a series of responder objects, and the view corresponding to the touch event comprises an architecture layer view associated with the touch event in the responder chain.
Optionally, the obtaining, by the responder chain, a view corresponding to the touch event includes:
obtaining a response view corresponding to the touch area through a responder chain based on the touch area corresponding to the touch event, wherein the response view is a view corresponding to a responder object responding to the touch area;
the judging the type of the view and determining the view information corresponding to the type of the view in the view based on the type of the view comprises the following steps:
judging the type of the response view, and determining the view information corresponding to the type of the response view in the response view based on the type of the view.
Optionally, after the determining the type of the view and determining, based on the type of the view, that the type of the view is in the view information corresponding to the view, the method further includes:
storing view information corresponding to a preset number of touch events;
after detecting a crash event, sending the view information to a crash analysis server, comprising:
and after a crash event is detected, sending the stored view information corresponding to the preset number of touch events to a crash analysis server.
In a second aspect of the present invention, there is also provided an information transmission apparatus for crash location, including:
a capture module to capture a touch event;
an obtaining module, configured to obtain view information corresponding to a touch event, where the view information is used to represent an operation behavior for a view corresponding to the touch event;
and the sending module is used for sending the view information to a crash analysis server after a crash event is detected so as to enable the crash analysis server to perform crash positioning based on the view information.
Optionally, the type of the view includes at least one of: a configuration level view, a container level view, and an element level view;
the obtaining module is specifically configured to obtain a view corresponding to the touch event; judging the type of the view, and determining the view information corresponding to the view of the type of the view based on the type of the view.
Optionally, the obtaining module is specifically configured to obtain a class name corresponding to the view; determining a type of the view based on the class name.
Optionally, the obtaining module is specifically configured to obtain a view corresponding to the touch event through a responder chain, where the responder chain is a hierarchical structure formed by a series of responder objects, and the view corresponding to the touch event includes a framework layer view associated with the touch event in the responder chain.
Optionally, the obtaining module is specifically configured to obtain, based on a touch area corresponding to the touch event, a response view corresponding to the touch area through a responder chain, where the response view is a view corresponding to a responder object responding to the touch area; judging the type of the response view, and determining the view information corresponding to the type of the response view in the response view based on the type of the view.
Optionally, the obtaining module is specifically configured to store view information corresponding to a preset number of touch events after the determining of the type of the view and the determining of the type of the view based on the type of the view are performed on the view information corresponding to the view;
the sending module is specifically configured to send the stored view information corresponding to the preset number of touch events to a crash analysis server after a crash event is detected.
In another aspect of the implementation of the present invention, there is also provided an information transmission device for crash location, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the first aspect when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the method steps of the first aspect.
In a further aspect of the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of the first aspect.
The information transmission method, the information transmission device, the information transmission equipment and the information transmission storage medium for crash location provided by the embodiment of the invention capture a touch event; obtaining view information corresponding to the touch event, wherein the view information is used for representing the operation behavior of the view corresponding to the touch event; upon detecting the crash event, the view information is sent to a crash analysis server, such that the crash analysis server can perform crash location based on the view information. The method can realize that the crash scene can be reproduced based on the view information, and can perform crash positioning by reproducing the crash scene.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart illustrating an information transmission method for crash location according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating obtaining view information corresponding to a touch event according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of a view of an embodiment of the present invention;
FIG. 4 is a schematic application diagram of an information delivery method for crash location according to an embodiment of the present invention;
FIG. 5 is a system architecture diagram of an information transfer method for crash location according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an information transmission apparatus for crash location according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an information transmission apparatus for crash location according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In a cross-service scenario, if multiple service scenarios are switched continuously, variables are disturbed and interfere with each other, so that unexpected errors occur, and a breakdown is caused. For example, multiple pages (A, B, C, D) share a common variable. The call can be performed in the order of A \ B \ C \ D or any order, such as ABDC, ACDB, BCAD and the like. But only the operation of DCBA in this case causes a variable exception which in turn triggers the coast user to flash back. Where exceptions may be variables released (unprotected against operation of the empty variable), values of variables too large or too small, etc.
The stack information collected by the existing crash mechanism is not enough to help to reproduce the crash scenario, and it can also be understood that the stack information shows less available information, and it is desirable to reproduce the cross-service scenario to assist in locating the crash while the stack information is being taken.
In the embodiment of the invention, the touch feedback of the user before the crash occurs is collected, namely the user behavior is captured, the touch path of the user touch behavior is determined, the user operation flow is simulated based on the touch feedback, the crash scene is reproduced, and the crash is assisted and positioned by reproducing the crash scene.
The information transmission method for crash location provided by the embodiment of the invention is described in detail below.
The embodiment of the invention provides an information transmission method for crash location, which is suitable for client equipment and comprises the following steps:
capturing a touch event;
obtaining view information corresponding to the touch event, wherein the view information is used for representing the operation behavior of the view corresponding to the touch event;
and after the crash event is detected, sending the view information to a crash analysis server so that the crash analysis server can perform crash positioning based on the view information.
In the embodiment of the invention, the touch event is captured; obtaining view information corresponding to the touch event, wherein the view information is used for representing the operation behavior of the view corresponding to the touch event; upon detecting the crash event, the view information is sent to a crash analysis server, such that the crash analysis server can perform crash location based on the view information. The method can realize that the crash scene can be reproduced based on the view information, and can perform crash positioning by reproducing the crash scene.
The information transmission method for crash location provided by the embodiment of the invention is suitable for client equipment, the client equipment can comprise electronic equipment provided with a client, and the electronic equipment can be a terminal such as a mobile phone and the like.
Fig. 1 is a flowchart illustrating an information transmission method for crash location according to an embodiment of the present invention. An embodiment of the present invention provides an information transmission method for crash location, as shown in fig. 1, the information transmission method may include:
s101, capturing a touch event.
A touch event may also be understood as an event that generates a touch behavior, and may include an event that touches a screen in an operating system, etc., such as a touch screen event in an ios system. Touch behavior may include long press, click, and the like.
For example, once the user clicks on the screen of the device, a touch event is triggered, and the device captures the touch event, specifically, the touch event can be captured by rewriting the (void) sendEvent function of the system. And capturing the touch event, and simultaneously acquiring touch event information corresponding to the touch event.
The touch event information is used to describe a touch event, including an event object generated by the touch event, etc., e.g., a UITouch object, a uiresponse object, etc., of the touch event.
This object of the UITouch class is brought in when a touch event is performed. All information of the touch is contained in this object:
window: a window where the touch is located; view: view of the touch; tap count is the number of clicks in a short time; timestamp of touch generation or change; phase, each state within the touch cycle; locationinView method: obtaining the position of the designated view; previousLocationInView method: the previous position of the movement is taken.
And S102, obtaining view information corresponding to the touch event.
The view information is used to represent the operation behavior of the view corresponding to the touch event.
As shown in fig. 2, S102 may include:
and S1021, obtaining a view corresponding to the touch event.
A view corresponding to the touch event may be obtained through a responder chain. The details of obtaining the view corresponding to the touch event through the responder chain will be described below, and will not be described herein at first.
A responder chain is a hierarchy of a series of responder objects.
Views may be understood as objects visible to the user and also objects interacting with the user, such as pages, buttons, text fields and sliders, etc.
The view of the touch event may include a view of where the touch was during the touch event.
Wherein a responder chain is a hierarchical structure made up of a series of responder objects. Responder Object (Responder Object) refers to an Object that has the capability to respond and process events.
S1022, judging the type of the view, and determining the view information corresponding to the type of the view based on the type of the view.
The view information is used to represent the operation behavior for the view.
The type of view includes at least one of: a configuration level view, a container level view, and an element level view, and fig. 3 is a schematic diagram of the configuration level view, the container level view, and the element level view.
The configuration level view may be understood as a view, such as a page, etc., that a user may configure. The container level view may be understood as a view of the type of component, such as a slider, etc. The element level view may be a tab, button, etc.
Different operation behaviors can exist for different types of views, and different view information can be determined for different types of views so as to represent the operation behaviors for the views through the view information.
For example, the view information corresponding to the configuration level view, such as a page, may include the name of the current page, page _ st, page sliding distance offset, and the like. The view information corresponding to the container level view may include operation information of horizontal sliding and vertical sliding. View information corresponding to an element-level view may include coordinate information corresponding to the element, element content, and so on.
The type corresponding to the view can be judged through an-iskindofcass function.
In an alternative embodiment, the class name corresponding to the view may be obtained, for example, the class name such as
(QYUPAdRecommandViewController \ RecommandCollectionCell \ QYASCRadViewV 3); the type of view is determined based on the class name.
The obtained view information can be used for reproducing the crash scene, and crash positioning can be carried out by reproducing the crash scene.
The plurality of touch events may include touch events respectively corresponding to different time points in a preset time range according to a time sequence from morning to evening. The view information corresponding to the multiple touch events can be combined into final view information, so that a crash scene can be reproduced through the final view information, and crash positioning can be performed through the reproduced crash scene.
S103, after the crash event is detected, the view information is sent to the crash analysis server, so that the crash analysis server performs crash positioning based on the view information.
For example, after the electronic device determines that the application program app (application) crashes, the view information is sent to the crash location platform. The APP may be an application program applied in the ios system.
Therefore, the crash scene can be reproduced through the crash positioning platform, and the crash can be positioned, such as positioning of a page, a view, a control, an operation scene and the like of the crash, so that the crash can be repaired, the stability of application can be improved, the crash rate is reduced, and the user experience and user retention are improved.
After the view information is obtained by the mobile terminal, such as a mobile phone, the view information can be sent to a crash positioning platform in the crash analysis server, so that the pressure of the mobile terminal can be reduced, a crash scene can be reproduced through the server based on the view information, and crash positioning can be performed through the reproduction of the crash scene.
In the embodiment of the invention, the touch event can be captured; obtaining view information corresponding to the touch event, wherein the view information is used for representing the operation behavior of the view corresponding to the touch event; upon detecting the crash event, the view information is sent to a crash analysis server, such that the crash analysis server can perform crash location based on the view information. The method can realize that the crash scene can be reproduced based on the view information, and can perform crash positioning by reproducing the crash scene. It can also be understood that user behavior can be collected, and crash scenarios can be reproduced through the user behavior to assist in crash location.
And according to the method, the touch behavior is captured through AOP hook (section-oriented programming), the touch behavior of the user is analyzed, the page, the view controller, the component content, the data flow direction and the like which are touched by the current finger can be known, so that the operation flow before the user crashes can be known, and therefore, after the crash occurs, the crash scene can be reproduced and the crash can be positioned based on the operation flow, such as the page, the view, the control, the operation scene and the like of the crash can be positioned.
In S1021, a view corresponding to the touch event may be obtained through a responder chain, where the responder chain is a hierarchical structure formed by a series of responder objects, and the view corresponding to the touch event includes a framework layer view associated with the touch event in the responder chain.
The step of obtaining a view corresponding to the touch event through the responder chain may include:
judging whether the current view can accept the touch event or not according to each view in the view layer level structure; if so, continuously judging whether the position of the touch event is in the current view range; if so, judging whether the sub-view of the current view can accept the touch event and judging whether the position of the touch event is in the sub-view according to the sequence from the topmost view to the bottommost view; and if the sub-view of the current view can accept the touch event and the position where the touch event occurs is in the sub-view, taking the sub-view as the view corresponding to the touch event.
Wherein, the acceptance of the touch event by the current view needs to satisfy three conditions: the views can be interactive, the views are not hidden, and the opacity of the views is greater than 0.01. It is determined whether the current view is able to accept touch events, i.e., whether the three conditions are met.
Specifically, the First responder (First responder) refers to the responder object (usually a UIView object) currently accepting touch, i.e., indicating that the object is currently interacting with the user, which is the beginning of the responder chain. The entire responder chain and the mission of event distribution are both to find the first responder.
The UIWindow object sends the event in the form of a message to the first responder giving him the opportunity to process the event first. If the first responder is not processing, the system passes the event (via a message) to the next responder in the responder chain to see if it can process.
When detecting a finger Touch (Touch) operation, the ios system packs the finger Touch (Touch) operation into an UIEvent object and puts the UIEvent object into an event queue of the current active Application, the UIapplication of a single instance takes a Touch event from the event queue and transmits the Touch event to the UIWindow of the single instance for processing, the UIWindow object firstly uses a hitTest to find a View (View) where an initial point of the Touch operation is located, namely the View which needs to transmit the Touch event to the UIWindow for processing, and the process is called a hit-test View.
The UIWindow instance object first calls a hit test and a withEvent on the content view, the method calls a pointInside and a withEvent on each view in the view hierarchy, the method is used for judging whether the position of the occurrence of the click event is in the range of the current view to determine whether the user clicks the current view, if the pointInside and the withEvent return YES, the step-by-step calling is continued until the position of the occurrence of the touch operation is found, and the view is the hit-test view to be found.
The method comprises the following processing flows of hitTest, withEvent and the following steps:
firstly, calling a pointlnternate of a current view, namely a withEvent, and judging whether a touch point is in the current view or not by a method;
if NO is returned, hitTest, withEvent, return nil;
if YES is returned, sending hitTest to all sub-views (subviews) of the current view, wherein the withEvent is a message, and the traversal sequence of all the sub-views is from the topmost view to the bottommost view, namely from the end of the subviews array to the front until all the sub-views return non-empty objects or all the sub-views are completely traversed;
if a sub-view returns a non-empty object for the first time, hitTest, withEvent, namely returning the object by the method, and ending the processing;
if all child views return not, then hitTest: withEvent: the method returns itself (self).
In an alternative embodiment, a response view corresponding to the touch area may be obtained through a responder chain based on the touch area corresponding to the touch event, where the response view is a view corresponding to a responder object responding to the touch area; judging the type of the response view, and determining the view information corresponding to the type of the response view in the response view based on the type of the view.
The method comprises the steps of obtaining a response view corresponding to a touch area through a responder chain, only recording view information of the response view corresponding to the touch area, and sending the view information of the response view to a crash analysis server after a crash event is detected, so that the crash analysis server performs crash positioning based on the view information of the response view. Thus, the occupation of the storage space can be reduced, and the calculation complexity of the crash analysis server can also be reduced.
In one particular embodiment, the system application class may be inherited first and used as a proxy class in the main function. Then, by overwriting the system-sendEvent method, the event is captured. After the event is captured, enter the logdicFromEvent method (and get touch time, take to touch coordinates on Window by event).
Specifically, a system responder chain is simulated first, and the responder chain is walked once to obtain a view viewResult of a final response. The simulation system responder chain obtaining the viewResult can be realized by the following steps:
step A: rewrite a-hitTest method (judge whether the current control can accept the event, and need to guarantee three conditions of interactive view, non-hidden view and opacity greater than 0.01).
And B: and judging that the touch point is not in the control-pointInsid on the premise of meeting the A.
And C: and traversing the child controls of the current control in a reverse order, and calling A for the child controls.
Through the above steps, the most suitable view, namely the viewResult, is returned.
After the viewResult is taken, the type of the viewResult can be judged through the system-isKindOfClass; if it is a page level container: let us record the name page _ st and the page sliding distance offset of the current page through the data model bound by the current container [ uiscrillview, UITableView ]. If the element is a common view element [ UIButton, UILable ], the element content text of the current element is recorded. For the special requirement (the user-defined data needs to be captured), the method can realize that the-qytouchLogForpost proxy method returns the data to be recorded.
In this way, the view corresponding to the touch event can be acquired, and then the crash scene can be reproduced based on the view information of the view.
In an alternative embodiment, based on the embodiment shown in fig. 2, in S1022: judging the type of the view, and determining the type of the view after the view information corresponding to the view based on the type of the view, may further include:
and storing view information corresponding to a preset number of touch events.
The preset number may be determined according to actual requirements, for example, 30, 20, and so on.
In one implementation, the view information corresponding to the touch event may be added to a queue of a preset length.
The preset length can be determined according to actual requirements, for example, according to the complexity of the operation flow, the higher the complexity is, the more view information corresponding to the touch event needs to be stored; meanwhile, the memory of the electronic equipment can be considered, and if the memory of the electronic equipment is smaller, the preset length can be reduced as much as possible on the basis that the preset length meets the complexity. For example, the preset length may be 30, 40, etc.
A queue with a preset length may be created in advance, and for each touch event, view information corresponding to the touch event may be added to the queue with the preset length.
Before the view information is added to the queue, namely, before enqueuing, whether the queue reaches a capacity threshold value or not can be judged, namely whether the number of data in the queue reaches a preset length or not is judged, the queue is simply understood to judge whether the queue is full, and if the queue does not reach the capacity threshold value, the view information is directly added to the queue; and if the queue reaches the capacity threshold, deleting the view information with the earliest adding time in the queue, namely the view information at the head of the queue in the queue, and adding the currently obtained view information to the tail of the queue.
In one implementation, the obtained view information corresponding to the touch event may be added to the queue according to an LFU (Least Frequently Used) algorithm.
Therefore, view information corresponding to touch events generated by the touch behavior of the user can be stored based on the queue, namely, touch paths of the user are recorded through the queue, the view information corresponding to different touch events can be directly obtained from the queue to form operation flow information, and then cross service scenes, namely scenes in which a plurality of service scenes are switched continuously, are reproduced based on the operation flow information, so that crash positioning is carried out by reproducing crash scenes.
Fig. 4 is an application diagram of an information transmission method for crash location according to an embodiment of the present invention. Referring to fig. 4, the user touches the screen and obtains a leaf node view. Specifically, a user touches a screen, an operating system of the electronic device captures a touch event, and obtains a leaf node view corresponding to the touch event.
The current responder is taken and the relevant information is spliced.
Judging whether a next responder exists or not, if so, returning the next responder, taking the responder as a current responder, returning to the step of taking the current responder and splicing related information; and if not, completing the splicing mark to obtain a ResponerChain string 1, wherein the ResponerChain string 1 is also the view information corresponding to the touch event.
Judging whether the queue is full, if so, removing the oldest data, and inserting the currently obtained data, namely the view information corresponding to the currently obtained touch event; and if the queue is not full, directly inserting the currently obtained data.
The result is then obtained, i.e. all the data in the queue constitutes the operational flow information.
The steps are all completed by a client (client).
After the crash occurs, the obtained operation flow information is sent to a server (server), specifically, the operation flow information may be encoded into data in a json format, that is, a json result is obtained and sent to the server.
Fig. 5 is a system architecture diagram of an information transfer method for crash location according to an embodiment of the present invention. Referring to fig. 5, a system applying the information transmission method for crash location according to the embodiment of the present invention may include a front end UI (User Interface), a presentation layer, a touchLog layer (touch layer), and a data layer. The information transmission method for crash location provided by the embodiment of the invention can be applied to a touchLog layer.
The combination of the touchLog layer and the data layer can realize log recording, and the combination of the display layer, the touchLog layer and the data layer can realize authority control.
Specifically, parameters A, B, C, D and the like may be exposed in the front end UI. The presentation layer may perform content management, user management, system setup, statistics, presentation of system logs, and the like. the touchLog layer performs view distribution, and the touchLog layer can determine a Page Name (Page Name), a ViewController Name (controller Name), a component Name (component Name), and a Control Name (small Control Name). The data layer can complete storage process, data caching, self-defined functions, transactions, reading and writing databases and the like.
Corresponding to the information transmission method for crash location provided in the foregoing embodiment, an embodiment of the present invention further provides an information transmission apparatus for crash location, as shown in fig. 6, where the information transmission apparatus for crash location may include:
a capture module 601 for capturing a touch event;
an obtaining module 602, configured to obtain view information corresponding to a touch event, where the view information is used to represent an operation behavior for a view corresponding to the touch event;
the sending module 603 is configured to send the view information to the crash analysis server after the crash event is detected, so that the crash analysis server performs crash location based on the view information.
Optionally, the type of view includes at least one of: a configuration level view, a container level view, and an element level view;
an obtaining module 602, specifically configured to obtain a view corresponding to a touch event; judging the type of the view, and determining the view information corresponding to the view of the type of the view based on the type of the view.
Optionally, the obtaining module 602 is specifically configured to obtain a class name corresponding to the view; the type of view is determined based on the class name.
Optionally, the obtaining module 602 is specifically configured to obtain a view corresponding to the touch event through a responder chain, where the responder chain is a hierarchical structure formed by a series of responder objects, and the view corresponding to the touch event includes a framework layer view associated with the touch event in the responder chain.
Optionally, the obtaining module 602 is specifically configured to obtain, based on the touch area corresponding to the touch event, a response view corresponding to the touch area through a responder chain, where the response view is a view corresponding to a responder object responding to the touch area; judging the type of the response view, and determining the view information corresponding to the type of the response view in the response view based on the type of the view.
Optionally, the obtaining module 602 is specifically configured to store view information corresponding to a preset number of touch events after determining that the type of the view is in view information corresponding to the view based on the type of the view;
the sending module 603 is specifically configured to send, after the crash event is detected, the stored view information corresponding to the preset number of touch events to the crash analysis server.
The information transmission device for crash location provided by the embodiment of the present invention is a device to which the information transmission method for crash location is applied, and all embodiments of the information transmission method for crash location are applicable to the device and can achieve the same or similar beneficial effects.
Corresponding to the information transmission method for crash location provided in the foregoing embodiment, an embodiment of the present invention further provides an information transmission device for crash location, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the method steps of the information transmission method for crash location when executing the program stored in the memory 703.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In a further embodiment provided by the present invention, a computer-readable storage medium is also provided, in which a computer program is stored which, when being executed by a processor, carries out the above-mentioned method steps of the information transfer method for crash location.
In a further embodiment of the present invention, a computer program product is also provided, which comprises instructions that, when run on a computer, cause the computer to perform the above-mentioned method steps of the information transfer method for crash localization.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some of the description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (9)

1. An information transfer method for crash location, wherein the method is applied to a client device, and comprises:
capturing a touch event;
obtaining view information corresponding to the touch event, wherein the view information is used for representing operation behaviors aiming at a view corresponding to the touch event; and after a crash event is detected, sending the view information to a crash analysis server so that the crash analysis server performs crash positioning based on the view information.
2. The method of claim 1, wherein the type of view comprises at least one of: a configuration level view, a container level view, and an element level view;
the obtaining of the view information corresponding to the touch event includes:
obtaining a view corresponding to the touch event;
judging the type of the view, and determining the view information corresponding to the view of the type of the view based on the type of the view.
3. The method of claim 2, wherein the determining the type of the view comprises:
acquiring a class name corresponding to the view;
determining a type of the view based on the class name.
4. The method of claim 2, wherein obtaining the view corresponding to the touch event comprises:
and obtaining a view corresponding to the touch event through a responder chain, wherein the responder chain is a hierarchical structure formed by a series of responder objects, and the view corresponding to the touch event comprises an architecture layer view associated with the touch event in the responder chain.
5. The method of claim 4, wherein obtaining a view corresponding to a touch event through a responder chain comprises:
obtaining a response view corresponding to the touch area through a responder chain based on the touch area corresponding to the touch event, wherein the response view is a view corresponding to a responder object responding to the touch area;
the judging the type of the view and determining the view information corresponding to the type of the view in the view based on the type of the view comprises the following steps:
judging the type of the response view, and determining the view information corresponding to the type of the response view in the response view based on the type of the view.
6. The method according to claim 4, wherein after the determining the type of the view and determining the type of the view in the view information corresponding to the view based on the type of the view, the method further comprises:
storing view information corresponding to a preset number of touch events;
after detecting a crash event, sending the view information to a crash analysis server, comprising:
and after a crash event is detected, sending the stored view information corresponding to the preset number of touch events to a crash analysis server.
7. An information transfer device for crash location, comprising:
a capture module to capture a touch event;
an obtaining module, configured to obtain view information corresponding to a touch event, where the view information is used to represent an operation behavior for a view corresponding to the touch event;
and the sending module is used for sending the view information to a crash analysis server after a crash event is detected so as to enable the crash analysis server to perform crash positioning based on the view information.
8. An information transmission device for crash location is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
9. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202110504272.5A 2021-05-10 2021-05-10 Information transmission method, device, equipment and storage medium for crash positioning Active CN113204445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110504272.5A CN113204445B (en) 2021-05-10 2021-05-10 Information transmission method, device, equipment and storage medium for crash positioning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110504272.5A CN113204445B (en) 2021-05-10 2021-05-10 Information transmission method, device, equipment and storage medium for crash positioning

Publications (2)

Publication Number Publication Date
CN113204445A true CN113204445A (en) 2021-08-03
CN113204445B CN113204445B (en) 2024-04-19

Family

ID=77030816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110504272.5A Active CN113204445B (en) 2021-05-10 2021-05-10 Information transmission method, device, equipment and storage medium for crash positioning

Country Status (1)

Country Link
CN (1) CN113204445B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070220364A1 (en) * 2006-03-16 2007-09-20 Quanta Computer Inc. Method for capturing a display frame of a computer crashing
US8621282B1 (en) * 2011-05-19 2013-12-31 Google Inc. Crash data handling
AU2015203638A1 (en) * 2010-12-20 2015-07-23 Apple Inc. Event recognition
US20150347220A1 (en) * 2014-05-30 2015-12-03 Crittercism, Inc. System for Monitoring and Tracking Application Crashes Occurring on Different Mobile Devices
CN107622000A (en) * 2017-09-19 2018-01-23 北京京东尚科信息技术有限公司 A kind of collection of application crash information and report method, device
CN108268364A (en) * 2018-01-19 2018-07-10 百度在线网络技术(北京)有限公司 Anomalous event back method, device and equipment
US20180349218A1 (en) * 2017-06-04 2018-12-06 Apple Inc. Auto Bug Capture
CN109284102A (en) * 2017-07-21 2019-01-29 阿里巴巴集团控股有限公司 Information collecting method and device
CN109669798A (en) * 2018-12-25 2019-04-23 北京金山安全软件有限公司 Crash analysis method, crash analysis device, electronic equipment and storage medium
CN110968432A (en) * 2018-09-29 2020-04-07 武汉斗鱼网络科技有限公司 Control event processing method and device and readable storage medium
CN111708655A (en) * 2020-06-19 2020-09-25 北京达佳互联信息技术有限公司 Application crash processing method, device and system
CN112136101A (en) * 2018-06-03 2020-12-25 苹果公司 Framework for providing application programming interface for user interface and animation
US20210089520A1 (en) * 2019-09-19 2021-03-25 International Business Machines Corporation Composite views in a master data management system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070220364A1 (en) * 2006-03-16 2007-09-20 Quanta Computer Inc. Method for capturing a display frame of a computer crashing
AU2015203638A1 (en) * 2010-12-20 2015-07-23 Apple Inc. Event recognition
US8621282B1 (en) * 2011-05-19 2013-12-31 Google Inc. Crash data handling
US20150347220A1 (en) * 2014-05-30 2015-12-03 Crittercism, Inc. System for Monitoring and Tracking Application Crashes Occurring on Different Mobile Devices
US20180349218A1 (en) * 2017-06-04 2018-12-06 Apple Inc. Auto Bug Capture
CN109284102A (en) * 2017-07-21 2019-01-29 阿里巴巴集团控股有限公司 Information collecting method and device
CN107622000A (en) * 2017-09-19 2018-01-23 北京京东尚科信息技术有限公司 A kind of collection of application crash information and report method, device
CN108268364A (en) * 2018-01-19 2018-07-10 百度在线网络技术(北京)有限公司 Anomalous event back method, device and equipment
CN112136101A (en) * 2018-06-03 2020-12-25 苹果公司 Framework for providing application programming interface for user interface and animation
CN110968432A (en) * 2018-09-29 2020-04-07 武汉斗鱼网络科技有限公司 Control event processing method and device and readable storage medium
CN109669798A (en) * 2018-12-25 2019-04-23 北京金山安全软件有限公司 Crash analysis method, crash analysis device, electronic equipment and storage medium
US20210089520A1 (en) * 2019-09-19 2021-03-25 International Business Machines Corporation Composite views in a master data management system
CN111708655A (en) * 2020-06-19 2020-09-25 北京达佳互联信息技术有限公司 Application crash processing method, device and system

Also Published As

Publication number Publication date
CN113204445B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN105556482B (en) Monitor mobile application performance
WO2020233053A1 (en) Method, apparatus, device, and storage medium for making test page script
WO2021088724A1 (en) Testing method and apparatus
CN109697066B (en) Method and system for realizing data sheet splicing and automatically training machine learning model
CN108363657B (en) Method, equipment and medium for monitoring integrity of embedded data acquisition of APP client
CN104765689B (en) A kind of interface capability data supervise method and apparatus in real time
CN109635210B (en) Behavior data reporting method, device, equipment and storage medium
CN108134812B (en) Data processing method and device
CN105589782A (en) User behavior collection method based on browser
CN110941382B (en) Display operation method, device, equipment and storage medium of intelligent interactive panel
CN110647321A (en) Method, device and equipment for playing back operation flow and storage medium
CN112148571A (en) Method and device for recording and playing back webpage operation process
CN113254320A (en) Method and device for recording user webpage operation behaviors
US20190087303A1 (en) System, method, and apparatus for gathering information
US10140377B2 (en) Data processing, data collection
CN115445212A (en) Game gift bag pushing method and device, computer equipment and storage medium
CN109101412B (en) Test file generation method, test file generation device, test file testing method, test file testing device, storage medium and computer equipment
CN113987393A (en) Web page operation recorder, system, device and method
CN106358220B (en) The detection method of abnormal contact information, apparatus and system
CN110717130B (en) Dotting method, dotting device, dotting terminal and storage medium
CN112817817B (en) Buried point information query method, buried point information query device, computer equipment and storage medium
CN110908552B (en) Multi-window operation control method, device, equipment and storage medium
CN113204445B (en) Information transmission method, device, equipment and storage medium for crash positioning
CN105653145A (en) Method and device for processing display object
WO2021189766A1 (en) Data visualization method and related device

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