CN111494938B - Speed measuring method and device, storage medium and electronic device - Google Patents
Speed measuring method and device, storage medium and electronic device Download PDFInfo
- Publication number
- CN111494938B CN111494938B CN202010350590.6A CN202010350590A CN111494938B CN 111494938 B CN111494938 B CN 111494938B CN 202010350590 A CN202010350590 A CN 202010350590A CN 111494938 B CN111494938 B CN 111494938B
- Authority
- CN
- China
- Prior art keywords
- game
- speed
- speed measurement
- task
- measured
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 238000005259 measurement Methods 0.000 claims abstract description 350
- 230000001133 acceleration Effects 0.000 claims abstract description 200
- 238000012360 testing method Methods 0.000 claims abstract description 19
- 230000004044 response Effects 0.000 claims description 40
- 238000004590 computer program Methods 0.000 claims description 19
- 238000000691 measurement method Methods 0.000 claims description 5
- 238000000827 velocimetry Methods 0.000 claims 2
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000012545 processing Methods 0.000 description 20
- 230000008569 process Effects 0.000 description 14
- 230000005540 biological transmission Effects 0.000 description 13
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0894—Packet rate
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/30—Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
- A63F13/35—Details of game servers
- A63F13/358—Adapting the game course according to the network or server load, e.g. for reducing latency due to different connection speeds between clients
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a speed measuring method, a speed measuring device, a storage medium and an electronic device. The method comprises the following steps: after the fact that the accelerator client program starts to run is determined, starting a preset speed measuring thread, wherein the preset speed measuring thread is used for measuring the speed of an acceleration node associated with a game to be measured; generating a first game speed measuring task according to the current game to be measured in an idle period of the accelerator client program; based on the first game speed measuring task, acquiring acceleration node information associated with the current game to be measured from a server; and adopting a preset speed measuring thread to measure the speed according to the accelerating node information. The invention solves the technical problems that the overall time consumption of the test mode for executing the speed measurement on all acceleration nodes in each time provided in the related technology is too long, so that the waiting time of a user is too long, and the game acceleration experience of the user is greatly influenced.
Description
Technical Field
The invention relates to the field of computers, in particular to a speed measuring method, a speed measuring device, a storage medium and an electronic device.
Background
Currently, during the acceleration process of a game, an optimal acceleration node is generally selected to accelerate the game to the greatest extent. Therefore, the speed measurement of the acceleration node becomes a crucial operation step. In other words, the speed measurement result will directly affect the acceleration effect judgment of the accelerator client on the acceleration node. Whereas mainstream games on the market are typically configured with hundreds or thousands of acceleration nodes, if the speed measurement is performed on all the acceleration nodes at a time, a lot of time is inevitably spent, which causes the waiting time of the user to be too long, thereby greatly affecting the game acceleration experience of the user. Moreover, with the increasing number of acceleration nodes, the disadvantage of performing speed measurement on all acceleration nodes each time is more obvious, and thus the game acceleration experience of the user is further deteriorated. Therefore, how to accelerate the speed measurement process of the acceleration node becomes a technical problem to be solved.
Accelerators provided in the related art are generally only able to solve the speed measurement problem of acceleration nodes from the display level, for example: in the display interface, if the speed measurement is completed on one acceleration node, the acceleration node is displayed in the display interface, however, the obvious defect of this operation mode is that: the overall time taken to perform the speed measurement for all accelerating nodes is still not reduced.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
At least some embodiments of the present invention provide a speed measurement method, apparatus, storage medium, and electronic device, so as to at least solve the technical problem that the overall time consumption of a test method for measuring speed of all acceleration nodes in each time provided in the related art is too long, which is easy to cause too long waiting time of a user, thereby greatly affecting the game acceleration experience of the user.
According to one embodiment of the present invention, there is provided a speed measuring method including:
After the fact that the accelerator client program starts to run is determined, starting a preset speed measuring thread, wherein the preset speed measuring thread is used for measuring the speed of an acceleration node associated with a game to be measured; generating a first game speed measuring task according to the current game to be measured in an idle period of the accelerator client program; based on the first game speed measuring task, acquiring acceleration node information associated with the current game to be measured from a server; and adopting a preset speed measuring thread to measure the speed according to the accelerating node information.
Optionally, generating the first game speed measurement task according to the current game to be measured includes: obtaining a game list to be tested, wherein the game list to be tested comprises: the games to be tested are arranged in a game list to be tested according to the adding sequence in the accelerator client program; and selecting the current game to be measured from the game list to be measured according to the arrangement sequence of the games to be measured in the game list to be measured so as to determine a first game speed measuring task.
Optionally, according to the accelerating node information, measuring the speed by adopting a preset speed measuring thread includes: determining a plurality of acceleration nodes associated with the current game to be measured according to the acceleration node information; and testing each acceleration node in the plurality of acceleration nodes by adopting a preset speed measuring thread.
Optionally, the testing each acceleration node in the plurality of acceleration nodes by adopting a preset speed measurement thread includes: a preset speed measuring thread is adopted to respectively send a single request data packet to each acceleration node in a plurality of acceleration nodes, and the packet sending time of the single request data packet is recorded; receiving a single response data packet returned by each acceleration node in a plurality of acceleration nodes by adopting a preset speed measuring thread, and recording the packet receiving time of the single response data packet; and calculating a speed measurement result based on the packet sending time and the packet receiving time.
Optionally, the testing each acceleration node in the plurality of acceleration nodes by adopting a preset speed measurement thread includes: a preset speed measuring thread is adopted to respectively send a plurality of request data packets to each acceleration node in a plurality of acceleration nodes, and the packet sending time of each request data packet in the plurality of request data packets is recorded; a preset speed measuring thread is adopted to respectively receive a plurality of response data packets returned by each acceleration node in a plurality of acceleration nodes, and the packet receiving time of each response data packet in the plurality of response data packets is recorded; calculating a plurality of speed measurement intermediate values based on the packet sending time of each request data packet and the packet receiving time of the corresponding response data packet; and carrying out mean value operation on the plurality of speed measurement intermediate values to obtain a speed measurement result.
Optionally, the method further comprises: responding to the speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction; determining that the first game speed measurement task is in an intermittent execution state, and acquiring a speed measurement result set after the first game speed measurement task is executed; and determining that the game corresponding to the second game speed measurement task is contained in a speed measurement result set, selecting a speed measurement result corresponding to the second game speed measurement task from the speed measurement result set, and feeding back the speed measurement result.
Optionally, the method further comprises: responding to the speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction; determining that the first game speed measurement task is in an intermittent execution state, and acquiring a speed measurement result set after the first game speed measurement task is executed; and determining that the game corresponding to the second game speed measurement task is not contained in the speed measurement result set, executing the second game speed measurement task, obtaining a speed measurement result corresponding to the second game speed measurement task, and feeding back the speed measurement result.
Optionally, the method further comprises: responding to the speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction; determining that the first game speed measuring task is in an executing state, and determining that the game corresponding to the first game speed measuring task and the game corresponding to the second game speed measuring task are the same game; after the execution of the first game speed measuring task is finished, acquiring a speed measuring result corresponding to the first game speed measuring task and feeding back the speed measuring result.
Optionally, the method further comprises: responding to the speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction; determining that the first game speed measuring task is in an executing state, and determining that the game corresponding to the first game speed measuring task and the game corresponding to the second game speed measuring task are different games; and pausing the first game speed measuring task, executing the second game speed measuring task, and after the execution of the second game speed measuring task is finished, acquiring a speed measuring result corresponding to the second game speed measuring task and feeding back the speed measuring result.
Optionally, after the speed measurement is performed by adopting a preset speed measurement thread according to the acceleration node information, the method further includes: judging whether the speed measurement of a plurality of games to be measured in the game list to be measured is finished, if not, sequentially measuring the speed according to the arrangement sequence in the game list to be measured until the speed measurement of the games to be measured is finished; if so, stopping measuring the speed within the first preset time.
Optionally, the method further comprises: after the second preset time length, acquiring an updated to-be-measured game list, and re-measuring the speed according to the latest arrangement sequence of each to-be-measured game in the updated to-be-measured game list.
Optionally, the method further comprises: and responding to the currently received speed measurement stopping instruction, interrupting the speed measurement of the first game speed measurement task, and exiting the preset speed measurement thread.
According to one embodiment of the present invention, there is also provided a speed measuring device including:
The starting module is used for starting a preset speed measuring thread after the accelerator client program is determined to start running, wherein the preset speed measuring thread is used for measuring the speed of the acceleration node associated with the game to be measured; the first acquisition module is used for generating a first game speed measurement task according to the current game to be measured in an idle period of the accelerator client program; the second acquisition module is used for acquiring acceleration node information related to the current game to be measured from the server based on the first game speed measurement task; and the speed measuring module is used for measuring the speed by adopting a preset speed measuring thread according to the accelerating node information.
Optionally, the first acquisition module includes: an obtaining unit, configured to obtain a to-be-measured game list, where the to-be-measured game list includes: the games to be tested are arranged in a game list to be tested according to the adding sequence in the accelerator client program; the first determining unit is used for selecting the current to-be-measured speed game from the to-be-measured speed game list according to the arrangement sequence of the to-be-measured speed games in the to-be-measured speed game list so as to determine a first game speed measuring task.
Optionally, the speed measuring module includes: a second determining unit, configured to determine a plurality of acceleration nodes associated with the current game to be measured according to the acceleration node information; the speed measuring unit is used for testing each acceleration node in the plurality of acceleration nodes by adopting a preset speed measuring thread.
Optionally, the speed measurement unit is configured to send a single request data packet to each acceleration node in the plurality of acceleration nodes by using a preset speed measurement thread, and record a packet sending time of the single request data packet; receiving a single response data packet returned by each acceleration node in a plurality of acceleration nodes by adopting a preset speed measuring thread, and recording the packet receiving time of the single response data packet; and calculating a speed measurement result based on the packet sending time and the packet receiving time.
Optionally, the speed measurement unit is configured to send a plurality of request data packets to each acceleration node in the plurality of acceleration nodes by using a preset speed measurement thread, and record a packet sending time of each request data packet in the plurality of request data packets; a preset speed measuring thread is adopted to respectively receive a plurality of response data packets returned by each acceleration node in a plurality of acceleration nodes, and the packet receiving time of each response data packet in the plurality of response data packets is recorded; calculating a plurality of speed measurement intermediate values based on the packet sending time of each request data packet and the packet receiving time of the corresponding response data packet; and carrying out mean value operation on the plurality of speed measurement intermediate values to obtain a speed measurement result.
Optionally, the apparatus further includes: the third acquisition module is used for responding to the speed measurement starting instruction and generating a second game speed measurement task according to the game corresponding to the speed measurement starting instruction; the first processing module is used for determining that the first game speed measurement task is in an intermittent execution state and acquiring a speed measurement result set after the first game speed measurement task is executed; and determining that the game corresponding to the second game speed measurement task is contained in a speed measurement result set, selecting a speed measurement result corresponding to the second game speed measurement task from the speed measurement result set, and feeding back the speed measurement result.
Optionally, the first processing module is further configured to determine that the first game speed measurement task is in an intermittent execution state, and obtain a speed measurement result set after the first game speed measurement task is executed; and determining that the game corresponding to the second game speed measurement task is not contained in the speed measurement result set, executing the second game speed measurement task, obtaining a speed measurement result corresponding to the second game speed measurement task, and feeding back the speed measurement result.
Optionally, the first processing module is further configured to determine that the first game speed measurement task is in an executing state, and determine that a game corresponding to the first game speed measurement task and a game corresponding to the second game speed measurement task are the same game; after the execution of the first game speed measuring task is finished, acquiring a speed measuring result corresponding to the first game speed measuring task and feeding back the speed measuring result.
Optionally, the first processing module is further configured to determine that the first game speed measurement task is in an executing state, and determine that a game corresponding to the first game speed measurement task and a game corresponding to the second game speed measurement task are different games; and pausing the first game speed measuring task, executing the second game speed measuring task, and after the execution of the second game speed measuring task is finished, acquiring a speed measuring result corresponding to the second game speed measuring task and feeding back the speed measuring result.
Optionally, the apparatus further includes: the second processing module is used for judging whether the speed measurement of the games to be measured in the game list to be measured is finished or not, if not, sequentially measuring the speed according to the arrangement sequence in the game list to be measured until the speed measurement of the games to be measured is finished; if so, stopping measuring the speed within the first preset time.
Optionally, the apparatus further includes: and the third processing module is used for acquiring an updated game list to be measured after the second preset time length, and re-measuring the speed according to the latest arrangement sequence of each game to be measured in the updated game list to be measured.
Optionally, the apparatus further includes: and the fourth processing module is used for responding to the currently received speed measurement stopping instruction, interrupting the speed measurement of the first game speed measurement task and exiting the preset speed measurement thread.
According to one embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described speed measuring method when run.
According to an embodiment of the present invention, there is also provided a processor for running a program, wherein the program is configured to execute the above speed measurement method when running.
According to one embodiment of the present invention, there is also provided an electronic device including a memory having a computer program stored therein and a processor configured to run the computer program to perform the above-described speed measuring method.
In at least some embodiments of the present invention, after the accelerator client program is determined to start running, a preset speed measurement thread is started, where the preset speed measurement thread is used to measure the speed of the acceleration node associated with the game to be measured, by generating a first game speed measurement task according to the current game to be measured in an idle period of the accelerator client program, acquiring acceleration node information associated with the current game to be measured from a server based on the first game speed measurement task, and measuring the speed of the acceleration node by using the preset speed measurement thread according to the acceleration node information, a purpose of significantly reducing a time consumed by a user for measuring the speed of the acceleration node in an acceleration game process is achieved, thereby achieving a technical effect of reducing a preparation time before the user accelerates the game, finding an optimal acceleration node for the user at maximum, and improving an acceleration experience of the user using the accelerator, and further solving a technical problem that a test mode provided in a related technology for executing speed measurement on all acceleration nodes each time is generally excessively long, so that a waiting time of the user is easily caused, and the game acceleration experience of the user is greatly affected.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a method of measuring speed according to one embodiment of the invention;
FIG. 2 is a schematic diagram of an accelerator client program interface according to an alternative embodiment of the invention;
FIG. 3 is a flow chart of a method of measuring speed according to an alternative embodiment of the present invention;
FIG. 4 is a block diagram of a speed measuring device according to one embodiment of the present invention;
Fig. 5 is a block diagram of a speed measuring device according to an alternative embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, partial terms or terminology appearing in describing at least some embodiments of the invention are applicable to the following explanation:
(1) Internet Protocol (IP) addresses are a unified address format provided by the IP protocol that assigns a logical address to each network and each host on the internet to mask differences in physical addresses.
(2) The acceleration node, also called node server, when accessing the target game server, the network data that the user wishes to upload to the target game server needs to be forwarded by the acceleration node, thereby completing the acceleration effect.
(3) Network delay refers to the fact that in the process of transmitting different types of network data through a network protocol in a network medium, if the amount of the transmitted network data is too large to be limited, the excessive transmission of the network data can cause slow response of equipment, so that network delay is caused.
(4) The Ping value is an important index for checking network delay between the user equipment and the acceleration node, and smaller Ping value indicates better current network condition.
(5) The internet control message protocol (Internet Control Message Protocol, abbreviated ICMP) is a sub-protocol of the Transmission Control Protocol (TCP)/IP protocol family for passing control messages between IP hosts and routers. The control message generally includes: whether the network is clear, whether the host is reachable, whether a route is available, etc.
(6) The idle period refers to a segment duration in an idle state after the accelerator client program starts running. The accelerator client program enters an operating state to perform a game acceleration task whenever it receives an acceleration control instruction, without performing the game acceleration task in an idle state.
According to one embodiment of the present invention, there is provided an embodiment of a method of measuring speed, it being noted that the steps shown in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
The method embodiments may be performed in a mobile terminal, a computer terminal, or similar computing device. Taking the Mobile terminal as an example, the Mobile terminal can be a smart phone (such as an Android Mobile phone, an iOS Mobile phone, etc.), a tablet computer, a palm computer, a Mobile internet device (Mobile INTERNET DEVICES, MID), a PAD, etc. A mobile terminal may include one or more processors (which may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processor (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may further include a transmission device, an input/output device, and a display device for a communication function. It will be appreciated by those of ordinary skill in the art that the foregoing structural descriptions are merely illustrative and are not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than the above structural description, or have a different configuration than the above structural description.
The memory may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to the speed measurement method in the embodiment of the present invention, and the processor executes the computer program stored in the memory, thereby performing various functional applications and data processing, that is, implementing the speed measurement method described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory may further include memory remotely located with respect to the processor, the remote memory being connectable to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through the base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
Display devices may be, for example, touch screen type Liquid Crystal Displays (LCDs) and touch displays (also referred to as "touch screens" or "touch display screens"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI), and the user may interact with the GUI by touching finger contacts and/or gestures on the touch-sensitive surface, where the man-machine interaction functions optionally include the following interactions: executable instructions for performing the above-described human-machine interaction functions, such as creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving electronic mail, talking interfaces, playing digital video, playing digital music, and/or web browsing, are configured/stored in a computer program product or readable storage medium executable by one or more processors.
In this embodiment, a speed measuring method for operating the mobile terminal is provided, fig. 1 is a flowchart of a speed measuring method according to one embodiment of the present invention, and as shown in fig. 1, the flowchart includes the following steps:
Step S10, after determining that an accelerator client program starts to run, starting a preset speed measuring thread, wherein the preset speed measuring thread is used for measuring the speed of an acceleration node associated with a game to be measured;
Step S11, generating a first game speed measurement task according to a current game to be measured in an idle period of an accelerator client program;
Step S12, based on a first game speed measurement task, acquiring acceleration node information associated with a current game to be measured from a server;
And S13, measuring the speed by adopting a preset speed measuring thread according to the accelerating node information.
According to the method, after the accelerator client program is determined to start running, a preset speed measuring thread is started, the preset speed measuring thread is used for measuring the speed of the acceleration node related to the game to be measured, a first game speed measuring task is generated according to the current game to be measured in an idle period of the accelerator client program, acceleration node information related to the current game to be measured is acquired from a server based on the first game speed measuring task, and the speed of the acceleration node is measured according to the acceleration node information by adopting the preset speed measuring thread, so that the aim of remarkably reducing the time consumed by a user for measuring the speed of the acceleration node in the process of accelerating the game is fulfilled, the technical effects of reducing the preparation time before the user accelerates the game, finding the optimal acceleration node for the user at the highest speed, and improving the acceleration experience of the user using the accelerator are achieved, and the technical problems that the overall time consumed by the test mode of executing the speed measurement on all the acceleration nodes each time is too long in the related technology are solved, the waiting time of the user is too long, and the game acceleration experience of the user is greatly influenced are easily achieved.
Alternatively, the main body of execution of the above steps may be an electronic device such as a mobile terminal, a computer terminal, or the like, but is not limited thereto.
As can be seen from an analysis of the user's behavior in using the accelerator, there are typically two general operations that a user has after opening the accelerator client program:
After the first operation is started and the accelerator client program is operated, the accelerator client program is kept in an on-hook state all the time;
for example: the accelerator client program is set to a power-on auto-start program or the user does not stop running the accelerator client program although the acceleration function is stopped after the user has previously used the accelerator client program for acceleration operation.
And secondly, after the acceleration of the game is finished, performing minimization processing on the accelerator client program, and then executing other normal game operations.
It follows that there are a large number of idle periods available for accelerator client programs. That is, the idle period can be fully utilized to speed up the speed of the accelerating node.
After double clicking the accelerator client program icon, the user may appear in the accelerator client program interface within the graphical user interface. After the accelerator client program is started, starting a preset speed measuring thread asynchronously in the background of the operating system to execute speed measurement of the accelerating node.
The server may be any one of the plurality of acceleration nodes, or may be a separate server independent of all acceleration nodes. The server is responsible for configuring acceleration node information associated with each game to be measured, wherein the acceleration node information may include, but is not limited to:
(1) Acceleration node attribute information describing attribute information of acceleration nodes, for example: accelerating the attribute information of the node such as the operators and the like in the area where the node is currently located.
(2) Acceleration node Identification (ID) information for representing the uniqueness of each acceleration node so as to be distinguished from other acceleration nodes.
(3) Acceleration node address information for connecting the IP address of the acceleration node.
(4) Acceleration node port information for connecting a port number of the acceleration node.
(5) And the acceleration mode information adopted by the acceleration nodes is used for recording the current acceleration mode adopted by each acceleration node. For example: route acceleration mode, proxy acceleration mode.
The accelerator client program may send an acceleration node acquisition request to the server prior to performing the game acceleration operation, for example: a hypertext transfer protocol (HTTP) request to request from a server configuration information related to an acceleration node associated with a current game to be measured. After receiving the acceleration node acquisition request sent by the accelerator client program, the server may send the pre-configured acceleration node information to the accelerator client program. The acceleration node information may be in a format preset by the server side, or in a format preset by both the server and the accelerator client program, for example: the server sends acceleration node information to the accelerator client program in json format, an exemplary content of which is as follows:
optionally, in step S11, acquiring the first game speed measurement task may include performing the steps of:
Step S111, a game list to be measured is obtained, wherein the game list to be measured comprises: the games to be tested are arranged in a game list to be tested according to the adding sequence in the accelerator client program;
step S112, selecting the current game to be measured from the game list to be measured according to the arrangement sequence of the games to be measured in the game list to be measured so as to determine a first game speed measuring task.
In an alternative embodiment, first, the accelerator client program obtains a list of games to be tested for which the speed measurement is not completed currently according to the order in which the games to be tested are added by the current user. Secondly, the accelerator client program selects the first to-be-measured game (namely the to-be-measured game added by the user first) from the game list, and requests to acquire acceleration node information associated with the to-be-measured game from the server. Then, after receiving the accelerating node information returned by the server, the accelerator client program stores the accelerating node information into the memory so as to carry out subsequent accelerating node speed measurement.
FIG. 2 is a schematic diagram of an accelerator client program interface according to an alternative embodiment of the present invention, as shown in FIG. 2, including games 1,2 and 3 that wish to accelerate, wherein the user adds game 1 first, game 2 second and game 3 last. Therefore, game 1, game 2 and game 3 constitute a plurality of games to be tested in the above list of games to be tested. The accelerator client program may select the top game 1 from the game list and request the server to obtain acceleration node information associated with game 1. Then, after receiving the accelerating node information returned by the server, the accelerator client program stores the accelerating node information into the memory so as to carry out subsequent accelerating node speed measurement.
Optionally, in step S13, according to the accelerating node information, performing the speed measurement by using a preset speed measurement thread may include the following steps:
step S131, determining a plurality of acceleration nodes associated with the current game to be measured according to the acceleration node information;
Step S132, testing each acceleration node in the plurality of acceleration nodes by adopting a preset speed measuring thread.
After the accelerator client program is started, the server may be requested for associated acceleration node information (which may be a list of acceleration nodes) by selecting the top-ranked game to be measured. After the accelerating node list is obtained, the accelerator client program respectively tests the speed of each accelerating node in the accelerating node list, and then stores the speed testing results of the accelerating nodes into a preset storage area (such as a memory).
Optionally, in step S132, testing each acceleration node of the plurality of acceleration nodes by using a preset speed measurement thread may include the following steps:
Step S1321, a preset speed measuring thread is adopted to respectively send a single request data packet to each acceleration node in a plurality of acceleration nodes, and the packet sending time of the single request data packet is recorded;
Step S1322, respectively receiving a single response data packet returned by each acceleration node in a plurality of acceleration nodes by adopting a preset speed measuring thread, and recording the packet receiving time of the single response data packet;
step S1323, calculating a speed measurement result based on the packet sending time and the packet receiving time.
When the accelerator client program adopts a preset speed measuring thread to measure the speed of the accelerating node, any one protocol of ICMP protocol, TCP protocol and User Datagram Protocol (UDP) protocol can be selected. The terminal where the accelerator client program is located may send a request packet to each of the plurality of accelerator nodes, and record the current packet sending time t1. When the accelerator client program receives a response data packet returned by each acceleration node in the plurality of acceleration nodes, the current packet receiving time t2 is recorded. Therefore, the speed measurement result (also commonly referred to as a ping value) between the terminal where the accelerator client program is located and the acceleration node is the difference between T2 and T1 divided by 2, i.e. t= (T2-T1)/2.
Optionally, in step S132, testing each acceleration node of the plurality of acceleration nodes by using a preset speed measurement thread may include the following steps:
step S1324, a preset speed measuring thread is adopted to respectively send a plurality of request data packets to each acceleration node in a plurality of acceleration nodes, and the packet sending time of each request data packet in the plurality of request data packets is recorded;
Step S1325, a preset speed measuring thread is adopted to respectively receive a plurality of response data packets returned by each acceleration node in a plurality of acceleration nodes, and the packet receiving time of each response data packet in the plurality of response data packets is recorded;
Step S1326, calculating a plurality of speed measurement intermediate values based on the packet sending time of each request data packet and the packet receiving time of the corresponding response data packet;
And step S1327, carrying out mean value operation on the plurality of speed measurement intermediate values to obtain a speed measurement result.
Of course, in order to ensure that the speed measurement result is more accurate, the terminal where the accelerator client program is located may continuously send a plurality of request data packets to each acceleration node, and receive a plurality of response data packets returned by each acceleration node. Then, a plurality of speed measurement intermediate values can be obtained by recording the packet sending time of each request data packet sent to each acceleration node and the packet receiving time of the corresponding response data packet. And finally, determining an average value of the plurality of speed measurement intermediate values as a final speed measurement result, namely the ping value of the current acceleration node.
For example: the terminal where the accelerator client program is located transmits the request packet 1 to the accelerator node 1 at the packet transmission time t11, transmits the request packet 2 to the accelerator node 1 at the packet transmission time t12, transmits the request packet 3 to the accelerator node 1 at the packet transmission time t13, and transmits the request packet 4 to the accelerator node 1 at the packet transmission time t 14. Then, the terminal where the accelerator client program is located receives the response data packet 1 returned by the accelerator node 1 at the packet receiving time t21, receives the response data packet 2 returned by the accelerator node 1 at the packet receiving time t22, receives the response data packet 3 returned by the accelerator node 1 at the packet receiving time t23, and receives the response data packet 4 returned by the accelerator node 1 at the packet receiving time t 24. Therefore, the terminal where the accelerator client program is located can calculate 4 speed measurement intermediate values, which are respectively: t1= (T21-T11)/2, t2= (T22-T12)/2, t3= (T23-T13)/2, t4= (T24-T14)/2. Finally, the speed measurement result between the terminal where the accelerator client program is located and the acceleration node is: t= (t1+t2+t3+t4)/4.
Optionally, the method may further include the following steps:
step S14-1, responding to a speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction;
step S15-1, determining that a first game speed measurement task is in an intermittent execution state, and acquiring a speed measurement result set after the first game speed measurement task is executed;
step S16-1, determining that the game corresponding to the second game speed measurement task is contained in a speed measurement result set, selecting a speed measurement result corresponding to the second game speed measurement task from the speed measurement result set, and feeding back the speed measurement result.
In the process of measuring the speed of the acceleration node, a "queue-up" phenomenon may be encountered, that is, in the process of measuring the speed of the current speed-measuring game, the user clicks the game acceleration button suddenly to send a speed-measuring start command, which is equivalent to temporarily inserting an urgent game speed-measuring task (that is, the second game speed-measuring task generated according to the game corresponding to the speed-measuring start command). At this time, first, it is necessary to determine whether the first game speed measurement task is in an executing state. If it is determined that the first game speed measurement task is in an intermittent state of execution (which refers to a blank period when a single game speed measurement task is interrupted, or a transition period between adjacent game speed measurement tasks, or a blank period when an original game speed measurement task is completely executed and a new game speed measurement task is not yet determined, for example, a blank period when a previous game corresponding to the first game speed measurement task is already finished and a next game is not yet started to measure speed, or a blank period when a game corresponding to the first game speed measurement task is already finished, waiting for ending the first game speed measurement task, and the like), a speed measurement result set after the first game speed measurement task is already executed is obtained. For example: the speed measurement result set comprises: game 1 corresponds to speed measurement result 1, game 2 corresponds to speed measurement result 2, game 3 corresponds to speed measurement result 3 and game 4 corresponds to speed measurement result 4. And then judging whether the game corresponding to the second game speed measuring task is contained in the speed measuring result set. If the game corresponding to the second game speed measurement task is determined to be contained in the speed measurement result set, selecting a speed measurement result corresponding to the second game speed measurement task from the speed measurement result set, and feeding back the speed measurement result. For example: when the game corresponding to the second game speed measurement task is game 2, a speed measurement result 2 corresponding to the second game speed measurement task can be selected from the speed measurement result set, and the speed measurement result 2 is fed back.
Optionally, the method may further include the following steps:
step S14-2, responding to the speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction;
Step S15-2, determining that the first game speed measurement task is in an intermittent execution state, and acquiring a speed measurement result set after the first game speed measurement task is executed;
And S16-2, determining that the game corresponding to the second game speed measurement task is not contained in the speed measurement result set, executing the second game speed measurement task, obtaining the speed measurement result corresponding to the second game speed measurement task, and feeding back the speed measurement result.
And in the process of judging whether the first game speed measurement task is in the executing state or not, if the first game speed measurement task is determined to be in the executing intermittent state, acquiring a speed measurement result set after the first game speed measurement task is executed. For example: the speed measurement result set comprises: game 1 corresponds to speed measurement result 1, game 2 corresponds to speed measurement result 2, game 3 corresponds to speed measurement result 3 and game 4 corresponds to speed measurement result 4. And then judging whether the game corresponding to the second game speed measuring task is contained in the speed measuring result set. If the game corresponding to the second game speed measurement task is determined not to be contained in the speed measurement result set (for example, the game corresponding to the second game speed measurement task is game 5), the second game speed measurement task is started to be preferentially executed, a speed measurement result 5 corresponding to the second game speed measurement task is obtained, and the speed measurement result 5 is fed back.
Optionally, the method may further include the following steps:
Step S14-3, responding to the speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction;
Step S15-3, determining that the first game speed measuring task is in an executing state, and determining that the game corresponding to the first game speed measuring task and the game corresponding to the second game speed measuring task are the same game;
And S16-3, after the execution of the first game speed measuring task is finished, acquiring a speed measuring result corresponding to the first game speed measuring task and feeding back the speed measuring result.
In the process of judging whether the first game speed measuring task is in the executing state, if the first game speed measuring task is determined to be in the executing state, whether the game corresponding to the first game speed measuring task and the game corresponding to the second game speed measuring task are the same game needs to be further judged. If the game corresponding to the first game speed measurement task and the game corresponding to the second game speed measurement task are the same (for example, the game corresponding to the first game speed measurement task is game 5 and the game corresponding to the second game speed measurement task is game 5), the first game speed measurement task is continuously executed, so that after the execution of the first game speed measurement task is finished, a speed measurement result corresponding to the first game speed measurement task is obtained, and a speed measurement result is fed back.
Optionally, the method may further include the following steps:
step S14-4, responding to the speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction;
Step S15-4, determining that the first game speed measuring task is in an executing state, and determining that the game corresponding to the first game speed measuring task and the game corresponding to the second game speed measuring task are different games;
And S16-4, suspending the first game speed measuring task, executing the second game speed measuring task, and after the execution of the second game speed measuring task is finished, acquiring a speed measuring result corresponding to the second game speed measuring task and feeding back the speed measuring result.
On the premise that the first game speed measuring task is in the executing state, whether the game corresponding to the first game speed measuring task and the game corresponding to the second game speed measuring task are the same or not needs to be further judged. If the game corresponding to the first game speed measurement task and the game corresponding to the second game speed measurement task are determined to be different games (for example, the game corresponding to the first game speed measurement task is game 5, but the game corresponding to the second game speed measurement task is game 6), the first game speed measurement task is paused, the second game speed measurement task is preferentially executed, and after the execution of the second game speed measurement task is finished, the speed measurement result corresponding to the second game speed measurement task is obtained and the speed measurement result is fed back. The previously paused first game speed measurement task is then resumed.
Optionally, in step S13, after the speed measurement is performed by using the preset speed measurement thread according to the acceleration node information, the following steps may be further included:
Step S17, judging whether the speed measurement of a plurality of games to be measured in the game list to be measured is finished, if not, sequentially measuring the speed according to the arrangement sequence in the game list to be measured until the speed measurement of the games to be measured is finished; if so, stopping measuring the speed within the first preset time.
The accelerator client program checks whether all the games to be tested added by the user currently have the speed measured. In consideration of the fact that in the speed measuring process of the acceleration nodes, a user may perform addition or deletion operation on the games to be measured, so that after all the acceleration nodes of one game to be measured are tested at a time, whether all the games to be measured have been measured at present needs to be further checked. And if the game to be measured for the speed measurement is available, repeatedly executing the speed measurement of the acceleration node until all the games to be measured for the speed measurement are finished. If it is determined that all the games to be measured have completed measuring the speed, a preset time period (i.e., the first preset time period is, for example, 10 minutes or 30 minutes) may be set to stop measuring the speed. Therefore, the network data transmission pressure can be relieved, the occupancy rate of network resources is reduced, and the network state tends to be stable within a period of time based on the locality principle, so that the speed measurement is not required to be carried out too frequently. Then, after the pause period is over, a new round of speed measurement is started.
Optionally, the method may further include the following steps:
step S18, after the second preset time length, acquiring an updated to-be-measured game list, and re-measuring the speed according to the latest arrangement sequence of each to-be-measured game in the updated to-be-measured game list.
In consideration of the fact that the user may add or delete the games to be tested in the game list to be tested in a period of time, in order to ensure the validity of the speed measurement result, the updated game list to be tested may be acquired at intervals (i.e. the second preset time length) and the speed measurement may be performed again according to the latest arrangement sequence of each game to be tested in the updated game list to be tested. The interval period takes the unit of minutes, for example: 10 minutes.
Optionally, the method may further include the following steps:
And step S19, in response to the currently received speed measurement stopping instruction, stopping measuring the speed of the first game speed measuring task, and exiting the preset speed measuring thread.
Under normal conditions, the user can stop executing the speed measurement when actually exiting the accelerator client program (i.e. sending a speed measurement stopping instruction), otherwise, the preset speed measurement thread can continuously run in the background of the operating system. If the speed measurement stopping function is determined, after receiving the speed measurement stopping instruction, the accelerator client program immediately interrupts the currently executed speed measurement no matter whether the current speed measurement is completed or not, and then exits the preset speed measurement thread. If the speed measurement is determined to be continuously performed, the accelerator client program can continuously acquire acceleration node information of which the speed measurement is not completed, so that the speed measurement is continuously completed.
The above-described alternative embodiments are described in further detail below in conjunction with the alternative implementation shown in fig. 3. Fig. 3 is a flowchart of a method of measuring speed according to an alternative embodiment of the present invention, as shown in fig. 3, the process may include the following steps:
In step S301, after double clicking the accelerator client program icon, the user may present the accelerator client program interface within the graphical user interface.
In step S302, after the accelerator client program is started, a preset speed measurement thread is started asynchronously in the background of the operating system to perform speed measurement of the accelerating node.
In step S303, it is determined whether the execution of the speed measurement is required to be stopped, in a normal case, the execution of the speed measurement is stopped when the user actually exits the accelerator client program (i.e. issues a speed measurement stopping instruction), otherwise, the preset speed measurement thread is continuously running in the background of the operating system. If yes, go on to step S304; if not, step S305 is continued.
In step S304, after receiving the command for stopping the speed measurement, the accelerator client program immediately interrupts the currently executed speed measurement no matter whether the current speed measurement is completed or not, and then exits the preset speed measurement thread.
In step S305, the accelerator client program obtains a game list to be tested, for which the speed measurement is not completed currently, according to the order in which the current user adds the games to be tested. Secondly, the accelerator client program selects the top-ranked game to be measured from the game list (i.e., the game to be measured that the user first adds), and requests the server to acquire acceleration node information (which may be an acceleration node list) associated with the game to be measured. Then, after receiving the accelerating node information returned by the server, the accelerator client program stores the accelerating node information into the memory so as to carry out subsequent accelerating node speed measurement.
Step S306, after the accelerating node list is obtained, the accelerator client program respectively tests the speed of each accelerating node in the accelerating node list, and then stores the speed testing results of the accelerating nodes into the memory.
Step S307, the accelerator client program checks whether all the games to be measured added by the user currently have their speed measured. In consideration of the fact that in the speed measuring process of the acceleration nodes, a user may perform addition or deletion operation on the games to be measured, so that after all the acceleration nodes of one game to be measured are tested at a time, whether all the games to be measured have been measured at present needs to be further checked. If the game to be measured for the speed measurement is still available, returning to the step S305, and repeatedly executing the speed measurement of the acceleration node until all the games to be measured for the speed measurement are completed; otherwise, step S308 is continued.
In step S308, if it is determined that all the games to be tested have completed the speed measurement, a preset period of time (e.g., 10 minutes or 30 minutes) may be set to stop the speed measurement.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiment also provides a speed measuring device, which is used for realizing the above embodiment and the preferred implementation manner, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 4 is a block diagram of a speed measuring device according to one embodiment of the present invention, as shown in fig. 4, the device includes: the starting module 10 is configured to start a preset speed measurement thread after determining that the accelerator client program starts to run, where the preset speed measurement thread is used to measure the speed of an acceleration node associated with a game to be measured; the first obtaining module 20 is configured to generate a first game speed measurement task according to a current game to be measured in an idle period of the accelerator client program; the second obtaining module 30 is configured to obtain, from the server, acceleration node information associated with a current game to be measured based on the first game speed measurement task; the speed measuring module 40 is configured to measure the speed by using a preset speed measuring thread according to the accelerating node information.
Optionally, the first acquisition module 20 includes: an acquisition unit (not shown in the figure) for acquiring a to-be-measured speed game list, wherein the to-be-measured speed game list includes: the games to be tested are arranged in a game list to be tested according to the adding sequence in the accelerator client program; a first determining unit (not shown in the figure) for selecting the current game to be measured from the list of games to be measured according to the arrangement order of the games to be measured in the list of games to be measured to determine the first game speed measuring task.
Optionally, the speed measurement module 40 includes: a second determining unit (not shown in the figure) for determining a plurality of acceleration nodes associated with the current game to be measured based on the acceleration node information; and the speed measuring unit (not shown in the figure) is used for respectively testing each acceleration node in the plurality of acceleration nodes by adopting a preset speed measuring thread.
Optionally, a speed measurement unit (not shown in the figure) is configured to send a single request data packet to each acceleration node in the plurality of acceleration nodes by using a preset speed measurement thread, and record a packet sending time of the single request data packet; receiving a single response data packet returned by each acceleration node in a plurality of acceleration nodes by adopting a preset speed measuring thread, and recording the packet receiving time of the single response data packet; and calculating a speed measurement result based on the packet sending time and the packet receiving time.
Optionally, a speed measurement unit (not shown in the figure) is configured to send a plurality of request data packets to each of a plurality of acceleration nodes by using a preset speed measurement thread, and record a packet sending time of each request data packet in the plurality of request data packets; a preset speed measuring thread is adopted to respectively receive a plurality of response data packets returned by each acceleration node in a plurality of acceleration nodes, and the packet receiving time of each response data packet in the plurality of response data packets is recorded; calculating a plurality of speed measurement intermediate values based on the packet sending time of each request data packet and the packet receiving time of the corresponding response data packet; and carrying out mean value operation on the plurality of speed measurement intermediate values to obtain a speed measurement result.
Alternatively, fig. 5 is a block diagram of a speed measuring device according to an alternative embodiment of the present invention, and as shown in fig. 5, the device includes, in addition to all the modules shown in fig. 4: the third obtaining module 50 is configured to respond to the speed measurement starting instruction, and generate a second game speed measurement task according to a game corresponding to the speed measurement starting instruction; the first processing module 60 is configured to determine that the first game speed measurement task is in an intermittent execution state, and obtain a speed measurement result set after the first game speed measurement task has been executed; and determining that the game corresponding to the second game speed measurement task is contained in a speed measurement result set, selecting a speed measurement result corresponding to the second game speed measurement task from the speed measurement result set, and feeding back the speed measurement result.
Optionally, the first processing module 60 is further configured to determine that the first game speed measurement task is in an intermittent execution state, and obtain a speed measurement result set after the first game speed measurement task is executed; and determining that the game corresponding to the second game speed measurement task is not contained in the speed measurement result set, executing the second game speed measurement task, obtaining a speed measurement result corresponding to the second game speed measurement task, and feeding back the speed measurement result.
Optionally, the first processing module 60 is further configured to determine that the first game speed measurement task is in an executing state, and determine that a game corresponding to the first game speed measurement task and a game corresponding to the second game speed measurement task are the same game; after the execution of the first game speed measuring task is finished, acquiring a speed measuring result corresponding to the first game speed measuring task and feeding back the speed measuring result.
Optionally, the first processing module 60 is further configured to determine that the first game speed measurement task is in an executing state, and determine that the game corresponding to the first game speed measurement task and the game corresponding to the second game speed measurement task are different games; and pausing the first game speed measuring task, executing the second game speed measuring task, and after the execution of the second game speed measuring task is finished, acquiring a speed measuring result corresponding to the second game speed measuring task and feeding back the speed measuring result.
Optionally, as shown in fig. 5, the apparatus further includes: the second processing module 70 is configured to determine whether all of the games to be tested in the to-be-tested game list have been tested, and if not, sequentially test the speed according to the arrangement sequence in the to-be-tested game list until all of the games to be tested have been tested; if so, stopping measuring the speed within the first preset time.
Optionally, as shown in fig. 5, the apparatus further includes: and the third processing module 80 is configured to obtain an updated to-be-measured game list after the second preset duration, and re-measure the speed according to the latest arrangement sequence of each to-be-measured game in the updated to-be-measured game list.
Optionally, as shown in fig. 5, the apparatus further includes: the fourth processing module 90 is configured to interrupt the speed measurement of the first game speed measurement task in response to the currently received speed measurement stopping instruction, and exit the preset speed measurement thread.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; or the above modules may be located in different processors in any combination.
An embodiment of the invention also provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, after the accelerator client program is determined to start running, starting a preset speed measuring thread, wherein the preset speed measuring thread is used for measuring the speed of an acceleration node associated with a game to be measured;
S2, generating a first game speed measuring task according to the current game to be measured in an idle period of the accelerator client program;
S3, acquiring acceleration node information associated with the current game to be measured from a server based on the first game speed measuring task;
S4, adopting a preset speed measuring thread to measure the speed according to the accelerating node information.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a read-only memory (ROM), a random access memory (Random Access Memory RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, after the accelerator client program is determined to start running, starting a preset speed measuring thread, wherein the preset speed measuring thread is used for measuring the speed of an acceleration node associated with a game to be measured;
S2, generating a first game speed measuring task according to the current game to be measured in an idle period of the accelerator client program;
S3, acquiring acceleration node information associated with the current game to be measured from a server based on the first game speed measuring task;
S4, adopting a preset speed measuring thread to measure the speed according to the accelerating node information.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a read-only memory (ROM), a random access memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (15)
1. A method of measuring speed comprising:
after the fact that the accelerator client program starts to run is determined, starting a preset speed measuring thread, wherein the preset speed measuring thread is used for measuring the speed of an acceleration node associated with a game to be measured;
generating a first game speed measuring task according to a current game to be measured in an idle period of the accelerator client program, wherein the idle period comprises a period when the accelerator client is in an on-hook state, and the current game to be measured is the first game to be measured in a list of games to be measured for which speed measurement is not completed currently;
acquiring acceleration node information associated with the current game to be measured from a server based on the first game speed measuring task;
According to the accelerating node information, adopting the preset speed measuring thread to asynchronously measure the speed of a plurality of accelerating nodes associated with the current game to be measured;
The generating the first game speed measurement task according to the current game to be measured comprises the following steps: obtaining a game list to be tested, wherein the game list to be tested comprises: the games to be tested are arranged in the game list to be tested according to the adding sequence in the accelerator client program; selecting the current game to be tested from the game list to be tested according to the arrangement sequence of the games to be tested in the game list to be tested so as to determine the first game speed measuring task;
Wherein the method further comprises: after a second preset time length, acquiring an updated game list to be measured, and re-measuring the speed according to the latest arrangement sequence of each game to be measured in the updated game list to be measured.
2. The method of claim 1, wherein using the preset tachometer thread to measure the speed according to the acceleration node information comprises:
Determining a plurality of acceleration nodes associated with the current game to be measured according to the acceleration node information;
And adopting the preset speed measuring thread to test each acceleration node in the plurality of acceleration nodes respectively.
3. The method of claim 2, wherein testing each acceleration node of the plurality of acceleration nodes with the preset velocimetry thread comprises:
Adopting the preset speed measuring thread to respectively send a single request data packet to each acceleration node in the plurality of acceleration nodes, and recording the packet sending time of the single request data packet;
Receiving a single response data packet returned by each acceleration node in the plurality of acceleration nodes by adopting the preset speed measuring thread, and recording the packet receiving time of the single response data packet;
And calculating a speed measurement result based on the packet sending time and the packet receiving time.
4. The method of claim 2, wherein testing each acceleration node of the plurality of acceleration nodes with the preset velocimetry thread comprises:
Adopting the preset speed measuring thread to respectively send a plurality of request data packets to each acceleration node in the plurality of acceleration nodes, and recording the packet sending time of each request data packet in the plurality of request data packets;
The preset speed measuring thread is adopted to respectively receive a plurality of response data packets returned by each acceleration node in the plurality of acceleration nodes, and the packet receiving time of each response data packet in the plurality of response data packets is recorded;
Calculating a plurality of speed measurement intermediate values based on the packet sending time of each request data packet and the packet receiving time of the corresponding response data packet;
and carrying out mean value operation on the plurality of speed measurement intermediate values to obtain a speed measurement result.
5. The method according to claim 1, wherein the method further comprises:
responding to a speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction;
determining that the first game speed measurement task is in an intermittent execution state, and acquiring a speed measurement result set after the first game speed measurement task is executed;
And determining that the game corresponding to the second game speed measurement task is contained in the speed measurement result set, selecting the speed measurement result corresponding to the second game speed measurement task from the speed measurement result set, and feeding back the speed measurement result.
6. The method according to claim 1, wherein the method further comprises:
responding to a speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction;
determining that the first game speed measurement task is in an intermittent execution state, and acquiring a speed measurement result set after the first game speed measurement task is executed;
And determining that the game corresponding to the second game speed measurement task is not contained in the speed measurement result set, executing the second game speed measurement task, obtaining the speed measurement result corresponding to the second game speed measurement task, and feeding back the speed measurement result.
7. The method according to claim 1, wherein the method further comprises:
responding to a speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction;
determining that the first game speed measuring task is in an executing state, and determining that the game corresponding to the first game speed measuring task and the game corresponding to the second game speed measuring task are the same game;
After the execution of the first game speed measuring task is finished, acquiring a speed measuring result corresponding to the first game speed measuring task and feeding back the speed measuring result.
8. The method according to claim 1, wherein the method further comprises:
responding to a speed measurement starting instruction, and generating a second game speed measurement task according to a game corresponding to the speed measurement starting instruction;
Determining that the first game speed measuring task is in an executing state, and determining that the game corresponding to the first game speed measuring task and the game corresponding to the second game speed measuring task are different games;
And suspending the first game speed measuring task, executing the second game speed measuring task, and after the second game speed measuring task is executed, acquiring a speed measuring result corresponding to the second game speed measuring task and feeding back the speed measuring result.
9. The method of claim 1, further comprising, after using the preset tachometer thread to measure the speed according to the acceleration node information:
judging whether the speed measurement of the games to be measured in the game list to be measured is finished or not, if not, sequentially measuring the speed according to the arrangement sequence in the game list to be measured until the speed measurement of the games to be measured is finished; if so, stopping measuring the speed within the first preset time.
10. The method according to claim 1, wherein the method further comprises:
And responding to a speed measurement stopping instruction, interrupting the speed measurement of the first game speed measurement task, and exiting the preset speed measurement thread.
11. The method of claim 1, wherein the acceleration node information comprises at least one of:
Acceleration node attribute information, acceleration node identification information, acceleration node address information, acceleration node port information, and acceleration mode information employed by the acceleration node.
12. A speed measuring device, comprising:
The starting module is used for starting a preset speed measuring thread after the accelerator client program is determined to start running, wherein the preset speed measuring thread is used for measuring the speed of the acceleration node associated with the game to be measured;
The first acquisition module is used for generating a first game speed measurement task according to a current to-be-measured game in an idle period of the accelerator client program, wherein the idle period comprises a period when the accelerator client is in an on-hook state, and the current to-be-measured game is the first to-be-measured game in a to-be-measured game list of which the speed measurement is not completed currently;
The second acquisition module is used for acquiring acceleration node information associated with the current game to be measured from a server based on the first game speed measurement task;
the speed measuring module is used for carrying out asynchronous speed measurement on a plurality of acceleration nodes associated with the current game to be measured by adopting the preset speed measuring thread according to the acceleration node information;
The first obtaining module is further configured to obtain a to-be-detected game list, where the to-be-detected game list includes: the games to be tested are arranged in the game list to be tested according to the adding sequence in the accelerator client program; selecting the current game to be tested from the game list to be tested according to the arrangement sequence of the games to be tested in the game list to be tested so as to determine the first game speed measuring task;
wherein, the speed measuring module is further used for: after a second preset time length, acquiring an updated game list to be measured, and re-measuring the speed according to the latest arrangement sequence of each game to be measured in the updated game list to be measured.
13. A storage medium having stored therein a computer program, wherein the computer program is arranged to perform the method of predictive speed measurement of an acceleration node according to any one of claims 1 to 11 at run-time.
14. A processor, characterized in that the processor is adapted to run a program, wherein the program is arranged to execute the speed measuring method as claimed in any one of claims 1 to 11 when run.
15. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the speed measurement method of any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010350590.6A CN111494938B (en) | 2020-04-28 | 2020-04-28 | Speed measuring method and device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010350590.6A CN111494938B (en) | 2020-04-28 | 2020-04-28 | Speed measuring method and device, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111494938A CN111494938A (en) | 2020-08-07 |
CN111494938B true CN111494938B (en) | 2024-04-19 |
Family
ID=71848596
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010350590.6A Active CN111494938B (en) | 2020-04-28 | 2020-04-28 | Speed measuring method and device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111494938B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112884806B (en) * | 2021-01-12 | 2022-09-02 | 昆明理工大学 | Video stream measuring method and device based on combination of block matching and intensive reverse search |
CN113181659B (en) * | 2021-05-28 | 2022-11-25 | 腾讯科技(深圳)有限公司 | Network performance evaluation method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103957209A (en) * | 2014-04-29 | 2014-07-30 | 北京奇虎科技有限公司 | Optimizer and optimizing method and system for online game |
CN110247824A (en) * | 2019-06-21 | 2019-09-17 | 网易(杭州)网络有限公司 | A kind of test method and device, electronic equipment, storage medium of gaming network |
-
2020
- 2020-04-28 CN CN202010350590.6A patent/CN111494938B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103957209A (en) * | 2014-04-29 | 2014-07-30 | 北京奇虎科技有限公司 | Optimizer and optimizing method and system for online game |
CN110247824A (en) * | 2019-06-21 | 2019-09-17 | 网易(杭州)网络有限公司 | A kind of test method and device, electronic equipment, storage medium of gaming network |
Also Published As
Publication number | Publication date |
---|---|
CN111494938A (en) | 2020-08-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108959000B (en) | Server pressure testing method, system and terminal | |
CN111494938B (en) | Speed measuring method and device, storage medium and electronic device | |
WO2017036394A1 (en) | Wifi resource processing method and system | |
CN111447107B (en) | Network state determining method and device, storage medium and electronic equipment | |
CN107005418B (en) | Red packet data processing method and terminal | |
CN110061892B (en) | Method, system, storage medium and electronic device for displaying network status in real time | |
CN112328492B (en) | Interaction control method and device between anchor and electronic equipment | |
CN112988185A (en) | Cloud application updating method, device and system, electronic equipment and storage medium | |
WO2024055840A1 (en) | Image rendering method and apparatus, device, and medium | |
WO2016188101A1 (en) | Service system test method and device | |
CN106953933B (en) | A kind of information push method and device, electronic equipment | |
CN113495843A (en) | Method and device for testing play-starting performance of video player | |
CN105471674A (en) | Method and system for testing performance of server | |
CN113346973A (en) | Event prompting method and device, electronic equipment and computer readable storage medium | |
CN113760672A (en) | Performance test method, equipment and storage medium for multi-cloud platform resources | |
CN117478524A (en) | Method, device, equipment and medium for server simulation test | |
CN110286954A (en) | A kind of the starting method, apparatus and storage medium of application program | |
WO2023193633A1 (en) | Image analysis methods and apparatuses, computer device and storage medium | |
WO2022262472A1 (en) | Frame rate processing method and apparatus, storage medium, and terminal | |
US11206156B2 (en) | Method and apparatus for storing data of transmission signal, and computer readable storage medium | |
CN115576791A (en) | Dynamic adjustment method and device for pressure measurement thread, electronic equipment and storage medium | |
CN114328153A (en) | RDMA performance test system, method, device and medium | |
CN112764837B (en) | Data reporting method, device, storage medium and terminal | |
CN117056926B (en) | File detection system, electronic equipment and storage medium | |
KR102369525B1 (en) | Apparatus, system, and method for remote connection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |