CN110865940B - Program jamming positioning method and related device - Google Patents

Program jamming positioning method and related device Download PDF

Info

Publication number
CN110865940B
CN110865940B CN201911096389.3A CN201911096389A CN110865940B CN 110865940 B CN110865940 B CN 110865940B CN 201911096389 A CN201911096389 A CN 201911096389A CN 110865940 B CN110865940 B CN 110865940B
Authority
CN
China
Prior art keywords
function
execution
positioning
frame
stuck
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911096389.3A
Other languages
Chinese (zh)
Other versions
CN110865940A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911096389.3A priority Critical patent/CN110865940B/en
Publication of CN110865940A publication Critical patent/CN110865940A/en
Application granted granted Critical
Publication of CN110865940B publication Critical patent/CN110865940B/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/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Landscapes

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

Abstract

The application discloses a method for positioning a stuck-in position and a related device, which are characterized in that an execution function of each frame during program operation is obtained in real time, and a statistical pile is inserted into a plurality of execution functions in the execution functions to obtain a detection function; then recording function information of the detection function to determine the time consumed by executing the function; and when the time consumed by executing the function meets a preset condition, positioning a corresponding executing function in the detection function as a stuck occurrence point. Therefore, the determining process of the pause point in the program running process is realized, the time consumption and related data of the function execution of the pause frame can be accurately positioned without acquiring a large amount of data, the occupied resources are less, the stability of the positioning process is improved, the requirement on terminal hardware is low, and the method has a good application range.

Description

