CN115480677A - Information processing method and device - Google Patents
Information processing method and device Download PDFInfo
- Publication number
- CN115480677A CN115480677A CN202110597415.1A CN202110597415A CN115480677A CN 115480677 A CN115480677 A CN 115480677A CN 202110597415 A CN202110597415 A CN 202110597415A CN 115480677 A CN115480677 A CN 115480677A
- Authority
- CN
- China
- Prior art keywords
- control
- command
- target
- control command
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0482—Interaction with lists of selectable items, e.g. menus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
The application relates to the technical field of computers, and particularly discloses an information processing method and device; the method and the device can receive control command information sent by a control information interface of a target application, wherein the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is formed by converting the target identifier control in the control information interface; converting the control command information into a target control command which can be identified by an object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled, so that the object to be controlled executes the target control instruction. Therefore, the control efficiency of the object to be controlled is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information processing method and apparatus.
Background
With the development of computer technology, information interaction between terminal devices has become mature. However, in the process of system development, system iteration and new application development of the terminal device, the terminal device needs to be controlled to know the operating environment, condition and the like of the terminal device, so that the developed system or application is evaluated according to the test result, and a corresponding decision is made. In the related art, when the terminal device is controlled, test software is installed on fixed working equipment, and a technician inputs a control command through the test software on the working equipment to control the terminal device.
In the research and practice process of the prior art, the inventor of the application finds that the prior art needs to be realized by specific working equipment with test software when the terminal equipment is controlled, and has limitations and low convenience; and the control command needs to be input through the test software, the process is complicated, and the control efficiency of the terminal equipment is reduced.
Disclosure of Invention
The embodiment of the application provides an information processing method and device. The efficiency and convenience when the terminal equipment is controlled can be improved, and the operation process is simplified.
An embodiment of the present application provides an information processing method, including:
receiving control command information sent by a control information interface of a target application, wherein the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is formed by converting a target identifier control in the control information interface;
converting the control command information into a target control command recognizable by the object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining a target control command corresponding to the control command information input by a user and converting the target control command into a target control command recognizable by the object to be controlled;
and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled, so that the object to be controlled executes the target control instruction.
Correspondingly, an embodiment of the present application provides an information processing method, including:
displaying a control information interface, wherein the control information interface comprises a plurality of identification controls corresponding to control commands;
generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface;
and sending the control command information to a server so that the server converts the control command information into a target control instruction which can be identified by the object to be controlled through node language service in a node language environment, and sends the target control instruction to the object to be controlled.
Correspondingly, an embodiment of the present application provides an information processing apparatus, including:
the control device comprises a receiving unit, a processing unit and a control unit, wherein the receiving unit is used for receiving control command information sent by a control information interface of a target application, the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is formed by converting a target identifier control in the control information interface;
the conversion unit is used for converting the control command information into a target control command which can be identified by the object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining a target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled;
and the sending unit is used for sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction.
In some embodiments, the conversion unit includes:
the determining subunit is used for determining a target command identifier corresponding to the control command information through a node language service in a node language environment;
the matching subunit is used for matching the corresponding target control command according to the target command identifier;
and the conversion subunit is used for converting the target control command into a target control instruction which can be identified by the object to be controlled.
In some embodiments, the matching subunit is further configured to:
searching a to-be-matched identifier matched with the target command identifier in a preset command library, wherein the to-be-matched identifiers of a plurality of control commands are stored in the preset command library;
and when the target to-be-matched identifier matched with the target command identifier is found, acquiring a control command corresponding to the target to-be-matched identifier as a target control command corresponding to the target command identifier.
In some embodiments, the matching subunit is further configured to:
when the target to-be-matched identifier matched with the target command identifier is not found, searching a target control command corresponding to the target command identifier in a cloud command database;
and newly adding the target control command to the preset command library through a command newly-added interface, and acquiring the target control command corresponding to the target identifier to be matched.
In some embodiments, the matching subunit is further configured to:
acquiring version information of a control command matched with the target command identifier in the preset command library;
and when the release time in the version information is detected to be larger than a preset time threshold, acquiring a target control command corresponding to the target command identifier in a cloud command database, and replacing the target control command with a control command matched with the target command identifier in the preset command database.
In some embodiments, the information processing apparatus further includes: a processing unit to:
identifying a control item of the target control command, and matching the control item with a historical control item set of the object to be controlled;
when the control item is detected not to be matched with the historical control item, acquiring an item type corresponding to the control item;
acquiring a plurality of target historical control commands of the historical control command set of the object to be controlled, wherein the target historical control commands are the same as the item types, and acquiring test paths corresponding to the target historical control commands;
generating a combined control command corresponding to the plurality of target historical control commands according to the test path;
executing the combined control command through the command program to obtain a combined control command;
and sending the combined control instruction to the object to be controlled, so that the object to be controlled executes the combined control instruction.
In some embodiments, the processing unit is further configured to:
receiving a first control result returned after the target control instruction is executed by the object to be controlled, and receiving a second control result returned after the combined control instruction is executed by the object to be controlled;
and determining a target control result corresponding to the control command information according to the first control result and the second control result.
In some embodiments, the information processing apparatus further includes: an interface control unit for:
when a calling request of a webpage service interface sent by a target application is detected, acquiring a command identifier corresponding to each control command in a preset command library, and generating a command identifier set;
and returning the command identifier set to the terminal, so that the terminal displays each command identifier in the command identifier set on the control information interface in the state of an identifier control through the target application.
Correspondingly, an embodiment of the present application provides an information processing apparatus, including:
the display unit is used for displaying a control information interface, and the control information interface comprises a plurality of identification controls corresponding to the control commands;
the information generating unit is used for generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface;
and the information sending unit is used for sending the control command information to a server so that the server converts the control command information into a target control instruction which can be identified by the object to be controlled through a node language service under a node language environment, and sends the target control instruction to the object to be controlled.
In some embodiments, the information processing apparatus further includes: an interface layout unit to:
sending a calling request of a web service interface to a server so that the server returns a command identifier set consisting of command identifiers corresponding to each control command in a preset command library according to the calling request;
and receiving the command identification set, and laying out each command identification in the command identification set on the control information interface in the state of identifying the control.
In addition, an electronic device is further provided in an embodiment of the present application, and includes a processor and a memory, where the memory stores an application program, and the processor is configured to run the application program in the memory to implement the information processing method provided in the embodiment of the present application.
In addition, a computer-readable storage medium is provided, where the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform steps in any one of the information processing methods provided in the embodiments of the present application.
In addition, the embodiment of the present application also provides a computer program, which includes computer instructions, and the computer instructions are stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the steps in any information processing method provided by the embodiment of the application.
The method and the device can receive control command information sent by a control information interface of a target application, wherein the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is formed by converting the target identifier control in the control information interface; converting the control command information into a target control command which can be identified by an object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction. Therefore, the control command service is deployed on the computer equipment with the interaction capacity, so that when other terminals call the control command service, the control commands of the preset command library in the computer equipment are displayed on the control information interface of the terminal in the state of the identification control, and the control commands are visualized on the control information interfaces of other terminals; and the control command information sent by the control information interface is converted into a target control command based on the node language service in the node language environment, and the target control command is sent to the object to be controlled, so that the control of the object to be controlled by calling the control command service through other terminals is realized, specific test software or programs do not need to be installed on other terminals, the convenience of controlling the object to be controlled is improved, a user does not need to directly input the control command when controlling the object to be controlled, and the operation process is simplified.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a scene schematic diagram of an information processing method provided in an embodiment of the present application;
FIG. 2 is a schematic flowchart illustrating steps of an information processing method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating another step of an information processing method according to an embodiment of the present application;
FIG. 4 is a schematic timing flow chart of an information processing method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a control information interface provided by an embodiment of the present application;
fig. 6a is an interaction scene schematic diagram of an information processing method provided in an embodiment of the present application;
FIG. 6b is a schematic diagram of an interaction logic of an information processing method according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present application;
FIG. 8 is a schematic diagram of another structure of an information processing apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides an information processing method and device. The embodiment of the present application will be described in terms of an information processing apparatus, which may be specifically integrated in an electronic device, where the electronic device may be a server or a terminal; the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, big data and an artificial intelligence platform. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
For example, refer to fig. 1, which is a schematic view of a scene of an information processing method provided in an embodiment of the present application. The scene comprises a server 10, a terminal 20 and an object to be controlled 30, wherein the server 10 is respectively connected with the terminal 20 and the object to be controlled 30 through wireless communication to realize data interaction.
The terminal 20 may display a control information interface, where the control information interface includes a plurality of identification controls corresponding to the control commands; generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface; the control command information is transmitted to the server 10 so that the server 10 converts the control command information into a target control instruction recognizable by the object to be controlled through the node language service in the node language environment, and transmits the target control instruction to the object to be controlled 30.
The server 10 may receive control command information sent by a control information interface of a target application, where the control command information carries an identifier of an object 30 to be controlled, where the control information interface displays an identifier control corresponding to a control command in a preset command library, and the control command information is converted from a target identifier control in the control information interface; converting the control command information into a target control command which can be identified by an object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; based on the identification of the object to be controlled 30, the target control instruction is sent to the object to be controlled 30, so that the object to be controlled 30 executes the target control instruction.
The object to be controlled 30 may be a terminal device to be controlled or an application to be controlled on the terminal device, or the like. After receiving the target control instruction sent by the server 10, the object to be controlled 30 executes the target control instruction to obtain a corresponding control result, and returns the obtained control result to the server 10, so that the server 10 processes the control result and forwards the control result to the control information interface of the terminal 20, or the server 10 directly returns the control result to the terminal 20.
The information processing may include processing the control command information, determining a target control command, executing the target control command to obtain a target control instruction, controlling an object to be controlled, and the like.
The following are detailed descriptions. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
In the embodiments of the present application, description will be made from the perspective of an information processing apparatus, with which the information processing apparatus can be specifically integrated in an electronic device such as a server. Referring to fig. 2, fig. 2 is a schematic flowchart of a step flow of an information processing method provided in an embodiment of the present application, where when a processor on a terminal or a server executes a program corresponding to the information processing method, a specific flow of the information processing method is as follows:
101. and receiving control command information sent by a control information interface of the target application.
The control information interface may be a display interface for implementing visualization of a control command preset by the current electronic device (such as a server or a terminal), and the control command may be displayed in the control information interface in the form of a character, an identifier, a code, or a preset character, so as to implement visualization of the control command. When the electronic device is a server, a control command service is deployed on the server, and the server interacts with the operation terminal to send relevant information corresponding to a control command built in the server to the operation terminal, for example, a command identifier of the control command in a preset command library of the server is sent to the terminal, so that the operation terminal displays the relevant information corresponding to the received control command through a control information interface. When the control information interface displays the related information corresponding to the control command, the command identifier (related information) corresponding to the control command can be laid out on the control information interface in the state of the corresponding identifier control, and further, the identifier control corresponding to the control command in the preset command library is displayed on the control information interface of the target application on the operation terminal. It should be noted that the control information interface includes an information component area and an information input frame area, where the information component area may be an area where the above-mentioned identification control is laid out, and the information input frame area may be an information area for directly inputting a control command and an identification (name, serial number, ID, etc.) of an object to be controlled.
The object to be controlled may be a mobile terminal (e.g., an Android device such as an Android real machine, an Android simulator, yun Zhenji, etc.), a computer, etc., and the object to be controlled may also be an application, a component, hardware, etc. on the mobile terminal, that is, any thing on the terminal device, which is not specifically limited herein.
The control command information can be control information set by a user when the user controls (such as testing, debugging, control and the like) an object to be controlled, and can express the control intention of the user when the user controls the object to be controlled from characters. Further, the control command information carries an identifier of the object to be controlled, for example, if the control command information set on the control information interface by the user may be "start a camera", the object to be controlled may be a camera on the terminal device; for example, the control command information may be "open an application a", and the object to be controlled is an application a on the terminal device, and the corresponding identifier may be "application a" or "application a" (application); for another example, the control command information may be "B content of an open applet page", and then the object to be controlled is the B content of an application applet page on the terminal device. It should be noted that, when generating the control command information, the control command information may be combined with the information of the object to be controlled, so that the control command information carries the information of the object to be controlled, and the control command information used for indicating that the object to be controlled has the control intention is obtained.
The target application is a browser application or an application with a browser function, and a Web Service (Web Service) can be realized through the target application, wherein the Web Service (Web Service) is a platform-independent programmable Web-based application program and is used for developing a distributed interactive operation application program. After a user configures control command information through a control information interface of a target application, the control command information generated by the control information interface is sent to electronic equipment (such as a server), so that the electronic equipment receives the control command information generated by the target application through the control information interface.
When a user calls a service interface through a web service with interactive capability, the web interface service can be established through a command-line interface (CLI) tool provided by the electronic device. For example, a user starts a Web Service (Web Service) through a Web Service interface by using a browser application or an application having a browser function, so that the browser communicates with a local terminal or a remote server; therefore, the control commands preset by the electronic equipment are visually presented on the control information interface (the interface of the browser) of the browser.
Before the step of receiving the control command information sent by the target application through the control information interface, the method further comprises the following steps:
(1) When a calling request of a web service interface sent by a target application is detected, a command identifier corresponding to each control command in a preset command library is obtained, and a command identifier set is generated.
In this embodiment of the present application, the Web service interface (Node Web API) may be an interface for implementing information interaction between the control information interface and the electronic device, and may select and input the control command information to the electronic device, so that the terminal device invokes the Web service of the control command through the interface, and implements remote control of the object to be controlled through the Web service. For example, taking a server as an electronic device as an example, when detecting a call request of a web service interface sent by a terminal device (such as a mobile terminal, a computer, etc.) through a browser, the server may establish a communication connection with a target application according to the call request of the web service interface.
In order to realize the calling of the control command through the web service interface, the preset control command needs to be displayed on the control information interface, so that the visualization of the control command is realized, and the calling of the control command by a user is facilitated. In this embodiment, the control command may be an Android Debug Bridge (ADB) command, and each control command in a preset command library of the server is acquired to realize subsequent command visualization.
In order to facilitate the user to recognize or learn the functions of the control commands in the control information interface, each preset control command may be replaced by a corresponding identification, such as a text, a code, and the like, which is convenient for the user to recognize. In this embodiment, the command identifier may be information such as a short text and a preset number that describe the control command, where the implementation manner of obtaining the command identifier corresponding to each control command may be: acquiring a command identifier corresponding to each control command according to a preset control command and a command identifier list, and combining the command identifiers to obtain a preset command identifier set of all control commands through information processing according to the command identifier corresponding to each control command; it should be noted that the preset control command and command identifier list includes a plurality of mapping relationships between control commands and command identifiers, and when the control command and command identifier list is established in advance, corresponding command identifiers may be configured for existing control commands, so that the control command and command identifier list is established according to each control command and the configured command identifier.
Through the mode, the control command can be packaged to be displayed with a specific display identifier in the visualization of the control command, so that a user can conveniently recognize or learn the function of the control command.
(2) And returning the command identifier set to the terminal, so that the terminal displays the command identifier set on the control information interface in the state of identifying the control through the target application.
In this embodiment, in order to implement visualization of a control command preset in a server, the command identifier set needs to be returned to a corresponding terminal, where the terminal is a terminal device that calls a web service interface through a target application, and when the terminal calls the web service interface through the target application, communication between the terminal and the server is established, and when the command identifier set is returned to the terminal, the implementation manner may be: returning the command identifier set to the terminal through the web service interface; when the terminal receives the command identifier set, the plurality of command identifiers in the command identifier set are displayed on a control information interface of the target application in the state of the identifier control. The identification control can be a control which has a mapping relation or establishes a relation with the command identification.
In this way, the control commands can be packaged via a Graphical User Interface (GUI). For example, taking a server as an electronic device as an example, after a command identifier set corresponding to a control command in a preset command library of the server is generated, returning the command identifier set to a target application of a terminal, so as to display a command identifier in the command identifier set on a control information interface in a state of identifying a control, that is, display the command identifier on a graphical user interface in a manner of identifying the control; the image user interface is used for transmitting the control command, so that the user can conveniently identify or learn the function of the control command. Furthermore, when the user needs to control the object to be controlled, the user can input the identifier of the object to be controlled and select the identifier control in the control information interface to generate control command information; therefore, when the user controls the object to be controlled, the user does not need to directly input the control command, the operation process is simplified, the learning cost of the user on the control command (such as an ADB command) is reduced, the control requirements of the user without professional knowledge in the aspect of the control command on devices such as a mobile phone, a simulation machine and a cloud-real machine can be met, and feasibility is achieved.
102. And converting the control command information into a target control instruction which can be identified by the object to be controlled through the node language service in the node language environment.
The node language environment may be a scripting language environment of an electronic device side where a control command service is deployed, and is used for controlling an application software program. For example, taking the server as the electronic device as an example, and taking the JavaScript programming language as the scripting language of the server, the language environment of the server may be a node.
The node language service is used for determining a target control command corresponding to control command information input by a user and converting the target control command into a target control instruction which can be identified by an object to be controlled.
Further, in order to obtain a control instruction of an object to be controlled, in the embodiment of the present application, after receiving the control instruction information, the control instruction service is started through the node language service of the node language environment. For example, taking a server node as an example, a node language environment of node.
In some embodiments, the step of converting the control command information into a target control instruction recognizable by the object to be controlled through a node language service in a node language environment includes:
(1) And determining a target command identifier corresponding to the control command information through the node language service under the node language environment.
In order to obtain a target control instruction corresponding to control command information, the embodiment of the application may determine a target command identifier corresponding to the control command information through a node language service in a node language environment; for example, the target command identifier corresponding to the control command information may be determined according to the intention data of the control command information. The intention data may be data such as key information, keywords, keyword group information and the like in the control command information, and may reflect the control purpose, the control purpose and the like of the user on the object to be controlled through the intention data.
The target command identifier may reflect an intention corresponding to the control command information, and may represent a corresponding control command in the form of a short text, a preset number, a letter, or the like. For example, if the control command information is "prompt function when testing low battery scenario", the target command identifier may be "low battery prompt function" or may be represented as a description related to "test low battery scenario"; for another example, the target command identification may also be represented by other forms, such as: "command id = object.action.battery _ LOW"; and the control command may be a "test low battery prompt". Thus, the target command identity may represent a corresponding control command.
In this embodiment, in order to determine a target command identifier corresponding to control command information, it is necessary to identify intention data of the control command information, where an identification process of the intention data may be: acquiring character information in the control command information; searching a preset part-of-speech information table according to the character combination in the character information, or matching the character combination in the character information with the information in the preset part-of-speech information table to obtain phrase data or word characteristics; and determining the intention data in the control command information according to the searched or matched phrase data (or word characteristics) and the main predicate element structure sentence pattern (or predicate element structure sentence pattern).
Illustratively, the intention data in the control command information is determined according to the searched or matched phrase data (or word features) and the main predicate element structure sentence pattern (or predicate element structure sentence pattern), which may be implemented by: acquiring the word attribute of each matched word group data (or word characteristic); filling the main predicate structure sentence pattern (or the predicate structure sentence pattern) according to the word attribute of each matched word group data (or word characteristic), obtaining a target control information sentence pattern corresponding to the control command information, extracting the word group data (or the word characteristic) corresponding to the verb attribute in the target control information sentence pattern, and determining the word group data (or the word characteristic) as intention data. Furthermore, the intention data is matched with the command identifier in the command identifier list in a character mode, and therefore the target command identifier corresponding to the control command information is determined.
Through the mode, the target command identifier is determined according to the control command information, the control intention of the user to the object to be controlled can be converted into the target command identifier recognized by the server, and therefore the accuracy and the efficiency of subsequent acquisition of the corresponding control command are improved.
(2) And matching the corresponding target control command according to the target command identifier.
The target control command may be a control command stored in a preset command library on the electronic device side, and may be obtained by matching the target command identifier, and is used for controlling the object to be controlled. Wherein the control command may be an Android Debug Bridge (ADB) command.
In the embodiment of the application, the preset command library comprises a plurality of control commands of different function types, and as the target command identifier is determined according to the intention data of the control command information, the control command information and the target command identifier have relevance, and the target command identifier can represent the control intention of a user on an object to be controlled. Therefore, a control command of the target function type, i.e., a target control command, can be determined from the target command identification.
In some embodiments, in order to determine the control command of the target function type, when selecting the control command, the target control command corresponding to the target command identifier may be matched based on a mapping relationship included in the preset control command and the command identifier list, so as to improve accuracy and efficiency when selecting the control command.
The step of matching the corresponding target control command according to the target command identifier comprises the following steps of:
and (2.1) searching the to-be-matched identifier matched with the target command identifier in a preset command library, wherein the to-be-matched identifiers of a plurality of control commands are stored in the preset command library.
The preset command library is a command library in the storage space of the electronic equipment and stores a plurality of preset control commands, and each control command has a corresponding command identifier. It should be noted that, a corresponding command identifier may be set for each control command, and the control command with the command identifier set may be stored in a preset command library; or storing a plurality of preset control commands into a preset command library, and establishing a mapping relation between each control command in the preset command library and the command identifier to realize the binding between the control commands and the command identifier.
The identifier to be matched may be a command identifier corresponding to each control command in a preset command library, and is used to distinguish the control commands of each function type in the preset command library. The obtaining mode of the identifier to be matched of the control command in the preset command library may be: and acquiring the identifier to be matched of each control command in the preset command library according to the mapping relation between each control command in the preset command library and the command identifier.
After the identification to be matched of each control command in the preset command library is obtained, the control commands in the preset command library can be distinguished through the identification to be matched, the identification to be matched can be used as a recognition medium (bridge) between the target command identification and the control commands in the preset command library, program logic between the target command identification corresponding to the control command information and the control commands is met, and accuracy in subsequent control command selection is improved.
In order to subsequently determine the target control command, the target command identifier and the to-be-matched identifier corresponding to each control command in the preset command library may be traversed to implement comparison between the target command identifier and each to-be-matched identifier, and the to-be-matched identifier matched with the target command identifier is determined according to a comparison result. The step of searching for the identifier to be matched that matches the target command identifier may include: acquiring a to-be-matched identifier of a control command in a preset command library; and traversing the target command identifier and each identifier to be matched.
For example, if the intention of the user is "test a performance adjustment request for application in low power level scenario", the target command identifier may be "test performance adjustment request" or "test performance adjustment request", the object to be controlled is "a application" on the terminal or "a application in low power level scenario", and the identifier to be matched corresponding to the target command identifier may be "test of performance adjustment request", which is not limited herein. Therefore, when the target command identifier is matched with each identifier to be matched, the character information in the target command identifier and the character information in the identifier to be matched can be compared to obtain a comparison result, and the identifier to be matched with the highest similarity or the same similarity as the comparison result is selected as the target identifier to be matched.
When the control command in the preset command library is selected, the mark to be matched is used as a basis for selecting the control command, so that the accuracy of the subsequent control command selection is improved.
And (2.2) when the corresponding target to-be-matched identifier matched with the target command identifier is found, acquiring a control command corresponding to the target to-be-matched identifier as a target control command corresponding to the target command identifier.
The target identifier to be matched is an identifier matched with the target command identifier, that is, an identifier matched with the target command identifier in the identifier to be matched corresponding to the control command in the preset command library.
When it is detected that the target command identifier matches the corresponding target identifier to be matched, the corresponding control command, that is, the target control command, may be obtained according to the target identifier to be matched. The manner of obtaining the corresponding target control command may be: acquiring a mapping relation between a control command in a command library and a mark to be matched; and searching a target control command corresponding to the target identifier to be matched in the command library according to the mapping relation between the control command and the identifier to be matched.
Through the above manner, the identification to be matched is used as a basis for selecting the control command, and the accuracy in selecting the control command is improved.
And (2.3) when the target to-be-matched identifier which is not matched with the target command identifier is not found, searching a target control command which is in the cloud command database and corresponds to the target command identifier.
The cloud command database may be a database outside the electronic device, and is used for storing a large number of control commands.
In order to reduce the storage pressure of the electronic device (such as a server), the embodiment of the application may configure the command library with a plurality of conventional control commands, that is, store the plurality of conventional control commands in the storage space (preset command library) of the electronic device; further, a command identifier of any other control command (a command other than the conventional control command) may be obtained in advance, so as to establish a mapping relationship between the command identifier and the command query instruction, store the other control command in the cloud command database, and generate a preset command query instruction list according to the mapping relationship between the command identifier and the command query instruction to store the preset command query instruction list in the electronic device. Through the mode, the distributed layout of the control commands on the storage space can be realized, and the storage pressure of the current electronic equipment (such as a server) is reduced. It should be noted that the command query instruction may be an instruction pointing to a link or an interface address of a control command outside the preset command library, and is used for searching the control command outside the preset command library, for example, the command query instruction may be used for searching the control command in a cloud command database outside the preset command library.
In this embodiment of the present application, when the identifier to be matched of the control command in the preset command library cannot be matched with the target command identifier, it indicates that the preset command library does not include a control command that needs to be selected or used by the user, and in order to obtain the target control command corresponding to the target command identifier, a manner of obtaining the target control command in the cloud command database in this embodiment of the present application may include: determining a command query instruction corresponding to the target command identifier according to a mapping relation between the command query instruction and the command identifier contained in the preset command query instruction list; and querying a target control command corresponding to the target command identifier in the cloud command database according to the command query instruction. For example, after the command query instruction is obtained, the link of the target control command is directly opened or switched to the target control command in the cloud command database according to the link of the target control command, so as to obtain the target control command.
By the mode, the control commands in the distributed storage space can be called, the storage pressure of a command library of the electronic equipment can be reduced, the control commands outside the storage space of the electronic equipment (such as a server) can be inquired through the command inquiry command, the use requirements of users on any control command are met, and the user experience is improved.
And (2.4) adding the target control command to a preset command library through a command adding interface, and acquiring the target control command corresponding to the target identifier to be matched.
It should be noted that, after the target control command corresponding to the target command identifier in the cloud command database is queried, the target control command may be directly called, or the target control command may be added to a preset command library and then called, which is not limited herein.
Wherein the command adding interface may be a service interface for adding the control command to a preset command library. When the target control command needs to be added to the preset command library, command adding operation can be carried out through the command adding interface.
The step of adding the target control command to the preset command library through the command adding interface and obtaining the target control command corresponding to the target identifier to be matched may include:
and (2.4.1) binding the target control command with the target command identifier to obtain the target control command with the command identifier mapping relation, and updating the target control command with the command identifier mapping relation to a preset command library through a command newly-added interface.
Because the target control command searched in the cloud command database may not have a corresponding command identifier in the preset command library, in order to meet the subsequent direct use requirement of the same target control command (a control command in a non-preset command library), the searched target control command and the target command identifier can be bound, so that a mapping relation exists between the target control command and the target command identifier, and after the binding is completed, the target control command can be given an identifier to be matched (namely, the corresponding target command identifier); further, after the corresponding identifier to be matched is given to the target control command, the target control command having the mapping relation with the identifier to be matched is added to the preset command library through the command newly-added interface. In addition, after the target control command is added to the preset command library, the target command identifier and the target control command are bound, so that the target control command newly added to the command library has a corresponding identifier to be matched. By the above mode, the control command can be directly used subsequently according to the corresponding target command identifier, the efficiency of using the control command is improved, and the individual use requirements of the user are met.
It should be noted that, when the user uses the web service of the control command, the user may set a corresponding user account or identity, so that when adding the control command to the preset command library through the command add interface, the control command added by different users may be distinguished through the user account or identity, that is, the association relationship between the control command and the user account is established, so as to meet the individual requirements. In addition, the control command to be added can be loaded into the local storage space of the front end of the web service (i.e. the terminal device running the browser interface or the control information interface) so as to meet the individual requirements of the user on the control command.
The target control command with the mapping relation is added to the preset command library, and the adding mode may be as follows: and adding the control command with the mapping relation to a preset command library through the called command adding interface. For example, the command adding interface may be "localhost:8080/command Method: POST", and the target control command having the mapping relationship may be added to the preset command library through the command adding interface to update the number of control commands included in the preset command library.
And (2.4.2) determining a target control command corresponding to the target command identification based on the updated preset command library.
And after the control command is added to the preset command library, updating the original command library to obtain an updated preset command library. Further, acquiring a mapping relation between the control command in the updated preset command library and the identifier to be matched; comparing the target command identifier with the identifier to be matched of each control command in a preset command library to obtain a target identifier to be matched, which is matched with the target command identifier; and searching a target control command corresponding to the target identifier to be matched in the command library according to the mapping relation between the control command and the identifier to be matched.
In some embodiments, the step (2.2) "obtaining a control command corresponding to the target identifier to be matched as a target control command corresponding to the target identifier" further includes:
(2.2.1) acquiring version information of the control command matched with the target command identifier in a preset command library;
(2.2.2) when the release time in the version information is detected to be larger than a preset time threshold, acquiring a target control command corresponding to the target command identification in the cloud command database;
and (2.2.3) replacing the target control command with the control command matched with the target command identifier in the preset command library, and acquiring the target control command corresponding to the target command identifier from the preset command library.
The version information may control an information set of the command, which may include a command identifier, a command attribute, a command function/role, a usage scenario, an issue time, a current version number, and the like.
Due to the update of the object to be controlled (such as each component of the mobile terminal, an application on the terminal, etc.), the control command in the preset command library may not be able to control the object to be controlled, and therefore, the control command needs to be updated. In order to avoid that the obtained target control command cannot be operated or executed, whether the corresponding control command meets the preset updating condition or not can be detected at intervals of unit time (such as 1 week, half month, 1 month and the like) or when the target control command corresponding to the target command identifier is matched, and when the preset updating condition is met, the mechanical energy of the target control command corresponding to the target command identifier in the preset command library is updated. For example, when the release time of the target control command is greater than 1 month, the target control command corresponding to the target command identifier is newly acquired from the cloud command database, and the newly acquired target control command replaces the control command matched with the target command identifier in the preset command database to obtain a currently updated preset command database, so as to acquire the target control command matched with the target command identifier based on the updated preset command database.
In some embodiments, the manner of updating the control commands in the preset command library may be: respectively searching target control commands in the cloud command database according to a preset command identification list; comparing the searched target control command with a corresponding control command in a preset command library; and when the difference between the target control command and the corresponding control command in the preset command library is detected, updating the control command corresponding to the command identifier in the preset command library according to the control sub-command. The updating mode of the control command corresponding to the command identifier in the preset command library may be: and updating the control command corresponding to the command identifier in the preset command library by the sub-command through the called command updating interface. For example, the command update interface may be "localization: 8080/command/: command Method: PUT", it should be noted that, when a control command in the preset command library is updated through the command update interface, "command id", that is, a command identifier, in the command update interface needs to be set, so as to determine the control command needing to be updated according to the command identifier.
In addition, in order to meet the individual requirements of the user on the control commands, the present embodiment may delete the control commands in the preset command library according to the selection of the user, for example, compared with the user, part of the control commands in the preset command library are used less or not, and the part of the control commands are usually in an unused state, and may delete the part of the control commands. The realization mode is as follows: acquiring a use frequency value of each control command in a preset command library, and comparing the use frequency value of each control command with a preset frequency threshold; and when the use frequency value of the control command is detected to be smaller than the preset frequency threshold value, deleting the control command to be deleted in the preset command library through the command deleting interface. For example, the command deletion interface may be "locahst: 8080/command/: command Method: DELETE", it should be noted that when a control command in the preset command library is deleted through the command deletion interface, "command id", that is, a command identifier, in the command deletion interface needs to be set, so as to determine the control command that needs to be deleted according to the command identifier.
(3) And converting the target control command into a target control instruction which can be recognized by the object to be controlled.
It should be noted that the object to be controlled may not be able to directly recognize and execute the target control command, and therefore, after the target control command is obtained, the target control command needs to be converted into a corresponding target control instruction. When the target control command is converted, a corresponding command program can be started through the node language service in the node language environment, and the command program converts the target control command into a target control instruction which can be recognized by an object to be controlled; it should be noted that the command program may be a command line program or a command line tool with various functions, and is configured to execute the selected target control command to convert to obtain the target control command, provide access right to the transmission script, and subsequently send the target control command to the object to be controlled through the transmission script, so as to implement interaction between the electronic device (such as a server or a terminal) and the simulator or the device.
Since the computer environment of the object to be controlled (e.g., mobile terminal, application on the terminal) is different from the computer environment of the server, the mobile terminal or the application on the mobile terminal cannot recognize the target control command. In the embodiment of the present application, in order to enable a subsequent control command to be recognized by the mobile terminal, after the target control command is obtained, the target control command needs to be converted into a corresponding target control instruction. When the target control command is converted, a corresponding command program can be started through the node language service in the node language environment, and the target control command is converted into a target control instruction which can be identified by an object to be controlled through the command program; for example, the target control command is executed through a command program, so that the target control instruction which can be identified by the mobile terminal is obtained. For example, taking an ADB command as a target control command, an ADB command program (e.g., android Debug bridges Tools) is an Android software development tool, and executes the ADB command through the ADB command program to obtain a target control instruction that can be recognized by an Android device.
By the above mode, language interaction between the server and the mobile terminal can be realized, so that the mobile terminal to be controlled can identify the control command of the server, and feasibility is achieved.
103. And sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction.
In order to control the object to be controlled, the corresponding object to be controlled may be determined according to the identifier of the object to be controlled carried by the control command information, for example, the corresponding port address may be obtained according to the identifier of the object to be controlled, so as to determine the object to be controlled according to the port address, or the corresponding serial number may be obtained according to the identifier of the object to be controlled, so as to determine the object to be controlled according to the serial number. Further, the target control instruction is sent to the object to be controlled, and the target control instruction needs to be sent to the object to be controlled, so that the object to be controlled executes the target control instruction and responds according to an execution result.
For example, taking a mobile terminal as an object to be controlled, if a target control instruction is "upper left corner area of a screen of a test terminal", assuming that an application B is laid out in the upper left corner area of the screen of the terminal, when the mobile terminal executes the instruction, a touch scene of the upper left corner area of the screen of the terminal is simulated, and when a capacitive touch component in the upper left corner area of the screen of the terminal is in a normal state, the terminal opens the application B to complete a control scene of the target control instruction. The above is an exemplary control scenario for controlling the object to be controlled through the control command, and other controls may also be performed on the object to be controlled through the control command, such as an application on the terminal, opening an applet in the application, and jumping to a certain content or page of the applet, which are not described herein in detail.
Through the above mode, the control of the object to be controlled can be realized, the user does not need to manually touch the object to be controlled, and the target control instruction is sent to the object to be controlled, so that the remote control method can be applied to the remote control of the object to be controlled, has convenience, and is favorable for improving the control efficiency of the object to be controlled.
It should be noted that, when the terminal device platform pushes a new function for the mobile terminal, in the development and test stage of the new function, the existing old function on the mobile terminal needs to be tested, so as to avoid the new function from affecting the original old function, such as causing the phenomena of running disorder and flash fallback of the old function. For example, assuming that a terminal device platform provides a new function of 'double-click terminal screen quick screen locking' for a mobile terminal, since an old function has a function of 'click terminal screen quick screen capture', in order to avoid confusion between the new function and the old function in actual application, the new function can be tested first, and the running condition of the old function can be tested on the premise of ensuring normal running of the new function. However, when testing the old functions on the terminal, it may be necessary to test a plurality of old functions, which requires a user to set a plurality of control command information, or to set a large amount of control command information continuously, and the time difference between each control command information may cause a discontinuous test procedure or a messy test sequence for the old functions, which may affect the test effect on the old functions of the mobile terminal, and increase the workload of related personnel.
In the embodiment of the application, in order to improve the test effect on the old function of the mobile terminal, when the detection target control command is a command for testing the new function of the mobile terminal, the control command used for testing the old function of the terminal is evoked by one key, so that the old function similar to the new function is tested after the new function is tested. After the step of sending the target control instruction to the object to be controlled so that the object to be controlled executes the target control instruction, the method further comprises the following steps:
(1) And identifying the control item of the target control command, and matching the control item with a historical control item set of the object to be controlled.
The control item may be a function, an application, or the like of the object to be controlled. The identification mode of the control items is as follows: reading content information corresponding to a command identifier in a target control command, and determining a control item of the target control command according to the content information corresponding to the command identifier, wherein if the target control command is' locahost:8080/command/execute/command = android.
The historical control item set may be all historical control items for controlling the object to be controlled, such as testing an old function of the object to be controlled, running an application, and the like. After determining the control item, matching the history control item equivalent to the control item is needed to determine whether the control item is the history control item of the old function. It will be appreciated that when the control item does not match a historical control item, the control item is identified as a newly launched item, such as a newly launched function. Through the method, the control item of each target control command can be identified, so that whether the control item is the first tested item or not is determined, and the testing effect is improved.
(2) And when the control item is not matched with the historical control item, acquiring the item type corresponding to the control item.
The item type may be a type of control item, which may be distinguished according to attributes, functions, and the like. If the control item is a "test low power prompt scenario", the corresponding item type may be a "low power prompt scenario", or may be other similar description types, which is not specifically limited herein.
When the control item is not matched with the historical control item, the current target control item is determined to be a new item, in order to avoid the influence of the new item on the operating environment of the items of the same type of the object to be controlled, the control item and the items of the same type on the object to be controlled need to be controlled (such as testing) in sequence, and the like, and the item type corresponding to the control item can be obtained.
(3) The method comprises the steps of obtaining a plurality of target historical control commands of a historical control command set of an object to be controlled, wherein the target historical control commands are the same as the item types, and obtaining test paths corresponding to the target historical control commands.
The test path may be a test sequence of a plurality of target history control commands when testing a history of an object to be controlled, for example, target history control commands having 3 same item types, where the 3 target history control commands are a, b, and c, each target history control command corresponds to one history control item, and a sequence of the 3 target history control commands when testing the object to be controlled may be: if a is executed first, c is executed, and b is executed last, then the test path may be: a-c-b.
By acquiring the test paths of a plurality of target historical control commands with the same type as the items, the control sequence of the control items with the same item type in the object to be controlled is determined, the test effect is improved, and the accuracy of the object to be controlled in the test is ensured.
(4) And generating a combined control command corresponding to the plurality of target historical control commands according to the test path.
In order to ensure the control sequence of a plurality of target historical control commands on an object to be controlled and reduce the pressure generated by a command program of the electronic equipment when the plurality of target historical control commands are operated, the plurality of target historical control commands can be combined to obtain a control command containing a plurality of control functions. When generating a combined control command corresponding to a plurality of target historical control commands, the combined control command may be expressed in the form of a test path that may be combined with the plurality of target historical control commands, where the test path is "a-c-b":
"locacost: 8080/command/execute/command = $ { command _ a } & command = $ { command _ c } & command = $ { command _ b } & times = $ { times } Method: GET", in the combination control command, command _ a represents a target history control command a, command _ c represents a target history control command c, command _ b represents a target history control command b, and time represents the number of times of execution of the combination control command, for example, the number of times of execution may be 1, 2, 3, and the like. By the combined control command, the multiple control commands related to one-key awakening can be realized by combining the execution sequence of the multiple control commands.
In addition, by generating the form of the combined control command, the execution times of the combined control command can be set so that the combined control command is executed for multiple times, namely, the set times are executed circularly, so as to meet certain specific test scenes of the object to be controlled. For example, if a target control command needs to be executed multiple times or infinite times to test some specific test scenarios, such as "crazy clicking a certain button of the mobile terminal, crazy refreshing a page", etc., it can be implemented by combining control commands, and if the target control command is "commandId _1", the target control command is executed 100 times, that is, the value of time is 100, the corresponding combined control command can be expressed as follows:
“locahost:8080/command/execute/commandId=${commandId_1}×=${100}Method:GET”。
through the above manner, when a plurality of control commands are faced or one or more control commands are executed circularly, the combined control command can be generated to realize the purpose through the combined control command, and the combined control command is only equivalent to one control command when being executed through a command program, so that the operating pressure of the electronic equipment can be reduced, the operating resources (such as operating memory and the like) can be saved, and the performance of the electronic equipment can be improved.
(5) And executing the combined control command through a command program to obtain a combined control command.
In the embodiment of the application, in order to enable the subsequent control command to be recognized by the mobile terminal, the command program executes the combined control command, so that the combined control command which can be recognized by the mobile terminal is obtained. The combined control instruction includes a plurality of control instructions, and the plurality of control instructions included in the combined control instruction do not have a binding relationship, that is, correspond to the plurality of control instructions.
(6) And sending the combined control instruction to the object to be controlled so that the object to be controlled executes the combined control instruction.
Since the combined control instruction comprises a plurality of control instructions, when the combined control instruction is sent, the sending sequence of each control instruction can be determined according to the test path of each target historical control instruction in the combined control instruction, so as to determine the sequence of executing each control of the object to be controlled.
The combined control command is an instruction which can be identified by the object to be controlled, the combined control command is generated according to the combined control command, and the execution sequence of a plurality of controls in the combined control command is consistent with the test path set by the combined control command including the plurality of control commands, so that the combined control command can be directly sent to the object to be controlled, the object to be controlled reads the execution sequence of each control command in the combined control command, and executes each control command according to the execution sequence.
Wherein, the step "(6) of sending the combined control instruction to the object to be controlled, so that after the object to be controlled executes the combined control instruction", the method further comprises the following steps:
(7) And receiving a first control result returned after the object to be controlled executes the target control instruction, and receiving a second control result returned after the object to be controlled executes the combined control instruction.
The first control result and the second control result are results of the object to be controlled executing the corresponding control instruction, for example, after the object to be controlled executes the instruction of the "upper left corner region of the screen of the test terminal", the obtained control result may be "normal touch in the upper left corner region of the screen" or "abnormal touch in the upper left corner region of the screen", and the like, which is not limited herein.
In this embodiment, when it is detected that the control item of the target control command does not belong to the historical control item set, it indicates that there is no historical control record for the control item, that is, the control item is a new item, such as a new function, a new application, and the like on the terminal. In order to ensure that the new project normally runs on the terminal and the new project does not affect the running of the old project related to the new project on the terminal, the new project and the old project need to be controlled in sequence to realize the sequential testing of the new project and the related old project on the terminal so as to obtain the related control result. For example, after the object to be controlled executes the target control instruction, a first control result corresponding to the target control instruction is obtained, where the first control result may be a control result when a new project is tested; and after the object to be controlled executes the combined control instruction, obtaining a second control result corresponding to the combined control instruction, wherein the second control result can be a control result when an old item is tested.
(8) And determining a target control result corresponding to the control command information according to the first control result and the second control result.
And combining a first control result corresponding to the target control command and a second control result corresponding to the combined control command to obtain a target control result of the control command information. Taking a mobile terminal as an object to be controlled as an example, in order to test the operation condition of a new function on the mobile terminal, the operation of the new function on the mobile terminal needs to be tested through a target control command, and a first control result corresponding to the new function is obtained; testing the operation of the old function on the terminal through the target historical control command with the same type of the new function to obtain a second control result corresponding to the old function; thereby determining a target control result based on the first control result and the second control result.
Illustratively, the new function is "double-click terminal screen shortcut lock screen", the target control command is "simulated double-click terminal screen shortcut lock screen", the old function may be "click screen" or "click screen specific position" to realize the related function (function related to click screen), and the combined control command may be "simulated click screen xxxx". Further, when the first control result corresponding to the target control command is "test normal" and the second control result corresponding to the combined control command is "test normal", it indicates that the new function can normally operate without affecting the operation of the old function; when the first control result corresponding to the target control command is normal in test and the second control result corresponding to the combined control command is abnormal in test, the new function can normally operate but the operation of the old function is influenced; when the first control result corresponding to the target control command is "test abnormal" and the second control result corresponding to the combined control command is "test normal" or "test abnormal", it indicates that the new function is operating abnormally and may have an influence on the operation of the old function.
By the above mode, the control of the new project of the object to be controlled can be realized, and whether the new project affects the operation of the original old project or not is determined, so that the whole function test of the object to be controlled has sustainability; and through the form of combining the control commands, the method can realize that the single or a plurality of control commands are circularly executed to control the related scenes, thereby realizing simulation and having reliability.
As can be seen from the above, the embodiment of the application can receive control command information sent by a control information interface of a target application, where the control command information carries an identifier of an object to be controlled, where the control information interface displays an identifier control corresponding to a control command in a preset command library, and the control command information is converted from a target identifier control in the control information interface; converting the control command information into a target control command which can be identified by an object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction. Therefore, the control command service is deployed on the computer equipment with the interactive capability, so that when other terminals call the control command service, the control commands of the preset command library in the computer equipment are displayed on the control information interface of the terminal in the state of the identification control, and the control commands are visualized on the control information interfaces of other terminals; and the control command information sent by the control information interface is converted into a target control command based on the node language service in the node language environment, and the target control command is sent to the object to be controlled, so that the control of the object to be controlled by calling the control command service through other terminals is realized, specific test software or programs do not need to be installed on other terminals, the convenience of controlling the object to be controlled is improved, a user does not need to directly input the control command when controlling the object to be controlled, and the operation process is simplified.
The method described in the above examples is further illustrated in detail below by way of example.
In the embodiment of the present application, it will be described from the perspective of an information processing apparatus, and the information processing apparatus may be specifically integrated in an electronic device, such as a terminal device.
Referring to fig. 3, fig. 3 is a schematic flow chart of another step of the information processing method provided in the embodiment of the present application, and when a processor on the terminal executes a program corresponding to the information processing method, a specific flow of the information processing method is as follows:
201. and displaying a control information interface.
The control information interface may be a display interface for implementing visualization of a control command preset in a current electronic device (e.g., a server or a terminal), and the control information interface includes a plurality of identification controls corresponding to the control command. The control command can be displayed in the form of identifying the control or the state of the control in the control information interface in the forms of characters, identifications, codes or preset characters and the like, so that the control command can be visualized.
The control information interface can be located on the current terminal, communication connection with the server is established through the called webpage service interface, and relevant information corresponding to a control command built in the server is sent to the operation terminal in front through interaction between the server and the current terminal, so that the operation terminal displays the relevant information corresponding to the received control command through the control information interface.
When the control information interface displays the relevant information corresponding to the control command, the relevant information corresponding to the control command can be generated to identify the state layout of the control on the control information interface, and display is achieved. Before the step of displaying the control information interface, the method further comprises the following steps:
(1) And sending a calling request of the web service interface to the server so that the server returns a command identifier set consisting of command identifiers corresponding to each control command in a preset command library according to the calling request.
The Web service interface (Node Web API) can be an interface with the capability of selecting and setting a control command, so that the terminal equipment calls the Web service of the control command through the interface and remotely controls an object to be controlled through the Web service. Illustratively, a user sends a call request of a web service interface to a server through a browser application or an application with a browser function through a terminal (a mobile phone, a computer, etc.); and enabling the server to acquire a command identifier set corresponding to the control command in the preset command library and return the command identifier set to the terminal equipment.
(2) And receiving a command identification set, and laying out each command identification in the command identification set on the control information interface in a mode of identifying the state of the control.
In the related art, a user can only input a related control command or a related code string on a specific terminal to control the mobile terminal, and the control command or the code string input by the user is complex, is not easy to memorize, and is complex to operate, and if the user is required to search the related code string or the control command, a non-professional person is difficult to operate, so that the threshold of information processing is high, and the efficiency of information processing is extremely low.
According to the method and the device, the terminal equipment receives the command identifier set returned by the server, and the command identifiers in the command identifier set are distributed on the control information interface in the visual state of the identification control, so that a user can simply and accurately input control command information. And if the command identifications are laid out on the corresponding identification control, the control commands are visually displayed.
Through the mode, the control command can be packaged through the image user interface (GUI), the effect of transmitting the control command is achieved through the image user interface, the user can conveniently recognize or learn the function of the control command, the learning cost of the user on the control command (such as an ADB command) is reduced, the control requirements of the user without professional knowledge in the aspect of the control command on devices such as a mobile phone, a simulation machine and a cloud reality machine can be met, and feasibility is achieved.
202. And generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface.
The control information interface comprises an information component area and an information input frame area, wherein the information component area can be an area where the identification control is laid out, and the information input frame area can be an information frame area used for directly inputting a control command and an object identification (name, serial number, ID and the like) needing to be controlled.
When a user configures control command information through the control information interface, the user can click an identification control corresponding to a command identification arranged in the information component area; or directly inputting a command identifier, a control command, an object identifier to be controlled and the like in an information input box; or clicking an identification control corresponding to the command identification arranged in the information component area, and inputting an object identification to be controlled and the like in the information input box; further, any combination of the above configurations is also possible. Through the configuration mode, the control command information can be generated, the requirement of a user on the control command information is met, the control intention and the requirement of the user on the object to be controlled are effectively expressed, and the user experience is improved.
203. And sending the control command information to a server so that the server converts the control command information into a target control instruction which can be recognized by the object to be controlled through the node language service in the node language environment, and sends the target control instruction to the object to be controlled.
In order to control an object to be controlled, after control command information configured by a user through a control information interface is obtained, the control command information needs to be sent to a server. Determining a corresponding target command identifier according to the control command information by using the node language service in the server node language environment; then, matching a corresponding target control command according to the target command identifier; then, the server executes the target control command through a command program to obtain a target control command; and finally, sending the target control instruction to the object to be controlled so as to control the object to be controlled.
As can be seen from the above, in the embodiment of the present application, control command information sent by a control information interface of a target application is received, where the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is converted from a target identifier control in the control information interface; converting the control command information into a target control command which can be identified by an object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction. Therefore, the control command service is deployed on the computer equipment with the interactive capability, so that when other terminals call the control command service, the control commands of the preset command library in the computer equipment are displayed on the control information interface of the terminal in the state of the identification control, and the control commands are visualized on the control information interfaces of other terminals; and the control command information sent by the control information interface is converted into a target control command based on the node language service in the node language environment, and the target control command is sent to the object to be controlled, so that the control of the object to be controlled by calling the control command service through other terminals is realized, specific test software or programs do not need to be installed on other terminals, the convenience of controlling the object to be controlled is improved, a user does not need to directly input the control command when controlling the object to be controlled, and the operation process is simplified.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Referring to fig. 4, fig. 4 is a schematic timing flow diagram of an information processing method provided in the embodiment of the present application, fig. 5 is a schematic control information interface provided in the embodiment of the present application, fig. 6a is a schematic interaction scenario diagram of the information processing method provided in the embodiment of the present application, and fig. 6b is a schematic interaction logic diagram of the information processing method provided in the embodiment of the present application; for easy understanding, please refer to fig. 4, fig. 5, fig. 6a and fig. 6b together to describe the embodiments of the present application.
In the embodiments of the present application, description will be made from the perspective of an information processing apparatus, which can be specifically integrated in an electronic device such as a terminal, a server, or the like. When the processors on the terminal and the server execute the programs corresponding to the information processing method together, the specific time sequence flow corresponding to the information processing method is as follows:
301. and the terminal sends a calling request of the web service interface to the server.
A user sends a call request of a Web service interface (Node Web API) to a server through a browser application of a terminal (such as a mobile terminal, a computer, etc.) or an application with a browser function, so as to realize quick start of a Web service through a command-line interface (CLI) provided by a Node.
The Web service interface (Node Web API) can be an interface for realizing information interaction between the control information interface and the electronic equipment, and can select and input control command information from the control information interface and transmit the control command information to the electronic equipment, so that the terminal equipment calls the Web service of the control command through the interface and remotely controls the object to be controlled through the Web service. It should be noted that, the web service interface belongs to an interface set on the server side, and is designed by using standard Restful, and the control command itself is regarded as a resource, and the operation on all commands is regarded as the operation on the resource. When the control command is operated, the command identifier corresponding to the control command is used as key information in the uniform resource locator address, so that the resource corresponding to each interface is specified through a uniform resource locator address (URL). And further, the capability of the web service Node (Node) of the control command (such as an ADB command) is more full and expandable, so that the user experience is improved, and the expansion is supported by combining with the actual business.
In addition, the server side is provided with a plurality of types of interfaces, and the resource corresponding to each interface is specified through a Uniform Resource Locator (URL). The command identifier corresponding to the control command can be used as key information in the uniform resource location address; and adding, modifying, deleting and the like of the resource are realized by using the verb in the HTTP protocol, that is, the state torsion of the resource is realized by using the HTTP verb, in the embodiment, for example, "GET" is used for acquiring or executing the control command, "POST" is used for adding the control command resource (which can also be used for updating the resource), "PUT" is used for updating the control command resource, and "DELETE" is used for deleting the control command resource. For example, the present embodiment is not limited to an Application Programming Interface (Node API) that may include the following service nodes:
"localhost:8080/command Method: POST", for adding control command;
"locahst: 8080/command/: command ID Method: PUT" for updating control commands;
"locahst: 8080/command/execute/command = $ { command _1} & command = $ { command _2} & times = $ { times } Method: GET", is used for executing a combined control command, that is, a plurality of control commands are executed in combination.
"locahost:8080/command/: command ID Method: DELETE" is used to DELETE the control command.
Through the application program interface, the capability of the webpage service node can be more full and expandable, so that the experience of a user is improved, the expansion in combination with actual business is supported, and the individual requirements of the user on control commands (such as ADB commands) are met.
302. And the server returns a command identifier set consisting of command identifiers corresponding to all the control commands in the preset command library according to the calling request, and returns the command identifier set to the terminal.
Since the control command is usually composed of a character string or a code, in order to facilitate the user to recognize or learn the function of the control command, each control command preset in the server may be replaced with a corresponding character, code, or the like, which is easy for the user to recognize. In this embodiment, the command identifier may be information such as a short text and a preset number that describe the control command, where the implementation manner of obtaining the command identifier corresponding to each control command may be: acquiring a command identifier corresponding to each control command according to a preset control command and a command identifier list, and combining the command identifiers to obtain a preset command identifier set of all control commands through information processing according to the command identifier corresponding to each control command; it should be noted that the preset control command and command identifier list includes a plurality of mapping relationships between control commands and command identifiers, and when the control command and command identifier list is established in advance, corresponding command identifiers may be configured for existing control commands, so that the control command and command identifier list is established according to each control command and the configured command identifier.
Further, in order to visualize the control command preset in the server, the command identifier set needs to be returned to the corresponding terminal.
Through the mode, the control command can be packaged to be displayed in a specific display mark in the visualization of the control command in the follow-up process, and a user can conveniently recognize or learn the function of the control command.
303. And the terminal receives the command identifier set, lays out each command identifier in the command identifier set on the control information interface in the state of identifying the control, and displays the control information interface.
And when each command identifier is laid out on the corresponding identifier control, for example, each command identifier is laid out on the identifier control in a one-to-one manner, and each identifier control is laid out on the control information interface, so that the control command is visually displayed on the control information interface.
Through the mode, the control command can be packaged through the image user interface (GUI), the effect of transmitting the control command is achieved through the image user interface, the user can conveniently recognize or learn the function of the control command, the learning cost of the user on the control command (such as an ADB command) is reduced, the control requirements of the user without professional knowledge in the aspect of the control command on devices such as a mobile phone, a simulation machine and a cloud reality machine can be met, and feasibility is achieved.
304. And the terminal generates control command information according to the identification control selected by the user on the control information interface.
Referring to fig. 5, the control information field 40 includes an information component area 41 and an information input frame area 42, the information component area 41 may be an area where the above-mentioned identification control 411 is laid out, and the information input frame area 42 may be an information frame area for directly inputting a control command, an identification (name, serial number, ID, etc.) of an object to be controlled.
The control command information may be control information set by a user when the user controls (such as testing, debugging, controlling, and the like) the object to be controlled, and represents a control intention of the user when the user controls the object to be controlled, and the control command information may be generated in a manner of directly inputting information through a control information interface, clicking an identification control, and the like, and is used for selecting a corresponding control command when the electronic device subsequently implements the information processing method.
For example, the user is to configure control command information on "prompt function when testing low battery" at the control information interface. When a user configures control command information through the control information interface, the user can click an identification control corresponding to a command identification arranged in the information component area, such as clicking a 'low-power prompt' control, so as to generate corresponding control command information; or directly inputting a command identifier, a control command, an object identifier to be controlled and the like in the information input box, for example, directly inputting the control command in the information input box, the control command may be "locahost:8080/command/execute/command = address. Or, by clicking the identification control corresponding to the command identification laid out in the information component area, and inputting the identification of the object to be controlled in the information input box, for example, configuring the control command information about the "prompt function of the test a application at low power", the "low power prompt" control in the information component area may be clicked, and the "a application" may be input in the information input box, so as to obtain the control command information corresponding to the "prompt function of the test a application at low power". Through the configuration mode, the control command information can be generated, the requirement of a user on the control command information is met, the control intention and the requirement of the user on the object to be controlled are effectively expressed, and the user experience is improved.
305. And the terminal sends control command information to the server through a control information interface of the target application, wherein the control command information carries the identification of the object to be controlled.
After a user generates control command information on a control information interface of a browser application or an application with a browser function, the control command information needs to be sent to a server. Because a user calls a Web service interface (Node Web API) of a control command through a browser application of a terminal or an application with a browser function to realize the establishment of communication between the browser interface and a remote server, control command information generated by a control information interface can be sent to the server through the Web service interface, so that the server can subsequently process information according to the received control command information. The control command information carries an object to be controlled, such as control command information corresponding to a prompt function for testing application A in low power, and the object to be controlled is application A.
306. And the server receives the control command information and determines a target command identifier corresponding to the control command information through the node language service in the node language environment.
The server receives control command information through a Web service interface (Node Web Api), where the control command information may be a Uniform Resource Locator (URL) carrying an HTTP protocol.
For example, after a user configures control command information about "prompt function when testing low battery" on a control information interface, and receives the control command information through a Web service interface (Node Web Api), the expression form of the control command information on a server may be as follows:
“http://locahost:8080/command/execute/commandId=android.intent.action.BATTERY_LOW”。
the intention data is intention information of a user when the user sets a control command on a control information interface, and represents the control intention of the user on an object to be controlled, and the intention data can be key information, keywords, key phrase information and the like in the control command information. The intention data can reflect the control purpose, the control purpose and the like of the user on the object to be controlled.
The target command identification may reflect an intention corresponding to the control command information, which represents the corresponding control command in the form of a short text, a preset number, or the like.
In order to determine a target command identifier corresponding to the control command information, it is necessary to identify intention data of the control command information, where an identification process of the intention data may be: acquiring character information in the control command information; searching a preset part-of-speech information table according to the character combination in the character information, or matching the character combination in the character information with the information in the preset part-of-speech information table to obtain phrase data or word characteristics; and determining the intention data in the control command information according to the searched or matched phrase data (or word characteristics) and the main predicate element structure sentence pattern (or the predicate element structure sentence pattern).
The intention data in the control command information is determined according to the searched or matched phrase data (or word features) and the main predicate structure sentence pattern (or predicate structure sentence pattern), and the implementation manner may be: acquiring the word attribute of each matched word group data (or word characteristic); filling the main predicate structure sentence pattern (or the predicate structure sentence pattern) according to the word attribute of each matched word group data (or word characteristic), obtaining a target control information sentence pattern corresponding to the control command information, extracting the word group data (or the word characteristic) corresponding to the verb attribute in the target control information sentence pattern, and determining the word group data (or the word characteristic) as intention data. Furthermore, traversing is carried out according to the intention data and command identification data in a preset control command and command identification list, so that a target command identification corresponding to the control command information is determined.
Through the mode, the target command identification is determined according to the control command information, the control intention of the user to the object to be controlled can be converted into the target command identification recognized by the server, and therefore the accuracy and the efficiency in the subsequent process of acquiring the corresponding control command are improved.
307. And the server matches the corresponding target control command according to the target command identifier.
Wherein the control command may be A Debug Bridge (ADB) command.
For example, the control command information about "prompt function at low battery test" is expressed in the form of:
"http:// locahost:8080/command/execute/command = address.intent.action.battery _ LOW", and further, the target control command corresponding to the control command information may be "command = address.intent.action.battery _ LOW".
The preset command library of the server comprises a plurality of control commands with different function types, and in order to determine the control command of the target function type, when the control command is selected, the target control command corresponding to the target command identifier can be matched based on the mapping relation between the preset control command and the command identifier list, so that the accuracy and the efficiency in selecting the control command are improved. Specifically, the matching manner of the target control command may be: acquiring a to-be-matched identifier of a control command in a preset command library; traversing the target command identifier and each identifier to be matched; and when the target command identifier is detected to be matched with the corresponding target identifier to be matched, acquiring a target control command corresponding to the target identifier to be matched. On the other hand, when the target command identifier is not matched with the corresponding target identifier to be matched, determining a command query instruction corresponding to the target command identifier according to a preset command query instruction list; and calling a target control command corresponding to the target command identification according to the command query instruction.
308. And the server converts the target control command into a target control command which can be recognized by the object to be controlled.
The command program is a command line program or a command line tool with multiple functions, and is used for executing a selected target control command so as to realize interaction between an electronic device (such as a server or a terminal) and a simulator or a device. Illustratively, the command program may be an ADB command program (e.g., android Debug Bridge Tools), which may pass access rights to a command line (Unix shell).
For example, the implementation manner of executing the target control command by the command program may be: js operating environment based on the server, operating the Shell program; executing the target control command through the Shell program to obtain an execution result; and sending an execution result of the Shell program to the ADB command program through the access authority given to the Shell program by the ADB command program, so that the ADB command program converts the execution result into a target control instruction which can be identified by an object to be controlled (Android equipment).
For example, regarding the control command information of the "prompt function at the time of testing LOW power amount", the corresponding target control command may be "command id = address. Further, in the subsequent step, the target control command is executed by the command program, and the corresponding target control instruction may be "child _ process.exec (' adb ', [" shell "," am ', $ { query.
By the above mode, language interaction between the server and the mobile terminal can be realized, so that the mobile terminal to be controlled can identify the control command of the server, and feasibility is achieved.
309. And the server sends the target control instruction to the object to be controlled based on the identifier of the object to be controlled.
In order to control the object to be controlled, the target control instruction may be sent to the object to be controlled, and the target control instruction needs to be sent to the object to be controlled, so that the object to be controlled executes the target control instruction and responds according to an execution result.
310. And the object to be controlled executes the target control instruction to obtain a control result.
It should be noted that the object to be controlled usually has a specific program thereon, and can execute the target control instruction.
For example, taking an Android device as an object to be controlled, a daemon process (adbd) is installed on the Android device and is used for assisting A Debugging Bridge (ADB) in debugging the Android device. For example, the target control instruction is 'upper left corner area of a screen of a test terminal', and if an application B is laid out in the upper left corner area of the screen of the Android device, the Android device simulates a touch scene in the upper left corner area of the screen of the terminal when executing the instruction, so that a touch signal is generated in the upper left corner area of the screen of the Android device; and when the capacitive touch control assembly in the upper left corner area of the screen of the Android device is in a normal state, the terminal opens the application B to indicate that the test result in the upper left corner area of the screen of the Android device is normal.
The above is an exemplary control scenario for controlling the object to be controlled through the control command, and other controls may also be performed on the object to be controlled through the control command, such as an application on the terminal, opening an applet in the application, and jumping to a certain content or page of the applet, which are not described herein in detail.
311. And returning the control result to the server by the object to be controlled.
And the object to be controlled sends the control result to the server so as to realize the feedback of the result of executing the target control instruction to the server.
312. And the server sends the control result to a control information interface of the terminal through the webpage service interface.
When the server receives the control result sent by the object to be controlled, the server may perform information processing on the control result, for example, convert the control result into corresponding text or identification information, and send the converted text or identification information to a terminal (a control terminal for displaying a control information interface) so as to display the related control result on the control information interface.
It should be noted that, in the embodiment of the present application, the servers involved in steps 301 to 312 may implement the above related method steps based on a specific operating environment. Js, that is, javaScript running on the server side, may be utilized as a server side language to interact with an operating system according to the language. In addition, the node.js operating environment based on the server can implement the expansion of the service or the function through an expansion tool (such as npm), for example, a function corresponding to a debugging bottom layer of an image user interface (GUI) can pack an image user interface expansion packet (such as an image user interface packet in npm format), and configure the image user interface expansion packet to a server side having the node.js operating environment, so that the Node service can be deployed.
On the other hand, a node.js operating environment can be built on other electronic equipment (such as a local terminal) so as to deploy Node services, thereby replacing the Node services on the server side. For example, the local terminal may be a desktop computer, a notebook computer, a mobile terminal, and the like, and taking a Personal Computer (PC) as an example, a node. Furthermore, a function corresponding to a debugging bottom layer of the Graphical User Interface (GUI) may be configured to pack a graphical user interface extension packet (e.g., a graphical user interface packet in the format of npm) of the layer, and configure the graphical user interface extension packet to a local terminal having a Node. By the method, the control command pre-stored in the local terminal can be packaged, and the command identifier of the pre-stored control command is displayed through the control information interface, so that the visualization of the control command is realized.
In the embodiment of the application, a web service interface of a Node service (control command service) can be called through a browser application on any control terminal or an application with a browser function, and control command information is generated on a control information interface, so that the Node service generates a corresponding target control instruction according to the control command information and sends the target control instruction to an object to be controlled, the problem of limitation of controlling the object to be controlled (such as Android equipment) through a fixed terminal can be solved, and the method and the device have high expandability.
As can be seen from the above, the embodiment of the application can receive control command information sent by a control information interface of a target application, where the control command information carries an identifier of an object to be controlled, where the control information interface displays an identifier control corresponding to a control command in a preset command library, and the control command information is converted from a target identifier control in the control information interface; converting the control command information into a target control command which can be identified by an object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled, so that the object to be controlled executes the target control instruction. Therefore, the control command service is deployed on the computer equipment with the interactive capability, so that when other terminals call the control command service, the control commands of the preset command library in the computer equipment are displayed on the control information interface of the terminal in the state of the identification control, and the control commands are visualized on the control information interfaces of other terminals; and the control command information sent by the control information interface is converted into a target control command based on the node language service in the node language environment, and the target control command is sent to the object to be controlled, so that the control of the object to be controlled by calling the control command service through other terminals is realized, specific test software or programs do not need to be installed on other terminals, the convenience of controlling the object to be controlled is improved, a user does not need to directly input the control command when controlling the object to be controlled, and the operation process is simplified.
In order to better implement the above method, the present application further provides an information processing apparatus, which may be integrated in an electronic device, such as a server or a terminal.
For example, as shown in fig. 7, the information processing apparatus may include a receiving unit 501, a converting unit 502, and a transmitting unit 503.
The receiving unit 501 is configured to receive control command information sent by a control information interface of a target application, where the control command information carries an identifier of an object to be controlled, where the control information interface displays an identifier control corresponding to a control command in a preset command library, and the control command information is converted from a target identifier control in the control information interface;
a conversion unit 502, configured to convert the control command information into a target control instruction recognizable by the object to be controlled through a node language service in a node language environment, where the node language service is configured to determine a target control command corresponding to the control command information input by the user, and convert the target control command into a target control instruction recognizable by the object to be controlled;
a sending unit 503, configured to send the target control instruction to the object to be controlled based on the identifier of the object to be controlled, so that the object to be controlled executes the target control instruction.
In some embodiments, the conversion unit further comprises: determining a subunit, a matching subunit and a converting subunit;
the determining subunit is used for determining a target command identifier corresponding to the control command information through the node language service in the node language environment;
the matching subunit is used for matching the corresponding target control command according to the target command identifier;
and the conversion subunit is used for converting the target control command into a target control instruction which can be recognized by the object to be controlled.
In some embodiments, the determining subunit is further configured to: acquiring character information in the control command information; searching a preset part-of-speech information table according to the character combination in the character information, or matching the character combination in the character information with the information in the preset part-of-speech information table to obtain phrase data or word characteristics; determining intention data in the control command information according to the searched or matched phrase data (or word characteristics) and the main predicate object structure sentence pattern (or predicate object structure sentence pattern); and performing character matching on the intention data and the command identifier in the command identifier list so as to determine a target command identifier corresponding to the control command information.
In some embodiments, the determining subunit is further configured to: acquiring the word attribute of each matched word group data (or word characteristic); and filling the word attributes of each matched word group data (or word characteristic) into a main predicate object structure sentence pattern (or a predicate object structure sentence pattern) to obtain a target control information sentence pattern corresponding to the control command information, and extracting the word group data (or word characteristic) corresponding to the verb attribute in the target control information sentence pattern to determine as intention data.
In some embodiments, the matching subunit is further configured to:
searching a to-be-matched identifier matched with the target command identifier in a preset command library, wherein the to-be-matched identifiers of a plurality of control commands are stored in the preset command library;
and when the target to-be-matched identifier matched with the target command identifier is found, acquiring a control command corresponding to the target to-be-matched identifier as a target control command corresponding to the target command identifier.
In some embodiments, the matching subunit is further configured to:
when the target to-be-matched identifier matched with the target command identifier is not found, searching a target control command corresponding to the target command identifier in the cloud command database;
and newly adding the target control command to a preset command library through the command newly-added interface, and acquiring the target control command corresponding to the target identifier to be matched.
Further, in some embodiments, the matching subunit is further configured to:
binding the target control command with the target command identifier to obtain a target control command with a command identifier mapping relation, and updating the target control command with the command identifier mapping relation to a preset command library through a command newly-added interface;
and determining a target control command corresponding to the target command identifier based on the updated preset command library.
In some embodiments, the matching subunit is further configured to:
acquiring version information of a control command matched with a target command identifier in a preset command library;
and when the release time in the version information is detected to be larger than a preset time threshold, acquiring a target control command corresponding to the target command identifier in the cloud command database, and replacing the target control command with a control command matched with the target command identifier in the preset command database.
In some embodiments, the information processing apparatus further includes: a processing unit, the processing unit specifically configured to:
identifying a control item of a target control command, and matching the control item with a historical control item set of an object to be controlled;
when the control item is detected not to be matched with the historical control item, acquiring an item type corresponding to the control item;
acquiring a plurality of target historical control commands of which the historical control command sets of the object to be controlled are the same as the item types, and acquiring test paths corresponding to the target historical control commands;
generating a combined control command corresponding to a plurality of target historical control commands according to the test path;
executing the combined control command through a command program to obtain a combined control command;
and sending the combined control instruction to the object to be controlled so that the object to be controlled executes the combined control instruction.
Further, in some embodiments, the processing unit is further configured to:
receiving a first control result returned after the object to be controlled executes the target control instruction, and receiving a second control result returned after the object to be controlled executes the combined control instruction;
and determining a target control result corresponding to the control command information according to the first control result and the second control result.
In some embodiments, the information processing apparatus further includes: an interface control unit for:
when a calling request of a webpage service interface sent by a target application is detected, acquiring a command identifier corresponding to each control command in a preset command library, and generating a command identifier set;
and returning the command identifier set to the terminal, so that the terminal displays each command identifier in the command identifier set on the control information interface in the state of the identifier control through the target application.
As can be seen from the above, in the embodiment of the present application, control command information sent by a control information interface of a target application may be received by the receiving unit 501, where the control command information carries an identifier of an object to be controlled, where the control information interface displays an identifier control corresponding to a control command in a preset command library, and the control command information is converted from a target identifier control in the control information interface; the conversion unit 502 is configured to convert the control command information into a target control instruction recognizable by the object to be controlled through a node language service in a node language environment, where the node language service is configured to determine a target control command corresponding to the control command information input by the user, and convert the target control command into a target control instruction recognizable by the object to be controlled; the sending unit 503 is configured to send the target control instruction to the object to be controlled based on the identifier of the object to be controlled, so that the object to be controlled executes the target control instruction. Therefore, the control command service is deployed on the computer equipment with the interactive capability, so that when other terminals call the control command service, the control commands of the preset command library in the computer equipment are displayed on the control information interface of the terminal in the state of the identification control, and the control commands are visualized on the control information interfaces of other terminals; and the control command information sent by the control information interface is converted into a target control command based on the node language service in the node language environment, and the target control command is sent to the object to be controlled, so that the control of the object to be controlled by calling the control command service through other terminals is realized, specific test software or programs do not need to be installed on other terminals, the convenience of controlling the object to be controlled is improved, a user does not need to directly input the control command when controlling the object to be controlled, and the operation process is simplified.
In order to better implement the above method, the embodiment of the present application further provides an information processing apparatus, which may be integrated in an electronic device, such as a terminal, where the terminal may be a mobile phone, a computer, or other terminal devices.
For example, as shown in fig. 8, the information processing apparatus may include a display unit 601, an information generating unit 602, and an information transmitting unit 603.
The display unit 601 is configured to display a control information interface, where the control information interface includes a plurality of identification controls corresponding to the control commands;
an information generating unit 602, configured to generate, according to an identifier control selected by a user on a control information interface, control command information corresponding to the selected identifier control;
an information sending unit 603, configured to send the control command information to the server, so that the server converts the control command information into a target control instruction recognizable by the object to be controlled through the node language service in the node language environment, and sends the target control instruction to the object to be controlled.
In some embodiments, the information processing apparatus further includes: an interface layout unit to:
sending a calling request of a web service interface to a server so that the server returns a command identifier set consisting of command identifiers corresponding to each control command in a preset command library according to the calling request;
and receiving a command identification set, and laying out each command identification in the command identification set on the control information interface in a state of identifying the control.
As can be seen from the above, in the embodiment of the present application, a control information interface may be displayed through the display unit 601, where the control information interface includes a plurality of identification controls corresponding to control commands; generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface through the information generating unit 602; the control command information is sent to the server through the information sending unit 603, so that the server converts the control command information into a target control instruction recognizable by the object to be controlled through the node language service in the node language environment, and sends the target control instruction to the object to be controlled.
Therefore, the control command service is deployed on the computer equipment with the interactive capability, so that when other terminals call the control command service, the control commands of the preset command library in the computer equipment are displayed on the control information interface of the terminal in the state of the identification control, and the control commands are visualized on the control information interfaces of other terminals; and the control command information sent by the control information interface is converted into a target control command based on the node language service in the node language environment, and the target control command is sent to the object to be controlled, so that the control of the object to be controlled by calling the control command service through other terminals is realized, specific test software or programs do not need to be installed on other terminals, the convenience of controlling the object to be controlled is improved, a user does not need to directly input the control command when controlling the object to be controlled, and the operation process is simplified.
An electronic device according to an embodiment of the present application is further provided, as shown in fig. 9, which shows a schematic structural diagram of the electronic device according to an embodiment of the present application, specifically:
the electronic device may include components such as a processor 701 of one or more processing cores, memory 702 of one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 9 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 701 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 702 and calling data stored in the memory 702, thereby performing overall monitoring of the electronic device. Optionally, processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 701.
The memory 702 may be used to store software programs and modules, and the processor 701 executes various functional applications and data processing by operating the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
The electronic device further includes a power source 703 for supplying power to each component, and preferably, the power source 703 may be logically connected to the processor 701 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The power supply 703 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may also include an input unit 704, and the input unit 704 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 701 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 702 according to the following instructions, and the processor 701 runs the application program stored in the memory 702, so as to implement various functions as follows:
receiving control command information sent by a control information interface of a target application, wherein the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is converted from a target identifier control in the control information interface; converting the control command information into a target control command which can be identified by the object to be controlled through node language service under the node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction.
Or, displaying a control information interface, wherein the control information interface comprises a plurality of identification controls corresponding to the control commands; generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface; and sending the control command information to a server so that the server converts the control command information into a target control instruction which can be identified by the object to be controlled through the node language service in the node language environment, and sending the target control instruction to the object to be controlled.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, the embodiment of the application can receive control command information sent by a control information interface of a target application, where the control command information carries an identifier of an object to be controlled, where the control information interface displays an identifier control corresponding to a control command in a preset command library, and the control command information is converted from a target identifier control in the control information interface; converting the control command information into a target control command which can be identified by an object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction. Therefore, the control command service is deployed on the computer equipment with the interaction capacity, so that when other terminals call the control command service, the control commands of the preset command library in the computer equipment are displayed on the control information interface of the terminal in the state of the identification control, and the control commands are visualized on the control information interfaces of other terminals; and the control command information sent by the control information interface is converted into a target control command based on the node language service in the node language environment, and the target control command is sent to the object to be controlled, so that the control of the object to be controlled by calling the control command service through other terminals is realized, specific test software or programs do not need to be installed on other terminals, the convenience of controlling the object to be controlled is improved, a user does not need to directly input the control command when controlling the object to be controlled, and the operation process is simplified.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the information processing methods provided in the embodiments of the present application. For example, the instructions may perform the steps of:
receiving control command information sent by a control information interface of a target application, wherein the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is converted from the target identifier control in the control information interface; converting the control command information into a target control command which can be identified by an object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining the target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled; and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction.
Or, displaying a control information interface, wherein the control information interface comprises a plurality of identification controls corresponding to the control commands; generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface; and sending the control command information to a server so that the server converts the control command information into a target control instruction which can be identified by the object to be controlled through the node language service in the node language environment, and sending the target control instruction to the object to be controlled.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
The present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the information processing method provided in the various optional implementation manners in the above embodiments.
Since the instructions stored in the computer-readable storage medium can execute the steps in any information processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any information processing method provided in the embodiments of the present application can be achieved, and detailed descriptions are omitted here for the details, see the foregoing embodiments.
The foregoing detailed description is directed to an information processing method and apparatus provided in an embodiment of the present application, and a specific example is applied in the detailed description to explain the principles and embodiments of the present application, and the foregoing description of the embodiment is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. An information processing method characterized by comprising:
receiving control command information sent by a control information interface of a target application, wherein the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is formed by converting a target identifier control in the control information interface;
converting the control command information into a target control command which can be identified by the object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining a target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled;
and sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled, so that the object to be controlled executes the target control instruction.
2. The method according to claim 1, wherein the converting the control command information into the target control instruction recognizable by the object to be controlled through a node language service in a node language environment comprises:
determining a target command identifier corresponding to the control command information through a node language service in a node language environment;
matching a corresponding target control command according to the target command identification;
and converting the target control command into a target control instruction which can be recognized by the object to be controlled.
3. The method of claim 2, wherein matching the corresponding target control command according to the target command identification comprises:
searching a to-be-matched identifier matched with the target command identifier in a preset command library, wherein the to-be-matched identifiers of a plurality of control commands are stored in the preset command library;
and when the target to-be-matched identifier matched with the target command identifier is found, acquiring a control command corresponding to the target to-be-matched identifier as a target control command corresponding to the target command identifier.
4. The method of claim 3, further comprising:
when the target to-be-matched identifier matched with the target command identifier is not found, searching a target control command corresponding to the target command identifier in a cloud command database;
and newly adding the target control command to the preset command library through a command newly-added interface, and acquiring the target control command corresponding to the target identifier to be matched.
5. The method according to claim 3, wherein the obtaining of the control command corresponding to the target identifier to be matched as the target control command corresponding to the target command identifier includes:
acquiring version information of a control command matched with the target command identifier in the preset command library;
when detecting that the release time in the version information is greater than a preset time threshold, acquiring a target control command corresponding to the target command identifier in a cloud command database;
and replacing the target control command with the control command matched with the target command identifier in the preset command library, and acquiring the target control command corresponding to the target command identifier from the preset command library.
6. The method according to claim 1, wherein the sending the target control instruction to the object to be controlled, so that the object to be controlled executes the target control instruction, further comprises:
identifying a control item of the target control command, and matching the control item with a historical control item set of the object to be controlled;
when the control item is detected not to be matched with the historical control item, acquiring an item type corresponding to the control item;
acquiring a plurality of target historical control commands which are the same as the item types in the historical control command set of the object to be controlled, and acquiring test paths corresponding to the plurality of target historical control commands;
generating a combined control command corresponding to the plurality of target historical control commands according to the test path;
executing the combined control command through the command program to obtain a combined control command;
and sending the combined control instruction to the object to be controlled, so that the object to be controlled executes the combined control instruction.
7. The method of claim 1, wherein before receiving the control command information sent by the target application through the control information interface, the method further comprises:
when a calling request of a webpage service interface sent by a target application is detected, acquiring a command identifier corresponding to each control command in a preset command library, and generating a command identifier set;
and returning the command identifier set to the terminal, so that the terminal displays each command identifier in the command identifier set on the control information interface in the state of an identifier control through the target application.
8. An information processing method characterized by comprising:
displaying a control information interface, wherein the control information interface comprises a plurality of identification controls corresponding to the control commands;
generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface;
and sending the control command information to a server so that the server converts the control command information into a target control instruction which can be identified by the object to be controlled through node language service in a node language environment, and sends the target control instruction to the object to be controlled.
9. An information processing apparatus characterized by comprising:
the control device comprises a receiving unit, a processing unit and a control unit, wherein the receiving unit is used for receiving control command information sent by a control information interface of a target application, the control command information carries an identifier of an object to be controlled, an identifier control corresponding to a control command in a preset command library is displayed on the control information interface, and the control command information is formed by converting a target identifier control in the control information interface;
the conversion unit is used for converting the control command information into a target control command which can be identified by the object to be controlled through a node language service under a node language environment, wherein the node language service is used for determining a target control command corresponding to the control command information input by a user and converting the target control command into the target control command which can be identified by the object to be controlled;
and the sending unit is used for sending the target control instruction to the object to be controlled based on the identifier of the object to be controlled so that the object to be controlled executes the target control instruction.
10. An information processing apparatus characterized by comprising:
the display unit is used for displaying a control information interface, and the control information interface comprises a plurality of identification controls corresponding to the control commands;
the information generating unit is used for generating control command information corresponding to the selected identification control according to the identification control selected by the user on the control information interface;
and the information sending unit is used for sending the control command information to a server so that the server converts the control command information into a target control instruction which can be identified by the object to be controlled through a node language service under a node language environment, and sends the target control instruction to the object to be controlled.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110597415.1A CN115480677A (en) | 2021-05-31 | 2021-05-31 | Information processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110597415.1A CN115480677A (en) | 2021-05-31 | 2021-05-31 | Information processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115480677A true CN115480677A (en) | 2022-12-16 |
Family
ID=84420005
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110597415.1A Pending CN115480677A (en) | 2021-05-31 | 2021-05-31 | Information processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115480677A (en) |
-
2021
- 2021-05-31 CN CN202110597415.1A patent/CN115480677A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7421511B2 (en) | Methods and apparatus, electronic devices, readable storage media and computer programs for deploying applications | |
US11163851B2 (en) | Method, apparatus, computer device and storage medium of page displaying | |
CN108108297B (en) | Method and device for automatic testing | |
US20210117210A1 (en) | Methods and Systems for Integrated Development Environment Editor Support with a Single Code Base | |
CN109739855B (en) | Method and system for realizing data sheet splicing and automatically training machine learning model | |
CN111752843B (en) | Method, apparatus, electronic device and readable storage medium for determining influence surface | |
US11741002B2 (en) | Test automation systems and methods using logical identifiers | |
CN110928763A (en) | Test method, test device, storage medium and computer equipment | |
CN110688305B (en) | Test environment synchronization method, device, medium and electronic equipment | |
CN113722020A (en) | Interface calling method, device and computer readable storage medium | |
KR20210036167A (en) | Test automation of application | |
CN115658529A (en) | Automatic testing method for user page and related equipment | |
CN113268260A (en) | Routing method and device for web front end | |
CN113778897A (en) | Automatic test method, device, equipment and storage medium of interface | |
CN115576600A (en) | Code change-based difference processing method and device, terminal and storage medium | |
CN113971191A (en) | Data import method and device and computer readable storage medium | |
CN112948264B (en) | Method and device for executing test task, system, storage medium and electronic device | |
CN112486797A (en) | Interface test method and device | |
CN111338609B (en) | Information acquisition method, device, storage medium and terminal | |
US9787552B2 (en) | Operation process creation program, operation process creation method, and information processing device | |
CN114466401B (en) | Image transmission method and electronic equipment | |
CN109814911A (en) | Method, apparatus, computer equipment and storage medium for Manage Scripts program | |
CN115860877A (en) | Product marketing method, device, equipment and medium | |
CN113179183B (en) | Service switch state control device and method | |
CN115480677A (en) | Information processing method and device |
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 |