CN101808349B - Method and device for acquiring system time of mobile terminal message - Google Patents

Method and device for acquiring system time of mobile terminal message Download PDF

Info

Publication number
CN101808349B
CN101808349B CN 201010124751 CN201010124751A CN101808349B CN 101808349 B CN101808349 B CN 101808349B CN 201010124751 CN201010124751 CN 201010124751 CN 201010124751 A CN201010124751 A CN 201010124751A CN 101808349 B CN101808349 B CN 101808349B
Authority
CN
China
Prior art keywords
message
time
rtos
system time
value
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.)
Expired - Fee Related
Application number
CN 201010124751
Other languages
Chinese (zh)
Other versions
CN101808349A (en
Inventor
腾飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing T3G Technology Co Ltd
Original Assignee
Beijing T3G Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing T3G Technology Co Ltd filed Critical Beijing T3G Technology Co Ltd
Priority to CN 201010124751 priority Critical patent/CN101808349B/en
Publication of CN101808349A publication Critical patent/CN101808349A/en
Application granted granted Critical
Publication of CN101808349B publication Critical patent/CN101808349B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides method and a device for acquiring system time of a mobile terminal message. The method comprises the following steps of: acquiring real-time operating system (RTOS) time of a message transmitted by a mobile terminal; and obtaining the system time of the message according to the RTOS time, the current RTOS base time variable value and the current system time variable value of the message. The scheme of the invention enhances the testing efficiency of the mobile terminal and avoids unnecessary consumption on manpower and time.

Description

Obtain the method and apparatus of the system time of mobile terminal message
Technical field
The present invention relates to the mobile terminal test field, refer to especially a kind of method and apparatus that obtains the system time of mobile terminal message.
Background technology
In the portable terminal R﹠D process, often need to carry out internal debugging and field testing to portable terminal, and obtain the parameter of the various real-time statuss of portable terminal, thus the problem of analyzing the problem that runs in the exploitation and finding to occur in actual the use, and solve.The means that realize these purposes are exactly to catch the message that sends between the portable terminal internal module, by these message datas are gathered and preserve, the generating messages daily record, by developer and tester message is carried out research and analysis, judge whether portable terminal works and proper communication at modules, thereby reach the purpose of test.
For portable terminal, obtain its internal communication message and can use communication apparatus message logging system, this communication apparatus message logging system is by USB (Universal Serial Bus, USB) and UART (Universal Asynchronous Receiver/Transmitte, general asynchronous receiving-transmitting transmitter) be connected to portable terminal.After the successful connection, portable terminal is by its built-in program, when modules communicates, the copy of message is sent to communication apparatus message logging system, communication apparatus message logging system just can show these message, can decode to these message, perhaps preserve these message to message logging, in order to research and analyse subsequently use.
The mode of obtaining the message of portable terminal also can be to pass through Network Capture, obtain portable terminal by the message of Internet Transmission, and preserve into corresponding message logging, for some test, need relatively these two kinds of message loggings that approach obtains, thereby draw relevant test result.
But the message for the portable terminal transmission, amount of information is often very huge, test call or the message number that gathers that dials up on the telephone all may reach 100,000 even up to a million message, and the message logging of generation can GB (Gigabyte, GB) be unit.Tester and developer for analyze contrast certain once converse or other business in the message of catching from portable terminal and the message of catching from network side, then need to catch from both sides location this time conversation or business the message logging file of message generation, the current conversation of intercepting or professional related news are analyzed,, in the face of huge size of message like this, the general accurately location that is difficult to.This just needs the tester to expend a lot of times first two parts of message logging files to be analyzed, and locates this time conversation or professional zero-time and termination time, and analyzes.Because a series of test often can repeat such test item; so same need of work repeatedly; so just a lot of unnecessary workloads have been brought to test; a lot of unnecessary manpowers and time have been expended to a great extent; affect the efficient of test, and brought difficulty to test job.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of method and apparatus that can obtain exactly the system time of mobile terminal message, and the testing efficiency of portable terminal is improved, and avoids expending of unnecessary manpower and time.
For solving the problems of the technologies described above, embodiments of the invention provide technical scheme as follows:
On the one hand, provide a kind of method of obtaining the system time of mobile terminal message, comprising:
Obtain the real time operating system RTOS time of the message of portable terminal transmission;
According to the value of the RTOS time of described message, current RTOS baseline time variable and the value of current system time variable, obtain the system time of described message.
Wherein, obtaining the step of the real time operating system RTOS time of the message that portable terminal sends is specially:
Obtain the RTOS frame number that portable terminal is sent to the message of computer;
According to described RTOS frame number, obtain the RTOS time of described message.
Wherein, according to the RTOS of institute frame number, the step that obtains the RTOS time of described message is specially:
Pass through formula: RTOS time=long ((float (RTOS frame number)/(float (1000))) * 2 * 4615) obtains RTOS time of described message; Wherein, the RTOS frame number is the u32 type, and described u32 represents 32 signless integers; Float represents floating-point operation; Long represents the long computing.
Wherein, according to the value of the RTOS time of described message, current RTOS baseline time variable and the value of current system time variable, the step that obtains the system time of described message is specially:
Calculate the difference of the value of RTOS time of described message and described current RTOS baseline time variable;
With the value addition of described difference and described current system time variable, obtain the system time of described message.
Wherein, obtain also comprising after the system time of described message:
The RTOS time of described message is assigned to described RTOS baseline time variable;
The system time of described message is assigned to described system time variable.
Wherein, the value of described current RTOS baseline time variable is the RTOS time of the upper a piece of news of described message, and when described message was article one message, the value of described current RTOS baseline time variable was 0;
The value of described current system time variable is the system time of the upper a piece of news of described message, and when described message was article one message, the value of described current system time variable was: the system time when receiving described article one message.
Wherein, obtain also comprising after the step of system time of described message:
Preserve the system time of described message to message, and described message is saved in the message logging file.
Wherein, the type of described message logging file is: initial data journal file or the message logging file of having decoded.
Wherein, when the type of described message logging file is the initial data journal file, and when described initial data journal file is decoded:
The value of described current RTOS baseline time variable is the RTOS time of the upper a piece of news of described message, and when described message was article one message, the value of described current RTOS baseline time variable was the RTOS time of described article one message;
The value of described current system time variable is the system time of the upper a piece of news of described message, and when described message was article one message, the value of described current system time variable was the time when preserving described initial data journal file.
Embodiments of the invention also provide a kind of device that obtains the system time of mobile terminal message, comprising:
Acquisition module is for the real time operating system RTOS time of the message of obtaining the portable terminal transmission;
Processing module is used for according to the value of the RTOS time of described message, current RTOS baseline time variable and the value of current system time variable, obtains the system time of described message.
Wherein, described acquisition module specifically is used for: obtain the RTOS frame number of the message of portable terminal transmission, and according to described RTOS frame number, obtain the RTOS time of described message.
Wherein, described processing module specifically is used for: calculate the difference of the value of RTOS time of described message and described current RTOS baseline time variable, with the value addition of described difference and described current system time variable, obtain the system time of described message.
Wherein, said apparatus also comprises:
The assignment module is used for behind the system time of the RTOS time that obtains described message and described message, and RTOS time of described message is assigned to described RTOS baseline time variable, and the system time of described message is assigned to described system time variable.
Wherein, said apparatus also comprises:
Preserve module, the system time that is used for preserving described message is to message, and described message is saved in the message logging file; And/or
Display module is for the system time that shows described message.
Embodiments of the invention have following beneficial effect:
By obtaining the RTOS time of the message that portable terminal sends, and with this RTOS time in conjunction with the value of current RTOS baseline time variable and the value of current system time variable, obtain the system time of message, system time according to this message, can locate more exactly this message place is professional or converse transmitting time and time of reception, save the tester and analyzed the time of journal file, thereby the testing efficiency of portable terminal is improved, avoided expending of unnecessary manpower and time.
Description of drawings
Fig. 1 is the method flow diagram that embodiments of the invention obtain the system time of mobile terminal message;
Fig. 2 is a specific implementation flow chart of method shown in Figure 1;
Fig. 3 is the structure drawing of device that embodiments of the invention obtain the system time of mobile terminal message;
Fig. 4 is a specific implementation structure chart of device shown in Figure 3.
Embodiment
For technical problem, technical scheme and advantage that embodiments of the invention will be solved is clearer, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
Embodiments of the invention are for this time of localisation of mobile terminals conversation in the prior art or professional zero-time and termination time, plenty of time can be expended, the problem that testing efficiency is low, a kind of method and apparatus that can obtain exactly the system time of mobile terminal message is provided, the testing efficiency of portable terminal is improved, avoids expending of unnecessary manpower and time.
As shown in Figure 1, embodiments of the invention provide a kind of method of obtaining the system time of mobile terminal message, comprising:
Step 11, real time operating system RTOS (the Real TimeOperating System) time of obtaining the message of portable terminal transmission;
Step 12 according to the value of the RTOS time of described message, current RTOS baseline time variable and the value of current system time variable, obtains the system time of described message.
This embodiment is by the RTOS time of the message obtaining portable terminal and send, and with this RTOS time in conjunction with the value of current RTOS baseline time variable and the value of current system time variable, obtain the system time of message, system time according to this message, can locate more exactly this message place is professional or converse transmitting time and time of reception, saved time that the tester analyzes journal file, thereby the testing efficiency of portable terminal is improved, avoids expending of unnecessary manpower and time.
Specifically, above-mentioned steps 11 specifically can comprise:
Step 111 is obtained the RTOS frame number of the message that portable terminal sends;
Step 112 according to described RTOS frame number, obtains the RTOS time of described message.
Wherein, this step 112 is specifically passed through formula: RTOS time=long ((float (RTOS frame number)/(float (1000))) * 2 * 4615) obtains RTOS time of described message; Wherein, the RTOS time is the variable for the RTOS time of preserving message, and the RTOS frame number is the u32 type, and u32 represents 32 signless integers; Float represents floating-point operation; Long represents the long computing.
Calculate the RTOS of message after the time, when above-mentioned steps 12 realizes, specifically comprise:
Step 121 is calculated the difference of the value of RTOS time of described message and described current RTOS baseline time variable;
Step 122 with the value addition of described difference and described current system time variable, obtains the system time of described message.
Behind the system time of the RTOS time that obtains message and message, also comprise:
Step 123 is assigned to described RTOS baseline time variable with RTOS time of described message;
Step 124 is assigned to the system time variable of described message with the system time of described message, so that used when calculating the system time of lower a piece of news.
The above embodiment of the present invention is by the RTOS time of the message of calculating portable terminal, and according to the value of RTOS baseline time variable in this RTOS time and the current system and the value of system time variable, calculate the system time of current message, this system time has been expressed zero-time and the termination time of the affiliated business of current message or conversation accurately, obtain this system time, zero-time and the termination time of the affiliated business of this current message or conversation have just been obtained, the tester utilizes the system time of this message that the message file journalization is analyzed, more exactly zero-time and the termination time of professional under the localization message or conversation, saved time that the tester analyzes journal file, thereby the testing efficiency of portable terminal is improved, avoids expending of unnecessary manpower and time.
Below in conjunction with application scenarios, specify the implementation procedure of above-described embodiment:
In order to improve the testing efficiency to portable terminal, provided by the inventionly can allow communication apparatus message logging system show in real time, decode and when storing, the method that shows the system time of the message obtain, wherein this system time can be the system for computer time (be called for short PC system time) of message when being sent to computer; In order to realize this method, as shown in Figure 2, the step of the method mainly contains 4, and is specific as follows described:
Step 21, the time parameter about message to communication apparatus message logging system carries out initialization, wherein, this time parameter mainly comprises: the RTOS time variable that is used for the RTOS time of preservation message, the system time variable that is used for the system time of preservation message, for system's baseline time variable of saved system baseline time with for the RTOS baseline time variable of preserving the RTOS baseline time, in communication apparatus message logging system, during use, at first be these variable assignments, and these variablees are global variables, and namely these variablees are all applicable in the message sink process of whole portable terminal, and this initialized step mainly comprises:
Step 211, the initialization global variable, comprise: system's baseline time variable (is initialized as zero, specifically with the time also can come assignment with the system time of actual article one message of obtaining), RTOS baseline time variable (be initialized as zero, specifically with the time also can be with the RTOS time assignment of actual article one message of obtaining); Certainly, the RTOS time variable also can be with the RTOS time assignment of this article one message, the system time variable also can come initialization with the value of system's baseline time variable, assignment module in the communication apparatus message logging system is after to system's baseline time variable and RTOS baseline time initialization of variable, also need a flag is initialized as vacation, this flag represents whether the baseline time variable has been carried out assignment, if the baseline time variable is not carried out assignment, then the value of this flag is false, if the baseline time variable has been carried out assignment, then the value of this flag is true;
In addition, in this communication apparatus message logging system, after obtaining the system time of every message, the system time of this message can assignment be given this system time variable, on the one hand be used for showing the system time of current this message, on the other hand, for the system time that calculates lower a piece of news used; The RTOS time of this message can assignment be given this RTOS time variable;
Step 212, when communication apparatus message logging system acquisition is sent to article one message of computer to portable terminal, this article one message includes the RTOS temporal information, by RTOS frame number (RTOS Ticks) and the computing formula of using this article one message:
RTOS time=long ((float (RTOS frame number)/(float (1000))) * 2 * 4615), calculate sending (namely catching) RTOS time of this article one message, simultaneous communications equipment message log system obtains the system time of this article one message when received, as can be with the RTOS time assignment of this article one message to RTOS time variable and RTOS baseline time variable, the system time assignment of this article one message is to system's baseline time variable, use again value initialization's system time variable of this system's baseline time variable, so just finished the assignment first time of variable; Wherein the value of system's baseline time variable is mainly used when appearance is unusual.
Step 213 for system's baseline time variable, RTOS baseline time variable be used for storing system time variable and the flag assignment of every message, uses the RTOS time assignment of above-mentioned article one message to RTOS baseline time variable; System time assignment when received with this article one message is to system's baseline time variable, the system time variable of message also can come assignment with the system time of this article one message, certainly this system time variable also can come assignment without the system time of this article one message, is true (expression communication apparatus message logging system is to RTOS baseline time variable and system's baseline time variable assignments) simultaneously with the flag assignment;
That is to say, when calculating the system time of a piece of news, the value of described current RTOS baseline time variable is the RTOS time of the upper a piece of news of described message, when described message is article one message, the value of described current RTOS baseline time variable is 0, after time, the RTOS time of just using this article one message is this RTOS baseline time variable again assignment at the RTOS that calculates article one message, and the original value of this RTOS baseline time variable can be lost;
The value of described current system time variable is the system time of the upper a piece of news of described message, and when described message was article one message, the value of described current system time variable was: the system time when receiving described article one message.
Step 22, the system time of every message that the calculating portable terminal sends, this step mainly comprises:
Step 221, judge the state of portable terminal, if portable terminal restarts, perhaps disconnect and reconnect, can send a corresponding signaling, inform communication apparatus message logging system, the situation that portable terminal occurs is (such as deadlock, restart, connect and disconnect etc.), then communication apparatus message logging system can be according to this signaling that receives, according to restart or reconnect after the article one of catching comprise the message of RTOS temporal information, re-start RTOS baseline time variable and system's baseline time variable and flag are carried out assignment, but at the state of portable terminal under normal circumstances, after the system time initialization of system's baseline time variable when received described article one message, can not be updated, only have when the portable terminal abnormal, can again obtain the value of system's baseline time variable;
Step 222, if the state of portable terminal is normal, when the message of catching includes the RTOS temporal information, and whether expression system's baseline time and RTOS baseline time are true (expression system's baseline time and RTOS baseline time are by assignment) by the flag of assignment, then frame number (RTOSTicks) the substitution formula by this message:
RTOS time=long ((float (RTOS frame number)/(float (1000))) * 2 * 4615) calculates sending (namely catching) RTOS time of this message;
Step 223, judge the size of the value of RTOS time of this message and RTOS baseline time variable, if this RTOS time is greater than or equal to the RTOS baseline time, then calculate the time difference of the value of RTOS baseline time variable to this RTOS time, use this time difference, be added in to preserve the system time variable (system time of bar message is the system time of the front a piece of news of current message afterwards headed by this system time variable assignment first time) of every message.So just draw the system time of this message.Upgrade RTOS baseline time variable with the RTOS time of this message at last, make the value of this RTOS baseline time variable comprise the new RTOS baseline time of the message of RTOS temporal information as next bar.
In step 223, if this RTOS time less than the RTOS baseline time, show occured unusual, by the processing of unusually dishing out of communication apparatus message logging system;
The system time of described message is preserved and/or shown to step 23, specifically, preserves the system time of described message to message, and described message is saved in the message logging file; Operation according to step 22, can calculate the system time of every message of catching, whenever the system time that calculates this message, the system time of this message can be kept at the form of text in the decoded message content, and in the window of the source codec of communication apparatus message logging system, show this system time, display format is " PCTime=", the system time of back display message.The tester just can check the system time of message in real time in the process of communication apparatus message logging system acquisition message like this, and stops communication apparatus message logging system, checks the system time of certain bar message when checking Message Record.
After communication apparatus message logging system is stopped, in the system time in the Message Record that can check communication apparatus message logging system acquisition, Message Record can also be preserved into the message logging file, the type of described message logging file is: initial data journal file or the message logging file of having decoded.
Therefore, the system time of above-mentioned message and this message can be preserved into the message logging file of having decoded also, (the original data record journal file is the 2 system code streams of not decoding also can to preserve into the original data record journal file, if calculate the PC system time of message, need to again decode and calculate the system time of every message).The system time of the message of communication apparatus message logging system acquisition also can be kept at message is carried out among the decoded message logging file, and the tester can directly open the file of this kind form and check.
Step 24, when if the message logging file of above-mentioned preservation is the original data record journal file, need to again decode to this original data record journal file, calculate the system time of every message, the system time that could show every message, therefore, the original data record journal file that test was preserved before communication apparatus message logging system can open, and can again decode to this original data record journal file, according to the creation-time of this initial data journal file, and RTOS time of every message in the journal file, extrapolate every message at captive system time at that time, this step mainly is divided into a step, and is specific as follows described:
Step 241, at first dispose communication apparatus message logging system, read in the initial data journal file that again to decode, the creation-time (time that this creation-time is preserved for this initial data journal file) of initial data journal file is at first read in communication apparatus message logging system, carry out assignment to system's baseline time variable with this time, also can give this time assignment and be used for preserving the system time variable of every message, whether will represent simultaneously that the flag assignment of baseline time being carried out assignment comes true (representing to have carried out assignment to baseline time);
That is to say, when the type of described message logging file is the initial data journal file, and when described initial data journal file is decoded again, the value of described current RTOS baseline time variable is the RTOS time of the upper a piece of news of described message, when described message was article one message, the value of described current RTOS baseline time variable was the RTOS time of this article one message of calculating;
The value of described current system time variable is the system time of the upper a piece of news of described message, and when described message was article one message, the value of described current system time variable was the time when preserving described initial data journal file;
Step 242, when communication apparatus message logging system read out article one and comprises the message of RTOS temporal information, communication apparatus message logging system was by the frame number (RTOS Ticks) of this message, the substitution computing formula:
RTOS time=long ((float (RTOS Ticks)/(float (1000))) * 2 * 4615), calculate sending (namely catching) RTOS time of this message, wherein, comprise the RTOS time assignment of message of RTOS temporal information with this article one of calculating to RTOS baseline time variable, again added the value (such as the time during the initial data journal file as described in the above-mentioned preservation) of current system time variable this time, just obtained the system time of article one message, and with the system time assignment of this article one message to the system time variable, so just finished the assignment of the system time of article one message;
Step 243, when communication apparatus message logging system read successively in the initial data journal file comprise the message of RTOS temporal information the time, at first the frame number of this message (RTOS Ticks) substitution formula:
RTOS time=long ((float (RTOS frame number)/(float (1000))) * 2 * 4615), calculate sending (namely catching) RTOS time of this message, wherein, the value of this RTOS time with RTOS baseline time variable compared, calculate the time difference of RTOS baseline time to this RTOS time, use this time difference, be added in to preserve on the system time variable of every message (initial value of the variable of this system time is the system time of the front a piece of news of current message for the system time of bar message headed by the assignment for the first time afterwards).So just draw the system time of this message.Upgrade RTOS baseline time variable with this RTOS time at last, make the value of this RTOS baseline time variable comprise the new RTOS baseline time of the message of RTOS temporal information as next bar.
Step 244, every message of catching is carried out system time demonstration and preservation, operation according to step 243, can calculate the system time of every message that reads, whenever the system time that calculates this message, this time can be kept at the form of text in the decoded message content, and shows this system time in the window of the source codec of communication apparatus message logging system, display format is " PC Time=", the system time of back display message.
Step 245 after the initial data journal file carried out reading of total data and decode, can select to preserve decoded message, generates the later message logging file of decoding.
Said method of the present invention, use at first on computers communication apparatus message logging system that portable terminal is carried out message when catching, when communication apparatus message logging system receives article one and has the message of RTOS temporal information, communication apparatus message logging system can record current system time, and this system time carried out record as system's baseline time, in this simultaneously, communication apparatus message logging system can be by using the RTOS frame number of this article one message, calculate RTOS time of this message according to above-mentioned computing formula, and this RTOS time is carried out record as the RTOS baseline time;
When communication apparatus message logging system receives the message that comprises the RTOS temporal information again, communication apparatus message logging system calculates the RTOS time of this message according to the RTOS frame number of this message, and the value (namely going up the RTOS time of a piece of news) of this RTOS time and RTOS baseline time variable compared, calculate the time difference of the value of this RTOS time and RTOS baseline time variable, after being added to this time difference on the system time variable (its value is the system time of upper a piece of news), what draw is exactly the system time of this message.In this simultaneously, to RTOS baseline time variable, usefulness when calculating its system time as lower a piece of news has so just realized calculating and showing the method for the real-time system time of every message that receives with the RTOS time assignment of this message.
Processing for some special circumstances, disconnection appears connecting such as portable terminal, crash, the phenomenon such as perhaps restart, portable terminal is by built-in code, can send a corresponding signaling according to the situation that portable terminal occurs to communication apparatus message logging system, the state of apprizing system portable terminal, system can use corresponding the processing to the calculating of system time according to the information that signaling comprises.
In particular cases, as in the process of using portable terminal to converse or dial up on the telephone, the size of message that produces is too huge, because the performance issue of computing power problem or communication apparatus message logging system itself, can't process simultaneously a large amount of information, in order to tackle this situation, can when receiving a piece of news, just this message not decoded, but be kept at first the message that portable terminal sends to communication apparatus message logging system in the message queue, from formation, obtain successively message by communication apparatus message logging system again, thereby proceed decoding, computing system time, the processing such as demonstration; In this case, if in message, just obtain system time at communication apparatus message logging system acquisition, such time is inaccurate, because do not consider like this stand-by period of message in formation, when if data volume is not very large, error perhaps can be very little in addition can't discover, but in heavy traffic, when traffic carrying capacity is large, the time of waiting in the formation just can't have been ignored, so method of the present invention was calculated according to the RTOS time of message, can be controlled at error in the very little controlled range like this.
Of the present invention being of wide application, can be applied in variously has on the demand that pair mobile terminal message obtains Real Time Monitoring, also can use the message logging that includes the real-time system temporal information of mobile terminal message in preservation, make things convenient for developer and tester to analysis and the research of message logging.Can also use between the message logging that comparison mobile terminal side and communication network side are obtained and carry out on the demand of time comparison.The present invention makes in the work of monitoring, collection, analysis and preservation to mobile terminal message and has greatly improved operating efficiency and measuring accuracy.
As shown in Figure 3, embodiments of the invention also provide a kind of device 30 that obtains the system time of mobile terminal message, comprising:
Acquisition module 31 is for the real time operating system RTOS time of the message of obtaining the portable terminal transmission;
Processing module 32 is used for according to the value of the RTOS time of described message, current RTOS baseline time variable and the value of current system time variable, obtains the system time of described message.
Among this embodiment, device 30 specifically can be the communication apparatus JFS in the computer, this communication apparatus JFS can be that one in the computer is for the functional module that portable terminal is tested, this embodiment is sent to the RTOS time of the message of computer equally by obtaining portable terminal, and with this RTOS time in conjunction with the value of current RTOS baseline time variable and the value of current system time variable, obtain the system time of message, according to this system time, can locate more exactly this message place transmitting time and time of reception professional or conversation can locate more accurately, saved time that the tester analyzes journal file, thereby the testing efficiency of portable terminal is improved, avoids expending of unnecessary manpower and time.
Wherein, above-mentioned acquisition module 31 specifically is used for: obtain the RTOS frame number that portable terminal is sent to the message of computer, and according to described RTOS frame number, obtain the RTOS time of described message; Specifically:
Can pass through formula: RTOS time=long ((float (RTOS frame number)/(float (1000))) * 2 * 4615) obtains RTOS time of described message; Wherein, the RTOS frame number is the u32 type, and u32 represents 32 signless integers; Float represents floating-point operation; Long represents the long computing.
Above-mentioned processing module 32 specifically is used for: calculate the difference of the value of RTOS time of described message and described current RTOS baseline time variable, with the value addition of described difference and described current system time variable, obtain the system time of described message.
As shown in Figure 4, mobile terminal to send message is to this communication apparatus JFS, and by the acquisition module in this system and processing module, after obtaining the system time of message, said apparatus also comprises:
The assignment module is used for behind the system time of the RTOS time that obtains described message and described message, RTOS time of described message is assigned to described RTOS baseline time variable, so that it is used to calculate the system time of lower a piece of news; And the system time of described message is assigned to described system time variable, this assignment module can also be carried out initialization to RTOS baseline time variable and system's baseline time variable.
Further, this device 30 also can comprise:
Preserve module, the system time that is used for preserving described message is to message, and described message is saved in the message logging file; The type of this message logging file can be initial data journal file or the message logging file of having decoded, that is to say, the multiple messages that receives can be preserved into the initial data journal file, also can preserve into the message logging file of having decoded; And/or
Display module is for the system time that shows described message; Specifically, whenever calculate the system time of a piece of news, this display module will in time be presented at the system time of this message on the man-machine interface of computer by user interactive module;
If what preserve is the initial data journal file, then can re-start decoding to this initial data journal file, in the decode procedure, extrapolate the system time of every message according to the processing method of processing module, so in the reckoning process, when RTOS baseline time variable and system time variable are carried out assignment, can be different to the method that these two variablees carry out assignment in forming the message logging file of having decoded with processing module, in the decode procedure to the initial data journal file, when calculating the system time of every message, the value of described current RTOS baseline time variable is the RTOS time of the upper a piece of news of described message, when described message was article one message, the value of described current RTOS baseline time variable was the RTOS time of article one message; The value of described current system time variable is the system time of the upper a piece of news of described message, and when described message was article one message, the value of described current system time variable was the time when preserving described initial data journal file;
And processing module is receiving article one message, and in the process of the final formation message logging file of having decoded, the assignment mode of RTOS baseline time variable and system time variable is: the value of described current RTOS baseline time variable is the RTOS time of the upper a piece of news of described message, when described message was article one message, the value of described current RTOS baseline time variable was 0; The value of described current system time variable is the system time of the upper a piece of news of described message, and when described message was article one message, the value of described current system time variable was: the system time when receiving described article one message.
At last, need to prove: Application Example shown in Figure 2 and all implementation procedures of step 21-24 all are applicable to this device embodiment in the said method, also can reach same technique effect, do not repeat them here.
The above is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (12)

1. a method of obtaining the system time of mobile terminal message is characterized in that, comprising:
Obtain the real time operating system RTOS time of the message of portable terminal transmission;
According to the value of the RTOS time of described message, current RTOS baseline time variable and the value of current system time variable, obtain the system time of described message;
Wherein, according to the value of the RTOS time of described message, current RTOS baseline time variable and the value of current system time variable, the step that obtains the system time of described message is specially:
Calculate the difference of the value of RTOS time of described message and described current RTOS baseline time variable;
With the value addition of described difference and described current system time variable, obtain the system time of described message.
2. method according to claim 1 is characterized in that, the step of obtaining the real time operating system RTOS time of the message that portable terminal sends is specially:
Obtain the RTOS frame number that portable terminal is sent to the message of computer;
According to described RTOS frame number, obtain the RTOS time of described message.
3. method according to claim 2 is characterized in that, according to the RTOS of institute frame number, the step that obtains the RTOS time of described message is specially:
Pass through formula: RTOS time=long ((float (RTOS frame number)/(float (1000))) * 2 * 4615) obtains RTOS time of described message; Wherein, the RTOS frame number is the u32 type, and described u32 represents 32 signless integers; Float represents floating-point operation; Long represents the long computing.
4. method according to claim 1 is characterized in that, the system time that obtains described message also comprises afterwards:
The RTOS time of described message is assigned to described RTOS baseline time variable;
The system time of described message is assigned to described system time variable.
5. method according to claim 1 is characterized in that, the value of described current RTOS baseline time variable is the RTOS time of the upper a piece of news of described message, and when described message was article one message, the value of described current RTOS baseline time variable was 0;
The value of described current system time variable is the system time of the upper a piece of news of described message, and when described message was article one message, the value of described current system time variable was: the system time when receiving described article one message.
6. according to claim 1 to 5 each described methods, it is characterized in that the step that obtains the system time of described message also comprises afterwards:
Preserve the system time of described message to message, and described message is saved in the message logging file.
7. method according to claim 6 is characterized in that, the type of described message logging file is: initial data journal file or the message logging file of having decoded.
8. method according to claim 7 is characterized in that, when the type of described message logging file is the initial data journal file, and when described initial data journal file is decoded:
The value of described current RTOS baseline time variable is the RTOS time of the upper a piece of news of described message, and when described message was article one message, the value of described current RTOS baseline time variable was the RTOS time of described article one message;
The value of described current system time variable is the system time of the upper a piece of news of described message, and when described message was article one message, the value of described current system time variable was the time when preserving described initial data journal file.
9. a device that obtains the system time of mobile terminal message is characterized in that, comprising:
Acquisition module is for the real time operating system RTOS time of the message of obtaining the portable terminal transmission;
Processing module is used for according to the value of the RTOS time of described message, current RTOS baseline time variable and the value of current system time variable, obtains the system time of described message;
Wherein, described processing module specifically is used for: calculate the difference of the value of RTOS time of described message and described current RTOS baseline time variable, with the value addition of described difference and described current system time variable, obtain the system time of described message.
10. device according to claim 9 is characterized in that, described acquisition module specifically is used for: obtain the RTOS frame number of the message of portable terminal transmission, and according to described RTOS frame number, obtain the RTOS time of described message.
11. device according to claim 9 is characterized in that, also comprises:
The assignment module is used for behind the system time of the RTOS time that obtains described message and described message, and RTOS time of described message is assigned to described RTOS baseline time variable, and the system time of described message is assigned to described system time variable.
12. to 11 each described devices, it is characterized in that according to claim 10, also comprise:
Preserve module, the system time that is used for preserving described message is to message, and described message is saved in the message logging file; And/or
Display module is for the system time that shows described message.
CN 201010124751 2010-03-12 2010-03-12 Method and device for acquiring system time of mobile terminal message Expired - Fee Related CN101808349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010124751 CN101808349B (en) 2010-03-12 2010-03-12 Method and device for acquiring system time of mobile terminal message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010124751 CN101808349B (en) 2010-03-12 2010-03-12 Method and device for acquiring system time of mobile terminal message

Publications (2)

Publication Number Publication Date
CN101808349A CN101808349A (en) 2010-08-18
CN101808349B true CN101808349B (en) 2013-03-13

Family

ID=42609919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010124751 Expired - Fee Related CN101808349B (en) 2010-03-12 2010-03-12 Method and device for acquiring system time of mobile terminal message

Country Status (1)

Country Link
CN (1) CN101808349B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111711544B (en) * 2020-05-15 2021-11-09 北京奇艺世纪科技有限公司 Link dial testing method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845081A (en) * 2006-02-24 2006-10-11 北京博联伟图科技有限公司 Process monitoring method for embedded application software testing
CN1866961A (en) * 2006-03-13 2006-11-22 华为技术有限公司 Client system and service system data synchronizing method and system
CN101256531A (en) * 2008-04-08 2008-09-03 中兴通讯股份有限公司 Method for analysis of built-in equipment real-time

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845081A (en) * 2006-02-24 2006-10-11 北京博联伟图科技有限公司 Process monitoring method for embedded application software testing
CN1866961A (en) * 2006-03-13 2006-11-22 华为技术有限公司 Client system and service system data synchronizing method and system
CN101256531A (en) * 2008-04-08 2008-09-03 中兴通讯股份有限公司 Method for analysis of built-in equipment real-time

Also Published As

Publication number Publication date
CN101808349A (en) 2010-08-18

Similar Documents

Publication Publication Date Title
CN101394646B (en) Software test method and system
CN109271412A (en) The real-time streaming data processing method and system of smart city
CN100481782C (en) Apparatus and method for checking performance of wireless data network
CN104461903B (en) The method and apparatus of test client based on browser
CN105263155B (en) The method and system of remote real time monitoring intelligent mobile terminal baseband processor operating status
CN102946616A (en) Internet of things middleware performance testing system and testing method
CN108234659B (en) Data processing method, device and system
CN103246606B (en) The performance test methods of ESB platform and system
CN109408309A (en) The test method and device of multiple terminals
CN105224420B (en) A kind of analysis method and system of automatic parsing terminal abnormal
CN117176802B (en) Full-link monitoring method and device for service request, electronic equipment and medium
CN101808349B (en) Method and device for acquiring system time of mobile terminal message
CN112702430B (en) Data transmission method based on cloud edge mode and Web technology
CN113485282A (en) Message tracking display method, system, equipment and storage medium for distributed control system
CN112583663A (en) Automatic network performance testing method based on domestic operating system
WO2010069214A1 (en) Method and equipment for field filtering
CN107889191B (en) Connection method, device and equipment of wireless local area network and computer readable storage medium
CN105630646A (en) Method for quickly judging connectivity and stability of serial port
CN107316377A (en) A kind of invoice checking method applied based on mobile phone
CN114201659A (en) Message track transmission query method, device and system
CN110120895B (en) Method, device, medium and electronic equipment for testing communication of mobile terminal
CN201611952U (en) Communication flow test device based on commercial data card
CN206181045U (en) Wireless chip receiving and dispatching test, monitoring device
CN113645052A (en) Firmware debugging method and related equipment
CN106937322B (en) Flow consumption monitoring method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130313

Termination date: 20180312

CF01 Termination of patent right due to non-payment of annual fee