Program jamming positioning method and related device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a program stuck location method and a related device.
Background
Along with the development of the related technology of the mobile terminal, more and more intelligent devices appear in the life of people, wherein a game is a main terminal application program, people need to master the running state in the running process of the game in real time to make optimization, and the smooth running of the game is ensured.
At present, the IL2CPP version of Unity3D of android phones is realized by a profile tool in the aspect of morton positioning, a level Build is selected when the implementation mode needs to be compiled, the version is mainly used for debugging and testing in the previous period, a plurality of performance statistical codes are inserted into an engine in the compiling process according to the main implementation principle, the performance of a memory/CPU/GPU and the like is convenient to extract, and the statistical data is the total information of all latitudes for statistics. When the level version is used, a profiler tool is started at a computer end, the profiler tool is connected with the level version through a USB or an ip, and the level version can continuously send each frame of statistical data to the profiler tool. In order to count the running state of the program to determine the cause of the stuck, the data to be acquired includes more data, such as: CPU utilization rate, memory use condition, function execution time consumption, drawcall number and the like of each frame.
However, the amount of data involved in the process of determining the cause of the stuck location is large, many debugging scripts need to be added, resources of a terminal processor are occupied, the hardware requirement on the terminal is high, and the stability and the applicability of the stuck location process are affected.
Disclosure of Invention
In view of this, a first aspect of the present application provides a method for morton positioning, which can be applied to a system or a program process of a static database, and specifically includes: acquiring an execution function of each frame during program running in real time, wherein the execution function is used for indicating the running process of the program;
inserting a statistical peg into a plurality of the execution functions to obtain a detection function;
recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data;
and if the time consumed by the function execution meets a preset condition, positioning the corresponding frame information in the detection function as a pause occurrence point, wherein the preset condition is set based on a time delay threshold value.
Preferably, in some possible implementations of the present application, before the obtaining the execution function of each frame during the running of the program in real time, the method further includes:
acquiring a compiled version of the program;
decompiling the execution function according to the compiled version to obtain a corresponding relation between the execution function and a function address, wherein the function address is used for indicating an insertion point of the statistical pile;
the inserting a statistical peg into a plurality of the execution functions to obtain a detection function includes:
and inserting the statistical piles into the execution functions according to the insertion points to obtain the detection functions.
Preferably, in some possible implementation manners of the present application, if the time consumed for executing the function meets a preset condition, the locating the frame information corresponding to the detection function as a stuck occurrence point includes:
if the Kanton time length meets a preset condition, determining an execution function corresponding to the current Kanton time length as a central function;
and acquiring frame information corresponding to a plurality of fluctuation execution functions in a preset range to be positioned as the incarceration point, wherein the preset range is determined based on the central function.
Preferably, in some possible implementation manners of the present application, the acquiring frame information corresponding to a plurality of ripple executing functions within a preset range to be located as the stuck occurrence point includes:
acquiring a plurality of fluctuation execution functions in the preset range;
judging whether the pause time lengths of the plurality of fluctuation execution functions are all larger than a fluctuation threshold value, wherein a numerical value corresponding to the fluctuation threshold value is smaller than a numerical value corresponding to the time delay threshold value;
and if so, positioning the plurality of fluctuation execution functions and the central function as the blockage occurrence points.
Preferably, in some possible implementations of the present application, after the locating the corresponding execution function in the detection function as the stuck occurrence point, the method further includes:
determining a pause frame corresponding to the pause occurrence point;
and associating the jamming frame with the jamming frame and reporting the jamming frame to a server, wherein the server is used for counting and displaying the jamming occurrence points to obtain the jamming reason.
Preferably, in some possible implementations of the present application, the associating the morton frame with the morton frame and reporting the associated morton frame to the server includes:
associating the pause frame with the pause frame, and recording corresponding pause time to obtain accumulated pause time;
and if the accumulated pause time length meets the reporting condition, reporting the pause and the pause frame to a server.
Preferably, in some possible implementations of the present application, the stuck positioning method is applied to a terminal device, where the terminal device is a block node device in a block chain node.
This application second aspect provides a device of stuck location, includes: the acquisition unit is used for acquiring an execution function of each frame during the running of the program in real time, and the execution function is used for indicating the running process of the program;
an insertion unit, configured to insert a statistical stub into the plurality of execution functions to obtain a detection function;
the recording unit is used for recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data;
and the positioning unit is used for positioning the corresponding frame information in the detection function as a pause occurrence point if the time consumed for executing the function meets a preset condition, wherein the preset condition is set based on a time delay threshold value.
Preferably, in some possible implementations of the present application, the obtaining unit is further configured to obtain a compiled version of the program;
the obtaining unit is further configured to decompile the execution function according to the compiled version to obtain a corresponding relationship between the execution function and a function address, where the function address is used to indicate an insertion point of the statistical pile;
the inserting unit is specifically configured to insert the statistical pile into the plurality of execution functions according to the insertion point to obtain the detection function.
Preferably, in some possible implementations of the present application, the positioning unit is specifically configured to determine, if the kation duration satisfies a preset condition, that an execution function corresponding to the current kation duration is a central function;
the positioning unit is specifically configured to acquire frame information corresponding to a plurality of fluctuation execution functions within a preset range to position the frame information as the stuck occurrence point, where the preset range is determined based on the central function.
Preferably, in some possible implementations of the present application, the positioning unit is specifically configured to obtain a plurality of ripple execution functions within the preset range;
the positioning unit is specifically configured to determine whether the stuck time lengths corresponding to the multiple fluctuation execution functions are all greater than a fluctuation threshold, and a value corresponding to the fluctuation threshold is smaller than a value corresponding to the delay threshold;
the positioning unit is specifically configured to, if yes, position the plurality of fluctuation execution functions and the center function as the stuck occurrence point.
Preferably, in some possible implementations of the present application, the positioning unit is further configured to determine a stuck frame corresponding to the stuck occurrence point;
the positioning unit is further configured to associate the stuck frame with the stuck frame and report the stuck frame to a server, and the server is configured to count and display the stuck occurrence point to obtain a stuck reason.
Preferably, in some possible implementation manners of the present application, the positioning unit is further configured to associate the stuck frame with the stuck frame, and record a corresponding stuck duration to obtain a cumulative stuck duration;
and the positioning unit is further used for reporting the jamming and the jamming frame to a server if the accumulated jamming duration meets a reporting condition.
A third aspect of the present application provides a computer device comprising: a memory, a processor, and a bus system; the memory is used for storing program codes; the processor is configured to perform the method for stuck positioning according to any one of the first aspect or the first aspect.
A fourth aspect of the present application provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of stuck positioning as described in the first aspect or any one of the first aspects above.
According to the technical scheme, the embodiment of the application has the following advantages:
acquiring an execution function of each frame during program operation in real time, and inserting a statistical pile into a plurality of execution functions in the execution functions to obtain a detection function; then recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data; and when the time consumed by the function execution meets a preset condition, positioning a corresponding execution function in the detection function as a stuck occurrence point. Therefore, the determining process of the pause point in the program running process is realized, the time consumption and related data of the function execution of the pause frame can be accurately positioned without acquiring a large amount of data, the occupied resources are less, the stability of the positioning process is improved, the requirement on terminal hardware is low, and the method has a good application range.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a diagram of a network architecture for operation of a Cartesian positioning system;
fig. 2 is a flowchart of a morton positioning according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for stuck location according to an embodiment of the present disclosure;
FIG. 4 is a schematic illustration of an interface display for a Cartesian positioning according to an embodiment of the present disclosure;
FIG. 5 is a schematic illustration of another exemplary embodiment of a Cartesian positioning interface;
FIG. 6 is a schematic illustration of an interface display for another Cartesian orientation provided by an embodiment of the present application;
FIG. 7 is a schematic illustration of an interface display for another Cartesian orientation provided by an embodiment of the present application;
FIG. 8 is a schematic illustration of an interface display for another Cartesian orientation provided by an embodiment of the present application;
fig. 9 is a schematic structural diagram of a morton positioning device according to an embodiment of the present disclosure;
FIG. 10 is a schematic structural diagram of another exemplary embodiment of a Cartesian positioning apparatus according to the present disclosure;
fig. 11A is a schematic diagram of a data sharing system according to an embodiment of the present application;
fig. 11B is a block composition diagram of a data sharing system according to an embodiment of the present application;
fig. 11C is a schematic diagram of a data transmission response of a blockchain node according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a stuck positioning method and a related device, which can be applied to a stuck positioning system or process in the program running process of terminal equipment, and specifically obtains an execution function of each frame in the program running process in real time, and inserts a statistical pile into a plurality of execution functions in the execution functions to obtain a detection function; then recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data; and when the time consumed by the function execution meets a preset condition, positioning a corresponding execution function in the detection function as a stuck occurrence point. Therefore, the determining process of the pause point in the program running process is realized, the time consumption and related data of the function execution of the pause frame can be accurately positioned without acquiring a large amount of data, the occupied resources are less, the stability of the positioning process is improved, the requirement on terminal hardware is low, and the method has a good application range.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, the abbreviations of the related terms appearing in the present application are explained as follows:
U3D: also known as Unity3D, is a multi-platform, comprehensive game development tool developed by Unity Technologies that allows players to easily create types of interactive content such as three-dimensional video games, building visualizations, real-time three-dimensional animations, etc., and is a fully integrated professional game engine.
IL2 CPP: the Unity develops IL2cpp from version 4.6.1p5, converts intermediate code (IL) running on a virtual machine which should be remono into cpp code, and then compiles the generated cpp code on each platform by a native C + + compiler which is well optimized for each platform by using the cross-platform characteristic of C + +, so as to obtain higher efficiency and better compatibility.
Development Build U3D Game compilation option, a debugging version of the developer, which can be automatically connected to the Profiler when checked out at compile time.
Development version: and checking the version compiled by the Development Build compilation option.
High machine matching: the machine configuration condition used during the test is that the high machine-matching representative configuration is better, for example, the current Android high machine-matching standard is more than 8G memory.
It should be understood that the stuck positioning method provided by the present application may be applied to an operation process of a stuck positioning system, specifically, the stuck positioning system may operate in a network architecture as shown in fig. 1, which is a network architecture diagram of the stuck positioning system, as shown in fig. 1, the stuck positioning system may provide stuck positioning with a plurality of information sources, and insert a statistical pile into an execution function of a program to obtain a stuck waveform of a program operation delay, and further determine a stuck positioning result, as can be understood, a variety of terminal devices are shown in fig. 1, in an actual scene, more or fewer types of terminal devices may participate in the stuck positioning process, a specific number and a type are determined according to an actual scene, and no limitation is made here; in addition, fig. 1 shows one server, but in an actual scenario, a plurality of servers may participate, and particularly in a scenario of multi-application data interaction, the specific number of servers depends on the actual scenario.
It will be appreciated that the above described morton location system may be implemented in a personal mobile terminal, for example: an application, such as "calton meter", may also be run on a server, and may also be run on a third party device to provide calton positioning to obtain a result of the calton positioning of the information source, such as: in the mobile terminal, firstly, a relevant pause positioning program is started, then a game to be detected is pulled through the program to be started, and then pause positioning and analysis are carried out; the specific morton positioning system may be operated in the above-mentioned device in the form of a program, may also be operated as a system component in the above-mentioned device, and may also be used as one of cloud service programs, and the specific operation mode is determined by an actual scene, and is not limited herein.
Along with the development of the related technology of the mobile terminal, more and more intelligent devices appear in the life of people, wherein a game is a main terminal application program, people need to master the running state in the running process of the game in real time to make optimization, and the smooth running of the game is ensured.
At present, the IL2CPP version of Unity3D of android phones is realized by a profile tool in the aspect of morton positioning, a level Build is selected when the implementation mode needs to be compiled, the version is mainly used for debugging and testing in the previous period, a plurality of performance statistical codes are inserted into an engine in the compiling process according to the main implementation principle, the performance of a memory/CPU/GPU and the like is convenient to extract, and the statistical data is the total information of all latitudes for statistics. When the level version is used, a profiler tool is started at a computer end, the profiler tool is connected with the level version through a USB or an ip, and the level version can continuously send each frame of statistical data to the profiler tool. In order to count the running state of the program to determine the cause of the stuck, the data to be acquired includes more data, such as: CPU utilization rate, memory use condition, function execution time consumption, drawcall number and the like of each frame.
However, the data size involved in the process of determining the cause of the stuck location is large, many debugging scripts need to be added, resources of a terminal processor are occupied, the requirement on hardware of the terminal is high, and the stability and the applicability of the stuck location process are affected; in addition, the prior art can only aim at the dev version, and the non-dev version cannot locate the performance.
In order to solve the above problem, the present application provides a method for morton positioning, which is applied to a process framework of the morton positioning shown in fig. 2, as shown in fig. 2, the method is a process framework diagram of the morton positioning, and the diagram includes version compilation, hook execution function, statistics of morton information and a server, where the version compilation is used to obtain a current IL2CPP version, and then call an IDA decompiler through a script to obtain a corresponding relationship between a function and an address, and further perform decompilation, so as to insert a statistical stub into the execution function, further perform statistics of the morton information, obtain a morton waveform, and upload a frame and related function information meeting preset conditions to the server, so as to facilitate targeted optimization of the server.
It should be understood that the IL2CPP version in the U3D engine is described as an example, and may be specifically inserted based on versions of other engines, and the specific version selection depends on actual scenarios, which are not limited herein.
It can be understood that the method provided by the present application may be a program written as a processing logic in a hardware system, or may be a card positioning device, and the processing logic is implemented in an integrated or external manner. As an implementation manner, the morton positioning device obtains an execution function of each frame during program operation in real time, and inserts a statistical pile into a plurality of execution functions in the execution functions to obtain a detection function; then recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data; and when the time consumed by the function execution meets a preset condition, positioning a corresponding execution function in the detection function as a stuck occurrence point. Therefore, the determining process of the pause point in the program running process is realized, the time consumption and related data of the function execution of the pause frame can be accurately positioned without acquiring a large amount of data, the occupied resources are less, the stability of the positioning process is improved, the requirement on terminal hardware is low, and the method has a good application range.
With reference to the above flow architecture, the following describes a method for stuck positioning in the present application, please refer to fig. 3, where fig. 3 is a flow chart of the method for stuck positioning according to an embodiment of the present application, and the embodiment of the present application at least includes the following steps:
301. and acquiring the execution function of each frame when the program runs in real time.
In this embodiment, the execution function is used to indicate the running process of the program, that is, the execution time of the execution function may reflect the pause condition of the program.
In a possible scenario, the program is an IL2CPP version game loaded in a U3D engine, and since the prior art can only perform joint debugging with a profile tool to capture an execution function by selecting and editing a level version, but cannot perform the non-level version; therefore, the present embodiment may also perform version compilation of the engine before acquiring the execution function of each frame during the program running in real time.
Specifically, a compiled version of the program is first obtained; then decompiling the execution function according to the compiled version to obtain the corresponding relation between the execution function and a function address; and then the execution function information of each frame can be obtained from the hook during the running of the program.
It should be understood that the description of the engine version is an example, and the method provided by this embodiment may still be adopted for other engines of other versions on which programs may be loaded, and is not limited herein.
In a possible display mode, as shown in fig. 4, the display diagram of the interface of the morton positioning provided by the embodiment of the present application is shown, in the diagram, a game is pulled up through a plug-in such as a "morton meter", and then a process of executing a function corresponding to hook of the game is implemented; in addition, the version of the relevant game and the running engine can be displayed on the interface, for example, the version of the game of "soul fighting to come" is 1.19.58.4906, the loaded game engine is Unity3D, and relevant personnel can clearly know version information so as to facilitate the subsequent optimization process.
The above scenario describes a case where the program is a game, but it should be noted that the morton positioning method provided in this embodiment may also be applied to morton positioning of other types of APPs, as shown in fig. 5, which is an interface display diagram of morton positioning provided in this embodiment of the present application, where two test scenarios are shown in the diagram, and correspond to a battle scenario test with a high morton requirement, that is, a morton requirement is as few as possible; and the relatively average non-combat scene test can realize the targeted stuck positioning process through the selection of different modes, thereby achieving the purpose of saving time and system resources.
302. And inserting a statistical stub into a plurality of the execution functions to obtain a detection function.
In this embodiment, the statistical stub is used to insert or modify some codes in some positions in the program code of the execution function, so as to obtain and analyze the time consumed by the execution function during the execution of the execution function.
Optionally, the statistical pile may involve selection of an insertion point in the insertion process, and generally, traversal of a class file may be adopted, and then the bytecode is modified through the ASM, so that bytecode insertion can be completed; in addition, in step 301, an insertion point may be determined according to a corresponding relationship between an execution function and a function address by using a version-compiled program, and the statistical piles are inserted into the plurality of execution functions according to the insertion point, so as to obtain the detection function.
It is understood that the detection function and the execution function have a corresponding relationship, and the corresponding execution function can be searched through the determined detection function association to realize the positioning of the execution function.
303. And recording the function information and the frame information of the detection function.
In this embodiment, the function information includes function execution time consumption and call relation data, and the frame information corresponds to a frame corresponding to the current detection function, where the function execution time consumption may also be a pause duration, a pause time consumption, a function time consumption, or an execution time.
It can be understood that the function execution time consumption may be counted in real time to facilitate visual observation and analysis, for example, a waveform diagram manner is adopted, that is, the function information includes a stuck waveform of the detection function, and the stuck waveform is a set of execution times corresponding to each execution function, as shown in fig. 6, the method is an interface display diagram of stuck positioning provided in the embodiment of the present application, data of each round of test may also be counted in the recording process of the stuck waveform, and the statistical content may include a name of the test game, a test model, a test duration, a test scenario (mode), stuck times, severe stuck times, and test time.
Optionally, the katon waveform may also be a result of performing statistics and presentation on a plurality of scenes, as shown in fig. 7, which is a schematic diagram of an interface display of the katon positioning provided in the embodiment of the present application, where the diagram includes the katon waveforms of the plurality of scenes, and statistics are performed on the corresponding katon duration, and severity corresponding to the katon duration is evaluated, and based on characteristics of the katon waveform, continuity of the katon can be obtained, and the katon waveform is correspondingly presented in the relevant interface in a form of a table, so as to facilitate inspection by relevant people.
303. And if the time consumed by the function execution meets the preset condition, positioning the corresponding frame information in the detection function as a pause occurrence point.
In this embodiment, the preset condition is set based on a delay threshold, and the preset condition may be that the preset condition is greater than the delay threshold, for example: if the time delay threshold is 100ms, the detection function which takes more than 100ms for executing the function is positioned as the incarceration point.
Optionally, the scenario shown in fig. 5 indicates that there may be a case where the delay threshold is required differently, that is, the delay threshold is set specifically, for example: the delay threshold is 50ms for the combat scenario test and 100ms for the non-combat scenario test.
It is understood that the preset condition may also be a range value set based on the delay threshold, as shown in the scenario of fig. 6, there may be a difference between stuck and severe stuck, for example: the time delay threshold is 100ms, and the preset condition may be that the detection function with the stuck duration in the range of 100 ± 20ms is a stuck occurrence point, and the detection function with the stuck duration greater than 150ms is a serious stuck occurrence point.
Optionally, the process of determining the value range may also be the detection of adjacent frames, that is, the screening of the floating range is performed on the adjacent functions of the detection function of the determined stuck occurrence point; optionally, determining that the execution function corresponding to the current card pause time length is a central function by judging that the card pause time length meets a preset condition; and then acquiring frame information corresponding to a plurality of fluctuation execution functions within a preset range to be positioned as the incarceration point, wherein the preset range is determined based on the central function.
The positioning process for the adjacent function may be to execute the function by acquiring a plurality of fluctuations within the preset range; then judging whether the pause time lengths of the plurality of fluctuation execution functions are all larger than a fluctuation threshold value, wherein a numerical value corresponding to the fluctuation threshold value is smaller than a numerical value corresponding to the time delay threshold value; and if so, positioning the plurality of fluctuation execution functions and the central function as the blockage occurrence points.
Optionally, after the morton occurrence point is determined through the above embodiment, the relevant morton information may be sent to the server to analyze the morton occurrence point to obtain a morton reason, and further optimize the relevant program. Specifically, a stuck frame corresponding to the stuck occurrence point may be determined first; and then associating the jamming and the jamming frame, and reporting the jamming frame to a server, so that the server is used for counting and displaying the jamming occurrence points to obtain the jamming reason.
Before reporting to the server, the relevant information of the morton locating point may be sorted, specifically, a manner shown in fig. 8 may be referred to, as shown in fig. 8, which is an interface display diagram of the morton locating point provided in the embodiment of the present application, in the diagram, a frame marked as the morton locating point in the morton waveform is highlighted, and a corresponding morton time length is displayed, further, time consumption statistics is performed on all execution functions in the morton frame, and a relevant person may clearly know time consumption information of the relevant execution function.
Optionally, the total consumed time in the stuck frame may also be used as a reporting condition, that is, the accumulated stuck time length is obtained by associating the stuck frame with the stuck frame and recording the corresponding stuck time length; and if the accumulated pause time length meets the reporting condition, reporting the pause and the pause frame to a server.
With the above embodiment, the execution function of each frame during the program operation is obtained in real time, and the statistical pile is inserted into multiple execution functions in the execution functions to obtain the detection function; then recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data; and when the time consumed by the function execution meets a preset condition, positioning a corresponding execution function in the detection function as a stuck occurrence point. Therefore, the determining process of the pause point in the program running process is realized, the time consumption and related data of the function execution of the pause frame can be accurately positioned without acquiring a large amount of data, the occupied resources are less, the stability of the positioning process is improved, the requirement on terminal hardware is low, and the method has a good application range.
In order to better implement the above-mentioned aspects of the embodiments of the present application, the following also provides related apparatuses for implementing the above-mentioned aspects. Referring to fig. 9, fig. 9 is a schematic structural diagram of a morton positioning device according to an embodiment of the present application, in which the morton positioning device 900 includes:
an obtaining unit 901, configured to obtain, in real time, an execution function of each frame when a program runs, where the execution function is used to indicate a running process of the program;
an inserting unit 902, configured to insert a statistical stub into a plurality of the execution functions to obtain a detection function;
a recording unit 903, configured to record function information and frame information of the detection function, where the function information includes function execution time consumption and call relation data;
a positioning unit 904, configured to, if the time consumed for executing the function meets a preset condition, position the corresponding frame information in the detection function as a stuck occurrence point, where the preset condition is set based on a time delay threshold.
Preferably, in some possible implementation manners of the present application, the obtaining unit 901 is further configured to obtain a compiled version of the program;
the obtaining unit 901 is further configured to decompile the execution function according to the compiled version to obtain a corresponding relationship between the execution function and a function address, where the function address is used to indicate an insertion point of the statistical pile;
the inserting unit 902 is specifically configured to insert the statistical pile into the plurality of execution functions according to the insertion point to obtain the detection function.
Preferably, in some possible implementations of the present application, the positioning unit 904 is specifically configured to determine, if the katton time length meets a preset condition, that an execution function corresponding to the current katton time length is a central function;
the positioning unit 904 is specifically configured to obtain frame information corresponding to a plurality of fluctuation performing functions within a preset range, so as to position the frame information as the stuck occurrence point, where the preset range is determined based on the central function.
Preferably, in some possible implementations of the present application, the positioning unit 904 is specifically configured to obtain a plurality of ripple execution functions within the preset range;
the positioning unit 904 is specifically configured to determine whether the stuck time lengths corresponding to the multiple fluctuation execution functions are all greater than a fluctuation threshold, and a value corresponding to the fluctuation threshold is smaller than a value corresponding to the time delay threshold;
the positioning unit 904 is specifically configured to, if yes, position the multiple fluctuation performing functions and the center function as the stuck occurrence point.
Preferably, in some possible implementations of the present application, the positioning unit 904 is further configured to determine a stuck frame corresponding to the stuck occurrence point;
the positioning unit 904 is further configured to associate the stuck and stuck frames and report the stuck and stuck frames to a server, where the server is configured to count and display the stuck occurrence points to obtain a stuck reason.
Preferably, in some possible implementation manners of the present application, the positioning unit 904 is further configured to associate the stuck frame with the stuck frame, and record a corresponding stuck duration to obtain a cumulative stuck duration;
the positioning unit 904 is further configured to report the stuck and stuck frames to a server if the accumulated stuck duration satisfies a reporting condition.
Acquiring an execution function of each frame during program operation in real time, and inserting a statistical pile into a plurality of execution functions in the execution functions to obtain a detection function; then recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data; and when the time consumed by the function execution meets a preset condition, positioning a corresponding execution function in the detection function as a stuck occurrence point. Therefore, the determining process of the pause point in the program running process is realized, the time consumption and related data of the function execution of the pause frame can be accurately positioned without acquiring a large amount of data, the occupied resources are less, the stability of the positioning process is improved, the requirement on terminal hardware is low, and the method has a good application range.
Referring to fig. 10, fig. 10 is a schematic structural diagram of another morton positioning apparatus provided in the embodiment of the present application, the morton positioning apparatus 1000 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 1022 (e.g., one or more processors) and a memory 1032, and one or more storage media 1030 (e.g., one or more mass storage devices) storing an application 1042 or data 1044. Memory 1032 and storage medium 1030 may be, among other things, transient or persistent storage. The program stored on the storage medium 1030 may include one or more modules (not shown), each of which may include a sequence of instruction operations for a stuck position device. Further, the central processor 1022 may be configured to communicate with the storage medium 1030 to execute a series of instruction operations in the storage medium 1030 on the katton positioning device 1000.
The Cartesian location device 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input-output interfaces 1058, and/or one or more operating systems 1041, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The steps performed by the morton positioning device in the above embodiments may be based on the structure of the morton positioning device shown in fig. 9.
Also provided in the embodiments of the present application is a computer-readable storage medium, which stores therein a stuck location instruction, and when the computer-readable storage medium is executed on a computer, causes the computer to perform the steps performed by the stuck location apparatus in the method described in the foregoing embodiments shown in fig. 2 to 8.
Also provided in embodiments of the present application is a computer program product comprising katon positioning instructions, which when run on a computer, cause the computer to perform the steps performed by the katon positioning apparatus in the method as described in the embodiments of fig. 2-8 above.
Embodiments of the present application further provide a stuck positioning system, which may include the stuck positioning apparatus in the embodiment described in fig. 9 or the stuck positioning apparatus described in fig. 10.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a card positioning device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In addition, the method and the apparatus for morton positioning may also be applied to a data sharing system, referring to the data sharing system shown in fig. 11A, where the data sharing system 1100 refers to a system for performing data sharing between nodes, the data sharing system may include a plurality of nodes 1101, and the plurality of nodes 1101 may refer to respective clients in the data sharing system, where each client operates on a corresponding terminal device based on the method of the present application. Each node 1101 may receive input information during normal operation and maintain shared data within the data sharing system based on the received input information. In order to ensure information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and information transmission can be carried out between the nodes through the information connection. For example, when an arbitrary node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all the nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding thereto, and each node in the data sharing system may store a node identifier of another node in the data sharing system, so that the generated block is broadcast to the other node in the data sharing system according to the node identifier of the other node in the following. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
TABLE 1 node and node identification correspondence
Node name Node identification
Node
1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
Each node in the data sharing system stores one identical blockchain. The block chain is composed of a plurality of blocks, as shown in fig. 11B, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 11C, when the node where the block chain is located receives the input information, the input information is verified, after the verification is completed, the input information is stored in the memory pool, and the hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the data sharing system where the newly generated blocks are located according to the node identifications of the other nodes in the data sharing system, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (7)

