CN107896345A - The method of test network Connection Time in Android intelligent television - Google Patents
The method of test network Connection Time in Android intelligent television Download PDFInfo
- Publication number
- CN107896345A CN107896345A CN201711191414.7A CN201711191414A CN107896345A CN 107896345 A CN107896345 A CN 107896345A CN 201711191414 A CN201711191414 A CN 201711191414A CN 107896345 A CN107896345 A CN 107896345A
- Authority
- CN
- China
- Prior art keywords
- network connection
- network
- time
- intelligent television
- android
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
Abstract
The invention discloses the method for test network Connection Time in Android intelligent television a kind of, after system exchange start or STR start restartings, the quick connection of network is carried out under linux system, and in android system start-up course, open the Network Expert Systems thread of a running background, this thread inquires about two ways to obtain the successful event of network connection by the real-time broadcast event and timing cycle for receiving network state change, and in successful connection, by calculating the clock number of CPU operations the time that success is spent from system boot to network connection is calculated come accurate.Present invention saves human cost, the accuracy of test is substantially increased.
Description
Technical field
The present invention relates to Android intelligent television technical field, and in particular to Test Network in a kind of Android intelligent television
The method of network Connection Time.
Background technology
With the development of smart machine, network connection has become its essential One function, current intelligence electricity
Depending on typically can all possess the connection of wired and wireless multiple network type, therefore the length of network attachment time and connection speed
Speed directly influences whether the experience of user, so in the exploitation and test and appraisal of our present products, networking time is as one
Existing for important rigid index.But test and appraisal personnel do not have one preferably for the test and appraisal of this parameter of networking time at present
Method, the time that network connection is spent accurately is tested out, network connection icon on homepage can only be observed by one side
State, while carrying out timing by stopwatch, count the time of common cost, therefore this mode not only expends tester
Energy, and error-prone, accuracy also can only be to second level.
Network parameter testing process is as follows at present:1) when system electrification is started shooting, one piece of stopwatch is got out;2) beginning is established on by cable
Afterwards, stopwatch is pressed immediately, starts timing;3) start-up course for observation Android intelligent television of concentrating one's energy;4) when seeing TV's
When the network icon occurred in main interface is changed into connection status, presses stopwatch and terminate to be good for;5) network connection is calculated by stopwatch
The time spent.
Aforesaid way has following problem and defect by the stopwatch artificial calculating network Connection Time:
(1) TV is observed by human eye, then it is to have very big error to operate stopwatch this action;(2) when stopwatch is to count
Between, it is typically accurate only second level;(3) after network connection, to the renewal of main interface icon, still there is an error process.Therefore,
, very big error be present in the method not science of test and appraisal this test network parameter of personnel now.
The content of the invention
Instant invention overcomes the deficiencies in the prior art, there is provided the test network Connection Time in a kind of Android intelligent television
Method, the technical problem not high for solving current test network connection accuracy.
In view of the above mentioned problem of prior art, according to one side disclosed by the invention, the present invention uses following technology
Scheme:
A kind of method of test network Connection Time in Android intelligent television, including:
System boot is initialized, and timing is carried out in units of CPU running frequencies;
Network connection is carried out after linux system start completion;
Android system service starts and runs background network status monitoring thread;
The current network connection state of android system service synchronization simultaneously sends connection status broadcast message;
After background network status monitoring thread receives broadcast message, the current clock numbers of CPU are calculated, obtain network connection
Time;
As do not received broadcast, background network status monitoring thread is by inquiring about the state of network connection;
Inquiry obtains network connection success, then calculates now CPU clock number, obtain network attachment time.
In order to which the present invention is better achieved, further technical scheme is:
According to one embodiment of the invention, the linux system starts network connection in/init.xx.rc files
Action.
According to another embodiment of the invention, the step of linux system carries out network connection, includes:
1) wireless device driving is loaded;
2) wpa_supplicant processes are enabled, and according to related configuration file come in automatic connection profile
AP;
3) after successful connection, dhcp distribution network ip address is started;
4) the system property value of modification management network connection state, to facilitate andorid system layers service carry out state
It is synchronous.
According to another embodiment of the invention, the android system service starts and runs background network state
The step of monitoring thread includes:
1) android system service SystemServer is started;
2) background network status monitoring thread is started in SystemServer processes.
According to another embodiment of the invention, the current network connection state of the android system service synchronization
And the step of sending connection status broadcast message, includes:
1) wired and wireless communication status broadcast reception message is registered;
2) cyclic query module is run to obtain network state.
According to another embodiment of the invention, the inquiry obtains network connection success, then calculate now CPU when
The step of clock number includes:
CPU clock number is obtained by reading/proc/uptime file acquisitions.
According to another embodiment of the invention, CPU clock is obtained by reading/proc/uptime file acquisitions
Number is two parameters, and its first parameter, which is represented from system, starts to the now time, and value first parameter is network
Connect the time number spent altogether.
The present invention can also be:
According to another embodiment of the invention, calculating the method for cpu clock number at that time includes:
The development interface function provided using linux kernel, or the proc file system pipes provided by linux system
Reason.
According to another embodiment of the invention, obtained cpu clock number is converted into a second unit, recorded/data mesh
In file networktime.txt under record.
Compared with prior art, one of beneficial effects of the present invention are:
The method of test network Connection Time in a kind of Android intelligent television of the present invention, start is until network connection
After success, the time that network connection can be spent automatically is saved in fixed file, and tester can be from file directly
Know its test result;Tester can not have to require efforts using the so original method of testing of stopwatch, greatly improve yet
The accuracy of test.
Brief description of the drawings
, below will be to embodiment for clearer explanation present specification embodiment or technical scheme of the prior art
Or the required accompanying drawing used is briefly described in the description of prior art, it should be apparent that, drawings in the following description are only
It is the reference to some embodiments in present specification, for those skilled in the art, is not paying creative work
In the case of, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the FB(flow block) according to one embodiment of the invention.
Embodiment
The present invention is described in further detail with reference to embodiment, but the implementation of the present invention is not limited to this.
Embodiment 1
With reference to shown in Fig. 1, a kind of method of test network Connection Time in Android intelligent television, including:
Step 1:System boot is initialized, and timing is carried out in units of CPU running frequencies;
There are time modules specially to record CPU from clock number function during upper electricity start-up operation in linux kernel, and be provided with
The interface and method used to user's space;
Step 2:Network connection is carried out after linux system start completion;
Start network connection action in/init.xx.rc files, step is as follows:
1) wireless device driving insmod xxx.ko are loaded;
2) wpa_supplicant processes are enabled, and according to related configuration file come in automatic connection profile
AP;
3) after successful connection, dhcp distribution network ip address is started;
4) the system property value of modification management network connection state, to facilitate andorid system layers service carry out state
It is synchronous.
Step 3:Android system service starts and runs background network status monitoring thread;
1) android system service SystemServer is started:
2) background network status monitoring thread is started in SystemServer processes:
NetworkSmartSwitchMonitorService mNetMonitorServer=new
NetworkSmartSwitchMonitorService(context);
mNetMonitorServer.startMonitoring();
Step 4:The current network connection state of android system service synchronization simultaneously sends connection status broadcast message;
1) wired and wireless communication status broadcast reception message is registered:
registerWifiStateBroadcastReceiver();
registerEthernetBroadcastReceiver();
2) cyclic query module is run to obtain network state:
Step 5:After background network status monitoring thread receives broadcast message, the current clock numbers of CPU are calculated;
Step 6:As do not received broadcast, background network status monitoring thread is by inquiring about the state of network connection;
Step 7:Inquiry obtains network connection success, then calculates now CPU clock number;
Because the clock number in kernel on the current CPU of acquisition has this interface in application layer, reading/proc/ can be passed through
Uptime file acquisitions obtain.Form is:6669954.14 413457125.47.
First parameter is to represent from system to start to the now time (in seconds);
Second parameter is the system that the represents idle time (in seconds):
So when first parameter of value is that system starts to current, time number that network connection is spent altogether, unit is
Second, Millisecond can be accurate to.
By clock number twice, the time that network connection is spent can be accurately obtained.
Embodiment 2
A kind of method of new test network Connection Time, specific embodiment are as follows:
Step 1:System electrification initializes, and the clock number of now CPU operations starts counting up;
This function is realized in linux system kernel, and the interface of user class is provided.
Step 2:Network connection is carried out, while starts Android system service;
After linux system start completion, the system script under startup/etc;
Loading equipemtn drives, and carries out network connection;
Start android system service SystemServer;
Step 3:Background network status monitoring thread is run in android system service;
Start background network monitoring thread in android system service;
Wired and wireless network successful connection radio receiver is registered in background network monitoring thread;
While processing, the current network connection state of cyclic query are carried out in background network monitoring thread;
It is successfully, then to calculate cpu clock number at that time to receive network connection and successfully broadcast or inquire network state,
And record, it is designated as t1;
Calculate cpu clock number at that time there is several methods that, a kind of is the development interface function provided using linux kernel,
Another kind is the proc file system managements provided by linux system, can be with the current clock number of the acquisition of dynamic realtime
(in/proc/uptime files).
The t1 values being calculated are changed, i.e., cpu clock number is converted into a second unit, recorded/data catalogues under
In file networktime.txt;
Step 4:Tester, which directly takes out the networktime.txt files under/data/, can obtain system and opens
Machine succeeds the spent time to network connection.
Above method is applicable to the test of two kinds of network types of cable network and wireless network, and system exchange start
With the test environment under the conditions of two kinds of STR quick turn-ons.
For to sum up, the present invention come the change of supervision network state, is connect by the thread of running background using broadcast event
Receive and cyclic query two ways carrys out real-time supervision network state change, and connected with the clock number of CPU operations come calculating network
The time spent, so as to accurately test out very much network attachment time parameter, provided for tester a kind of very practical
Network test method.Can solve the defects of following software and problem:Tester's test network parameter passes through stopwatch at present
Clock, and the icon for observing network connection in main interface changes to determine the end of time, i.e. science is not smart yet for this mode
Really, very big error be present.The principle of the present invention:After system exchange start or STR start restartings, under linux system
The quick connection of network is carried out, and in android system start-up course, opens the Network Expert Systems line of a running background
Journey, this thread are inquired about two ways by the real-time broadcast event and timing cycle that receive network state change and connected to obtain network
Connect successful event, and in successful connection, the clock number by calculating CPU operations accurately to calculate from system boot to
Network connection success the spent time.
" one embodiment " for being spoken of in this manual, " another embodiment ", " embodiment ", etc., refer to tying
Specific features, structure or the feature for closing embodiment description are included at least one embodiment of the application generality description
In.It is not necessarily to refer to same embodiment that statement of the same race, which occur, in multiple places in the description.Appoint furthermore, it is understood that combining
When one embodiment describes a specific features, structure or feature, what is advocated is this to realize with reference to other embodiment
Feature, structure or feature are also fallen within the scope of the present invention.
Although reference be made herein to invention has been described for multiple explanatory embodiments of the invention, however, it is to be understood that
Those skilled in the art can be designed that a lot of other modifications and embodiment, and these modifications and embodiment will fall in this Shen
Please be within disclosed spirit and spirit.More specifically, can be to master in the range of disclosure and claim
The building block and/or layout for inscribing composite configuration carry out a variety of variations and modifications.Except what is carried out to building block and/or layout
Outside variations and modifications, to those skilled in the art, other purposes also will be apparent.
Claims (9)
1. a kind of method of test network Connection Time in Android intelligent television, it is characterised in that including:
System boot is initialized, and timing is carried out in units of CPU running frequencies;
Network connection is carried out after linux system start completion;
Android system service starts and runs background network status monitoring thread;
The current network connection state of android system service synchronization simultaneously sends connection status broadcast message;
After background network status monitoring thread receives broadcast message, the current clock numbers of CPU are calculated, when obtaining network connection
Between;
As do not received broadcast, background network status monitoring thread is by inquiring about the state of network connection;
Inquiry obtains network connection success, then calculates now CPU clock number, obtain network attachment time.
2. the method for test network Connection Time in Android intelligent television according to claim 1, it is characterised in that institute
State linux system and start network connection action in/init.xx.rc files.
3. the method for test network Connection Time in Android intelligent television according to claim 1, it is characterised in that institute
Stating the step of linux system carries out network connection includes:
1) wireless device driving is loaded;
2) wpa_supplicant processes are enabled, and according to related configuration file come the AP in automatic connection profile;
3) after successful connection, dhcp distribution network ip address is started;
4) the system property value of modification management network connection state, to facilitate the synchronization of andorid system layers service carry out state.
4. the method for test network Connection Time in Android intelligent television according to claim 1, it is characterised in that institute
Android system service is stated to start and the step of running background network status monitoring thread include:
1) android system service SystemServer is started;
2) background network status monitoring thread is started in SystemServer processes.
5. the method for test network Connection Time in Android intelligent television according to claim 1, it is characterised in that institute
State the current network connection state of android system service synchronization and include the step of sending connection status broadcast message:
1) wired and wireless communication status broadcast reception message is registered;
2) cyclic query module is run to obtain network state.
6. the method for test network Connection Time in Android intelligent television according to claim 1, it is characterised in that institute
Stating the step of inquiry obtains network connection success, then calculates now CPU clock number includes:
CPU clock number is obtained by reading/proc/uptime file acquisitions.
7. the method for test network Connection Time in Android intelligent television according to claim 6, it is characterised in that logical
It is two parameters to cross reading/proc/uptime file acquisitions and obtain CPU clock number, and its first parameter represents to be opened from system
The dynamic time till now, value first parameter is the time number that network connection is spent altogether.
8. the method for test network Connection Time in Android intelligent television according to claim 1, it is characterised in that meter
Calculating the method for cpu clock number at that time includes:
The development interface function provided using linux kernel, or the proc file system managements provided by linux system.
9. the method for test network Connection Time in Android intelligent television according to claim 1, it is characterised in that
To cpu clock number be converted into a second unit, recorded/data catalogues under file networktime.txt in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711191414.7A CN107896345A (en) | 2017-11-24 | 2017-11-24 | The method of test network Connection Time in Android intelligent television |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711191414.7A CN107896345A (en) | 2017-11-24 | 2017-11-24 | The method of test network Connection Time in Android intelligent television |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107896345A true CN107896345A (en) | 2018-04-10 |
Family
ID=61806023
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711191414.7A Pending CN107896345A (en) | 2017-11-24 | 2017-11-24 | The method of test network Connection Time in Android intelligent television |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107896345A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108718420A (en) * | 2018-07-06 | 2018-10-30 | 青岛海信传媒网络技术有限公司 | A kind of method and device of TIME SYNCHRONISM WITH TV |
CN109039518A (en) * | 2018-08-21 | 2018-12-18 | 四川长虹电器股份有限公司 | The ntp server address intelligent management of Android television system |
CN112118330A (en) * | 2020-09-22 | 2020-12-22 | 青岛海信传媒网络技术有限公司 | DHCP (dynamic host configuration protocol) network reconnection method and display equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104065523A (en) * | 2013-03-19 | 2014-09-24 | 腾讯科技(深圳)有限公司 | Connection rate detection method and device |
CN105744367A (en) * | 2016-03-08 | 2016-07-06 | 四川长虹电器股份有限公司 | Rapid wireless networking method on Android TV |
CN105933160A (en) * | 2016-06-23 | 2016-09-07 | 四川长虹电器股份有限公司 | Method for realizing quick connection of wired network on Android smart television |
-
2017
- 2017-11-24 CN CN201711191414.7A patent/CN107896345A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104065523A (en) * | 2013-03-19 | 2014-09-24 | 腾讯科技(深圳)有限公司 | Connection rate detection method and device |
CN105744367A (en) * | 2016-03-08 | 2016-07-06 | 四川长虹电器股份有限公司 | Rapid wireless networking method on Android TV |
CN105933160A (en) * | 2016-06-23 | 2016-09-07 | 四川长虹电器股份有限公司 | Method for realizing quick connection of wired network on Android smart television |
Non-Patent Citations (3)
Title |
---|
QQ_16505961: "通过广播监听wifi连接状态来自动读取数据", 《HTTPS://BLOG.CSDN.NET/QQ_16505961/ARTICLE/DETAILS/66973475》 * |
SIAISJACK: "/proc/uptime详解,获取系统启动时间", 《HTTPS://BLOG.CSDN.NET/JK110333/ARTICLE/DETAILS/18443453》 * |
周立功: "《嵌入式Linux开发教程下》", 31 October 2016 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108718420A (en) * | 2018-07-06 | 2018-10-30 | 青岛海信传媒网络技术有限公司 | A kind of method and device of TIME SYNCHRONISM WITH TV |
CN108718420B (en) * | 2018-07-06 | 2021-05-18 | 青岛海信传媒网络技术有限公司 | Method and device for synchronizing television time |
CN109039518A (en) * | 2018-08-21 | 2018-12-18 | 四川长虹电器股份有限公司 | The ntp server address intelligent management of Android television system |
CN112118330A (en) * | 2020-09-22 | 2020-12-22 | 青岛海信传媒网络技术有限公司 | DHCP (dynamic host configuration protocol) network reconnection method and display equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107896345A (en) | The method of test network Connection Time in Android intelligent television | |
CN109039518B (en) | The ntp server address intelligent management of Android television system | |
CN107018028B (en) | Data acquisition monitoring system and data acquisition monitoring method based on CAN bus and OPC technology | |
CN111586729B (en) | Three-network signal detection method and system based on metering terminal communication | |
CN104185195B (en) | A kind of measuring method of mobile network property, device and system | |
CN107168877A (en) | A kind of method for carrying out remote testing to server based on Python | |
CN112860569A (en) | Automatic testing method and device, electronic equipment and storage medium | |
CN104009887A (en) | Automatic speed testing method applied to network resource optimization | |
CN104717670B (en) | A kind of measure of the quality of service method, apparatus and system | |
CN111756597B (en) | Wireless module testing system, method and device applied to gateway | |
CN103631245A (en) | Power distribution terminal defect diagnostic system and method | |
CN105974223A (en) | Method used for carrying out on-line detection on electric equipment work state and system thereof | |
CN106603344A (en) | Household gateway bandwidth monitoring system and method | |
CN113364115B (en) | Power cable information comprehensive processing system and method | |
CN109815102A (en) | A kind of test data statistical method, device and storage medium | |
US20230089918A1 (en) | Method and apparatus for controlling charging, based on monitored communication signals associated with a charging session | |
CN115086384B (en) | Remote control test method, device, equipment and storage medium | |
CN112312376B (en) | Method and system for remotely and interactively managing multifunctional electric meter | |
CN110244253B (en) | Provincial metering center standard quantity transmission online control method | |
CN106339797A (en) | Point inspection data processing method and device | |
CN109783542A (en) | The data analysing method and device of distributed energy resource system | |
CN106899416A (en) | Check the test system and method for fixed broadband access rate test platform accuracy | |
WO2017181625A1 (en) | Method and apparatus for wireless data transmission | |
CN103220698B (en) | Asynchronization process method, Apparatus and system between a kind of node based on wireless network | |
KR101694348B1 (en) | Reading scheduling method in consideration of communication capability and time information of meters |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180410 |