CN110166276B - Method, device, terminal equipment and medium for positioning frame synchronization abnormity - Google Patents

Method, device, terminal equipment and medium for positioning frame synchronization abnormity Download PDF

Info

Publication number
CN110166276B
CN110166276B CN201811405673.XA CN201811405673A CN110166276B CN 110166276 B CN110166276 B CN 110166276B CN 201811405673 A CN201811405673 A CN 201811405673A CN 110166276 B CN110166276 B CN 110166276B
Authority
CN
China
Prior art keywords
function
frame synchronization
log
client
running
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
CN201811405673.XA
Other languages
Chinese (zh)
Other versions
CN110166276A (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.)
Shenzhen Tencent Information Technology Co Ltd
Original Assignee
Shenzhen Tencent Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tencent Information Technology Co Ltd filed Critical Shenzhen Tencent Information Technology Co Ltd
Priority to CN201811405673.XA priority Critical patent/CN110166276B/en
Publication of CN110166276A publication Critical patent/CN110166276A/en
Application granted granted Critical
Publication of CN110166276B publication Critical patent/CN110166276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application belongs to the technical field of communication, and discloses a method, a device, terminal equipment and a medium for positioning frame synchronization abnormity, wherein the method for positioning the frame synchronization abnormity comprises the steps of receiving first frame synchronization detection information sent by a first client terminal needing frame synchronization and second frame synchronization detection information sent by a second client terminal; when the first frame synchronization check information is determined to be inconsistent with the second frame synchronization check information, a first running log of a first client and a second running log of a second client are obtained, and both the first running log and the second running log only contain function identification of a function which is run by the client in a set range and parameter values of a function running result; and positioning the frame synchronization abnormity according to the consistency of the function identification and the parameter value contained in the first running log and the second running log. Therefore, the consumed network resources are reduced, and the efficiency and the accuracy of frame synchronization abnormal positioning are improved.

Description