1. A program card positioning method is characterized by being applied to terminal equipment, wherein card positioning application is installed in the terminal equipment; the method comprises the following steps:
pulling the program to be detected through the morton positioning application;
acquiring a compiled version of the program;
decompiling an execution function according to the compiled version to obtain a corresponding relation between the execution function and a function address, wherein the function address is used for indicating an insertion point of a statistical pile;
acquiring an execution function of each frame during program running in real time, wherein the execution function is used for indicating the running process of the program;
inserting the statistical piles into the execution functions according to the insertion points to obtain detection functions;
recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data;
if the function execution time consumption meets a preset condition, determining an execution function corresponding to the current function execution time consumption as a central function;
acquiring a plurality of fluctuation executive functions within a preset range;
judging whether the function execution time consumption corresponding to the multiple fluctuation execution functions is larger than a fluctuation threshold value or not, wherein the numerical value corresponding to the fluctuation threshold value is smaller than the numerical value corresponding to the time delay threshold value;
if yes, the multiple fluctuation execution functions and the central function are positioned as the jamming occurrence points, the preset range is determined based on the central function, and the preset condition is set based on a time delay threshold value.
2. The method of claim 1, wherein after locating the stuck occurrence, the method further comprises:
determining a pause frame corresponding to the pause occurrence point;
and associating the jamming frame with the jamming frame and reporting the jamming frame to a server, wherein the server is used for counting and displaying the jamming occurrence points to obtain the jamming reason.
3. The method of claim 2, wherein associating the morton frame with the morton frame and reporting to a server comprises:
associating the morton frame with the morton frame, and recording corresponding function execution time consumption to obtain accumulated function execution time consumption;
and if the execution time consumption of the accumulative function meets the reporting condition, reporting the jamming and jamming frames to a server.
4. The method of claim 1, wherein the method of stuck positioning is applied to a terminal device, and the terminal device is a block node device in a block chain node.
5. A device for positioning a card pause is characterized by being applied to terminal equipment, wherein the terminal equipment is internally provided with a card pause positioning application; the device comprises:
the acquisition unit is used for pulling the program to be detected through the Kanton positioning application; acquiring a compiled version of the program; decompiling an execution function according to the compiled version to obtain a corresponding relation between the execution function and a function address, wherein the function address is used for indicating an insertion point of a statistical pile; acquiring an execution function of each frame during program running in real time, wherein the execution function is used for indicating the running process of the program;
the inserting unit is used for inserting the statistical piles into the execution functions according to the inserting points to obtain detection functions;
the recording unit is used for recording function information and frame information of the detection function, wherein the function information comprises function execution time consumption and calling relation data;
the positioning unit is used for determining an execution function corresponding to the current function execution time consumption as a central function if the function execution time consumption meets a preset condition; acquiring a plurality of fluctuation executive functions within a preset range; judging whether the function execution time consumption corresponding to the multiple fluctuation execution functions is larger than a fluctuation threshold value or not, wherein the numerical value corresponding to the fluctuation threshold value is smaller than the numerical value corresponding to the time delay threshold value; if yes, the multiple fluctuation execution functions and the central function are positioned as the jamming occurrence points, the preset range is determined based on the central function, and the preset condition is set based on a time delay threshold value.
6. A computer device, the computer device comprising a processor and a memory:
the memory is used for storing program codes; the processor is configured to perform the katton positioning method of any one of claims 1 to 4 according to instructions in the program code.
7. A computer readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of stuck location as claimed in any one of claims 1 to 4 above.
CN201911096389.3A 2019-11-11 2019-11-11 Program jamming positioning method and related device Active CN110865940B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911096389.3A CN110865940B (en) 2019-11-11 2019-11-11 Program jamming positioning method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911096389.3A CN110865940B (en) 2019-11-11 2019-11-11 Program jamming positioning method and related device

