CN108920352B - Method and device for acquiring information - Google Patents

Method and device for acquiring information Download PDF

Info

Publication number
CN108920352B
CN108920352B CN201810841997.1A CN201810841997A CN108920352B CN 108920352 B CN108920352 B CN 108920352B CN 201810841997 A CN201810841997 A CN 201810841997A CN 108920352 B CN108920352 B CN 108920352B
Authority
CN
China
Prior art keywords
data
port
tested
application
operation instruction
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
Application number
CN201810841997.1A
Other languages
Chinese (zh)
Other versions
CN108920352A (en
Inventor
朱斌
辛庆
孙健
王芳
刘铮
殷添琦
何菁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to CN201810841997.1A priority Critical patent/CN108920352B/en
Publication of CN108920352A publication Critical patent/CN108920352A/en
Application granted granted Critical
Publication of CN108920352B publication Critical patent/CN108920352B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a method and a device for acquiring information. One embodiment of the method comprises: acquiring running state information of terminal equipment through a data channel, wherein the data channel is used for carrying out data transmission of data of a specified data type with the terminal equipment; acquiring at least one piece of process data of the application to be tested from the running state information; and responding to the monitored operation instruction corresponding to the application to be tested, and acquiring the operation parameters corresponding to the operation instruction according to the at least one piece of process data. The method and the device improve the accuracy and effectiveness of obtaining the operating parameters of the application to be tested.

Description

Method and device for acquiring information
Technical Field
The embodiment of the application relates to the technical field of data processing, in particular to a method and a device for acquiring information.
Background
With the development of science and technology, the data processing capacity of the intelligent terminal is more and more powerful. The user can execute corresponding information processing tasks through various applications installed on the intelligent terminal, and the information processing efficiency of work and life of the user is greatly improved. In order to provide better service for users, before and after the application is released, technicians need to test the applications installed on different intelligent devices to eliminate problems of the applications.
Disclosure of Invention
The embodiment of the application provides a method and a device for acquiring information.
In a first aspect, an embodiment of the present application provides a method for acquiring information, where the method includes: acquiring the running state information of the terminal equipment through a data channel, wherein the data channel is used for carrying out data transmission of data of a specified data type with the terminal equipment; acquiring at least one piece of process data of the application to be tested from the running state information; and responding to the monitored operation instruction corresponding to the application to be tested, and acquiring the operation parameters corresponding to the operation instruction according to the at least one piece of process data.
In some embodiments, the data channel is constructed by: sending port test data to the terminal equipment, wherein the port test data is used for detecting a port of the terminal equipment outputting data of a specified data type; responding to the detected port information corresponding to the port test data, and establishing a corresponding relation between a specified data type and the port information corresponding to the specified data type; and establishing a data channel between the terminal equipment and the terminal equipment based on the corresponding relation.
In some embodiments, the obtaining at least one piece of process data of the application to be tested from the running state information includes: screening at least one piece of process data of the application to be tested from the running state information according to the attribute information of the application to be tested, wherein the attribute information comprises at least one of the following items: the name of the application to be tested, the data type of the application to be tested, and the running time of the application to be tested.
In some embodiments, the obtaining, in response to the monitored operation instruction corresponding to the application to be tested and according to the at least one piece of process data, an operation parameter corresponding to the operation instruction includes: inquiring the operation attribute of the operation instruction, wherein the operation attribute comprises at least one of the following items: name of the operation instruction, and issuing time of the operation instruction; determining process data with changed data in the at least one piece of process data according to the operation attribute; acquiring output data of at least one port of the terminal equipment according to the process data and the operation attribute of which the data are changed; for a port in the at least one port, inquiring the data type of output data corresponding to the port according to the corresponding relation and the port information of the port; and constructing the operating parameters corresponding to the operating instructions through the output data and the data types corresponding to the output data.
In some embodiments, the above method further comprises: and constructing the test data of the application to be tested according to the operation parameters.
In a second aspect, an embodiment of the present application provides an apparatus for acquiring information, where the apparatus includes: an operation state information obtaining unit configured to obtain operation state information of the terminal device through a data channel, wherein the data channel is used for data transmission of data of a specified data type with the terminal device; the process data acquisition unit is configured to acquire at least one piece of process data of the application to be tested from the running state information; and the operation parameter acquisition unit is configured to respond to the monitored operation instruction corresponding to the application to be tested and acquire the operation parameter corresponding to the operation instruction according to the at least one piece of process data.
In some embodiments, the apparatus includes a data channel construction unit configured to construct a data channel, the data channel construction unit including: a port test data transmitting subunit configured to transmit port test data to the terminal device, where the port test data is used to detect a port at which the terminal device outputs data of a specified data type; a correspondence relation construction subunit configured to, in response to detection of port information corresponding to the port test data, establish a correspondence relation between a specified data type and the port information corresponding to the specified data type; and the data channel construction subunit is configured to establish a data channel with the terminal device based on the corresponding relationship.
In some embodiments, the process data acquiring unit includes: a process data obtaining subunit, configured to screen out at least one piece of process data of the application to be tested from the running state information according to the attribute information of the application to be tested, where the attribute information includes at least one of: the name of the application to be tested, the data type of the application to be tested and the running time of the application to be tested.
In some embodiments, the operation parameter obtaining unit includes: an operation attribute query subunit configured to query an operation attribute of the operation instruction, where the operation attribute includes at least one of: name of the operation instruction, and sending time of the operation instruction; a process data identification subunit configured to determine process data in which data in the at least one piece of process data is changed according to the operation attribute; an output data acquiring subunit, configured to acquire output data of at least one port of the terminal device according to the process data and the operation attribute of which the data changes; a data type query subunit configured to query, for a port of the at least one port, a data type of output data corresponding to the port according to the correspondence and port information of the port; and the operation parameter acquisition subunit is configured to construct the operation parameters corresponding to the operation instructions through the output data and the data types corresponding to the output data.
In some embodiments, the above apparatus further comprises: and the test data construction unit is configured to construct the test data of the application to be tested according to the operation parameters.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the method for obtaining information of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method for acquiring information of the first aspect.
According to the method and the device for acquiring the information, firstly, the running state information of the terminal equipment is acquired through a data channel; then, acquiring at least one piece of process data of the application to be tested from the running state information; finally, when the operation instruction corresponding to the application to be tested is monitored, the operation parameter corresponding to the operation instruction is obtained according to the at least one piece of process data, and the accuracy and the effectiveness of obtaining the operation parameter of the application to be tested are improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for obtaining information according to the present application;
FIG. 3 is a schematic illustration of an application scenario of a method for obtaining information according to the present application;
FIG. 4 is a flow diagram of yet another embodiment of a method for obtaining information according to the present application;
FIG. 5 is a schematic block diagram illustrating one embodiment of an apparatus for obtaining information according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing an electronic device according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which the method for acquiring information or the apparatus for acquiring information of the embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, and 103 may be installed with various applications to be tested, such as a web browser application to be tested, a shopping application to be tested, a search application to be tested, an instant messenger to be tested, a mailbox client to be tested, and social platform software to be tested.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices installed with applications to be tested and supporting data transmission, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a server testing applications to be tested installed on the terminal devices 101, 102, 103. The server may obtain the operation state information of the terminal devices 101, 102, and 103, and obtain the operation parameters of the applications to be tested on the terminal devices 101, 102, and 103 according to the operation state information.
It should be noted that the method for acquiring information provided in the embodiment of the present application is generally performed by the server 105, and accordingly, the apparatus for acquiring information is generally disposed in the server 105.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for obtaining information in accordance with the present application is shown. The method for acquiring information comprises the following steps:
step 201, obtaining the running state information of the terminal device through the data channel.
In the present embodiment, an execution subject (e.g., the server 105 shown in fig. 1) of the method for acquiring information may receive the operation state information from a terminal with which the user performs the application test through a wired connection manner or a wireless connection manner. Wherein the operation state information may include at least one of: hardware state information, software state information, data processing state information. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
When the existing method is used for testing the application to be tested, not only the data connection between the intelligent equipment provided with the application to be tested and the server for testing the application to be tested needs to be established through various data lines, but also the port information of the intelligent equipment needs to be acquired. On one hand, the distance between the intelligent equipment and the server is limited by various data lines; the hardware interface between the intelligent equipment and the server is limited, and the number of data lines is also influenced; in addition, before each test, the connection state of the data line needs to be checked. On the other hand, in order to ensure the security of the intelligent terminal, the manufacturer of the intelligent terminal usually performs security processing (no notification, hiding, etc.) on the logical port of the intelligent terminal to prevent virus attack or illegal use of the intelligent terminal by other means. Therefore, the existing method is not easy to obtain accurate and effective operation parameters of the application to be tested on the intelligent terminal, and is not beneficial to testing the application to be tested.
For this, the execution body of the present application may first establish a wired or wireless connection with the terminal device. And then acquiring the running state information of the terminal equipment through a data channel. The data channel can be used for data transmission of data of a specified data type with the terminal equipment. The type of the designated data is determined according to the actual application to be tested and the test purpose, and is not described in detail herein.
In some optional implementations of this embodiment, the data channel is constructed by:
firstly, port test data is sent to the terminal equipment.
Before testing an application to be tested installed on a terminal device 101, 102, 103, an executing entity of the present application may first establish a connection with the terminal device 101, 102, 103 in a wired or wireless manner. In practice, the same application to be tested may be installed on different operating systems or different brands of terminal devices 101, 102, 103. Different terminal devices 101, 102, 103 may have different types or versions of operating systems and/or system applications installed thereon, which makes the terminal device 101, 102, 103 generally have different settings (e.g., logical ports) for the ports of the terminal device 101, 102, 103 from the manufacturer of the terminal device 101, 102, 103. For this purpose, the execution body of the present application may send port test data to the terminal devices 101, 102, 103 after establishing a connection with the terminal devices 101, 102, 103. The port test data may be used to detect a port from which the terminal device outputs data of a specified data type. For example, the executing agent may send a certain type of data to the terminal devices 101, 102, 103, which can only (or primarily) output data of a certain specified data type (which may be, for example, battery temperature data). So that the subject monitoring is performed on the port that outputs the data of the specified data type.
And secondly, in response to the detection of the port information corresponding to the port test data, establishing a corresponding relation between the specified data type and the port information corresponding to the specified data type.
Generally, after receiving the port test data, the terminal devices 101, 102, and 103 output data of a specified data type corresponding to the port test data from a certain port(s). The execution body may detect a port and port information that output data of a specified data type. Then, the execution main body can also acquire corresponding port information through other port test data. Finally, the execution agent may establish a correspondence between the specified data type and the port information corresponding to the specified data type. The port information may include information such as a port name, a port number, and a port location. In general, the correspondence may be held in the execution body in the form of a correspondence table or the like.
And thirdly, establishing a data channel between the terminal equipment and the terminal equipment based on the corresponding relation.
After obtaining the corresponding relationship, the execution body may establish a data channel between the execution body and the corresponding port on the terminal device 101, 102, 103 according to the corresponding relationship.
Step 202, at least one piece of process data of the application to be tested is obtained from the running state information.
After the running state information of the terminal devices 101, 102, and 103 is obtained, the execution main body may obtain at least one piece of process data of the application to be tested on the terminal devices 101, 102, and 103 from the running state information.
In some optional implementation manners of this embodiment, the obtaining at least one piece of process data of the application to be tested from the running state information may include: and screening at least one piece of process data of the application to be tested from the running state information according to the attribute information of the application to be tested.
In general, each application installed on the terminal apparatuses 101, 102, 103 has attribute information different from the other applications. Wherein, the attribute information of the application to be tested may include at least one of the following items: the name of the application to be tested, the data type of the application to be tested, and the running time of the application to be tested. Correspondingly, the execution main body can screen out at least one piece of process data of the application to be tested from the running state information according to the attribute information of the application to be tested.
Step 203, responding to the monitored operation instruction corresponding to the application to be tested, and acquiring an operation parameter corresponding to the operation instruction according to the at least one piece of process data.
In order to test various performances of the application to be tested, a user may start the application to be tested on the terminal devices 101, 102, and 103, and then perform various operations on the application to be tested. The execution subject can monitor the operation instruction corresponding to each operation. In addition, under the condition that a user does not operate the application to be tested, the execution main body can also autonomously send an operation instruction to the application to be tested so as to enable the application to be tested to perform corresponding data processing. The terminal devices 101, 102, and 103 may perform data processing on the corresponding data of the application to be tested through the received operation instruction, and reflect the data through the process data of the application to be tested. The execution main body can obtain the operation parameters of the corresponding operation instructions according to the process data of the application to be tested. Wherein the operating parameters may include at least one of: processor usage, memory footprint, etc. The operation parameters may be other parameters according to the actual application to be tested, and are not described in detail herein.
In some optional implementation manners of this embodiment, the obtaining, according to the at least one piece of process data, an operation parameter corresponding to the operation instruction in response to the monitored operation instruction corresponding to the application to be tested may include:
In the first step, the operation attribute of the operation instruction is inquired.
After the operation instruction is issued, the execution subject may query the operation attribute of the operation instruction. Wherein the operation attribute may include at least one of: name of the operation instruction, and operation instruction issue time. For example, when a user manually operates an application to be tested, the application to be tested may determine a corresponding operation instruction according to the operation of the user. The execution agent may monitor the time of the user operation, and further monitor the operation attribute such as the name of the operation instruction executed by the terminal device 101, 102, 103 at that time. When the execution main body sends out the operation instruction, the execution main body can directly acquire the operation attribute of the operation instruction.
And secondly, determining the process data with changed data in the at least one piece of process data according to the operation attribute.
The application to be tested may correspond to at least one piece of process data. When the terminal devices 101, 102, and 103 execute the operation instruction, one or more pieces of process data in the process data corresponding to the application to be tested may change. For this purpose, the execution agent may determine the changed process data according to the operation attribute such as the name of the operation instruction, the issue time of the operation instruction, and the like. These changed process data can be regarded as having a correspondence with the operation instruction.
And thirdly, acquiring output data of at least one port of the terminal equipment according to the process data and the operation attribute of the changed data.
As can be seen from the above description, the execution main body may acquire the port information according to the port that outputs the data of the specified data type. The data channel may transmit data of the specified data type of the terminal device 101, 102, 103 to the execution body. After determining the process data and the operation attribute of the changed data, the execution body may monitor the data output by the corresponding ports of the terminal devices 101, 102, and 103 through the data channel. In practice, the terminal devices 101, 102, 103 typically run multiple applications simultaneously. When only the application to be tested is running, the operating system on the terminal device 101, 102, 103 may also output the same or similar output data as the operating instructions of the application to be tested. Therefore, the execution main body of the application can determine whether the data output by the port corresponds to the operation instruction of the application to be tested according to the process data and the operation attribute of which the data changes, and further acquire the output data of at least one port. For example, the executing agent may determine which data has changed based on the process data for which the data has changed; then, the execution main body can screen out the output data corresponding to the operation instruction of the application to be tested from the corresponding port according to the information such as the operation instruction sending time and/or the name of the operation instruction of the operation attribute.
And fourthly, inquiring the data type of the output data corresponding to the port according to the corresponding relation and the port information of the port for the port in the at least one port.
After the output data of the port is obtained, the execution main body can inquire the corresponding relation and determine the data type corresponding to the port outputting the data.
And fifthly, constructing the operation parameters corresponding to the operation instructions through the output data and the data types corresponding to the output data.
The execution subject may construct the operation parameters corresponding to the operation instruction by the output data and the data type corresponding to the output data. For example, the port a outputs the data 20, and the data type corresponding to the port a in the correspondence table is memory data (the unit may be megabyte). The execution agent may construct an operating parameter of "20 megabits" from "20" and "memory data". It is noted that the corresponding terminal devices 101, 102, and 103 occupy a memory space of "20 megabytes" when executing the operation instruction of the application to be tested.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for acquiring information according to the present embodiment. In the application scenario of fig. 3, the server 105 (executing agent) may first obtain the operation status information of the terminal device 102 through a data channel implemented by the wireless network 104; then, the server 105 may obtain at least one piece of process data of the application to be tested on the terminal device 102 from the running state information; finally, the server 105 may send an operation instruction to the application to be tested through the data channel, and obtain an operation parameter corresponding to the operation instruction of the application to be tested according to the process data. In fig. 3, the operating parameters include a parameter a and a parameter B, and the unit of the parameter a and the parameter B may be mega (M). The server 105 may obtain a profile of the parameters a and B over time, which may be seconds (t).
The method provided by the embodiment of the application firstly obtains the running state information of the terminal equipment through a data channel; then, acquiring at least one piece of process data of the application to be tested from the running state information; finally, when the operation instruction corresponding to the application to be tested is monitored, the operation parameter corresponding to the operation instruction is obtained according to the at least one piece of process data, and the accuracy and the effectiveness of obtaining the operation parameter of the application to be tested are improved.
With continued reference to FIG. 4, a flow 400 of one embodiment of a method for obtaining information in accordance with the present application is shown. The method for acquiring information comprises the following steps:
step 401, obtaining the operation state information of the terminal device through the data channel.
The content of step 401 is the same as that of step 201, and is not described herein again.
Step 402, obtaining at least one piece of process data of the application to be tested from the running state information.
The content of step 402 is the same as that of step 202, and is not described herein again.
And 403, responding to the monitored operation instruction corresponding to the application to be tested, and acquiring an operation parameter corresponding to the operation instruction according to the at least one piece of process data.
The content of step 403 is the same as that of step 203, and is not described herein again.
And step 404, constructing test data of the application to be tested according to the operation parameters.
After the operation parameters corresponding to the operation instructions of the application to be tested are obtained, the execution main body can construct test data through the operation parameters. The test data may be various according to actual factors such as the application to be tested, the operation instruction, and the test target, and will not be described in detail herein.
Because the data channel is constructed, the corresponding relation between the specified data type and the port information corresponding to the specified data type is established. The execution main body can set a series of operation instructions locally on the execution main body, so that the series of operation instructions are automatically sent to the applications to be tested on the terminal devices 101, 102, 103 through the data channel according to a certain sequence or association relationship. And then, the execution main body can automatically construct test data through the operation parameters acquired by the data channel, so that the automatic test of the application to be tested is realized, and the test efficiency of the application to be tested is greatly improved. Meanwhile, the data channel can directly return output data corresponding to the operation instruction of the application to be tested, the execution main body can construct operation parameters corresponding to the operation instruction according to the output data, and further construct test data, and the accuracy of obtaining the test data is improved.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for acquiring information, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the apparatus 500 for acquiring information of the present embodiment may include: an operation state information acquisition unit 501, a process data acquisition unit 502, and an operation parameter acquisition unit 503. The operation status information obtaining unit 501 is configured to obtain operation status information of a terminal device through a data channel, where the data channel is used for data transmission of data of a specified data type with the terminal device; the process data obtaining unit 502 is configured to obtain at least one piece of process data of the application to be tested from the running state information; the operation parameter obtaining unit 503 is configured to, in response to the monitored operation instruction corresponding to the application to be tested, obtain an operation parameter corresponding to the operation instruction according to the at least one piece of process data.
In some optional implementations of this embodiment, the apparatus 500 for obtaining information may include a data channel constructing unit (not shown in the figure) configured to construct a data channel, where the data channel constructing unit may include: a port test data sending subunit (not shown), a correspondence relation constructing subunit (not shown), and a data channel constructing subunit (not shown). The port test data sending subunit is configured to send port test data to the terminal device, where the port test data is used to detect a port at which the terminal device outputs data of a specified data type; a correspondence relation construction subunit configured to, in response to detection of port information corresponding to the port test data, establish a correspondence relation between a specified data type and the port information corresponding to the specified data type; the data channel constructing subunit is configured to establish a data channel with the terminal device based on the correspondence.
In some optional implementations of this embodiment, the process data acquiring unit 502 may include: a process data obtaining subunit (not shown in the figure), configured to screen out, from the running state information, at least one piece of process data of the application to be tested according to attribute information of the application to be tested, where the attribute information includes at least one of the following: the name of the application to be tested, the data type of the application to be tested and the running time of the application to be tested.
In some optional implementations of this embodiment, the operation parameter obtaining unit 503 may include: an operation attribute query subunit (not shown), a process data identification subunit (not shown), an output data acquisition subunit (not shown), a data type query subunit (not shown), and an operation parameter acquisition subunit (not shown). Wherein, the operation attribute query subunit is configured to query the operation attribute of the operation instruction, and the operation attribute comprises at least one of the following: name of the operation instruction, and sending time of the operation instruction; the process data identification subunit is configured to determine process data with changed data in the at least one piece of process data according to the operation attribute; the output data acquisition subunit is configured to acquire output data of at least one port of the terminal device according to the process data and the operation attribute of which the data are changed; a data type query subunit configured to query, for a port of the at least one port, a data type of output data corresponding to the port according to the correspondence and port information of the port; the operation parameter acquiring subunit is configured to construct the operation parameter corresponding to the operation instruction by the output data and the data type corresponding to the output data.
In some optional implementations of this embodiment, the apparatus 500 for acquiring information may further include: and a test data construction unit (not shown in the figure) configured to construct test data of the application to be tested according to the operation parameters.
The present embodiment further provides an electronic device, including: one or more processors; a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the above-described method for obtaining information.
The present embodiment also provides a computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the above-mentioned method for acquiring information.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing an electronic device (e.g., server 105 of FIG. 1) of an embodiment of the present application. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an operation state information acquisition unit, a process data acquisition unit, and an operation parameter acquisition unit. The names of these units do not in some cases constitute a limitation to the unit itself, and for example, the operation parameter acquisition unit may also be described as a "unit for obtaining operation parameters from process data".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring the running state information of the terminal equipment through a data channel, wherein the data channel is used for carrying out data transmission of data of a specified data type with the terminal equipment; acquiring at least one piece of process data of the application to be tested from the running state information; and responding to the monitored operation instruction corresponding to the application to be tested, and acquiring the operation parameters corresponding to the operation instruction according to the at least one piece of process data.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A method for obtaining information, comprising:
acquiring running state information of terminal equipment through a data channel, wherein the data channel is used for carrying out data transmission of data of a specified data type with the terminal equipment, and the construction method of the data channel comprises the following steps: establishing the data channel based on the corresponding relation between the specified data type and the port information corresponding to the specified data type;
acquiring at least one piece of process data of the application to be tested from the running state information;
responding to the monitored operation instruction corresponding to the application to be tested, and acquiring the operation parameters corresponding to the operation instruction according to the at least one piece of process data, wherein the operation parameters comprise: determining process data with changed data in the at least one piece of process data according to the operation attribute of the operation instruction; acquiring output data of at least one port of the terminal equipment according to the process data with changed data and the operation attribute; for a port in the at least one port, inquiring the data type of output data corresponding to the port according to the corresponding relation and the port information of the port; and constructing an operation parameter corresponding to the operation instruction through the output data and the data type corresponding to the output data, wherein the operation parameter is constructed based on the output data and the data type of the output data, and the output data is determined based on the process data with changed data and the operation attribute of the operation instruction.
2. The method of claim 1, wherein the data channel is constructed by:
sending port test data to the terminal equipment, wherein the port test data are used for detecting a port of the terminal equipment outputting data of a specified data type;
responding to the detected port information corresponding to the port test data, and establishing a corresponding relation between a specified data type and the port information corresponding to the specified data type;
and establishing a data channel between the terminal equipment and the terminal equipment based on the corresponding relation.
3. The method of claim 2, wherein the obtaining at least one piece of process data of the application to be tested from the running state information comprises:
screening at least one piece of process data of the application to be tested from the running state information according to the attribute information of the application to be tested, wherein the attribute information comprises at least one of the following items: the name of the application to be tested, the data type of the application to be tested and the running time of the application to be tested.
4. The method of claim 3, wherein the obtaining, in response to the monitored operation instruction corresponding to the application to be tested, the operation parameter corresponding to the operation instruction according to the at least one piece of process data further comprises:
Querying operation attributes of the operation instruction, wherein the operation attributes comprise at least one of the following: name of the operation instruction, and operation instruction issue time.
5. The method of any of claims 1 to 4, wherein the method further comprises:
and constructing test data of the application to be tested according to the operation parameters.
6. An apparatus for obtaining information, comprising:
an operation state information obtaining unit configured to obtain operation state information of a terminal device through a data channel, wherein the data channel is used for data transmission of data of a specified data type with the terminal device, and the construction method of the data channel includes: establishing the data channel based on the corresponding relation between the specified data type and the port information corresponding to the specified data type;
the process data acquisition unit is configured to acquire at least one piece of process data of the application to be tested from the running state information;
the operation parameter obtaining unit is configured to respond to the monitored operation instruction corresponding to the application to be tested, and obtain the operation parameters corresponding to the operation instruction according to the at least one piece of process data, and comprises the following steps: determining process data with changed data in the at least one piece of process data according to the operation attribute of the operation instruction; acquiring output data of at least one port of the terminal equipment according to the process data with changed data and the operation attribute; for a port in the at least one port, inquiring the data type of output data corresponding to the port according to the corresponding relation and the port information of the port; and constructing an operation parameter corresponding to the operation instruction through the output data and the data type corresponding to the output data, wherein the operation parameter is constructed based on the output data and the data type of the output data, and the output data is determined based on the process data with changed data and the operation attribute of the operation instruction.
7. The apparatus of claim 6, wherein the apparatus comprises a data channel construction unit configured to construct a data channel, the data channel construction unit comprising:
a port test data sending subunit configured to send port test data to the terminal device, where the port test data is used to detect a port at which the terminal device outputs data of a specified data type;
a correspondence relation construction subunit configured to, in response to detection of port information corresponding to the port test data, establish a correspondence relation between a specified data type and the port information corresponding to the specified data type;
and the data channel construction subunit is configured to establish a data channel with the terminal equipment based on the corresponding relation.
8. The apparatus of claim 7, wherein the process data acquisition unit comprises:
a process data obtaining subunit configured to screen out, according to attribute information of the application to be tested, at least one piece of process data of the application to be tested from the running state information, where the attribute information includes at least one of: the name of the application to be tested, the data type of the application to be tested, and the running time of the application to be tested.
9. The apparatus of claim 8, wherein the operating parameter acquisition unit further comprises:
an operation attribute query subunit configured to query an operation attribute of the operation instruction, the operation attribute including at least one of: name of the operation instruction, and operation instruction issue time.
10. The apparatus of any of claims 6 to 9, wherein the apparatus further comprises:
and the test data construction unit is configured to construct the test data of the application to be tested according to the operation parameters.
11. An electronic device, comprising:
one or more processors;
a memory having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN201810841997.1A 2018-07-27 2018-07-27 Method and device for acquiring information Active CN108920352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810841997.1A CN108920352B (en) 2018-07-27 2018-07-27 Method and device for acquiring information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810841997.1A CN108920352B (en) 2018-07-27 2018-07-27 Method and device for acquiring information

Publications (2)

Publication Number Publication Date
CN108920352A CN108920352A (en) 2018-11-30
CN108920352B true CN108920352B (en) 2022-06-28

Family

ID=64417426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810841997.1A Active CN108920352B (en) 2018-07-27 2018-07-27 Method and device for acquiring information

Country Status (1)

Country Link
CN (1) CN108920352B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6934934B1 (en) * 1999-08-30 2005-08-23 Empirix Inc. Method and system for software object testing
CN103873369B (en) * 2012-12-17 2017-02-08 中国科学院沈阳自动化研究所 Gateway and method for supporting interaction of heterogeneous network
CN103235753A (en) * 2013-04-09 2013-08-07 国家电网公司 Method and device for monitoring information server
CN104461899B (en) * 2014-12-19 2017-12-26 北京奇虎科技有限公司 The method, test terminal and system of consumed resource are analyzed in test process
CN107832117A (en) * 2017-11-15 2018-03-23 北京东土科技股份有限公司 A kind of virtual machine state information synchronous method and electronic equipment
CN108111369A (en) * 2017-12-22 2018-06-01 北京奇虎科技有限公司 The test method and device of a kind of webpage performance of mobile terminal

Also Published As

Publication number Publication date
CN108920352A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN108900388B (en) Method, apparatus, and medium for monitoring network quality
US11509505B2 (en) Method and apparatus for operating smart network interface card
CN108810047B (en) Method and device for determining information push accuracy rate and server
CN109828830B (en) Method and apparatus for managing containers
KR102543838B1 (en) Method and appartus for obtaining information
US11121912B2 (en) Method and apparatus for processing information
CN104899733B (en) Data processing method and data processing device
CN109218338B (en) Information processing system, method and device
CN109471713B (en) Method and device for inquiring information
CN116761144A (en) Method and device for accessing equipment to Internet of things platform
CN108920352B (en) Method and device for acquiring information
CN114465919B (en) Network service testing method, system, electronic equipment and storage medium
CN108933802B (en) Method and apparatus for monitoring operation
CN112887162B (en) Method and apparatus for detecting anomalies
CN113778780B (en) Application stability determining method and device, electronic equipment and storage medium
CN108811036B (en) Method and apparatus for displaying wireless access point information
CN108353297A (en) Wave condition detecting system and wave condition detection method
CN107256170B (en) Method and device for activating input method setting items of terminal equipment
CN108984313B (en) Method and device for processing information and server
CN109688432B (en) Information transmission method, device and system
CN113760712A (en) Test evaluation method and device
CN112241357A (en) Method, device, equipment and computer readable medium for gray scale test
CN112883410B (en) Method and device for displaying information
CN110875856A (en) Method and apparatus for activation data anomaly detection and analysis
CN114285743B (en) Method, device, electronic equipment and storage medium for updating configuration information

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