Method, device, terminal equipment and medium for positioning frame synchronization abnormity
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a terminal device, and a medium for locating a frame synchronization exception.
Background
The frame synchronization technology is a technology for synchronizing display at a pixel level of a synchronization source, and for a plurality of accessers on a network, a signal is synchronously sent to other people through a host computer and synchronously displayed on each terminal. The frame synchronization is based on that two clients of different terminals (or two clients of the same application in the same terminal) respectively execute logic based on the same operation instruction sequence and output the same result. Frame synchronization technology is commonly applied in the field of gaming to keep the game states of the respective game terminals synchronized.
In the prior art, to perform frame synchronization monitoring and abnormal positioning, a server usually determines whether frame synchronization is abnormal according to parameters (e.g., game state) output by each terminal, and performs frame synchronization abnormal positioning by comparing log data of each terminal obtained when it is determined that frame synchronization is abnormal.
However, since a large amount of log data is output during the operation of the terminal, a large amount of transmission time and network resources are consumed for the log data, and the cost for positioning the frame synchronization abnormality is increased.
Disclosure of Invention
The embodiment of the application provides a method, a device, a terminal device and a medium for positioning frame synchronization abnormity, which are used for reducing time and resources consumed by frame synchronization abnormity positioning when monitoring and positioning frame synchronization abnormity.
In one aspect, a method for locating a frame synchronization exception is provided, including:
receiving first frame synchronization check information sent by a first client and receiving second frame synchronization check information sent by a second client, wherein the first client and the second client are two clients of the same application needing frame synchronization;
when the first frame synchronization check information and the second frame synchronization check information are determined to be inconsistent, a first running log in a set range is obtained from a first client, and a second running log in the set range is obtained from a second client, wherein: the first running log records function identifiers of functions and parameter values of function running results, which are called by the first client when the first client runs within a set range, and the second running log records function identifiers of functions and parameter values of function running results, which are called by the second client when the second client runs within the set range;
and positioning the frame synchronization abnormity according to whether the corresponding parameter values in the first running log and the second running log are consistent or not.
In one aspect, a method for locating a frame synchronization anomaly is provided, including:
acquiring frame synchronization inspection information and sending the frame synchronization inspection information to a server, wherein the frame synchronization inspection information is used by the server for judging whether the frame synchronization inspection information of different clients of the same application needing frame synchronization is consistent; and are
Sending an operation log in a set range to a server according to triggering of the server when judging that frame synchronization check information of different clients is inconsistent, wherein the operation log in the set range is used for positioning frame synchronization abnormity by the server;
the operation log in the setting range records function identifiers of functions called by the client when the client operates in the setting range and parameter values of function operation results.
In one aspect, an apparatus for locating a frame synchronization abnormality is provided, including:
the system comprises a receiving unit, a frame synchronization checking unit and a frame synchronization checking unit, wherein the receiving unit is used for receiving first frame synchronization checking information sent by a first client and receiving second frame synchronization checking information sent by a second client, and the first client and the second client are two clients of the same application needing frame synchronization;
an obtaining unit, configured to obtain a first running log in a set range from a first client and obtain a second running log in the set range from a second client when it is determined that the first frame synchronization check information and the second frame synchronization check information are inconsistent, where: the first running log records function identifiers of functions and parameter values of function running results, which are called by the first client when the first client runs within a set range, and the second running log records function identifiers of functions and parameter values of function running results, which are called by the second client when the second client runs within the set range;
and the positioning unit is used for positioning the frame synchronization abnormity according to whether the corresponding parameter values in the first running log and the second running log of each function identifier are consistent.
In one aspect, an apparatus for locating a frame synchronization abnormality is provided, including:
the system comprises an acquisition unit, a server and a frame synchronization detection unit, wherein the acquisition unit is used for acquiring frame synchronization detection information and sending the frame synchronization detection information to the server, and the server is used for judging whether the frame synchronization detection information of different clients of the same application needing frame synchronization is consistent; and are
The sending unit is used for sending the running logs within the set range to the server according to the trigger of the server when judging that the frame synchronization detection information of different clients is inconsistent, and the running logs within the set range are used for positioning frame synchronization abnormity by the server;
the operation log in the setting range records function identifiers of functions called by the client when the client operates in the setting range and parameter values of function operation results.
In one aspect, a terminal device is provided, which includes at least one processing unit and at least one storage unit, where the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes any one of the above steps of the method for locating a frame synchronization abnormality.
In one aspect, a computer readable medium is provided, which stores a computer program executable by a terminal device, and when the program is run on the terminal device, the program causes the terminal device to perform any one of the steps of the above-mentioned method for locating a frame synchronization abnormality.
In the method, the device, the terminal equipment and the medium for positioning the frame synchronization abnormity, a first client and a second client of the same application send periodically acquired frame synchronization inspection information to a server; when the server determines that the received frame synchronization check information is inconsistent, acquiring a first running log of the first client in a set range and a second running log of the second client in the set range, wherein the first running log and the second running log only comprise function identifications of functions and parameter values of function running results, which are run by the clients in the set range; and the server carries out positioning of frame synchronization abnormity according to whether the parameter values corresponding to the function identifications in the first running log are consistent with the parameter values corresponding to the function identifications in the second running log. Therefore, the operation log only contains the function identification and the corresponding parameter value, but not a large amount of extra data (such as text data), and as the function identification and the function value are numerical values, compared with the traditional log containing a large amount of extra data, the operation log only occupies a small amount of system resources, greatly reduces transmission time and occupied network resources, has wide coverage, and improves the efficiency and the accuracy of frame synchronization abnormal positioning.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1a is a first diagram illustrating a method for locating frame synchronization anomaly according to the prior art;
FIG. 1b is a diagram illustrating a second method for locating frame synchronization anomaly according to the prior art;
fig. 1c is a schematic diagram illustrating a method for locating a frame synchronization exception according to an embodiment of the present application;
FIG. 1d is a schematic diagram of an input/output model;
fig. 1e is a schematic structural diagram of a frame synchronization anomaly positioning system according to an embodiment of the present application;
fig. 2 is a flowchart illustrating an implementation of a method for locating a frame synchronization exception according to an embodiment of the present disclosure;
FIG. 3a is a schematic view of a log of a run provided in an embodiment of the present application;
FIG. 3b is a diagram illustrating a frame synchronization exception positioning according to an embodiment of the present disclosure;
fig. 3c is an application scenario diagram provided in the embodiment of the present application;
FIG. 4a is a first schematic structural diagram of a frame synchronization anomaly positioning apparatus according to an embodiment of the present disclosure;
fig. 4b is a schematic structural diagram of a frame synchronization anomaly positioning apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device in an embodiment of the present application.
Detailed Description
In order to reduce transmission time and consumed network resources and reduce the cost of abnormal positioning when monitoring and positioning frame synchronization abnormality, embodiments of the present application provide a method, an apparatus, a terminal device, and a medium for positioning frame synchronization abnormality.
First, some terms referred to in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
1. The frame synchronization technology comprises the following steps: the method is a technology for synchronously displaying pixel levels of a synchronous source, and for a plurality of access persons on a network, a signal is synchronously sent to other persons through a host and synchronously displayed on various terminals.
The frame synchronization technology is generally applied to the field of games, and can enable a plurality of clients (which may be a plurality of clients of the same terminal or clients of different terminals) of the same application to respectively execute logic and output the same state based on the same operation instruction sequence. In order to ensure the normal operation of frame synchronization, frame synchronization monitoring and frame synchronization abnormality positioning are usually performed.
Taking the application in the field of games as an example, when monitoring and locating frame synchronization abnormality, the following two conventional methods are generally adopted:
the first mode is as follows: fig. 1a is a schematic diagram illustrating a method for locating a frame synchronization abnormality. The server obtains the hash values of all game states of the Nth frame of the first terminal and the hash values of all game states of the Nth frame of the second terminal, compares the hash values with the hash values of all game states of the Nth frame of the second terminal, judges that frame synchronization is normal when the hash values are consistent, and judges that frame synchronization is abnormal if the hash values are not consistent, and informs the first terminal and the second terminal that frame synchronization is abnormal. The first terminal and the second terminal start log switches to record running information, and send the state log of the (N + x) th frame of the first terminal and the state log of the (N + x) th frame of the second terminal to the server, so that the server performs frame synchronization abnormal positioning according to the state logs. And N is an integer, wherein the state log is related running information of the recorded Nth frame.
However, each frame outputs a large amount of data such as game states, so that when performing hash calculation on all game states output by the nth frame, a large amount of time is consumed, and the frequency of reporting hash values is low; in order to reduce occupied system resources, only when the frame synchronization abnormity is determined, the log switch is turned on, the obtained state logs are lagged, the obtained log data are less and the coverage area is small, and the abnormal logic point is difficult to be analyzed and inferred only according to the state logs of the (N + x) th frame.
The second way is: fig. 1b shows a schematic diagram of a method for locating a frame synchronization anomaly. The server acquires the key state values (such as blood volume) of the first terminal and the second terminal in the Nth frame, compares the key state values with the key state values, judges that the frame synchronization is normal if the key state values are consistent, and informs the first terminal and the second terminal of abnormal frame synchronization if the key state values are not consistent. The first terminal and the second terminal send the process logs in a set time period (such as in the current single game) to the server, so that the server performs frame synchronization abnormal positioning according to the obtained process logs, wherein the process logs are operation related data recorded in a period of time.
However, the key status value is too single, the coverage is too small, and it cannot accurately reflect whether the frame synchronization is abnormal in real time, and further, because the process log contains a lot of text and other information that occupy a lot of storage resources, and the number of covered functions is small, the log uploading cost is too high, and it is difficult to accurately locate the frame synchronization abnormality through the process log.
In summary, in both the first and second manners, a log including a large amount of texts and the like occupying a large amount of storage space is output, and the log does not completely cover the called function, so that it is difficult to analyze the accurate logical point of the frame synchronization abnormality through the obtained log, and the uploading cost is high.
In order to reduce the cost of positioning frame synchronization abnormity and improve the accuracy of positioning frame synchronization abnormity, the application provides a technical scheme for positioning frame synchronization abnormity.A server receives frame synchronization inspection information sent by a first client and a second client (needing frame synchronization) of the same application, acquires function identifications of functions and parameter values of function operation results when the frame synchronization inspection information of the first client and the second client are determined to be inconsistent, and determines the function with frame synchronization abnormity according to the function identifications and corresponding parameter values of the first client and whether the function identifications and corresponding parameter values of the second client are consistent. The frame synchronization check information may be a hash value of a common state of the nth frame, the setting range is, for example, in units of frames, and when the current frame is the nth frame, a set number of frames, for example, 50 frames are pushed forward, that is, the function identifiers of the functions and the parameter values of the function operation results during the operation in the N-50 th frame to the nth frame. The 50 frames is merely an example, and the operation parameters of each function when a frame abnormality occurs can be obtained within a range of a set number of frames based on experience. The frame may be substantially regarded as a time unit, and the setting range may be defined by the time unit as it is, for example, a setting time period before the current time.
For example, refer to fig. 1c, which is a schematic diagram illustrating a method for locating a frame synchronization exception according to an embodiment of the present application. The first terminal sends the first hash values of the multiple common states of the Nth frame of the first client to the server, and the second terminal sends the second hash values of the multiple common states of the Nth frame of the second client to the server. When the server determines that the first hash value is consistent with the second hash value, the frame synchronization is judged to be normal; otherwise, judging that the frame synchronization is abnormal, acquiring a first running log of a first client of the first terminal and a second running log of a second client of the second terminal, and comparing the consistency of the first running log and the second running log according to each function identifier and corresponding parameter values recorded in the running logs so as to position the function with the frame synchronization abnormality. It should be noted that the hash value is a common frame synchronization check information, and the application is not limited to performing frame synchronization check only by using the hash value.
The operation log only contains the function identification and the parameter value of each function, and extra data (such as text data) is removed, so that the data volume and the uploading cost are greatly reduced, and further, the operation log also contains the parameter values output by all functions in the operation process in the set range, so that the parameter values of the functions of the first client and the second client are directly compared in a consistency mode, the function with abnormal frame synchronization can be accurately positioned, the operation log is intuitive and clear, the positioning step is greatly simplified, and the positioning efficiency of the abnormal frame synchronization is improved.
Further, referring to fig. 1d, a schematic diagram of an input/output model is shown. The technical scheme of positioning the frame synchronization abnormity can be applied to a frame synchronization application scene, and a high-performance log system can be set according to the running log. For any input/output model shown in fig. 1d, when the inputs of different clients are all a and the input/output models are all F, if the outputs are different, that is, the outputs are Y1 and Y2, the logical point causing the output inconsistency can also be located by the operation log obtained in the above manner.
Fig. 1e is a schematic diagram of an architecture of a positioning system for frame synchronization abnormality, where the positioning system for frame synchronization abnormality includes a server and a terminal, where one or more terminals may be provided, and multiple clients requiring frame synchronization may be in one terminal or may be applied to different terminals.
A terminal: the system comprises a client side and a server, and is used for acquiring frame synchronization check information of the client side needing frame synchronization, sending the frame synchronization check information to the server, and sending an operation log of the client side in a set range to the server when determining that a frame synchronization abnormal notification sent by the server is received. The operation log only records the function identification of each function operated by the client in the set range and the parameter value of the function operation result.
Optionally, the frame synchronization check information may be a hash value of a common state of the nth frame, and the set range may be the nth-x frame to the nth frame.
For example, the game client a transmits the hash value determined from the 3 common game states of the 10 th frame to the server, and the game client b also transmits the hash value determined from the 3 common game states of the 10 th frame to the server. The server determines that the two obtained hash values are inconsistent, respectively informs the game client a and the game client b of abnormal frame synchronization, and obtains function identifications and parameter values of function running results of functions which are run by the game client a in the 5 th frame to the 10 th frame, and function identifications and parameter values of function running results of functions which are run by the game client b in the 5 th frame to the 10 th frame. Finally, the server compares the function identification of the game client a and the corresponding parameter value with the function identification of the game client b and the corresponding parameter value in a consistent manner, so as to realize the positioning of the frame synchronization abnormity.
A server: the system comprises a frame synchronization detection module, a frame synchronization module and a frame synchronization module, wherein the frame synchronization detection module is used for receiving frame synchronization detection information of each client needing frame synchronization so as to judge that the frame synchronization is abnormal when the frame synchronization detection information is determined to be inconsistent; and a function for positioning frame synchronization abnormality according to the function identification of the function recorded with the operation function and the operation log of the parameter value of each client.
The method for positioning frame synchronization abnormality provided in the embodiment of the present application may be applied to a terminal device, where the terminal device may be a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), and the like, and may be used for multiple clients (e.g., 2 or 5) of the same application that need frame synchronization detection and abnormality positioning, where the multiple clients may be located at the same terminal or at different terminals.
Referring to fig. 2, a flowchart of an implementation of a method for locating a frame synchronization exception according to the present application is shown. The specific implementation flow of the method is as follows:
step 200: the first client side obtains first frame synchronization check information, and the second client side obtains second frame synchronization check information.
Specifically, on one hand, the first client periodically (e.g., the game client a) acquires each common state of the nth frame during the running process, and performs hash operation on each common state to acquire a first hash value as the first frame synchronization check information. The common state may be a state frequently used by the client in the operation process, or may be a plurality of specified states.
On the other hand, the second client periodically (e.g., the game client b) acquires each common state of the nth frame in the running process, and performs hash operation on each common state to acquire a second hash value as second frame synchronization check information.
The first client and the second client are different clients of the same application.
For example, the first client is a client of the game application C running in the terminal a, and the second client is a client of the game application C running in the terminal B.
Therefore, different clients needing frame synchronization periodically determine the hash value of the common state of the Nth frame and send the hash value to the server, so that the condition that all states or a single state is sent to the server is avoided, uploaded data are reduced, and the accuracy and the real-time performance of subsequent frame synchronization abnormity monitoring are guaranteed.
Step 201: the first client sends first frame synchronization check information to the server, and the second client sends second frame synchronization check information to the server.
Specifically, on one hand, the first client sends the first frame synchronization check information to the server through a frame synchronization protocol. On the other hand, the second client sends second frame synchronization check information to the server through the frame synchronization protocol.
Therefore, the server can be ensured to receive the hash values of the different clients aiming at the common state of the Nth frame, and dislocation is avoided when consistency comparison is carried out.
Step 202: and when the server determines that the first frame synchronization check information is inconsistent with the second frame synchronization check information, the server informs the first client and the second client of abnormal frame synchronization.
Specifically, the server judges whether the first frame synchronization check information is consistent with the second frame synchronization check information, if so, the frame synchronization is judged to be normal, otherwise, the frame synchronization is judged to be abnormal, and notification messages representing the frame synchronization abnormality are respectively sent to the first client and the second client through a frame synchronization protocol.
Step 203: the first client sends the first running log to the server, and the second client sends the second running log to the server.
Specifically, when step 203 is executed, the first running log records function identifiers of functions and parameter values of function running results, which are called by the first client when running within a set range; the second operation log records function identifiers of functions called by the second client when the second client operates in the set range and parameter values of the function operation results.
In the embodiment of the present application, an example is described in which both the function identifier and the parameter value are stored and uploaded in a sequential manner. Alternatively, the setting range may be a specified time period or a specified number of frames. E.g., frame N-X-frame N; each function id may or may not output 1 or more parameter values for the corresponding function. The function identification is the only identification of the function, and the data volume can be reduced by adopting the function identification instead of the function name.
Before step 203 is executed, the terminal obtains the description information of each function in advance, and stores the description information corresponding to the function identifier of the function. The description information may include any one or any combination of the following parameters: function name, number of parameters, code file name, code file path, code line number, and comment text. The terminal may query for the corresponding description information through the function identifier in the function sequence, for example, the number of parameters included in the description information may be used to determine the parameter value of the function output corresponding to the function identifier.
For example, referring to FIG. 3a, a schematic view of a log is shown. The running log comprises a function identification sequence and a parameter value identification sequence. The function identification sequence comprises function identifications of 6 functions which are sequentially run by the client. The parameter value sequence comprises parameter values of function operation results of 6 functions which are sequentially operated by the client. The server obtains the description information of each function through the function identification, and determines the number of parameters corresponding to each function identification. It can be known that the number of the parameters corresponding to the function identifier 1 is 3, that is, the parameter values corresponding to the function identifier 1 are from parameter 1 to parameter 3, the parameter numbers of the function identifier 2 and the function identifier 3 are 0, and the parameter number of the function identifier 4 is 4, so that the parameter values corresponding to the function identifier 4 are from parameter 4 to parameter 7, and the parameter numbers of the function identifier 5 and the function identifier 6 are both 1, so that the parameter 8 corresponding to the function identifier 5 and the parameter 9 corresponding to the function identifier 6 are both provided.
And the function identification and the parameter value recorded in the first running log and the second running log are obtained by a log output function added in the source code in advance. Specifically, a corresponding log output function is added for each function in the source code of the client, and if the function is a function of a specified type (e.g., a log output function), the log output function is not repeatedly added.
When adding the log output function, the following method can be adopted:
firstly, when the terminal determines that the function is not a log function, the function name and the form parameter of the function are identified through a specified regular expression.
For example, the regular expression is: (public | private | protected) (\\ s + (static | override | virtual) } s +) | \ w + (< \ w + >) (<' \\ \ w + ([ + >) } s) (\\ \ w + ([ } w + >) ] + \\\\\\\ s) ([ + >) ] + } s) (} s [ + ] [ + >). \\ is applied to the patient.
Then, the terminal generates a log output function according to the form parameter of the function. The parameters of the log output function include an initial function identification and a specified type form parameter. The type form parameter is designated as a form parameter of a numerical type, so that the results obtained by the log output function are numerical values, and optionally, the initial function identifier may be set to 0.
For example, assume the function is: public virtual void funcnname (int arg1, object arg2, int arg3), the generated log output function is: logtrack (0, arg1, arg 3); /# funcnname #/. Where,/# funcnname #/is the function name (note text).
Then, the terminal sets a function identifier, wherein any one of the following modes can be adopted when setting the function identifier:
the first mode is as follows: the terminal acquires path information (such as a file path and a code line number) of the function according to the function name, determines a hash value of a character string generated by the path information, and sets the hash value as a function identifier of the function. The function identification is a 4 byte shaping (int) type.
The second way is: and the terminal selects a numerical value which is not set as the function identifier by other functions within the specified numerical value range as the function identifier.
This is because the number of each function in the source code may be small, and it may be represented by occupying two bytes with one short shaping (short), and if it is represented by the Int type determined by the hash value, it may occupy a large amount of storage space, so that it may directly select the unused value in the designated range in order to save the storage space.
And finally, replacing the initial function identification in the log output function by the determined function identification by the terminal to obtain a new log output function, and adding the log output function into the source code.
The terminal can add the log output function to the first row before the function according to different requirements, and can also add the log output function to corresponding positions of statement blocks and the like in the function to obtain corresponding output.
Therefore, the corresponding log output function can be added to each function in the source code in advance, and further, when each function is operated by the client, the function identification and the parameter value can be output through the corresponding log output function.
Step 204: and the server carries out positioning of frame synchronization abnormity according to the first running log and the second running log.
Specifically, when step 204 is executed, the server may adopt any one of the following manners:
the first mode is as follows: the server only compares the function identifications in the first running log with the function identifications in the second running log one by one to determine the function identifications which are inconsistent, so that the positioning of the frame synchronization abnormity is realized.
If the consistency comparison is performed only through the function identification, a frame synchronization abnormal positioning result may be obtained.
The second mode is as follows: the server only compares each parameter value in the first running log with each parameter value in the second running log one by one, determines the parameter value which is inconsistent, and obtains the function identifier corresponding to the parameter value which is abnormal, thereby realizing the positioning of the frame synchronization abnormity.
The third mode is as follows: the server combines the function identification and the corresponding parameter value contained in the first running log, combines the function identification and the corresponding parameter value contained in the second running log, then compares the combinations in the first running log with the combinations in the second running log one by one to determine the inconsistent combinations, and realizes the positioning of the frame synchronization abnormity.
The fourth mode is as follows: the server respectively obtains the description information of each function identifier in the first running log, generates a corresponding first log text according to each function identifier, the corresponding description information and the corresponding parameter value, respectively obtains the description information of each function identifier in the second running log, generates a corresponding second log text according to each function identifier, the corresponding description information and the corresponding parameter value, and finally compares each first log text corresponding to the first running log with each second log text corresponding to the second running log one by one in sequence to determine inconsistent log texts and realize the positioning of frame synchronization abnormity.
Fig. 3b is a schematic diagram illustrating the positioning of a frame synchronization abnormality. In the embodiment of the application, after the frame synchronization abnormity is determined, analysis is directly performed according to the running log only containing the function identification and the parameter value, frame synchronization abnormity positioning is achieved, the problems that in a traditional mode, a log switch which can output data containing a large amount of texts and the like is opened when the frame synchronization abnormity is determined, frame synchronization abnormity occurs, and if the log is incomplete, the client version is reconstructed are solved. The operation log only comprises numerical values such as function identification and parameter values, so that data such as texts and the like which occupy a large amount of system resources are removed, the system performance is improved, the log switch can be always turned on, and a corresponding log output function is set for each function in advance.
Step 205: and the server determines the specific reason causing the frame synchronization abnormity according to the positioning result of the frame synchronization abnormity and recommends a corresponding solution to the user.
Specifically, when step 205 is executed, the frame synchronization exception positioning result at least includes a frame synchronization exception function identifier. And analyzing source codes according to a first log text corresponding to the frame synchronization abnormal function identification of the first client and a second log text corresponding to the frame synchronization abnormal function identification of the second client, obtaining specific reasons for the frame synchronization abnormality, and recommending a corresponding solution set for the abnormal reason of each frame synchronization abnormality to a user.
Table 1.
Reason Solution scheme Whether or not it is controllable
Floating point number calculation By replacing with fixed-point numbers Controllable
Mathematical function calculation Replacement with unified custom algorithms Controllable
Random number generation With unified custom algorithms instead Controllable
Referring to table 1, a list of frame synchronization exception causes and solutions is shown. Due to the difference of systems of different platforms, frame synchronization abnormity occurs during floating point number calculation, and the difference can be removed by adopting a fixed point number replacing mode. Due to different system function algorithms of different platforms, when frame synchronization is abnormal during mathematical function calculation or random number generation, a uniform custom algorithm mode can be selected to remove the difference. As shown in table 1, frame synchronization anomalies caused by operations and related implementations are controllable, specific causes can be found clearly, and accurate solutions can be recommended.
For example, the server determines, from the first log text and the second log text, that the function identifier in which the abnormality occurs is a random number generation function identifier, and determines, from description information of the random number generation function identifier, that the function corresponding to the function identifier is a random number generation function, and the function is to generate a random number. If the server determines that the specific reason for the occurrence of the frame synchronization abnormality is caused by a random number generation algorithm, the solution recommended to the user is as follows: and (3) adopting a uniform custom algorithm to replace a random number generation algorithm of a random number generation function, and reconstructing a function source code of the random number generation function.
For another example, the server determines the function identifier with the exception as a floating-point arithmetic function identifier according to the first log text and the second log text, and determines the function name of the floating-point arithmetic function identifier as a floating-point arithmetic function according to the description information of the floating-point arithmetic function identifier. The server determines that the floating point number operation function comprises an algorithm calculated by adopting the floating point number, and judges that the specific reason of the occurrence of the frame synchronization abnormity is caused by different floating point numbers adopted by different platforms, and the recommended solution to the user is as follows: and reconstructing the source code corresponding to the floating-point number arithmetic function by adopting a mode of replacing the floating-point number with the fixed-point number.
Table 2.
Reason Solution scheme Whether or not it is controllable
Business logic exception call in No control of external users Is not controllable
View logic exception call-in No control of external users Is not controllable
Relying on business logic Call with uncontrollable callbacks Is not controllable
Dependent view logic Call with uncontrollable callbacks Is not controllable
Referring to table 2, a second list of frame synchronization anomaly causes and solutions is shown. The frame synchronization exception caused by the process of the service logic exception tuning-in and the view logic exception tuning-in is uncontrollable because the external user cannot be controlled. For each specific reason of the frame synchronization abnormality shown in table 2, since the external user cannot be controlled, a specific solution cannot be recommended to the user, and the user is only prompted to "cannot control the external user", and there is no specific measure for the problem causing the frame synchronization abnormality shown in table 2.
In the embodiment of the application, since the corresponding log output function is set in advance for each function (including the specified statement block in the function), and only function identification and parameter values of the numerical value type are output in the log output function, other additional data (such as text data) do not need to be output, stored and uploaded, therefore, the log switch can be always started, all functions operated in the operation process and the output parameter values can be recorded in real time, the occupied storage resources and the transmitted network resources are greatly reduced, the coverage is wide, the method can directly carry out consistency comparison on the logic points for determining the frame synchronization abnormity through the operation log, is simple and clear, does not need to carry out frame synchronization abnormity positioning according to inference analysis, does not need to edit the source code again to reconstruct the version, simplifies the complicated steps of positioning the frame synchronization abnormity, and improves the accuracy of positioning the frame synchronization abnormity.
A specific application scenario is described below, and referring to the application scenario shown in fig. 3c, when the server determines that frame synchronization abnormality occurs in the client 1 and the client 2 that require frame synchronization, the server obtains a first running log of the client 1 and a second running log of the client 2. Wherein, the subprocess is a function, and the operation is an algorithm adopted in the function operation process. The server compares function identifications and parameter values in the first running log and the second running log, determines that frame synchronization abnormity occurs when a subprocess 2+ operation 2 is executed, wherein the input of the client 1 is a, and outputs y1 after subprocess 1+ operation 1, subprocess 2+ operation 2 and subprocess 3+ operation 3 are executed in sequence; the input of the client 2 is also a, and the sub-process 1+ operation 1, the sub-process 2+ operation 2, the sub-process x + operation x, and the sub-process 3+ operation 3 are sequentially executed to output y 2. The server acquires the description information corresponding to each function identifier, performs source code analysis according to the description information corresponding to each function identifier, and determines that frame synchronization abnormality is caused by a subprocess x + operation x called from the outside in the execution process when the client 2 executes the subprocess 2. Further, the server determines that the operation x is a random number generation algorithm, and determines that the specific reason for the occurrence of the frame synchronization abnormality is caused by the random number generation algorithm, and then the solution recommended to the user is as follows: and reconstructing the function source code by adopting a mode of replacing a random number generation algorithm with a uniform custom algorithm.
Based on the same inventive concept, the embodiment of the present application further provides a frame synchronization abnormality positioning apparatus, and because the principle of the apparatus and the device for solving the problem is similar to a frame synchronization abnormality positioning method, the implementation of the apparatus can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 4a, a schematic structural diagram of a frame synchronization abnormality positioning apparatus according to an embodiment of the present application includes:
a receiving unit 410, configured to receive first frame synchronization check information sent by a first client, and receive second frame synchronization check information sent by a second client, where the first client and the second client are two clients of a same application that need frame synchronization;
an obtaining unit 411, configured to obtain a first operation log in a set range from a first client and obtain a second operation log in the set range from a second client when it is determined that the first frame synchronization check information and the second frame synchronization check information are inconsistent, where: the first running log records function identifiers of functions called by the first client in the running process within a set range and parameter values of function running results, and the second running log records function identifiers of functions called by the second client in the running process within the set range and parameter values of function running results;
and a positioning unit 412, configured to perform frame synchronization exception positioning according to whether corresponding parameter values in the first running log and the second running log are consistent or not according to the function identifiers.
Preferably, the positioning unit 412 is further configured to:
after positioning frame synchronization abnormity according to whether corresponding parameter values of the function identifications in the first running log and the second running log are consistent or not, respectively acquiring description information corresponding to the frame synchronization abnormity function identification in the first running log and description information corresponding to the frame synchronization abnormity function identification in the second running log according to the frame synchronization abnormity function identification determined by the frame synchronization abnormity positioning result;
generating a first log text according to the frame synchronization abnormal function identifier in the first running log and corresponding description information and parameter values, and generating a second log text according to the frame synchronization abnormal function identifier in the second running log and corresponding description information and parameter values;
and performing frame synchronization anomaly analysis according to the first log text and the second log text, and determining a frame synchronization anomaly analysis result.
Preferably, the description information includes any one or any combination of the following parameters: function name, parameter number, code file name, code file path, code line number, and comment text;
the function identifier is a hash value obtained by performing hash calculation on the path information of the function; or the function identifier is an unused value selected within a specified range of values;
the function identification and the parameter value are obtained by adding a log output function in a statement block before or in each function in the source code;
the log output function is generated based on the form parameter and the function identifier of the function acquired through the regular expression and is used for acquiring the parameter value and the corresponding function identifier output after the function is executed.
As shown in fig. 4b, a second structural schematic diagram of a frame synchronization abnormality positioning apparatus provided in the embodiment of the present application includes:
an obtaining unit 420, configured to obtain frame synchronization check information and send the frame synchronization check information to a server, where the frame synchronization check information is used by the server to determine whether frame synchronization check information of different clients of the same application that need to perform frame synchronization is consistent; and are
A sending unit 421, configured to send an operation log within a set range to a server according to a trigger of the server when determining that frame synchronization check information of different clients is inconsistent, where the operation log within the set range is used by the server to locate frame synchronization abnormality;
the operation log in the setting range records function identifiers of functions called by the client in the operation within the setting range and parameter values of the function operation result.
Preferably, the obtaining unit 420 is further configured to:
before acquiring the frame synchronization check information, the following steps are performed for each function in the source code of the client requiring frame synchronization:
identifying form parameters and function names of the function through a regular expression, and generating a log output function according to the form parameters, wherein the parameters of the log output function comprise an initial function identifier and a specified type form parameter;
acquiring the path information of the function according to the function name of the function, and determining a hash value acquired according to the path information of the function as a function identifier; or determining unused values selected from a designated value range as function identifiers;
and updating the initial function identification in the log output function into the function identification, and adding the log output function into the source code.
Preferably, the obtaining unit 420 is further configured to:
and adding the log output function to the corresponding function in the source code or a specified statement block of the function.
Based on the same technical concept, the present application further provides a terminal device 500, and referring to fig. 5, the terminal device 500 is configured to implement the methods described in the above various method embodiments, for example, implement the embodiment shown in fig. 2, and the terminal device 500 may include a memory 501, a processor 502, an input unit 503, and a display panel 504.
A memory 501 for storing computer programs executed by the processor 502. The memory 501 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the terminal device 500, and the like. The processor 502 may be a Central Processing Unit (CPU), a digital processing unit, or the like. The input unit 503 may be used to obtain a user instruction input by a user. The display panel 504 is configured to display information input by a user or information provided to the user, and in this embodiment of the present application, the display panel 504 is mainly used to display a display interface of each application program in the terminal device and a control entity displayed in each display interface. Alternatively, the display panel 504 may be configured in the form of a Liquid Crystal Display (LCD) or an organic light-emitting diode (OLED), and the like.
The embodiment of the present application does not limit the specific connection medium among the memory 501, the processor 502, the input unit 503, and the display panel 504. In the embodiment of the present application, the memory 501, the processor 502, the input unit 503, and the display panel 504 are connected by the bus 505 in fig. 5, the bus 505 is represented by a thick line in fig. 5, and the connection manner between other components is merely illustrative and not limited thereto. The bus 505 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The memory 501 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 501 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium which can be used to carry or store desired program code in the form of instructions or data structures and which can be accessed by a computer. The memory 501 may be a combination of the above memories.
The processor 502, for implementing the embodiment shown in fig. 2, includes:
a processor 502 for invoking a computer program stored in the memory 501 to perform the embodiment shown in fig. 2.
The embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions required to be executed by the processor, and includes a program required to be executed by the processor.
In some possible embodiments, the aspects of a method for locating a frame synchronization exception provided by the present application may also be implemented in the form of a program product, which includes program code for causing a terminal device to perform the steps in a method for locating a frame synchronization exception according to various exemplary embodiments of the present application described above in this specification, when the program product is run on the terminal device. For example, the terminal device may perform the embodiment as shown in fig. 2.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A program product for location of a frame synchronization exception according to embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be executable on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including a physical programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (12)

1. A method for locating frame synchronization abnormality is characterized by comprising the following steps:
receiving first frame synchronization check information sent by a first client and receiving second frame synchronization check information sent by a second client, wherein the first client and the second client are two clients of the same application needing frame synchronization;
when the first frame synchronization check information and the second frame synchronization check information are determined to be inconsistent, acquiring a first running log in a set range from the first client, and acquiring a second running log in the set range from the second client, wherein: the first running log records function identifiers of functions and parameter values of function running results, which are called by a first client when the first client runs in the set range, and the second running log records function identifiers of functions and parameter values of function running results, which are called by a second client when the second client runs in the set range;
positioning frame synchronization abnormity according to whether corresponding parameter values in the first running log and the second running log of each function identifier are consistent; the positioning of the frame synchronization abnormality according to whether the corresponding parameter values in the first running log and the second running log are consistent or not according to the function identifiers comprises: comparing each function identifier and/or corresponding parameter value in the first running log and the second running log one by one in sequence to obtain a frame synchronization abnormal positioning result;
respectively acquiring description information corresponding to the frame synchronization abnormal function identifier in the first running log and description information corresponding to the frame synchronization abnormal function identifier in the second running log according to the frame synchronization abnormal function identifier determined by the frame synchronization abnormal positioning result;
generating a first log text according to the frame synchronization abnormal function identifier in the first running log and corresponding description information and parameter values, and generating a second log text according to the frame synchronization abnormal function identifier in the second running log and corresponding description information and parameter values;
and performing frame synchronization anomaly analysis according to the first log text and the second log text, and determining a frame synchronization anomaly analysis result.
2. The method of claim 1, wherein the description information comprises any one or any combination of the following parameters: function name, parameter number, code file name, code file path, code line number, and comment text;
the function identification is a hash value obtained by carrying out hash calculation on the path information of the function; or the function identification is an unused value selected from a specified range of values;
the function identification and the parameter value are obtained by adding a log output function in front of each function or in a statement block in the function in the source code;
the log output function is generated based on the form parameter and the function identifier of the function acquired through the regular expression and is used for acquiring the parameter value and the corresponding function identifier output after the function is executed.
3. A method for locating frame synchronization abnormality is characterized by comprising the following steps:
acquiring frame synchronization check information and sending the frame synchronization check information to a server, wherein the frame synchronization check information is used by the server for judging whether the frame synchronization check information of different clients of the same application needing frame synchronization is consistent; and are
According to the trigger of the server when judging that the frame synchronization checking information of the different clients is inconsistent, sending an operation log in a set range to the server so as to enable the server to execute the following operations: comparing each function identification and/or corresponding parameter value in the running logs of different clients one by one in sequence to obtain a frame synchronization abnormity positioning result; respectively acquiring description information corresponding to the frame synchronization abnormal function identifications in different running logs according to the frame synchronization abnormal function identifications determined by the frame synchronization abnormal positioning result; respectively generating log texts according to frame synchronization abnormal function identifications in different running logs and corresponding description information and parameter values; performing frame synchronization anomaly analysis according to different log texts, and determining a frame synchronization anomaly analysis result;
the running log in the set range is used by the server for positioning frame synchronization abnormity;
and the running log in the set range records the function identification of each function called by the client when running in the set range and the parameter value of the function running result.
4. The method of claim 3, prior to obtaining the frame synchronization check information, further comprising:
for each function in the source code of a client that needs frame synchronization, performing the following steps:
identifying form parameters and function names of the function through a regular expression, and generating a log output function according to the form parameters, wherein the parameters of the log output function comprise an initial function identifier and a specified type form parameter;
acquiring the path information of the function according to the function name of the function, and determining a hash value acquired according to the path information of the function as a function identifier; or determining unused values selected from a specified value range as function identifiers;
and updating the initial function identification in the log output function to the function identification, and adding the log output function to the source code.
5. The method of claim 4, wherein adding the log output function to the source code comprises:
and adding the log output function to the corresponding function in the source code or a specified statement block of the function.
6. An apparatus for locating a frame synchronization abnormality, comprising:
the system comprises a receiving unit, a frame synchronization checking unit and a frame synchronization checking unit, wherein the receiving unit is used for receiving first frame synchronization checking information sent by a first client and receiving second frame synchronization checking information sent by a second client, and the first client and the second client are two clients of the same application needing frame synchronization;
an obtaining unit, configured to obtain a first operation log in a set range from the first client and obtain a second operation log in the set range from the second client when it is determined that the first frame synchronization check information and the second frame synchronization check information are inconsistent, where: the first running log records function identifiers of functions and parameter values of function running results, which are called by a first client when the first client runs in the set range, and the second running log records function identifiers of functions and parameter values of function running results, which are called by a second client when the second client runs in the set range;
the positioning unit is used for positioning frame synchronization abnormity according to whether corresponding parameter values in the first running log and the second running log of each function identifier are consistent or not; the positioning of the frame synchronization abnormality according to whether the corresponding parameter values in the first running log and the second running log are consistent or not according to the function identifiers comprises: comparing each function identifier and/or corresponding parameter value in the first running log and the second running log one by one in sequence to obtain a frame synchronization abnormal positioning result;
respectively acquiring description information corresponding to the frame synchronization abnormal function identifier in the first running log and description information corresponding to the frame synchronization abnormal function identifier in the second running log according to the frame synchronization abnormal function identifier determined by the frame synchronization abnormal positioning result;
generating a first log text according to the frame synchronization abnormal function identifier in the first running log and the corresponding description information and parameter values, and generating a second log text according to the frame synchronization abnormal function identifier in the second running log and the corresponding description information and parameter values;
and performing frame synchronization anomaly analysis according to the first log text and the second log text, and determining a frame synchronization anomaly analysis result.
7. The apparatus of claim 6, wherein the description information comprises any one or any combination of the following parameters: function name, parameter number, code file name, code file path, code line number, and comment text;
the function identification is a hash value obtained by carrying out hash calculation on path information of the function; or the function identification is an unused value selected from a specified range of values;
the function identification and the parameter value are obtained by adding a log output function in front of each function or in a statement block in the function in the source code;
the log output function is generated based on the form parameter and the function identifier of the function acquired through the regular expression and is used for acquiring the parameter value and the corresponding function identifier output after the function is executed.
8. An apparatus for locating a frame synchronization abnormality, comprising:
the system comprises an acquisition unit, a processing unit and a sending unit, wherein the acquisition unit is used for acquiring frame synchronization check information and sending the frame synchronization check information to a server, and the frame synchronization check information is used by the server for judging whether the frame synchronization check information of different clients of the same application needing frame synchronization is consistent; and are
A sending unit, configured to send an operation log within a set range to the server according to a trigger of the server when determining that the frame synchronization check information of the different clients is inconsistent, so that the server performs the following operations: comparing each function identification and/or corresponding parameter value in the running logs of different clients one by one in sequence to obtain a frame synchronization abnormity positioning result; respectively acquiring description information corresponding to the frame synchronization abnormal function identifications in different running logs according to the frame synchronization abnormal function identifications determined by the frame synchronization abnormal positioning result; respectively generating log texts according to frame synchronization abnormal function identifications in different running logs and corresponding description information and parameter values; performing frame synchronization anomaly analysis according to different log texts, and determining a frame synchronization anomaly analysis result;
the running log in the set range is used by the server for positioning frame synchronization abnormity;
and recording function identifiers of functions called by the client in the running log in the set range and parameter values of function running results in the running log in the set range.
9. The apparatus of claim 8, wherein the obtaining unit is further configured to:
before acquiring the frame synchronization check information, the following steps are performed for each function in the source code of the client requiring frame synchronization:
identifying form parameters and function names of the function through a regular expression, and generating a log output function according to the form parameters, wherein the parameters of the log output function comprise an initial function identifier and a specified type form parameter;
acquiring the path information of the function according to the function name of the function, and determining a hash value acquired according to the path information of the function as a function identifier; or determining unused values selected from a designated value range as function identifiers;
and updating the initial function identification in the log output function to the function identification, and adding the log output function to the source code.
10. The apparatus of claim 9, wherein the obtaining unit is further configured to:
and adding the log output function to the corresponding function in the source code or a specified statement block of the function.
11. A terminal device, comprising at least one processing unit and at least one memory unit, wherein the memory unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of the method of any of claims 1-2 or 3-5.
12. A computer-readable medium, in which a computer program executable by a terminal device is stored, which computer program, when run on the terminal device, causes the terminal device to carry out the steps of the method according to any one of claims 1 to 2 or 3 to 5.
CN201811405673.XA 2018-11-23 2018-11-23 Method, device, terminal equipment and medium for positioning frame synchronization abnormity Active CN110166276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811405673.XA CN110166276B (en) 2018-11-23 2018-11-23 Method, device, terminal equipment and medium for positioning frame synchronization abnormity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811405673.XA CN110166276B (en) 2018-11-23 2018-11-23 Method, device, terminal equipment and medium for positioning frame synchronization abnormity

Publications (2)

Publication Number Publication Date
CN110166276A CN110166276A (en) 2019-08-23
CN110166276B true CN110166276B (en) 2022-09-16

Family

ID=67645196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811405673.XA Active CN110166276B (en) 2018-11-23 2018-11-23 Method, device, terminal equipment and medium for positioning frame synchronization abnormity

Country Status (1)

Country Link
CN (1) CN110166276B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110812836A (en) * 2019-10-31 2020-02-21 广州市网星信息技术有限公司 Game synchronization method and device, computer equipment and storage medium
CN111045946A (en) * 2019-12-12 2020-04-21 珠海豹趣科技有限公司 Game testing method and device and electronic equipment
CN111068315A (en) * 2019-12-12 2020-04-28 珠海豹趣科技有限公司 Method and device for positioning frame synchronization problem and electronic equipment
CN111666222A (en) * 2020-07-09 2020-09-15 腾讯科技(深圳)有限公司 Test method and related device
CN111917866B (en) * 2020-07-29 2021-08-31 腾讯科技(深圳)有限公司 Data synchronization method, device, equipment and storage medium
CN113268377A (en) * 2021-04-25 2021-08-17 山东英信计算机技术有限公司 Abnormal state data backup method, system and storage medium
CN113259043B (en) * 2021-05-18 2022-12-09 力同科技股份有限公司 Data processing method, data processing device, communication system, communication device, and medium
CN113144620A (en) * 2021-05-20 2021-07-23 北京字节跳动网络技术有限公司 Detection method, device, platform, readable medium and equipment for frame synchronization game
CN113254347A (en) * 2021-06-21 2021-08-13 南京统信软件技术有限公司 Log function adding method, computing device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780619A (en) * 2014-01-08 2014-05-07 深圳市掌玩网络技术有限公司 Wide area network real-time interactive game synchronization method and device, and system
JP2017056188A (en) * 2016-06-13 2017-03-23 株式会社 ディー・エヌ・エー Information processing system and information processing program
CN106559426A (en) * 2016-11-24 2017-04-05 腾讯科技(深圳)有限公司 A kind of data processing method and server and client based on frame synchronization
CN107145429A (en) * 2017-06-01 2017-09-08 成都通甲优博科技有限责任公司 A kind of log analysis method and system
CN107678970A (en) * 2017-10-20 2018-02-09 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780619A (en) * 2014-01-08 2014-05-07 深圳市掌玩网络技术有限公司 Wide area network real-time interactive game synchronization method and device, and system
JP2017056188A (en) * 2016-06-13 2017-03-23 株式会社 ディー・エヌ・エー Information processing system and information processing program
CN106559426A (en) * 2016-11-24 2017-04-05 腾讯科技(深圳)有限公司 A kind of data processing method and server and client based on frame synchronization
CN107145429A (en) * 2017-06-01 2017-09-08 成都通甲优博科技有限责任公司 A kind of log analysis method and system
CN107678970A (en) * 2017-10-20 2018-02-09 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment

Also Published As

Publication number Publication date
CN110166276A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
CN110166276B (en) Method, device, terminal equipment and medium for positioning frame synchronization abnormity
EP2453370B1 (en) Method and system for specifying, preparing and using parameterized database queries
CN110321273B (en) Service statistics method and device
CN109660426B (en) Monitoring method and system, computer readable medium and electronic device
CN112154420B (en) Automatic intelligent cloud service testing tool
CN105072139B (en) Recommend method and apparatus
EP4050853A1 (en) Information sharing chain generation method and apparatus, electronic device, and storage medium
EP3938909B1 (en) Dynamic monitoring on cloud based application service
CN113704063B (en) Performance monitoring method, device, equipment and storage medium of cloud mobile phone
US20160070555A1 (en) Automated tenant upgrades for multi-tenant services
CN111311014B (en) Service data processing method, device, computer equipment and storage medium
CN112751729A (en) Log monitoring method, device, medium and electronic equipment
CN109492181A (en) Method for page jump, device, computer equipment and storage medium
CN111782672B (en) Multi-field data management method and related device
CN112612850A (en) Data synchronization method and device
CN105553770B (en) Data acquisition control method and device
CN107566480B (en) User activity information acquisition method and device for mobile terminal application and storage medium
CN112181477A (en) Complex event processing method and device and terminal equipment
CN110955438A (en) Method, device and equipment for monitoring performance of small program and storage medium
CN111523676B (en) Method and device for assisting machine learning model to be online
CN113238815A (en) Interface access control method, device, equipment and storage medium
CN111162938A (en) Data processing system and method
CN112217880A (en) Attribution method, attribution device, attribution medium and electronic equipment for application program activation
US20120173658A1 (en) Schema Validation Proxy
CN113495723B (en) Method, device and storage medium for calling functional component

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