Publications (2)

Publication Number Publication Date
CN110865940A CN110865940A (en) 2020-03-06
CN110865940B true CN110865940B (en) 2022-04-05

Family

ID=69653908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911096389.3A Active CN110865940B (en) 2019-11-11 2019-11-11 Program jamming positioning method and related device

Country Status (1)

Country Link
CN (1) CN110865940B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527627B (en) * 2020-11-02 2024-05-10 百果园技术(新加坡)有限公司 Page clamping detection method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140366007A1 (en) * 2013-06-06 2014-12-11 Microsoft Corporation Debugging native code by transitioning from execution in native mode to execution in interpreted mode
CN106649063A (en) * 2016-11-22 2017-05-10 腾讯科技(深圳)有限公司 Method and system used for monitoring time consuming data when program runs
CN106681913A (en) * 2016-12-08 2017-05-17 武汉斗鱼网络科技有限公司 Application not responding positioning system and method
CN109840177A (en) * 2017-11-24 2019-06-04 腾讯科技(深圳)有限公司 A kind of processing method and relevant device of Caton

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140366007A1 (en) * 2013-06-06 2014-12-11 Microsoft Corporation Debugging native code by transitioning from execution in native mode to execution in interpreted mode
CN106649063A (en) * 2016-11-22 2017-05-10 腾讯科技(深圳)有限公司 Method and system used for monitoring time consuming data when program runs
CN106681913A (en) * 2016-12-08 2017-05-17 武汉斗鱼网络科技有限公司 Application not responding positioning system and method
CN109840177A (en) * 2017-11-24 2019-06-04 腾讯科技(深圳)有限公司 A kind of processing method and relevant device of Caton

Also Published As

Publication number Publication date
CN110865940A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
CN107943707B (en) Behavior tree testing method and device, storage medium and terminal
CN107967206B (en) Data test system, request interception method and request interception device
US8863089B2 (en) Method and apparatus for visualizing computer program execution
CN109359003B (en) Game server pressure testing method, device and equipment
CN108920370B (en) Compatibility problem detection method, device and equipment
US20150154495A1 (en) Method, apparatus, and artificial intelligence editor for implementing artificial intelligence behavior
CN110457200B (en) Test case generation method and equipment, storage medium and electronic equipment thereof
CN112631846A (en) Fault drilling method and device, computer equipment and storage medium
CN111177729B (en) Program bug test method and related device
KR101423030B1 (en) Method of analysis application object which computer-executable, server performing the same and storage media storing the same
CN111124911A (en) Automatic testing method, device, equipment and readable storage medium
CN110865940B (en) Program jamming positioning method and related device
CN110339571A (en) Event generation method and device, storage medium and electronic device
CN110221933A (en) Aacode defect assists restorative procedure and system
CN105512562B (en) Vulnerability mining method and device and electronic equipment
CN110825466B (en) Program jamming processing method and jamming processing device
CN111030837A (en) Network environment current situation assessment method and device, electronic equipment and storage medium
CN110365682B (en) Anti-cheating method and device
CN116796552B (en) Simulation thinking asynchronous cooperative processing method and device
CN110781084B (en) Method and device for determining stuck identification parameter, storage medium and electronic device
CN114003293B (en) Interface management method, device, electronic equipment and readable storage medium
CN111984519A (en) Test method and device for service system
US9483241B2 (en) Method ranking based on code invocation
CN114185773A (en) Program testing method, program testing device, electronic equipment and computer readable storage medium
KR20180035515A (en) Method for verifying a performance of clients and servers for smart ternimal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022533

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant