CN112218325A - Network testing method and device - Google Patents

Network testing method and device Download PDF

Info

Publication number
CN112218325A
CN112218325A CN202010913844.0A CN202010913844A CN112218325A CN 112218325 A CN112218325 A CN 112218325A CN 202010913844 A CN202010913844 A CN 202010913844A CN 112218325 A CN112218325 A CN 112218325A
Authority
CN
China
Prior art keywords
network
sdk
detection
server
url
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
Application number
CN202010913844.0A
Other languages
Chinese (zh)
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.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing 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 Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN202010913844.0A priority Critical patent/CN112218325A/en
Publication of CN112218325A publication Critical patent/CN112218325A/en
Priority to CA3129986A priority patent/CA3129986A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a network testing method and a device, relates to the technical field of network testing, and aims to reduce the network testing cost by integrating an SDK (software development kit) with a timing network detection task function in an APP (application) so that a terminal periodically executes a network detection task based on the SDK. The method comprises the following steps: integrating the SDK with the timing network detection task function with the APP; the SDK regularly initiates a heartbeat request to the server side based on a preset period so as to obtain a network detection URL returned by the server side; and the SDK executes the detection task according to the network detection URL and feeds back the detection result to the server side for statistical analysis of the network test result. The device is applied with the method provided by the scheme.

Description

Network testing method and device
Technical Field
The present invention relates to the field of network testing technologies, and in particular, to a network testing method and apparatus.
Background
The purpose of network test is to obtain network performance conditions under different environments, so as to provide corresponding network improvement basis for operators or network service providers. In the network test scheme in the prior art, network tests are mostly carried out in a mode of constructing nodes or renting nodes all over the country, and a large amount of manpower and material resources are needed.
Disclosure of Invention
The invention aims to provide a network testing method and a network testing device, which are characterized in that an SDK with a timing network detection task function is integrated in an APP, so that a terminal periodically executes a network detection task based on the SDK, and the network testing cost is reduced.
In order to achieve the above object, a first aspect of the present invention provides a network testing method, including:
integrating the SDK with the timing network detection task function with the APP;
the SDK regularly initiates a heartbeat request to the server side based on a preset period so as to obtain a network detection URL returned by the server side;
and the SDK executes a detection task according to the network detection URL and feeds back a detection result to the server side for statistical analysis of a network test result.
Preferably, before the sending a heartbeat request to the server based on a preset period timing by the SDK to obtain the network probing URL returned by the server, the method further includes:
and after the APP is started, registering the timing service of the network detection task by using the AlarmManager of the SDK.
Preferably, the method for the SDK to initiate a heartbeat request to the server based on the preset period to obtain the network detection URL returned by the server includes:
after the SDK regularly sends a heartbeat request to the server side based on a preset period, the server side returns a network detection URL to the SDK meeting the preset condition based on the preset condition of the network test.
Illustratively, the preset conditions include the number of test terminals, a test area, and a name of a network operator of the test.
Optionally, when the SDK meeting the preset condition receives the network probing URL returned by the server, but the number of times that the probing task is not executed exceeds a frequency threshold, the SDK is pulled into a blacklist distributed by the probing task in the server.
Preferably, the method for the SDK to execute the probing task according to the network probing URL and feed the probing result back to the server for statistical analysis of the network testing result includes:
the SDK accesses the detection network according to the network detection URL and acquires a detection result returned by the detection network, wherein the detection result comprises a network state, signal strength and a network operator name;
and the SDK packs the detection result and the terminal parameter of the APP and sends the detection result and the terminal parameter to the server so that the server performs data statistics and analysis according to the detection result and the terminal parameter, wherein the terminal parameter comprises a system version, an application mode and terminal information.
Preferably, after the SDK executes the probing task according to the network probing URL and feeds the probing result back to the server for statistical analysis, the method further includes:
and the server side analyzes the statistical analysis result and automatically sends an alarm service to an administrator when a preset alarm threshold value is reached.
Compared with the prior art, the network testing method provided by the invention has the following beneficial effects:
in the network testing method provided by the invention, the SDK with the function of timing the network detection task is developed and integrated in the APP, after the APP is installed on the terminal equipment of a user, the SDK can regularly initiate a heartbeat request to the server based on a preset period so as to obtain the network detection URL returned by the server, so that the SDK regularly executes the detection task through the network detection URL, and after the detection task is completed, the detection result can be sent to the server so that a manager can perform statistical analysis on data according to the detection results fed back by a large number of SDKs, thereby obtaining the real network condition of the area to be tested.
Therefore, the invention can flexibly realize the real-time test of the area network condition of any user through the scheme of integrating the APP with the SDK. Compared with the prior art that the network test is implemented by building nodes or renting nodes, the scheme of the embodiment can obviously reduce the network test cost.
A second aspect of the present invention provides a network testing apparatus, which is applied to the network testing method according to the above technical solution, and the apparatus includes:
the SDK setting unit is used for integrating the SDK with the function of timing network detection task with the APP;
the heartbeat request unit is used for the SDK to regularly send a heartbeat request to the server side based on a preset period so as to obtain a network detection URL returned by the server side;
and the network detection unit is used for executing a detection task by the SDK according to the network detection URL and feeding back a detection result to the server side for statistical analysis of a network test result.
Preferably, the method further includes, between the SDK setting unit and the heartbeat requesting unit:
and the timing service unit is used for registering the timing service of the network detection task by using the AlarmManager of the SDK after the APP is started.
Compared with the prior art, the network testing device provided by the invention has the same beneficial effects as the network testing method provided by the technical scheme, and the detailed description is omitted here.
A third aspect of the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described network testing method.
Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the invention are the same as those of the network testing method provided by the technical scheme, and are not repeated herein.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart illustrating a network testing method according to an embodiment of the present invention;
fig. 2 is a timing diagram of a network testing method according to an embodiment of the invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, the present embodiment provides a network testing method, including:
integrating the SDK with the timing network detection task function with the APP; the SDK regularly initiates a heartbeat request to the server side based on a preset period so as to obtain a network detection URL returned by the server side; and the SDK executes the detection task according to the network detection URL and feeds back the detection result to the server side for statistical analysis of the network test result.
In the network testing method provided by this embodiment, an SDK having a function of timing a network detection task is developed and integrated in an APP, after a terminal device of a user installs the APP, the SDK can regularly initiate a heartbeat request to a server based on a preset period, so as to obtain a network detection URL returned by the server, so that the SDK regularly executes the detection task through the network detection URL, and after the detection task is completed, a detection result can be sent to the server, so that a manager can perform statistical analysis on data according to the detection results fed back by a large number of SDKs, thereby obtaining a real network condition of an area to be detected.
Therefore, the embodiment can flexibly realize the real-time test of the condition of the area network where any user is located through the scheme of integrating the APP with the SDK. Compared with the prior art that the network test is implemented by building nodes or renting nodes, the scheme of the embodiment can obviously reduce the network test cost. In addition, compared with a scheme that the server actively pushes the network detection URL to the SDK, the method and the device can reduce the disturbance rate to the user, and the screened user is more targeted.
In the above embodiment, before the sending, by the SDK, a heartbeat request to the server based on a preset period to obtain the network probing URL returned by the server, the method further includes:
and after the APP is started, registering the timing service of the network detection task by using an AlarmManager of the SDK.
In the above embodiment, the method for the SDK to execute the probing task according to the network probing URL and feed the probing result back to the server for statistical analysis of the network test result includes:
the SDK accesses the detection network according to the network detection URL and acquires a detection result returned by the detection network, wherein the detection result comprises a network state, signal intensity and a network operator name; and the SDK packs the detection result and the terminal parameter of the installed APP together and sends the detection result and the terminal parameter to the server so that the server performs data statistical analysis according to the detection result and the terminal parameter, wherein the terminal parameter comprises a system version, an application mode and terminal information.
Referring to fig. 2, in a specific implementation, after the APP is started, the SDK is automatically initialized, so that the SDK registers a network detection task service of a timing period based on the alarmmmanager, for example, a heartbeat request is initiated every 30 minutes, and notifies the terminal system OS of the registration service, when the current time is at a periodic timing time, the system OS sends a heartbeat request prompt to the SDK, the SDK immediately initiates a heartbeat request to the server after receiving the prompt notification, the heartbeat request is composed of a header and a content part, wherein the header includes network identification information such as a network operator used by the terminal, an outlet IP address, and the like, the content part includes terminal identification parameters such as a system version, an application mode, terminal information, and the like, after receiving the heartbeat request of the SDK, the server automatically identifies the network operator used by the user for the current internet access and information such as the user's current internet access region according to the heartbeat request, and then according to a preset condition of the network test, and returning the network detection URL to the SDK when the SDK is judged to be in accordance with the test condition, returning a test rejection notice to the SDK when the SDK is judged to be not in accordance with the test condition, accessing the URL address to execute a network detection task after the SDK receives the network detection, returning a detection result comprising a network state, signal strength and a network operator name to the SDK by the URL server, and then packaging and uploading the detection result and terminal parameters to a service end by the SDK in a preset data format so that the service end generates a landing file according to the packaged data for statistical analysis of subsequent data.
It can be understood that, when the administrator needs to update the network test task, the administrator can remotely update the timing period network detection task in the SDK in a manner of updating the APP in combination with the APP vendor, so as to implement remote issuing and updating of the network test task.
In the above embodiment, the method for the SDK to periodically initiate a heartbeat request to the server based on the preset period to obtain the network detection URL returned by the server includes:
after the SDK regularly initiates a heartbeat request to the server based on a preset period, the server returns a network detection URL to the SDK meeting the preset condition based on the preset condition of the network test. The preset conditions comprise the number of the test terminals, the test area and the name of the network operator to be tested.
In the above embodiment, the method for the SDK to execute the probing task according to the network probing URL and feed the probing result back to the server for statistical analysis of the network test result includes:
the SDK accesses the detection network according to the network detection URL and acquires a detection result returned by the detection network, wherein the detection result comprises a network state, signal intensity and a network operator name; and the SDK packs the detection result and the terminal parameter of the installed APP together and sends the detection result and the terminal parameter to the server so that the server performs data statistical analysis according to the detection result and the terminal parameter, wherein the terminal parameter comprises a system version, an application mode and terminal information. It should be noted that a specific process of statistical analysis of network test results is the prior art in the field, and this embodiment will not be described in detail here.
In specific implementation, an administrator can remotely configure preset conditions of network testing in a server, for example, network testing needs to be performed on 10000 terminals using a connected network in Nanjing area, when a heartbeat request received by the server is initiated by a Nanjing user or a non-connected network terminal, the server returns a test rejection notification to such SDK, and when the number of heartbeat requests received by the server in the current time period by the Nanjing user connected network exceeds 10000 times, the server also returns a test rejection notification to the SDK, in other words, only when the heartbeat request initiated by the SDK belongs to the connected network of the Nanjing user and is within 10000 requests, a network detection URL is returned to the SDK. By setting preset conditions, namely adopting a network test strategy of first-come first-get and last-full, the flexibility and pertinence of network test are increased.
Preferably, in the above embodiment, when the SDK meeting the preset condition receives the network probing URL returned by the server, but the number of times that the probing task is not executed exceeds the frequency threshold, the SDK is pulled into a blacklist distributed by the probing task in the server. Through the establishment of a blacklist system, shielding treatment can be carried out on users who do not want to participate in network testing. And whether the user wants to participate in the network test regularly can modify the setting in the APP, so that the disturbance to the user who does not want to participate in the network test is reduced, and the use experience of most users is improved.
Preferably, after the SDK executes the probing task according to the network probing URL and feeds the probing result back to the server for statistical analysis, the method further includes:
and the server side analyzes the statistical analysis result and automatically sends an alarm service to the administrator when a preset alarm threshold value is reached. Through the setting of the alarm threshold, the automation degree of the network test can be further improved.
Example two
The present embodiment provides a network test apparatus, including:
the SDK setting unit is used for integrating the SDK with the function of timing network detection task with the APP;
the heartbeat request unit is used for the SDK to regularly send a heartbeat request to the server side based on a preset period so as to obtain a network detection URL returned by the server side;
and the network detection unit is used for executing a detection task by the SDK according to the network detection URL and feeding back a detection result to the server side for statistical analysis of a network test result.
Preferably, the method further includes, between the SDK setting unit and the heartbeat requesting unit:
and the timing service unit is used for registering the timing service of the network detection task by using the AlarmManager of the SDK after the APP is started.
Compared with the prior art, the network testing device provided by the embodiment of the invention has the same beneficial effects as the network testing method provided by the first embodiment, and the detailed description is omitted here.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, performs the steps of the network testing method.
Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment are the same as those of the network testing method provided by the above technical scheme, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the invention may be implemented by hardware instructions related to a program, the program may be stored in a computer-readable storage medium, and when executed, the program includes the steps of the method of the embodiment, and the storage medium may be: ROM/RAM, magnetic disks, optical disks, memory cards, and the like.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A network testing method, comprising:
integrating the SDK with the timing network detection task function with the APP;
the SDK regularly initiates a heartbeat request to the server side based on a preset period so as to obtain a network detection URL returned by the server side;
and the SDK executes a detection task according to the network detection URL and feeds back a detection result to the server side for statistical analysis of a network test result.
2. The method according to claim 1, wherein before the SDK initiates a heartbeat request to the server based on a preset period timing to obtain the network probe URL returned by the server, the method further comprises:
and after the APP is started, registering the timing service of the network detection task through the SDK.
3. The method according to claim 1 or 2, wherein the method for the SDK to initiate a heartbeat request to the server based on the preset period timing so as to obtain the network probing URL returned by the server comprises:
after the SDK regularly sends a heartbeat request to the server side based on a preset period, the server side returns a network detection URL to the SDK meeting the preset condition based on the preset condition of the network test.
4. The method of claim 3, wherein the preset conditions include the number of test terminals, a test area, and a network operator name of the test.
5. The method according to claim 3, wherein when the SDK meeting a preset condition receives the network probing URL returned by the server, but the number of times that the probing task is not executed exceeds a frequency threshold, the SDK is pulled into a blacklist distributed by the probing task in the server.
6. The method according to claim 1 or 2, wherein the method for the SDK to execute the probing task according to the network probing URL and feed the probing result back to the server for statistical analysis of the network testing result comprises:
the SDK accesses the detection network according to the network detection URL and acquires a detection result returned by the detection network, wherein the detection result comprises a network state, signal strength and a network operator name;
and the SDK packs the detection result and the terminal parameter of the APP and sends the detection result and the terminal parameter to the server so that the server performs data statistics and analysis according to the detection result and the terminal parameter, wherein the terminal parameter comprises a system version, an application mode and terminal information.
7. The method of claim 6, wherein after the SDK performs the probing task according to the network probing URL and feeds the probing result back to the server for statistical analysis, the method further comprises:
and the server side analyzes the statistical analysis result and automatically sends an alarm service to an administrator when a preset alarm threshold value is reached.
8. A network test apparatus, comprising:
the SDK setting unit is used for integrating the SDK with the function of timing network detection task with the APP;
the heartbeat request unit is used for the SDK to regularly send a heartbeat request to the server side based on a preset period so as to obtain a network detection URL returned by the server side;
and the network detection unit is used for executing a detection task by the SDK according to the network detection URL and feeding back a detection result to the server side for statistical analysis of a network test result.
9. The apparatus according to claim 8, further comprising, between the SDK setting unit and the heartbeat requesting unit:
and the timing service unit is used for registering the timing service of the network detection task through the SDK after the APP is started.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of the claims 1 to 7.
CN202010913844.0A 2020-09-03 2020-09-03 Network testing method and device Pending CN112218325A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010913844.0A CN112218325A (en) 2020-09-03 2020-09-03 Network testing method and device
CA3129986A CA3129986A1 (en) 2020-09-03 2021-09-03 Network testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010913844.0A CN112218325A (en) 2020-09-03 2020-09-03 Network testing method and device

Publications (1)

Publication Number Publication Date
CN112218325A true CN112218325A (en) 2021-01-12

Family

ID=74048969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010913844.0A Pending CN112218325A (en) 2020-09-03 2020-09-03 Network testing method and device

Country Status (2)

Country Link
CN (1) CN112218325A (en)
CA (1) CA3129986A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363221A (en) * 2021-12-29 2022-04-15 武汉烽火信息集成技术有限公司 Heartbeat detection method based on micro-service system, storage medium, electronic device and system

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135729B (en) * 2023-01-20 2024-05-24 荣耀终端有限公司 Multi-device cooperation method, system and terminal device
CN117639906B (en) * 2024-01-26 2024-04-12 成都星联芯通科技有限公司 Method, device and system for testing performance of gateway station under high-orbit satellite broadband

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150067155A1 (en) * 2013-08-29 2015-03-05 Tune, Inc. Systems and methods for measuring approximate engagement of users in a software application
CN107832210A (en) * 2017-10-27 2018-03-23 广州四三九九信息科技有限公司 Access method of testing, device and a server are buried in daily record
CN110659185A (en) * 2019-10-09 2020-01-07 云南电网有限责任公司信息中心 Mobile APP user experience monitoring method based on real user perception

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150067155A1 (en) * 2013-08-29 2015-03-05 Tune, Inc. Systems and methods for measuring approximate engagement of users in a software application
CN107832210A (en) * 2017-10-27 2018-03-23 广州四三九九信息科技有限公司 Access method of testing, device and a server are buried in daily record
CN110659185A (en) * 2019-10-09 2020-01-07 云南电网有限责任公司信息中心 Mobile APP user experience monitoring method based on real user perception

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363221A (en) * 2021-12-29 2022-04-15 武汉烽火信息集成技术有限公司 Heartbeat detection method based on micro-service system, storage medium, electronic device and system
CN114363221B (en) * 2021-12-29 2024-05-03 武汉烽火信息集成技术有限公司 Heartbeat detection method, storage medium, electronic equipment and system based on micro-service system

Also Published As

Publication number Publication date
CA3129986A1 (en) 2022-03-03

Similar Documents

Publication Publication Date Title
CN112218325A (en) Network testing method and device
CN108712485B (en) Resource subscription method and device for Internet of things equipment
CN108616389B (en) Network evaluation method, equipment, storage medium and device based on cloud server
CN106294102B (en) Application program testing method, client, server and system
CN106534289B (en) Automatic testing method, device and system
CN105868040A (en) Log collection method and collection terminal
CN109660426B (en) Monitoring method and system, computer readable medium and electronic device
CN110830280B (en) Micro-service gateway device and method and electronic equipment
CN110855772B (en) Cross-device data storage method, system, device, server and medium
CN110245020B (en) Mobile phone content forensics method and system based on multiple forensics devices
CN111611140B (en) Report verification method and device for buried point data, electronic equipment and storage medium
CN113055225B (en) Network fault analysis data acquisition method, terminal and server
CN105607994A (en) Mobile terminal software testing method and system
CN114422254B (en) Cloud honey deployment method and device, cloud honey server and readable storage medium
CN109041267B (en) Network connection fault processing method and device and electronic equipment
CN108512682B (en) Method and device for determining false terminal identification
CN112118151A (en) Network speed measuring method, device, system, electronic equipment and storage medium
CN108306790B (en) Application flow monitoring method and device and Android equipment
KR20220146557A (en) Network Monitoring at the Service Enabler Architecture Layer (SEAL)
CN111130948A (en) Network quality detection method and device
CN111596942A (en) Method and device for forcibly triggering software upgrading and software upgrading system
CN109495331B (en) System monitoring method and device of network management system
CN111478901B (en) Account weak password detection method and device, server and storage medium
CN111147445B (en) Packet capturing method, device, system and storage medium
CN113422784A (en) Login certificate updating method and device, computer equipment and storage medium

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: 20210112