Disclosure of Invention
To solve the problem of merging data at multiple device sides. According to a first aspect of the present disclosure, there is provided a method of multi-terminal test data acquisition, comprising the steps of: A. the client acquires first data from the mobile terminal through a first connection; B. the client sends a request message including first data to the server; C. after receiving the request message, the server side sends a reply message containing a unique matching code to the mobile side; D. and the mobile terminal establishes a second connection with the client terminal or the server terminal according to the reply message and uploads second data corresponding to the mobile terminal, wherein the first data comprises an address of the mobile terminal, and the second data comprises detection data of the mobile terminal.
Further, the step D further comprises the following substeps: and the mobile terminal establishes a second connection with the client according to the reply message, uploads second data corresponding to the mobile terminal to the client, and the client combines the second data with the same matching code and uploads the second data to the server.
Further, the step D further comprises the following substeps: and the mobile terminal establishes a second connection with the server terminal according to the reply message, uploads second data corresponding to the mobile terminal to the server terminal, and the server terminal merges the second data with the same matching code for display.
Further, the match code comprises at least one of a two-dimensional code, a barcode, or a numeric match code.
Further, the first data includes a mobile phone number of the mobile terminal, and the reply message includes a short message.
Further, the first connection is a local connection and the second connection is a remote connection.
Further, the short message is stored in a form of a ciphertext.
According to a second aspect of the present disclosure, there is provided an apparatus for multi-terminal test data acquisition, comprising: the client acquires first data from the mobile terminal through first connection; the second module is used for sending a request message comprising first data to the server side by the client side; the third module is used for sending a reply message including a unique matching code to the mobile terminal after the server terminal receives the request message; and the mobile terminal establishes a second connection with the client or the server according to the reply message and uploads second data corresponding to the mobile terminal, wherein the first data comprises an address of the mobile terminal, and the second data comprises detection data of the mobile terminal.
Further, the match code comprises at least one of a two-dimensional code, a barcode, or a numeric match code.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first aspect of the present invention.
The invention has the beneficial effects that: the detection data at multiple device sides may be merged into one device side. The connection between the client and the mobile terminal can be automatically established in a short message mode, and automatic data acquisition is realized. The server side stores the detection information in a transferring manner, so that the mobile side can acquire the detection information when the client side is off line. By setting the first connection for which connection establishment is easy and the second connection for which connection establishment is complicated, the operation of establishing a complicated communication connection can be simplified. The efficiency of establishing connection is improved by detecting whether the network addresses of the client and the mobile terminal are in the same local network.
Detailed Description
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct combination or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated into two processing units, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in two computer readable storage media. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those within the specification of the present application that terms such as "first," "second," "A," "B," and the like, if not specifically stated, do not denote a limitation of order. For example, "step three" may precede "step one," and "D" may also be performed simultaneously with "a".
Referring to fig. 1 and 3, according to a first embodiment of the present disclosure, a method for multi-terminal test data collection is provided, which is based on a test system composed of a mobile terminal 100, a client terminal 200 and a server terminal 300. Illustratively, the mobile terminal 100 may be a smart phone, a tablet computer, a computer, etc., the client 200 may be a computer, and the server 300 may be a remote server. The number of the mobile terminals 100 and the number of the clients 200 may be multiple, and in the present embodiment, 1 mobile terminal 100 and 1 client 200 are taken as an example for description, but it should be understood by those skilled in the art that the technical idea of the present embodiment may be applied to a connection method including multiple mobile terminals 100 and/or multiple clients 200. The method comprises the following steps:
the client 200 collects first data from the mobile terminal 100 through a first connection; the client 200 transmits a request message including first data to the server 300; after receiving the request message, the server 300 sends a reply message including a unique matching code to the mobile terminal 100; the mobile terminal 100 establishes a second connection with the client 200 or the server 300 through the short message, and uploads second data corresponding to the mobile terminal, where the first data includes an address of the mobile terminal 100, and the second data includes detection data of the mobile terminal 100.
Specifically, for example, a data collection tool is started on a mobile phone as the mobile terminal 100 to collect information such as CPU, memory, temperature, and traffic, and a data collection tool is started on a computer as the client terminal 200, which is connected to a test mobile phone through a data line to collect detection data such as Frame Per Second (FPS) of the mobile phone and a mobile phone number of the mobile phone. After the test is completed, the computer sends detection information of the mobile terminal 100 including a measured part of the client 200, a request Message of an address of the mobile terminal 100 (for example, a mobile phone number of the mobile terminal 100) to a remote server as the server 300, the remote server generates matching information including the network address, and sends the matching information to a specified mobile phone in a Short Message Service (SMS), wherein the matching information is stored in a form of a ciphertext in the Short Message to prevent other users who see the Short Message from directly accessing or attacking the network address, and an encryption method may be, for example, Base64 encryption or the like. The mobile phone (mobile terminal 100) monitors the process of the short message service, receives the short message and decrypts the matching information, and then automatically connects to a computer (client terminal 100) or a remote server (server terminal) based on the matching information. When the handset establishes a second connection with the computer (client 200), the remote server sends a connection message including the network address of the computer to the handset, which may be a direct network address and port number, or may also include other information needed to establish the connection. The mobile phone establishes communication connection with the computer through the cellular data network and the remote network according to the connection message, and uploads second data corresponding to the mobile terminal to the client 200. The client 200 merges the second data with the same matching code and uploads the merged second data to the server 300. When the handset establishes a second connection with the remote server (server 300), the handset establishes the second connection with the remote server according to a reply message, wherein the reply message comprises data such as a network address and a port number of the remote server and the like used for establishing the connection between the handset and the remote server, the handset uploads the second data corresponding to the handset to the remote server, and the remote server combines the second data with the same matching code for display. The second data comprises detection information of the detection part of the mobile terminal, such as the CPU, the memory, the temperature, the flow and the like. The remote server stores the detection data for displaying the multiple device-side detected data in the background or on an external device accessing the remote server.
In one or more embodiments, the first connection is a local connection, such as a direct connection over a USB data connection line, or a direct peer-to-peer connection established through a network modem (e.g., a wireless network card), or a router or switch via only a Local Area Network (LAN). And the second connection is a remote connection, such as an indirect connection through a Wide Area Network (WAN) or a combination of a WAN and a cellular network. It should be noted here that the local connection and the remote connection herein do not refer to a physical distance between the client 200 and the mobile terminal 100, but a topological difference of the communication network. In general, the local connection realized by using a USB data connecting line and the like does not need complex pairing setting. The remote connection requires configuring a network address, a port, and the like, and is relatively complex to implement. This simplifies the operation of establishing a complex network connection. The first connection and the second connection may be connected in a different manner or the same manner, but with different channels.
In one or more embodiments, the network address further includes a public network IP and an internal network IP; when the public network IP and the intranet IP of the mobile terminal 100 are the same as those of the client 200, it indicates that the mobile terminal 100 and the client 200 are in the same local network, and at this time, the mobile terminal 100 establishes a P2P connection with the client 200, so as to improve the connection speed and reduce the delay. On the other hand, when the public network IP and the intranet IP of the mobile terminal 100 are different from one or both of the public network IP and the intranet IP of the client 200, it indicates that the mobile terminal 100 and the client 200 are not in the same local network, and the mobile terminal 100 and the client 200 establish a UDP connection. Thereby improving the efficiency of establishing a connection. In addition, the network address may also include an open port number.
Referring to fig. 2, according to a second embodiment of the present disclosure, a method for multi-terminal test data acquisition is provided, which is based on a test system composed of mobile terminals 100 to 103, a client 200 and a server 300. Illustratively, the mobile terminals 100 to 103 are smart phones, the client 200 is a notebook computer, and the server 300 is a remote server. This embodiment is substantially the same as the first embodiment of the present disclosure, and therefore, will not be further described herein.
According to still another embodiment of the present disclosure, there is provided a multi-terminal test data acquisition apparatus including: a first module, in which the client 200 collects first data from the mobile terminal 100 through a first connection; a second module, in which the client 200 sends a request message including first data to the server 300; a third module, after receiving the request message, the server 300 sends a reply message including a unique matching code to the mobile terminal 100; a fourth module, the mobile terminal 100 establishes a second connection with the client 200 or the server 300 according to the reply message, and uploads second data corresponding to the mobile terminal 100, where the first data includes an address of the mobile terminal 100, and the second data includes detection data of the mobile terminal 100. Wherein, the matching code comprises at least one of a two-dimensional code, a bar code or a digital matching code.
The method of operation of this embodiment is substantially the same as that of the first embodiment of the present disclosure and will not be further described herein.
According to yet another embodiment of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first embodiment of the present disclosure. The method of operation of this embodiment is substantially the same as that of the first embodiment of the present disclosure and will not be further described herein.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present invention, and all such changes or substitutions are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims. Description of reference numerals:
100. 101, 102, 103 mobile terminal
200 client
300 server side.