WO2023071857A1 - 回放方法、录制方法以及相关设备 - Google Patents

回放方法、录制方法以及相关设备 Download PDF

Info

Publication number
WO2023071857A1
WO2023071857A1 PCT/CN2022/125809 CN2022125809W WO2023071857A1 WO 2023071857 A1 WO2023071857 A1 WO 2023071857A1 CN 2022125809 W CN2022125809 W CN 2022125809W WO 2023071857 A1 WO2023071857 A1 WO 2023071857A1
Authority
WO
WIPO (PCT)
Prior art keywords
recording
playback
semantics
information
server
Prior art date
Application number
PCT/CN2022/125809
Other languages
English (en)
French (fr)
Inventor
张龙
彭泽宇
邓成瑞
张蕃
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023071857A1 publication Critical patent/WO2023071857A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/7867Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, title and artist information, manually generated time, location and usage information, user ratings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Definitions

  • the embodiment of the present application relates to the field of automation, and in particular to a playback method, a recording method and related equipment.
  • Automation technology is a technology that replaces manual operations with one or more devices.
  • workflows that are rule-driven and repeatable can be potential targets for automation.
  • each device since multiple devices in the aforementioned system are arranged in a distributed manner, each device only perceives the semantics input by the user to the device, and does not perceive the progress of other devices in executing the semantics. If there is data or signaling interaction between multiple devices in the aforementioned system (for example, after a certain device in the system executes a certain semantics, another device in the system needs to execute another semantics), it will lead to The sequence of execution semantics of each device is confused, which makes it difficult to realize the automation process of the system.
  • Embodiments of the present application provide a playback method, a recording method, and related devices, which are used to realize an automated process of a system including multiple devices in a distributed scenario.
  • the playback method provided in this application can be used in a scenario involving a recording device and a playback device, and can also be used in a scenario that does not involve a recording device but only involves a playback device.
  • the present application provides a playback method, which is used in scenarios involving a recording device and a playback device.
  • each recording device in the recording group generates at least one piece of semantics based on user operations on the recording device.
  • the server receives at least one semantic piece from each recording device in the recording group.
  • Each semantic piece is information describing the user's operation on the recording device.
  • the semantics includes time information, object information and action information.
  • the time information is used to indicate the moment when the recording device detects the operation, which can reflect when the user operates the recording device.
  • the object information is used to indicate the object of the operation corresponding to the semantics, that is, which part on the recording device the user operates.
  • the action information is used to indicate the content of the operation, that is, what specific actions are performed by the user on the recording device. Then, according to the time information of each piece of semantics, the server sends each piece of semantics to the corresponding playback device in the playback group in chronological order.
  • the server may obtain multiple semantics.
  • the foregoing plurality of semantics may be a semantic set.
  • the server needs to sort the semantics in the aforementioned semantic set before distributing the semantics, so as to ensure that the semantics sent by the server to the playback group are complete, which in turn helps to ensure that the operations performed by the playback devices in the playback group based on semantics are complete and error-free .
  • At least one piece of semantics generated by each recording device mentioned above may be directly sent by the recording device to the server, that is, the server receives at least one piece of semantics generated by each recording device from each recording device in the recording group;
  • a piece of semantics can also be sent by the recording device to a network element (for example, a proxy network element, a switch, etc.) for relaying messages, and then sent to the server by the network element.
  • a network element for example, a proxy network element, a switch, etc.
  • time information in the semantics used to realize automation as the basis for the server to schedule and distribute multiple semantics.
  • the server can The time information distributes the first multiple semantics to the corresponding playback devices in chronological order, so that each playback device can execute the semantics from the server in an orderly manner, thereby realizing orderly playback.
  • the server since the server can release the aforementioned multiple semantics in order instead of manual implementation, it can avoid confusion in the order of execution semantics of each playback device in the system, thereby ensuring that the automatic process of the system including multiple devices can be realized.
  • the server not only needs to know in which order to send each of the previous multiple semantics, but also needs to determine which playback device in the playback group to send each of the foregoing multiple semantics.
  • the server stores a first correspondence
  • the first correspondence is the correspondence between the indication information of each recording device in the recording group and the indication information of the playback devices in the playback group relationship
  • the first correspondence is used to indicate that the playback device can execute the semantics generated by the corresponding recording device. It can also be understood that the semantics generated by a certain recording device in the recording group can be run on the playback device in the playback group that has a first corresponding relationship with the recording device. Therefore, the server may determine to which playback device in the playback group the semantics generated by each recording device in the recording group should be sent based on the foregoing first correspondence.
  • the foregoing first correspondence may be preset manually, or may be determined by the server according to the information of the recording device (for example, the device type of the recording device) and the information of the playback device (for example, the device type of the playback device). It should be understood that the first correspondence may be stored in the server in an array, a table, or other data structures capable of representing associations. Specifically, there is no limitation here.
  • the first correspondence is stored in the server, and the first correspondence is the correspondence between the indication information of each recording device in the recording group and the indication information of the playback devices in the playback group. Therefore, based on the first correspondence, the server can determine which playback device in the playback group the semantics generated by a certain recording device in the recording group should be sent to for execution. It is not only beneficial to ensure the accuracy of the server when distributing semantics, but also helps to ensure the efficiency of the server when distributing semantics, and prevents the server from distributing semantics to the wrong playback device, which will cause confusion in the playback task of the playback device.
  • the indication information in the foregoing first correspondence includes a device identifier and/or a device type.
  • the indication information of the recording device includes the device identifier of the recording device and/or the device type of the recording device;
  • the indication information of the playback device includes the device identifier of the playback device and/or the device type of the playback device.
  • the foregoing indication information may also be other information capable of distinguishing a certain recording device or a certain playback device.
  • the device type is used to indicate the software type and/or hardware type supported by the recording device.
  • the hardware type refers to the physical structure of the device.
  • hardware types include touch screens, keyboards, and mice.
  • UI user interface
  • hardware types include cameras, speakers, microphones, and touch screens.
  • the hardware type includes a distance sensor, an infrared sensor, an infrared thermometer, and the like.
  • the software type refers to the software function that the device can realize by running the program.
  • the software type in an automation scenario based on a user interface (UI) application, includes a system type that records which functional interface the application calls and a file type in the UI storage format, and the system type mainly includes Web Applications, Windows desktop applications that call system interfaces, android (Andriod)/IOS/HarmonyOS (HarmonyOS) native applications; the file types of UI storage formats mainly include application interfaces based on dom tree expression, application interfaces that support json format storage, and support xml The application interface stored in pdf format, the application interface that supports pdf format storage, etc.
  • the software type in a manufacturing-based automation scenario, includes a supported host computer type and a sensor supported application type.
  • the software type in the shortcut operation-based automation scenario, includes related applications for executing a certain business, for example, search engine applications, shopping applications, and video and audio playing applications.
  • non-empty intersection between the software type supported by the recording device and the software type supported by the corresponding playback device; and/or, the hardware type supported by the recording device and the hardware type supported by the corresponding playback device There is a non-empty intersection. It can also be understood that the software types supported by the recording device and the playback device are completely or partially the same, or that the hardware types supported by the recording device and the playback device are completely or partially identical.
  • each piece of semantics includes indication information of the recording device.
  • the server sends the semantics to the corresponding playback devices in the playback group in chronological order, including: the server sends the semantics according to the time information of each piece of semantics, the recording device in each semantics Indicate the information and the first correspondence, and send the semantics to the corresponding playback devices in the playback group according to the chronological order.
  • the server determines which recording device in the recording group generates the semantic according to the indication information of the recording device in the semantic. Because, the server also stores a first correspondence, and the first correspondence is the correspondence between the indication information of each recording device in the recording group and the indication information of the playback devices in the playback group. Therefore, the server can determine the playback device corresponding to the semantics according to the indication information of the recording device in the semantics and the first correspondence.
  • the server stores a device list
  • the device list stores information of the recording group and information of the playback group
  • the information of the recording group includes a device identifier of each recording device in the recording group
  • the information of the playback group includes the device identification of each playback device in the playback group.
  • the method further includes: the server receiving a plurality of registration messages, each of which includes the device identification of the device sending the registration message; the server according to the The device list and the device identification of the device in the registration message determine whether the device is a recording device or a playback device.
  • the recording device and the playback device can provide the information of the recording device (for example, the device identification of the recording device) and the information of the playback device (for example, the device identification of the playback device) to the server through registration.
  • the server needs to determine whether the device sending the registration request is a recording device or a playback device through a pre-stored device list.
  • the server can only manage the registered recording devices and playback devices, which is beneficial to improve the efficiency of managing recording devices and playback devices.
  • the registration message further includes a device type of the device, and the device type includes a device type of the recording device and a device type of the playback device.
  • the server stores the device type of the recording device in correspondence with the device identifier of the recording device; the server stores the device type of the playback device in correspondence with the device identifier of the playback device.
  • the server when the registration message contains the device type (for example, the device type of the recording device or the device type of the playback device), the server also stores the device ID of the device and the device type correspondingly, so that the server can compare It is convenient to check the device type of each device, which in turn facilitates the server to make decisions based on the device identifier and device type.
  • the device type for example, the device type of the recording device or the device type of the playback device
  • the method further includes: sending the server to each recording device in the recording group
  • Each of the recording devices sends a first recording command
  • the first recording command is used to instruct each of the recording devices to start recording
  • the first recording command includes the system clock information of the server
  • the system clock information is used to indicate that in the recording group
  • Each recording device on the server synchronizes its clock with the server's system clock.
  • the server can control the recording device to start recording through the first recording command, and the server can carry the server's system clock information in the first recording command, so that the recording device resets the recording based on the server's system clock information.
  • the device's system clock Since the server simultaneously broadcasts the first recording instruction to each recording device in the recording group, each recording device in the recording group can receive the aforementioned first recording instruction. Therefore, each recording device in the recording group can reset the clock based on the same system clock (that is, the system clock of the server), so as to ensure that the system clocks of the recording devices in the recording group are synchronized.
  • the first recording instruction further includes at least one recording interface, and the at least one recording interface is used to obtain original information of at least one operation corresponding to the task type of the recording task, where the original information is detected by the recording device and the user is in the Information about operations on the recording device.
  • the foregoing recording interface includes an input/output (input/output, I/O) interface of a microphone, an I/O interface of a speaker, an I/O interface of a mouse, an I/O interface of a keyboard, etc., specifically here No limit.
  • the server may carry a recording interface in the first recording instruction, so that the recording device only obtains original information from the recording interface in the first recording instruction. It is beneficial for the server to control the recording device to record based on the granularity of the control interface, instead of using the recording device to obtain information about each interface. It is beneficial to save the processing load of the recording device.
  • the method further includes: the server sends a second recording instruction to at least one of the recording devices in the recording group.
  • the server when the server sends the semantics in the aforementioned plurality of semantics (for example, semantic set) to the corresponding playback device, the server can send only one semantic to the corresponding playback device at a time, or can send a group of semantics ( Including multiple semantics) to a corresponding playback device.
  • the server may also use receiving a notification message from the playback device as a trigger condition for sending the next semantic message (or the next group).
  • the aforementioned notification message is used to indicate that the playback device has finished executing the received semantics, and it can also be understood that the aforementioned notification message is used to indicate that the playback device has successfully played back the received semantics.
  • N is an integer greater than 1.
  • the server sends the semantics in the aforementioned plurality of semantics to the corresponding playback device in the playback group in this order according to the timing information of each semantic meaning, including: the server sends the timing information of each semantic in the aforementioned N semantics to Sorting the aforementioned N semantics to obtain the first semantic sequence determined by the N semantics; the server sends the i-th semantic sequence in the first semantic sequence to the corresponding playback device in the playback group; the server receives the i-th semantic sequence A notification message corresponding to a semantic meaning, the notification message corresponding to the i-th semantic meaning is used to indicate that the playback of the i-th semantic meaning is successful, and the i is an integer greater than or equal to 1 and less than or equal to N.
  • the server needs to receive a notification message from the playback device indicating that the playback is successful before triggering the sending of the next message. Therefore, it is beneficial for the playback devices in the playback group to execute the received semantics in an orderly manner, and it is also beneficial for the server to resend the aforementioned semantics to the playback device when the playback device fails to send the aforementioned notification message, so that each playback device in the playback group Both can execute the corresponding semantics, thereby ensuring the orderly progress of the entire playback task.
  • N is an integer greater than 1.
  • the server sends the semantics in the aforementioned plurality of semantics to the corresponding playback device in the playback group in this order according to the timing information of each semantic meaning, including: the server sends the timing information of each semantic in the aforementioned N semantics to The aforementioned N semantic sequences are sorted to obtain a first semantic sequence determined by the N semantic sequences; the server divides the first semantic sequence into multiple second semantic sequences, and each second semantic sequence is the first semantic sequence Consecutive at least one semantically determined sequence executed by the same playback device; the server sends the second semantic sequence to the corresponding playback device in the playback group.
  • the server sends a set of semantics (that is, a second semantic sequence) to the playback devices in the playback group each time, and the set of semantics is executed by a certain playback device. After the playback device executes the preceding set of semantics, the server sends the next set of semantics to the playback device.
  • This embodiment is beneficial to save signaling overhead between the server and the playback device.
  • the playback device can determine the sequence of executing each piece of semantics in the set of semantics based on the time information of each piece of semantics in the set of semantics. Therefore, the playback devices in the playback group can also ensure that the entire playback task is performed in an orderly manner.
  • the present application provides a playback method, which is used in scenarios involving a recording device and a playback device.
  • the semantics can be manually copied to the server.
  • the server obtains multiple semantics, each of which is used to indicate an operation that needs to be performed on the playback device in the playback group, and the operation includes controlling one playback device in the playback group to interact with another playback device in the playback group .
  • the semantics include timing information, object information and action information. Wherein, the timing information is used to indicate the order of the semantics relative to other semantics in the previous multiple semantics.
  • the object information is used to indicate the object of the operation corresponding to the semantic, that is, on which part of the playback device the playback device performs the operation according to the semantic.
  • the action information is used to indicate the content of the operation, that is, which actions the playback device performs on components of the playback device according to the semantics. Then, the server sends the semantics to the corresponding playback devices in the playback group according to the order indicated by the timing information of each piece of the semantics.
  • timing information to the semantics used to realize automation as the basis for the server to schedule and distribute multiple semantics.
  • the server can The order of semantic distribution is determined by the timing information, and then the multiple semantics are distributed to the corresponding playback devices according to the order indicated by the aforementioned timing information, so that each playback device can execute the semantics from the server in an orderly manner, thereby realizing orderly playback .
  • the server since the server can replace the manual implementation of issuing semantics in order, it can avoid confusion in the order of execution semantics of each playback device in the system, thereby ensuring that the automatic process of the system including multiple devices can be realized.
  • the server stores indication information of each playback device in the playback group, and the indication information of each playback device is used to identify a playback device in the playback group.
  • the server can manage each playback device in the playback group through registration.
  • each playback device in the playback group provides the playback device with the indication information of the playback device by sending a registration message to the server.
  • each piece of semantics further includes indication information of the playback device, and the indication information of the playback device in the semantics is used to indicate the playback device corresponding to the semantics.
  • each of the aforementioned semantics includes the indication information of the playback device, and the indication information of the playback device in the semantics is used to indicate which playback device the semantics will be executed, so that the server can perform the playback based on the indication information of each semantic Distribute semantics to corresponding playback devices.
  • the server sends the semantics to the corresponding playback device in the playback group according to the order indicated by each piece of timing information of the semantics, including: the server sends the semantics according to the timing information of each piece of semantics and each piece of The indication information of the playback device in the semantics sends the semantics to the playback device indicated by the indication information of the playback device in the sequence indicated by the timing information.
  • each piece of semantics contains the indication information of the playback device
  • the server stores the indication information of each playback device in the playback group
  • the server can based on the indication information of the playback device in each semantic
  • the playback device corresponding to the piece of semantics is determined, and then the server can send the semantics to the corresponding playback device based on the indication information of the playback device in each piece of semantics.
  • the method further includes: the server acquires the second correspondence, the The second correspondence includes the correspondence between the timing information and the indication information of the playback device, and the second correspondence is used to indicate that the semantics including the timing information can run in the playback device indicated by the indication information of the playback device;
  • the server sends the semantics to the corresponding playback device in the playback group according to the sequence indicated by each piece of timing information of the semantics, including: the server according to the timing information of each piece of semantics and the second correspondence, according to the timing information indication
  • the semantics are sent to the corresponding playback devices in the playback group in the order of .
  • the server can determine which playback device each semantic should be sent to based on the timing information of each semantic. Specifically, the server can acquire the second corresponding relationship, and the second corresponding relationship is the corresponding relationship between the timing information and the indication information of the playback device. Therefore, the second correspondence can indicate that the semantics including the timing information should be run on the playback device indicated by the indication information of the playback device. Therefore, the server may determine the playback device corresponding to each semantic only based on the timing information of the semantics and the second correspondence, and may not analyze other information in the semantics.
  • the indication information of the playback device includes a device identifier of the playback device and/or a device type of the playback device, and the device type of the playback device is used to indicate the type of software supported by the playback device and/or or hardware type.
  • the device type is used to indicate the software type and/or hardware type supported by the recording device.
  • the hardware type refers to the physical structure of the device.
  • the hardware type includes a touch screen, keyboard, mouse, and the like.
  • hardware types include cameras, speakers, microphones, and touch screens.
  • the hardware type includes a distance sensor, an infrared sensor, an infrared thermometer, and the like.
  • the software type refers to the software function that the device can realize by running the program.
  • the software type in an automation scenario based on a user interface (UI) application, includes a system type that records which functional interface the application calls and a file type in the UI storage format, and the system type mainly includes Web Applications, Windows desktop applications that call system interfaces, android (Andriod)/IOS/HarmonyOS (HarmonyOS) native applications; the file types of UI storage formats mainly include application interfaces based on dom tree expression, application interfaces that support json format storage, and support xml The application interface stored in pdf format, the application interface that supports pdf format storage, etc.
  • the software type in a manufacturing-based automation scenario, includes a supported host computer type and a sensor supported application type.
  • the software type in the shortcut operation-based automation scenario, includes related applications for executing a certain business, for example, search engine applications, shopping applications, and video and audio playing applications.
  • the present application provides a recording method, which is applied to a recording device. Specifically, the recording device generates at least one piece of semantics. Then, the recording device sends the at least one piece of semantics to the server, so that the server sends the semantics to the corresponding playback devices in the playback group in chronological order according to the time information of each piece of semantics.
  • each piece of semantics is the information generated by the recording device to describe the user's operation on the recording device, the semantics includes time information, object information and action information, and the time information is used to indicate that the recording device detects the operation At a time, the object information is used to indicate the object of the operation corresponding to the semantics, and the action information is used to indicate the content of the operation.
  • the semantics generated by the recording device have time information, and the time information is the time when the recording device detects the operation.
  • the aforementioned semantics from different recording devices can be sorted by time information, so that the server can know the time sequence of the semantics generated by each recording device in the recording group.
  • the semantics generated by the recording device have no time information.
  • the server obtains the semantics from different recording devices, the server cannot determine which semantics are generated first and which semantics are generated later. Therefore, the server also cannot implement ordered delivery semantics.
  • it is proposed to add time information in the semantics so that the server can obtain the basis for sorting the semantics (ie, time information), which is beneficial for the server to realize orderly distribution semantics.
  • the recording device is one of multiple recording devices in the recording group
  • the operation includes controlling one recording device in the recording group to interact with another recording device in the recording group.
  • each recording device in the recording group will generate semantics based on the aforementioned method, that is, the semantics generated by each recording device in the recording group includes time information.
  • the recording device generates at least one piece of semantic information, including: the recording device acquires at least one piece of original information, and each piece of original information is detected by the recording device and is related to the user's operation on the recording device.
  • Each piece of original information includes operation time, operation object and operation type; wherein, the operation time is the moment when the recording device detects the user's operation on the recording device, and the operation object is the user detected by the recording device
  • the operation type is the type of action performed by the user through the hardware and/or software supported by the recording device as checked by the recording device.
  • the recording device determines that the operation time is the time information of the semantic; the recording device determines the object information of the semantic according to the operation object; the recording device determines the action information of the semantic according to the operation type.
  • the semantics also includes the device type of the recording device.
  • the recording device determines the semantic action information according to the operation type, including: the recording device determines that the action feature corresponding to the operation type is the semantic action information according to the operation type and a mapping rule,
  • the mapping rule includes a correspondence between an action characteristic and multiple operation types, and each operation type in the multiple operation types satisfies the action characteristic.
  • a mapping rule is stored in the recording device, and the mapping rule is used to convert the operation type in the original information into the action information in the semantics.
  • the action information in the semantics is the action feature abstracted based on the operation type, and the action feature can be applied to various systems. It is beneficial to improve the commonality of semantics, so that semantics can be executed in different systems.
  • the multiple operation types include a first operation type and a second operation type, the first operation type is pressing on the user interface through the touch screen, and the second operation type is pressing the left button on the display screen;
  • the first action feature corresponding to the first operation type and the second operation type is pressing.
  • the multiple operation types include a third operation type and a fourth operation type, the third operation type is sliding in the first direction on the user interface through the touch screen, and the fourth operation type is A direction scroll progress bar; the second action characteristic corresponding to the third operation type and the fourth operation type is to move along the first direction.
  • the method further includes: the recording device sends a registration message to the server, where the registration message includes indication information of the recording device, and the indication information of the recording device Include the device type of the recording device and the device identification of the recording device.
  • the method further includes:
  • the recording device receives a first recording instruction from the server, the first recording instruction is used to instruct the recording device to start recording, the first recording instruction includes the system clock information of the server, and the system clock information is used to indicate that in the recording group
  • Each recording device on the server synchronizes its clock with the server's system clock.
  • the recording device can receive the first recording instruction from the server, and start recording based on the first recording instruction.
  • the recording device can reset the system clock of the recording device based on the system clock information of the server.
  • the server can simultaneously broadcast the first recording instruction to each recording device in the recording group, each recording device in the recording group can receive the aforementioned first recording instruction, and each recording device in the recording group can Reset the clock based on the same system clock (that is, the server's system clock). Therefore, it is beneficial to ensure that the system clocks of the recording devices in the recording group are synchronized.
  • the method further includes: the recording device receives a second recording instruction from the server, and the second recording instruction is used to instruct the recording device Stop recording.
  • the present application provides a server.
  • the server includes: a sending and receiving module and a processing module.
  • the transceiver module is used to receive at least one piece of semantics from each recording device in the recording group, each piece of semantics is information describing the user's operation on the recording device, and the semantics includes time information, object information and action information , the time information is used to indicate the time when the recording device detects the operation, the object information is used to indicate the object of the operation corresponding to the semantics, and the action information is used to indicate the content of the operation.
  • the processing module is used to determine the chronological order of each semantics according to the time information of each semantic, and control the sending and receiving module to send the semantics to the corresponding playback devices in the playback group according to the chronological order.
  • the server further includes a storage module, and the storage module is used to store a first correspondence, where the first correspondence is the indication information of each recording device in the recording group and the information in the playback group.
  • the correspondence between the indication information of the playback device, the first correspondence is used to indicate that the playback device can execute the semantics generated by the corresponding recording device.
  • the indication information includes a device identifier and/or a device type, where the device type is used to indicate the software type and/or hardware type supported by the recording device.
  • the processing module when each piece of semantic information includes the indication information of the recording device, the processing module is specifically configured to: Corresponding relationship, send the semantics to the corresponding playback device in the playback group according to the time sequence.
  • the storage module in the server is also used to store the device list.
  • the device list stores information of the recording group and information of the playback group.
  • the information of the recording group includes the device identification of each recording device in the recording group
  • the information of the playback group includes the device identification of each playback device in the playback group.
  • the transceiver module in the server is also used to receive multiple registration messages, each of which includes the device identification of the device sending the registration message; the processing module in the server is also used to The device identification of the device in the registration message identifies whether the device is a recording device or a playback device.
  • the registration message further includes a device type of the device, and the device type includes a device type of the recording device and a device type of the playback device.
  • the storage module in the server is also used to store the device type of the recording device and the device identifier of the recording device in correspondence; and, the device type of the playback device and the playback device The device ID corresponds to storage.
  • the transceiver module in the server is further configured to send a first recording instruction to each of the recording devices in the recording group, and the first recording instruction is used to instruct each of the recording devices to start recording, the first recording instruction includes system clock information of the server, and the system clock information is used to instruct each recording device in the recording group to perform clock synchronization according to the system clock of the server.
  • the transceiver module in the server is further configured to send a second recording instruction to at least one recording device in the recording group, where the second recording instruction is used to instruct the recording device to stop recording.
  • the present application provides a server, which can directly obtain multiple semantics manually copied, and obtain a semantic set.
  • the server includes an acquisition module and a processing module.
  • the obtaining module is used to obtain multiple semantics.
  • the processing module is configured to control the sending and receiving module to send the semantics to the corresponding playback devices in the playback group according to the order indicated by the timing information of each piece of the semantics.
  • Each of the semantics is used to indicate an operation that needs to be performed on the playback device in the playback group, and the operation includes controlling one playback device in the playback group to interact with another playback device in the playback group.
  • the semantics includes timing information, object information and action information. Wherein, the timing information is used to indicate the order of the semantics relative to other semantics in the aforementioned multiple semantics, the object information is used to indicate the object of the operation corresponding to the semantics, and the action information is used to indicate the content of the operation.
  • the server stores indication information of each playback device in the playback group, and the indication information of each playback device is used to identify a playback device in the playback group.
  • each piece of semantics further includes indication information of the playback device, and the indication information of the playback device in the semantics is used to indicate the playback device corresponding to the semantics.
  • the processing module is specifically configured to control the transceiver module according to the order indicated by the timing information according to the timing information of each semantic and the indication information of the playback device in each semantic
  • the semantics is sent to the playback device indicated by the indication information of the playback device.
  • the acquiring module is further configured to acquire a second correspondence, where the second correspondence includes a correspondence between the timing information and the indication information of the playback device, and the second correspondence uses Indicates that the semantics including the timing information can run in the playback device indicated by the indication information of the playback device.
  • the processing module is further configured to determine the playback device corresponding to each semantic item according to the timing information of each semantic item and the second corresponding relationship, and control the transceiver module to send the corresponding playback device in the playback group according to the order indicated by the timing information. Send that semantic.
  • the indication information of the playback device includes a device identifier of the playback device and/or a device type of the playback device, and the device type of the playback device is used to indicate the type of software supported by the playback device and/or or hardware type.
  • the present application provides a recording device, and the recording device includes a processing module and a transceiver module.
  • the processing module is used to generate at least one piece of semantics, each piece of semantics is the information generated by the recording device to describe the user's operation on the recording device, the semantics includes time information, object information and action information, and the time information is used
  • the object information is used to indicate the object of the semantically corresponding operation
  • the action information is used to indicate the content of the operation.
  • the sending and receiving module is configured to send the at least one piece of semantics to the server, so that the server sends the semantics to the corresponding playback devices in the playback group in chronological order according to the time information of each piece of semantics.
  • the recording device is one of multiple recording devices in the recording group
  • the operation includes controlling one recording device in the recording group to interact with another recording device in the recording group.
  • the semantics also includes the device type of the recording device.
  • the processing module is specifically used for:
  • each piece of original information is information related to the user's operation on the recording device detected by the recording device, and each piece of original information includes the operation time, operation object and operation type; wherein, the operation The time is the moment when the recording device detects the user's operation on the recording device, the operation object is the object detected by the recording device that the user operates on the recording device, and the operation type is the user's operation detected by the recording device. the types of actions performed by the hardware and/or software supported by the recording device;
  • the action information of the semantics is determined according to the operation type.
  • the processing module is specifically configured to determine that the action feature corresponding to the operation type is the action information of the semantics according to the operation type and a mapping rule, and the mapping rule includes an action feature and a plurality of operation The corresponding relationship among types, each operation type in the plurality of operation types satisfies the action feature.
  • the transceiver module is further configured to send a registration message to the server, where the registration message includes indication information of the recording device, and the indication information of the recording device includes the device type of the recording device and the recording device device ID.
  • the transceiver module is further configured to receive a first recording instruction from the server, the first recording instruction is used to instruct the recording device to start recording, and the first recording instruction includes the system clock of the server Information, the system clock information is used to instruct each recording device in the recording group to perform clock synchronization according to the system clock of the server.
  • the transceiving module is further configured to receive a second recording instruction from the server, where the second recording instruction is used to instruct the recording device to stop recording.
  • the present application provides a server, the server includes a processor and a memory; wherein, the memory stores a computer program; the processor invokes the computer program so that the server executes any one of the first aspect or the first aspect The method in one implementation manner, or, so that the server executes the method in the second aspect or any one implementation manner of the second aspect.
  • the present application provides a recording device, which includes a processor and a memory; wherein, the memory stores a computer program; the processor invokes the computer program to make the recording device execute the third aspect or the third aspect The method in any one of the implementations.
  • the present application provides an automation system, which includes: a playback device, the fourth aspect and the server in any implementation manner of the fourth aspect, and the sixth aspect and the sixth aspect The recording device in any one of the embodiments.
  • the present application provides an automation system, where the automation system includes: a playback device, and the fourth aspect and the server in any implementation manner of the fourth aspect.
  • the present application provides a computer program product containing instructions, which, when run on a computer, cause the computer to execute the aforementioned first aspect, second aspect, or third aspect, as well as each of the aforementioned aspects.
  • the embodiment of the present application provides a computer-readable storage medium, including instructions, when the instructions are run on a computer, so that the computer executes the aforementioned first aspect, second aspect or third aspect, and The method described in any one of the various implementations of the foregoing aspects.
  • Figure 1A is a system architecture diagram applicable to the method proposed in this application.
  • FIG. 1B is an example diagram of a scene where the method proposed in this application is applicable
  • Figure 1C is an example diagram of another scene where the method proposed in this application is applicable.
  • Figure 1D is an example diagram of another scene where the method proposed in this application is applicable.
  • Fig. 2 is a flowchart of the playback method and the recording method in the present application
  • Fig. 3 is an example diagram of the semantics in this application.
  • Fig. 4 is another flowchart of the playback method in the present application.
  • Fig. 5 is a schematic diagram of an embodiment of the server in this application.
  • FIG. 6 is a schematic diagram of another embodiment of the server in this application.
  • Fig. 7 is a schematic diagram of an embodiment of the device in this application.
  • Semantics It is an executable file written in a certain format using a specific descriptive language.
  • the semantics can be recognized by the device, so that the device controls software and/or hardware in the device based on the semantics, so that the device performs operations corresponding to the semantics.
  • one semantic corresponds to one operation.
  • Semantics is also referred to as Script.
  • the foregoing semantics may be generated by a recording device, or manually encoded.
  • Recording refers to the process in which the device records the user's operations on the device in computer language (eg, script, semantics, etc.).
  • the recording process includes: control lookup ⁇ execute and record operation ⁇ generate semantics.
  • a device that generates semantics in the recording process is called a recording device, and a group of devices including multiple recording devices is called a recording group.
  • Playback refers to the process in which a device searches for an object described in a computer language based on a computer language (eg, script, semantics, etc.), and executes an operation corresponding to the computer language.
  • the playback process includes: parse semantics ⁇ find controls ⁇ execute operations.
  • a playback device a device that parses semantics in a playback process
  • a playback group a group of devices including multiple playback devices.
  • Multi-terminal collaboration It is a scenario of multi-device interaction, which refers to multiple distributed design devices assisting each other to complete the same task.
  • the collaboration may be software capability collaboration, hardware capability collaboration, or software and hardware capability collaboration.
  • Cross-device migration transfer the semantics generated by one device to another device for operation, so that the other device can perform the operation corresponding to the aforementioned semantics.
  • FIG. 1A it is a system architecture diagram applicable to the playback method and the recording method proposed in this application.
  • the system includes a server 01 and a playback group 02 .
  • the server 01 is a newly added structure in the system of the present application, and is used for distributing semantics to each playback device in the playback group 02 (for example, playback device 1 and playback device 2 ).
  • Each playback device (for example, playback device 1 and playback device 2 ) in the playback group 02 is used to receive the semantics from the server 01 and perform operations corresponding to the semantics according to the semantics, so as to cooperate to complete a certain task.
  • the system may also include a recording group 03.
  • the recording group 03 includes a plurality of recording devices (for example, recording device 1 and recording device 2), and is used to detect operations on the recording devices and generate semantics based on the detected operations. Since the aforementioned system adds a server 01, the recording devices in the recording group can also send the generated semantics to the aforementioned server 01, so that the server 01 can schedule the semantics generated by the recording devices. It should be understood that the number of recording devices in the recording group 03 is not necessarily the same as the number of playback devices in the playback group 02 .
  • the devices (for example, recording devices and playback devices) involved in this application can be mobile terminals (mobile terminal, MT) such as mobile phone (mobile phone), tablet computer (Pad); it can also be virtual reality (virtual reality, VR) terminal equipment, augmented reality (augmented reality, AR) terminal equipment; it can also be terminal equipment in other fields that may have automation requirements, for example, terminal equipment in industrial control (industrial control), unmanned (self-driving) Terminal equipment in ), terminal equipment in remote medical surgery, terminal equipment in smart grid, terminal equipment in transportation safety, terminal equipment in smart city , terminal equipment in smart home (smart home), etc. It should be understood that the devices involved in this application may also be other devices that can execute scripts or semantics, or other devices that require automation. This application does not limit the specific technology and specific form adopted by the equipment.
  • the playback method and recording method proposed in this application are mainly applied to automation scenarios involving multiple devices.
  • the foregoing automation scenario involving multiple devices may be an automation scenario based on human-computer interaction.
  • FIG. 1B there may be a scenario where emails are edited simultaneously by a mobile phone and a computer.
  • the mobile phone 031 and the computer 032 are the recording devices in the recording group 03.
  • the mobile phone 031 converts the user's operation of inputting text or pictures into semantics and sends the semantics generated by the mobile phone 031 to the server 01
  • the computer 032 converts the operation of the user's inputting text in the email into semantics and sends the generated by the computer 032 to the server 01 semantics.
  • the server 01 distributes the received semantics to the mobile phone 021 and the computer 022 in the playback group 02 for playback, so that the mobile phone 021 and the computer 022 can cooperate with each other to realize email editing.
  • the aforementioned automation scenario involving multiple devices may be a multi-terminal automation scenario involving video and audio push.
  • the mobile phone 033 is used as the recording device in the recording group 03 , and the mobile phone 033 converts a series of operations such as video editing and debugging into semantics and reports them to the server 01 .
  • the server 01 distributes the received semantics to the computer 024 and the earphone 023 in the playback group 02 for playback, so that the computer 024 executes the semantics to realize playback of the video image, and the earphone 023 executes the semantics to realize the audio playback of the video.
  • the foregoing automation scenario involving multiple devices may be an automation scenario between multiple production devices in the manufacturing field.
  • FIG. 1D there may be a scenario where a certain component is manufactured collaboratively by one production device and another production device.
  • the user uses the computer 034 to record the operations of two production equipment (such as production equipment A and production equipment B) in virtual software, and reports the generated semantics to the server 01.
  • the server 01 distributes the semantics to the two production equipment, so that the production equipment A first punches the parts, and then the production equipment B cuts the aforementioned parts, and then the production equipment A further punches the parts .
  • This prompts the two production facilities to cooperate with each other to complete the manufacturing process.
  • FIG. 1B , FIG. 1C and FIG. 1D are only examples of automation scenarios involving multiple devices to which the method of the present application can be applied.
  • the foregoing playback method and recording method can also be applied to a single-device automation scenario.
  • both the recording group and the playback group contain only one device, and the server 01 collects semantics from the recording devices in the recording group, and then, the server distributes the semantics to the playback devices in the playback group. The details are not described here.
  • Step 201a the recording device sends a registration message to the server; correspondingly, the server receives the registration message from the recording device.
  • step 201b the playback device sends a registration message to the server; correspondingly, the server receives the registration message from the playback device.
  • the recording device can provide information of the recording device to the server through the registration message, so that the recording device is registered with the server, and then the server manages the recording device based on the information of the recording device.
  • the playback device can provide the information of the playback device to the server through the aforementioned registration message, so that the playback device is registered with the server, and then the server manages the playback device based on the information of the aforementioned playback device.
  • the server Since the system of this embodiment includes both a recording device and a playback device, for the server, the aforementioned registration message may come from the recording device in the recording group, or from the playback device in the playback group. Therefore, the server needs to determine, according to the content of each registration message, that the device sending the registration message is a recording device or a playback device.
  • the aforementioned registration message includes the device identifier of the device sending the registration message.
  • the device identifier may be information that can uniquely identify a device, such as an Internet protocol (internet protocol, IP) address, a device serial number, and the like.
  • IP Internet protocol
  • the registration message carries the device identifier of the recording device; if the device sending the registration message is a playback device, the registration message carries the device identifier of the playback device. Therefore, if the server knows the device identifier of the recording device and the device identifier of the playback device, the server can determine that the sender of the registration message is the recording device or the playback device through the content carried in the registration message.
  • the aforementioned registration message also includes the device type of the device.
  • the device type carried in the registration message is the device type of the recording device; when the device sending the aforementioned registration message is a playback device, the device type carried in the registration message The device type for the playback device.
  • the aforementioned device type is used to indicate the hardware type and/or software type supported by the device.
  • the hardware type refers to the physical structure of the device.
  • hardware types include touch screens, keyboards, and mice.
  • UI user interface
  • hardware types include cameras, speakers, microphones, and touch screens.
  • the hardware types include distance sensors, infrared sensors, infrared thermometers, and the like.
  • the software type refers to the software function that the device can realize by running the program.
  • the software type includes a system type that records which functional interface is invoked by an application and a file type in a UI storage format.
  • the system types mainly include Web applications that call container interfaces such as browsers, Windows desktop applications that call system interfaces, and native applications of Android (Andriod)/IOS/HarmonyOS;
  • the file types of UI storage formats mainly include dom tree-based The application interface, the application interface that supports json format storage, the application interface that supports xml format storage, the application interface that supports pdf format storage, etc.
  • the software type includes a supported host computer type and a sensor supported application type.
  • the software type includes related applications for executing a certain business, for example, search engine applications, shopping applications, and video and audio playing applications.
  • the server may perform the aforementioned steps 201a and 201b multiple times until the server has received registration messages of all recording devices in the recording group and registration messages of all playback devices in the playback group.
  • the server may receive multiple registration messages at the same time period, for example, the recording devices in the recording group and the playback devices in the playback group both send registration messages to the server within a preset time range.
  • the server may first receive registration messages from all recording devices in the recording group, and then receive registration messages from all playback devices in the playback group at a later time.
  • the server will determine according to the content of the registration message that the device sending the registration message is a recording device or a playback device.
  • the server stores a device list
  • the device list stores information of the recording group and information of the playback group.
  • the information of the recording group includes the device identification of each recording device in the recording group
  • the information of the playback group includes the device identification of each playback device in the playback group.
  • the device identifier in the registration message is consistent with the device identifier of the recording device, determine that the device sending the registration message is a recording device; when the device identifier in the registration message is consistent with the device identifier of the playback device, determine the device that sent the registration message is the playback device.
  • the device list includes the device identifier of each recording device in a recording group, therefore, the server can not only determine whether the device sending the registration message is a recording device based on the registration message, but also determine whether the recording device in the recording group Are all registered to the server.
  • the device list contains the device identifier of each playback device in a playback group, so the server can not only determine whether the device sending the registration message is a playback device based on the registration message, but also determine the playback device in the playback group Are all registered to the server.
  • the device list can be shown in the following table 1-1:
  • recording group 1 contains device identifiers of three recording devices, namely "LZ-01", “LZ-02” and “LZ-03"; playback group 1 contains The device identifiers of the three playback devices are "HF-01", “HF-02” and "HF-03". If the device identifier carried in a registration message received by the server is "LZ-02", the server may determine that the device sending the registration message is the recording device in recording group 1. When the server obtains "LZ-01”, “LZ-02” and “LZ-03" respectively from the three received registration messages, the server can determine that all recording devices in recording group 1 have registered.
  • the server can store the device type in the device list to facilitate subsequent processes Look up the device type of the recording device and/or the device type of the playback device.
  • the server may store the device type of the recording device in correspondence with the device identifier of the recording device, and store the device type of the playback device in correspondence with the device identifier of the playback device.
  • the device list may be as shown in the following table 1-2:
  • step 202 the server acquires a first correspondence, where the first correspondence is used to indicate that the playback device can execute the semantics generated by the corresponding recording device.
  • the first correspondence is a correspondence between the indication information of each recording device in the recording group and the indication information of the playback devices in the playback group.
  • the indication information includes a device identifier and/or a device type.
  • the indication information may also be other information capable of distinguishing different recording devices, and other information capable of distinguishing different playback devices.
  • the foregoing indication information is a device identifier, that is, the indication information of the recording device in the first correspondence is the equipment identification of the recording device, and the indication information of the playback device in the first correspondence is the Equipment Identity.
  • the first correspondence includes: "LZ-01" corresponds to "HF-02"; “LZ-02” corresponds to "HF-03"; “LZ-03 " corresponds to "HF-01".
  • This implementation manner may be applied to a scenario where the device type of the recording device in the recording group is the same or similar to the device type of the playback device in the playback group.
  • using the device identifiers of each device to represent the first corresponding relationship is beneficial to ensure that the recording device is clearly corresponding to the playback device and avoid confusion.
  • the aforementioned indication information is the device type, that is, the indication information of the recording device in the first correspondence is the equipment type of the recording device, and the indication information of the playback device in the first correspondence is the playback device type of device.
  • the first correspondence includes: "recording device supporting Windows” corresponds to “playback device supporting Windows”; “recording device supporting Android” corresponds to “playback device supporting Android” “Device” corresponds; “recording device supporting IOS” corresponds to "playback device supporting IOS”.
  • the first correspondence includes: “recording device supporting IOS” corresponds to “playback device supporting Windows”; “recording device supporting Android” corresponds to “playback device supporting Android”; “recording device supporting Windows “ corresponds to “playback device supporting IOS”.
  • the first correspondence includes: “recording device supporting keyboard and mouse” corresponds to “playback device supporting keyboard and mouse”; “recording device supporting touch screen” corresponds to “playback device supporting touch screen”; “Recording device for speakers” corresponds to “Playback devices that support speakers”.
  • the device type is used to represent the first correspondence, which will not be detailed here.
  • the first correspondence relationship may also be represented by at least one hardware type and/or at least one software type among device types.
  • the first correspondence includes: "recording device supporting keyboard, mouse and xml format” corresponds to “playback device supporting keyboard, mouse and xml format”; “recording device supporting speaker and Android system” corresponds to “supporting speaker It corresponds to the playback device of the IOS system”; “recording device supporting the touch screen and Android system” corresponds to the “playback device supporting the touch screen and Android system”. The details are not listed here.
  • the first correspondence may be stored in the server in an array, a table, or other data structures capable of representing associations. Specifically, there is no limitation here.
  • the foregoing first correspondence may be preset manually, or may be determined by the server according to the device type of the recording device and the device type of the playback device.
  • the first correspondence is a preset correspondence.
  • the step of the server obtaining the first correspondence can be understood as the server reading the aforementioned first correspondence from the storage medium, or the server obtaining the artificially set first correspondence through an input/output (I/O) interface.
  • I/O input/output
  • the first correspondence is determined by the server based on the device type of the recording device and the device type of the playback device.
  • the server can obtain the device identifier and device type of each recording device from the registration message in step 201a, obtain the device identifier and device type of each playback device from the registration message in step 201b, and then obtain A device list containing the device ID of the recording device, the device type of the recording device, the device ID of the playback device, and the device type of the playback device. For example, the device list shown in Table 1-2 above.
  • the server may determine that a recording device and a playback device supporting the same device type have the first corresponding relationship. It can also be understood that there is a non-empty intersection between the type of software supported by the recording device and the type of software supported by the corresponding playback device (that is, the playback device that has the first correspondence with the recording device); and/or, the type of software supported by the recording device There is a non-empty intersection between the hardware type and the hardware type supported by the corresponding playback device (ie, the playback device having the first corresponding relationship with the recording device). For example, the server determines that the recording device supporting the Windows system in the recording group has a first correspondence with the playback device supporting the Windows system in the playback group.
  • the server determines that there is a first correspondence between the recording device supporting the camera in the recording group and the playback device supporting the camera in the playback group. For another example, the server determines that the recording device supporting the speaker in the recording group has a first corresponding relationship with the playback device supporting the speaker in the playback group. Specifically, there is no limitation here.
  • recording devices and playback devices in the same row have a first correspondence.
  • the recording device LZ-01 that supports Windows and supports keyboard and mouse in the recording group and the recording device HF-01 that supports Windows and supports keyboard and mouse in the playback group have the first corresponding relationship.
  • the recording device LZ-02 that supports Android system and supports touch screen in the recording group has the first correspondence with the recording device HF-02 that supports Android system and supports touch screen in the playback group. relation. By analogy, the details will not be listed here.
  • the server stores a task list that records the recording tasks of the recording device
  • the aforementioned non-empty intersection is related to the recording tasks of the recording device. It can also be understood that both the software type supported by the recording device and the software type supported by the playback device are related to the recording task; and/or, the hardware type supported by the recording device and the hardware type supported by the playback device are both related to the recording task.
  • the task list includes task information of each recording device in the recording group, and the task information includes the task type of the recording device and the hardware type and/or software type supported by the task type.
  • different task types require devices to support different software types and/or hardware types.
  • the server will determine the recording device and the playback device having the first corresponding relationship based on the task type of each task and the hardware type and/or software type supported by the task type. For example, for tasks involving taking pictures and recording videos, both the recording device and the playback device are required to support cameras. As another example, for tasks involving audio playback, both the recording device and the playback device are required to support speakers. For another example, for tasks involving voice calls, both the recording device and the playback device are required to support microphones. The details are not listed here.
  • the device type of the recording device and the device type of the playback device with the first corresponding relationship are not necessarily identical.
  • both the recording device and the playback device are required to support cameras, but it is not necessarily required that both the recording device and the playback device support the same system type.
  • the recording device supporting the Android system and supporting the camera has a first corresponding relationship with the playback device supporting the IOS system and supporting the camera.
  • both the recording device and the playback device are required to support a certain mailbox application, but it is not necessarily required that both the recording device and the playback device support touch screen input.
  • a mobile phone that supports the aforementioned email application and touch screen input can be determined as the recording device, and a computer that supports the aforementioned email application and keyboard input can be determined as the playback device.
  • step 201a, step 201b and step 202 may all be performed before step 203, that is, before recording, both the recording device and the playback device are registered with the server, and the server obtains the first correspondence.
  • Step 201b and step 202 can also be executed after step 203 and before step 206, that is, the recording devices in the recording group are first registered on the server, and record under the command and control of the server, while the playback devices in the playback group only need to Just register to the server before the server distributes the semantics.
  • Step 203 the server sends a first recording instruction to each recording device in the recording group; correspondingly, the recording device receives the first recording instruction from the server.
  • the first recording instruction is used to instruct each recording device to start recording. After the recording device receives the aforementioned first recording instruction, the recording device will start recording.
  • starting recording refers to a process in which a recording device starts to detect user operations on the recording device, and generates semantics based on the operations detected by the recording device.
  • the first recording instruction includes system clock information of the server, and the system clock information is used to instruct each recording device in the recording group to perform clock synchronization according to the system clock of the server. Specifically, after each recording device receives the system clock information in the aforementioned first recording instruction, the recording device may reset the system clock. This embodiment is beneficial to ensure that the system clocks of the recording devices in the recording group are synchronized.
  • the aforementioned first recording instruction further includes at least one recording interface, and the at least one recording interface and the aforementioned task relevant.
  • the aforementioned recording interface includes an I/O interface of a microphone, an I/O interface of a speaker, an I/O interface of a mouse, an I/O interface of a keyboard, etc., which are not limited herein.
  • step 204 the recording device generates at least one piece of semantics.
  • the aforementioned semantics is the information generated by the recording device to describe the user's operation on the recording device. It can also be understood that the foregoing semantics is an abstract expression of the recording device to the user's operations on the recording device.
  • the semantics include time information, object information and action information.
  • the time information is used to indicate the moment when the recording device detects the operation, which can reflect when the user operates the recording device.
  • the object information is used to indicate the object of the operation corresponding to the semantics, that is, which part on the recording device the user operates.
  • the action information is used to indicate the content of the operation, that is, what specific actions are performed by the user on the recording device.
  • the recording device after the recording device receives the aforementioned first recording instruction, the recording device will start recording and generate semantics. Specifically, the recording device will detect the user's operation on the recording device through the recording interface, obtain the original information corresponding to the aforementioned operation, and generate a piece of semantics based on one or more pieces of the aforementioned original information. It should be understood that if the first recording instruction includes at least one recording interface, the recording device only detects the operation of each interface in the at least one recording interface during recording.
  • the recording device only The information related to the user operation is acquired from the I/O interface of the mouse and the I/O interface of the keyboard, and the information is not acquired from the I/O interface of the microphone and the I/O interface of the speaker.
  • each of the aforementioned semantics includes the indication information of the recording device, and the indication information of the recording device in the semantics is used to indicate which recording device generates the semantics, so that the server will Semantics are distributed to the corresponding playback devices.
  • each piece of original information is the information detected by the recording device and related to the user's operation on the recording device.
  • Each piece of original information includes operation time, operation object and operation type.
  • the operation time is the moment when the recording device detects the user's operation on the recording device;
  • the operation object is the object detected by the recording device that the user operates on the recording device;
  • the operation type is the user's operation detected by the recording device The type of action performed by the hardware and/or software supported by the recording device.
  • the recording device determines the aforementioned operation time as semantic time information.
  • the recording device determines the semantic object information according to the operation object.
  • the recording device determines the semantic action information according to the operation type.
  • the recording device stores a mapping rule for determining action information
  • the mapping rule includes a correspondence between an action feature and multiple types of operations, each of the aforementioned multiple types of operations satisfies the corresponding action features.
  • the recording device will determine, according to the operation type and the mapping rule, that the action feature corresponding to the operation type is semantic action information.
  • the multiple operation types in the mapping rule include a first operation type and a second operation type, and the first operation type is pressed on the user interface through a touch screen, and the second operation type is a mouse operation If the left button is pressed on the display screen, the first action feature corresponding to the first operation type and the second operation type is pressing.
  • the multiple operation types in the mapping rule include a third operation type and a fourth operation type
  • the third operation type is sliding in the first direction on the user interface through the touch screen
  • the fourth operation type In order to scroll the progress bar along the first direction by the mouse, the second action characteristic corresponding to the third operation type and the fourth operation type is to move along the first direction.
  • the multi-terminal automation scenario based on the user interface UI is taken as an example.
  • the recording device detects through the I/O interface of the touch screen that the user presses the action at point A whose coordinates are (x, y) on the touch screen, and the current system time is T1, the recording device will obtain the original info ⁇ T1; A(x,y); pressed on touchscreen ⁇ .
  • T1 is the operation time
  • A(x, y) is the operation object
  • "press on the touch screen” is the operation type.
  • the recording device will determine "T1" as semantic time information.
  • the recording device will determine the element or picture at the position of the coordinate A(x, y) as the object information.
  • the recording device will also determine action information based on the operation type and mapping rules.
  • mapping rules stored in the recording device are shown in Table 3-1 below, the recording device will determine that the action information is "press".
  • a UI-based multi-terminal automation scenario for example, a UI-based front-end test scenario.
  • a piece of semantics generated by the foregoing recording device may be shown in FIG. 3 .
  • end_id: LZ-01 indicates that the device ID of the recording device is "LZ-01”.
  • end_type: Android, file_type: XML refers to the device type of the recording device, where the recording task of the recording device needs to support the "Android" system type and the "XML” file type.
  • time: T1 indicates time information, which means that the time when the recording device detects the user's operation on the recording device is T1.
  • object_type: element; object_value: ⁇ name: name_string; class: class_string; path: element_path_string ⁇ indicates object information, where "object_type: element” indicates that the object information is an element in the user interface; "object_value: ⁇ name: name_string; class: class_string; path: element_path_string ⁇ ” indicates that the aforementioned element is found in the user interface, and it can also be understood as indicating the characteristics of the aforementioned element.
  • name_string indicates that the name of the element in the system is “name_string”
  • class: class_string indicates that the element level of the element in the system is “class_string”
  • path: element_path_string indicates that the element is in the system
  • the lookup path is “path:element_path_string”.
  • BNF backus normal form
  • the recording device will generate semantics based on the detected original information until the recording device receives a second recording instruction from the server, and the second recording instruction is used to instruct the recording device to stop recording; or until the recording device The device completes all operations in the recording task.
  • step 205 the recording device sends the aforementioned at least one semantic item to the server; correspondingly, the server receives the aforementioned at least one semantic item from the recording device.
  • the recording device needs to send the semantics to the server.
  • the recording device may send the semantics to the server every time it generates a semantic; the recording device may also send all the semantics generated by the recording device to the server after stopping the recording, which is not limited here.
  • the recording device may send the data packet carrying the semantics to the server, or the recording device may send the data packet carrying the semantics to the network element (for example, the proxy network element) , switch, etc.), and then sent by the network element to the server.
  • the network element for example, the proxy network element
  • switch etc.
  • the server will receive at least one piece of semantics from each recording device in the recording group, and will obtain multiple pieces of semantics.
  • the foregoing plurality of semantics may constitute a semantic set, and the semantic set includes all semantics generated by each recording device in the recording group.
  • the semantic collection is taken as an example in the following sections.
  • Step 206 the server sends the semantics to the corresponding playback devices in the playback group in chronological order according to the time information of each semantic.
  • the server will first determine the playback device corresponding to each semantic (that is, which playback device in the playback group each semantic should be sent to); then, the server parses the time information of each semantic, and compiles all the semantics in the semantic set according to Sort in chronological order; then, the server sends the semantics in the semantic set to the corresponding playback devices in the playback group in chronological order.
  • the server may determine the playback device corresponding to each semantic item according to the first correspondence described above. Since each piece of semantics includes the indication information of the recording device, and the first correspondence stores the correspondence between the indication information of each recording device in the recording group and the indication information of the playback device in the playback group, the server based on The indication information of the recording device and the aforementioned first correspondence can determine the playback device corresponding to the semantics. For ease of understanding, taking the first correspondence as the previous Table 2-1 as an example, if the server determines that the indication information of the recording device carried in semantic 01 is "LZ-01", then the server can determine the playback device corresponding to semantic 01 is a playback device whose indication information is "HF-01".
  • the server when the server sends the semantics in the semantic set to the corresponding playback device, the server only sends one semantic to the corresponding playback device at a time, or it can send a group of semantics (including multiple semantics) to a corresponding playback device at a time. equipment.
  • the server may also use receiving a notification message from the playback device as a trigger condition for sending the next semantic message (or the next group).
  • the aforementioned notification message is used to indicate that the playback device has finished executing the received semantics, and it can also be understood that the aforementioned notification message is used to indicate that the playback device has successfully played back the received semantics.
  • the semantic set includes N pieces of semantics, where N is an integer greater than 1.
  • the server sorts the semantics in the semantic set according to the timing information of the N semantics in the semantic set, and obtains a first semantic sequence determined by the N semantics. Then, the server sends the i-th semantic item in the first semantic sequence (wherein, the value of i is an integer greater than or equal to 1 and less than or equal to N) to the corresponding playback device in the playback group. Then, the server receives the notification message corresponding to the i-th semantic, and the notification message corresponding to the i-th semantic is used to indicate that the playback of the i-th semantic is successful.
  • the server needs to receive a notification message from the playback device indicating that the playback is successful before triggering the sending of the next message. Therefore, it is beneficial for the playback devices in the playback group to execute the received semantics in an orderly manner, and it is also beneficial for the server to resend the aforementioned semantics to the playback device when the playback device fails to send the aforementioned notification message, so that each playback device in the playback group Both can execute the corresponding semantics, thereby ensuring the orderly progress of the entire playback task.
  • the semantic set includes N pieces of semantics, where N is an integer greater than 1.
  • the server sorts the semantics in the semantic set according to the timing information of the N semantics in the semantic set, and obtains a first semantic sequence determined by the N semantics. Then, the server divides the first semantic sequence into multiple second semantic sequences, and each second semantic sequence is a continuous sequence of at least one semantic determination executed by the same playback device in the first semantic sequence. Then, the server sends the second semantic sequences to the corresponding playback devices in the playback group in sequence, until the server sends all the second semantic sequences determined based on the aforementioned semantic set to the playback devices.
  • the server sends a set of semantics (that is, a second semantic sequence) to the playback devices in the playback group each time, and the set of semantics is executed by a certain playback device. After the playback device executes the preceding set of semantics, the server sends the next set of semantics to the playback device.
  • This embodiment is beneficial to save signaling overhead between the server and the playback device.
  • the playback device can determine the sequence of executing each piece of semantics in the set of semantics based on the time information of each piece of semantics in the set of semantics. Therefore, the playback devices in the playback group can also ensure that the entire playback task is performed in an orderly manner.
  • the server can schedule and distribute multiple semantics.
  • the server can The time information of each semantic in the semantics distributes the aforementioned multiple semantics to the corresponding playback devices in chronological order, so that each playback device can execute the semantics from the server in an orderly manner, thereby realizing orderly playback.
  • the server can release the aforementioned multiple semantics in order instead of manual implementation, it can avoid confusion in the order of execution semantics of each playback device in the system, thereby ensuring that the automatic process of the system including multiple devices can be realized.
  • Step 401 the server obtains multiple semantics.
  • the aforementioned multiple semantics may be directly input by the user to the server through an I/O interface, or may be read by the server from an external storage medium, which is not specifically limited here.
  • the aforementioned multiple semantics may constitute a semantic set.
  • the semantic collection is taken as an example in the following sections.
  • each semantic item is used to indicate an operation that needs to be performed on the playback device in the playback group, and the operation includes controlling one playback device in the playback group to interact with another playback device in the playback group.
  • the semantics include timing information, object information and action information.
  • the timing information is used to indicate the order of the semantics relative to other semantics in the semantic set.
  • the foregoing timing information may be Arabic numerals such as "1", "2", and "3" that can represent a sequence.
  • the object information is used to indicate the object of the operation corresponding to the semantic, that is, on which part of the playback device the playback device performs the operation according to the semantic.
  • the action information is used to indicate the content of the operation, that is, which actions the playback device performs on components of the playback device according to the semantics.
  • each of the aforementioned semantics includes the indication information of the playback device, and the indication information of the playback device in the semantics is used to indicate which playback device the semantics will be executed, so that the server will Semantics are distributed to the corresponding playback devices.
  • the indication information of the playback device includes a device identifier of the playback device and/or a device type of the playback device.
  • the indication information of the playback device is a device identifier of the playback device.
  • the device identifier of the playback device may be information that can uniquely identify a playback device, such as the IP address of the playback device, the serial number of the playback device, and the like.
  • the indication information of the playback device is a device type of the playback device.
  • the device type of the playback device is used to indicate the software type and/or hardware type supported by the playback device.
  • the hardware type refers to the physical structure of the device.
  • hardware types include touch screens, keyboards, and mice.
  • hardware types include cameras, speakers, microphones, and touch screens.
  • the hardware type includes a distance sensor, an infrared sensor, an infrared thermometer, and the like.
  • the software type refers to the software function that the device can realize by running the program.
  • the software type includes a system type that records which functional interface is invoked by an application and a file type in a UI storage format.
  • the system types mainly include Web applications that call container interfaces such as browsers, Windows desktop applications that call system interfaces, and native applications of Android (Andriod)/IOS/HarmonyOS;
  • the file types of UI storage formats mainly include dom tree-based
  • step 402 the server obtains the information of the playback device.
  • the server may obtain the information of the playback device by receiving a registration message from the playback device. Specifically, the server will receive one or more registration messages, and each registration message includes information such as the device identifier and device type of the playback device. Then, the server stores the device identifier and device type of each playback device, so that the server can obtain the information of each playback device in the subsequent process of distributing semantics.
  • Step 403 the server sends the semantics to the corresponding playback device in the playback group according to the order indicated by the timing information of each semantic.
  • the server will first determine the playback device corresponding to each semantic (that is, which playback device in the playback group each semantic should be sent to); then, the server parses the timing information of each semantic, and sends The semantics in the semantic set are sent to the corresponding playback devices in the playback group.
  • the server has multiple ways to determine the playback device corresponding to each semantic, which are introduced below:
  • each piece of semantics includes playback device indication information
  • the playback device indication information in the semantics is used to indicate which playback device the semantics will be executed by. Therefore, the server will parse the received semantics to obtain the indication information of the playback device in the semantics, and then determine the playback device corresponding to the semantics based on the indication information of the playback devices in the semantics, and then the semantic set in the The semantics are sent to the playback device corresponding to each semantic.
  • the server can acquire a second correspondence, where the second correspondence includes a correspondence between timing information and indication information of a playback device, and the second correspondence is used to indicate the The semantics can run in the playback device indicated by the indication information of the playback device. Therefore, the server may determine the playback device corresponding to each semantic item according to the timing information of each semantic item and the second corresponding relationship, and send the semantics to the corresponding playback device in the playback group in the sequence indicated by the timing information.
  • HF-01 and “HF-02” represent the device IDs of playback devices; Arabic numerals represent timing information.
  • the second line indicates that the timing information is “1", “3” and “5" semantics, which should be sent to the playback device with the device identifier "HF-01" for execution;
  • the third line indicates that the timing information is "2", "5", The semantics of "4" and “6” should be sent to the playback device whose device identifier is "HF-02" for execution.
  • the server when the server sends the semantics in the semantic set to the corresponding playback device, the server only sends one semantic to the corresponding playback device at a time, or it can send a group of semantics (including multiple semantics) to a corresponding playback device at a time. equipment.
  • the server may also use receiving a notification message from the playback device as a trigger condition for sending the next semantic message (or the next group).
  • the aforementioned notification message is used to indicate that the playback device has finished executing the received semantics, and it can also be understood that the aforementioned notification message is used to indicate that the playback device has successfully played back the received semantics.
  • timing information to the semantics used to realize automation as the basis for the server to schedule and distribute multiple semantics.
  • the server can The sequence information determines the sequence of semantics distribution, and then distributes the multiple semantics to the corresponding playback devices according to the sequence indicated by the timing information, so that each playback device can execute the semantics from the server in an orderly manner, thereby realizing orderly playback.
  • the server since the server can release the aforementioned multiple semantics in order instead of manual implementation, it can avoid confusion in the order of execution semantics of each playback device in the system, thereby ensuring that the automatic process of the system including multiple devices can be realized.
  • FIG. 5 is a schematic structural diagram of the server 50 provided in the present application.
  • the server can be a cloud server or a local server.
  • the server can provide services to users in the form of SaaS (Software as a Service). Users can obtain the services of the server 50 through webpage access, application software and plug-ins, open source codes or toolkits, etc. on the recording device.
  • SaaS Software as a Service
  • Users can obtain the services of the server 50 through webpage access, application software and plug-ins, open source codes or toolkits, etc. on the recording device.
  • the server in the method embodiment corresponding to FIG. 2 or FIG. 4 may be based on the structure of the server 50 shown in FIG. 5 in this embodiment.
  • the server 50 may include a processor 510 , a memory 520 and a transceiver 530 .
  • the processor 510 is coupled to the memory 520
  • the processor 510 is coupled to the transceiver 530 .
  • the aforementioned transceiver 530 may also be referred to as a transceiver unit, a transceiver, a transceiver device, and the like.
  • the device used to realize the receiving function in the transceiver unit can be regarded as a receiving unit
  • the device used to realize the sending function in the transceiver unit can be regarded as a sending unit, that is, the transceiver unit includes a receiving unit and a sending unit, and the receiving unit also It can be called receiver, input port, receiving circuit, etc., and the sending unit can be called transmitter, transmitter, or transmitting circuit, etc.
  • the transceiver 530 may receive a registration message (eg, a registration message from a recording device or a registration message from a playback device).
  • the transceiver 530 may send a message to the recording device, for example, send a first recording instruction or a second recording instruction to the recording device.
  • the foregoing processor 510 may be a central processing unit (central processing unit, CPU), an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD) or a combination thereof.
  • the aforementioned PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL) or any combination thereof.
  • the processor 510 may refer to one processor, or may include multiple processors, which is not specifically limited here.
  • the aforementioned memory 520 is mainly used to store software programs and data.
  • the memory 520 may exist independently and be connected to the processor 510 .
  • the memory 520 may be integrated with the processor 510, for example, integrated into one or more chips.
  • the memory 520 can store program codes for executing the technical solutions of the embodiments of the present application, and the execution is controlled by the processor 510 , and various computer program codes to be executed can also be regarded as drivers for the processor 510 .
  • the memory 520 may include a volatile memory (volatile memory), such as a random-access memory (random-access memory, RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a read-only memory (read-only memory). only memory, ROM), flash memory (flash memory), hard disk (hard disk drive, HDD) or solid-state drive (solid-state drive, SSD); the memory 520 may also include a combination of the above-mentioned types of memory.
  • the storage 520 may refer to one storage, or may include multiple storages.
  • the storage 520 is configured to store information of the recording device (for example, the device identifier and device type of the recording device) and information of the playback device (for example, the device identifier and device type of the playback device).
  • the memory 520 is also used to store the first correspondence or the second correspondence described above.
  • the first correspondence is the correspondence between the indication information of each recording device in the recording group and the indication information of the playback device in the playback group, and the first correspondence is used to indicate that the playback device can perform corresponding Semantics generated by the recording device.
  • the second correspondence includes a correspondence between the timing information and the indication information of the playback device, and the second correspondence is used to indicate that the semantics including the timing information can run in the playback device indicated by the indication information of the playback device.
  • computer-readable instructions are stored in the memory 520 , and the computer-readable instructions include a plurality of software modules, such as a sending module 521 , a processing module 522 and a receiving module 523 .
  • the processor 510 may perform corresponding operations according to instructions of each software module.
  • an operation performed by a software module actually refers to an operation performed by the processor 510 according to an instruction of the software module.
  • the server 50 when the server 50 is used to execute the method in the aforementioned embodiment corresponding to FIG. 2 , the main functions of the sending module 521, the processing module 522 and the receiving module 523 in the server 50 are as follows:
  • the receiving module 523 is configured to receive at least one piece of semantics from each recording device in the recording group.
  • the processing module 522 is configured to determine the chronological sequence of the semantics according to the time information of each semantic, and control the sending and receiving module to send the semantics to the corresponding playback devices in the playback group according to the chronological order.
  • each of the semantics is information describing the user's operation on the recording device, and the semantics includes time information, object information and action information, the time information is used to indicate the time when the recording device detects the operation, and the object information It is used to indicate the object of the operation corresponding to the semantics, and the action information is used to indicate the content of the operation.
  • the memory 520 is used to store a first correspondence, the first correspondence being between the indication information of each recording device in the recording group and the indication information of the playback devices in the playback group
  • the first correspondence is used to indicate that the playback device can execute the semantics generated by the corresponding recording device.
  • the indication information includes a device identifier and/or a device type, where the device type is used to indicate the software type and/or hardware type supported by the recording device.
  • the processing module 522 when each piece of semantic information includes the indication information of the recording device, the processing module 522 is specifically configured to A corresponding relationship, sending the semantics to the corresponding playback device in the playback group according to the time sequence.
  • the memory 520 in the server 50 is also used to store the device list.
  • the device list stores information of the recording group and information of the playback group.
  • the information of the recording group includes the device identification of each recording device in the recording group
  • the information of the playback group includes the device identification of each playback device in the playback group.
  • the receiving module 523 is also used to receive a plurality of registration messages, each of which includes the device identification of the device sending the registration message; the processing module 522 is also used to control the memory 520 according to the device list and the registration message
  • the device ID of the device determines whether the device is a recording device or a playback device.
  • the registration message further includes a device type of the device, and the device type includes a device type of the recording device and a device type of the playback device.
  • the storage module in the server is also used to store the device type of the recording device and the device identifier of the recording device in correspondence; and, the device type of the playback device and the playback device The device ID corresponds to storage.
  • the sending module 521 is further configured to send a first recording instruction to each of the recording devices in the recording group, where the first recording instruction is used to instruct each of the recording devices to start recording, and the first recording instruction A recording instruction includes system clock information of the server, and the system clock information is used to instruct each recording device in the recording group to perform clock synchronization according to the system clock of the server.
  • the sending module 521 is further configured to send a second recording instruction to at least one recording device in the recording group, where the second recording instruction is used to instruct the recording device to stop recording.
  • the processing module 522 controls the external interface to obtain multiple semantic .
  • the processing module 522 controls the transceiving module to send the semantics to the corresponding playback devices in the playback group according to the order indicated by the timing information of each piece of semantics.
  • Each of these semantics is used to indicate an operation that needs to be performed on the playback device in the playback group, and the operation includes controlling one playback device in the playback group to interact with another playback device in the playback group.
  • this semantics includes timing information, object information and action information. Wherein, the timing information is used to indicate the order of the semantics relative to other semantics in the aforementioned multiple semantics, the object information is used to indicate the object of the operation corresponding to the semantics, and the action information is used to indicate the content of the operation.
  • the memory 520 in the server 50 stores indication information of each playback device in the playback group, and the indication information of each playback device is used to identify a playback device in the playback group.
  • each piece of semantics further includes indication information of the playback device, and the indication information of the playback device in the semantics is used to indicate the playback device corresponding to the semantics.
  • the processing module 522 is configured to control the sending and receiving module to send information to the The playback device indicated by the indication information of the playback device sends the semantics.
  • the processing module 522 controls the external interface to obtain a second correspondence, where the second correspondence includes a correspondence between the timing information and the indication information of the playback device, and the second correspondence is used for Indicates that the semantics including the timing information can run in the playback device indicated by the indication information of the playback device.
  • the processing module 522 is also configured to determine the playback device corresponding to each semantic item according to the timing information of each semantic item and the second corresponding relationship, and control the transceiver module to send the corresponding playback device in the playback group according to the order indicated by the timing information. Send that semantic.
  • the indication information of the playback device includes a device identifier of the playback device and/or a device type of the playback device, and the device type of the playback device is used to indicate the type of software supported by the playback device and/or or hardware type.
  • FIG. 2 or FIG. 4 corresponding to the method of the server in the embodiment, and details are not repeated here.
  • the processing module 522 in the server 50 may be divided into the structure shown in FIG. 6 according to functions.
  • the processing module 522 includes a recording controller 5223 , a semantic sequencing scheduling module 5222 and a playback controller 5221 .
  • the recording controller 5223 is a functional module that controls the recording process of the recording device. Before recording, each recording device in the recording group registers through the recording controller 5223 , and the server 50 receives the registration message through the receiving module 523 .
  • the registration message includes the device identifier of the recording device and the device type of the recording device.
  • the registration message also includes system clock information of the recording device.
  • the recording controller 5223 issues an instruction to start recording (i.e. the first recording instruction) and an instruction to stop recording (i.e. the second recording instruction), to obtain the semantics generated by each recording device in the recording group, and then obtain the Semantic set of semantics.
  • the semantic sorting scheduling module 5222 is the data storage and maintenance structure of the server 50 . It is used to sort the semantics in the semantic set in chronological order according to the time information, and then distribute them in the aforementioned chronological order in the playback stage. In addition, the semantic sorting scheduling module 5222 also stores a first correspondence, the first correspondence being the correspondence between the indication information of each recording device in the recording group and the indication information of the playback devices in the playback group, The first correspondence is used to indicate that the playback device can execute the semantics generated by the corresponding recording device.
  • the playback controller 5221 is a functional module that controls the playback process. Before the playback is performed, each playback device in the playback group registers with the playback controller 5221 .
  • the server 50 receives the registration message through the receiving module 523 .
  • the registration message includes the device identifier of the playback device and the device type of the playback device.
  • the registration message also includes system clock information of the playback device.
  • the playback controller 5221 distributes the semantics in the aforementioned semantic set to each playback device in the playback group in chronological order.
  • the playback controller 5221 may also collect a notification message replied by the playback device, where the notification message is used to indicate that the playback device has executed a certain semantic, so that the playback controller 5221 controls the sending module 521 to send the next semantic.
  • the device 70 may be a recording device or a playback device.
  • the aforementioned device may be a mobile terminal (mobile terminal, MT) such as a mobile phone (mobile phone), a tablet computer (Pad); it may also be a virtual reality (virtual reality, VR) terminal device, an augmented reality (augmented reality, AR) terminal device; It can also be terminal devices in other fields that may have automation requirements, for example, terminal devices in industrial control, terminal devices in self-driving, and terminals in remote medical surgery Devices, terminal devices in smart grid, terminal devices in transportation safety, terminal devices in smart city, terminal devices in smart home, etc.
  • MT mobile terminal
  • VR virtual reality
  • AR augmented reality
  • the foregoing device 70 may also be other devices capable of executing scripts or semantics, or other devices requiring automation.
  • the devices for example, recording devices or playback devices
  • the devices in the method embodiments corresponding to FIG. 2 and FIG. 4 may be based on the structure of the recording device 70 shown in FIG. 7 .
  • the recording device 70 includes at least one processor 701 and at least one memory 702 . It should be understood that FIG. 7 only shows one processor 701 and one memory 702 .
  • the processor 701 may be a general-purpose central processing unit CPU, a microprocessor, a network processor (network processor, NP) or a specific application integrated circuit (application-specific integrated circuit), or one or more program for the implementation of the integrated circuit.
  • the foregoing processor 701 may be a single-core (single-CPU) processor, or may be a multi-core (multi-CPU) processor.
  • Processor 701 may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the processor 701 can be an independent semiconductor chip, or can be integrated with other circuits to form a semiconductor chip.
  • a system on a chip (system-on-a-chip, SoC), or can also be integrated in the described ASIC as a built-in processor of a special application integrated circuit (application specific integrated circuit, ASIC), and the ASIC integrated with the processor can Packaged separately or together with other circuits.
  • SoC system-on-a-chip
  • ASIC application specific integrated circuit
  • the aforementioned memory 702 may be a read-only memory ROM, or other types of static storage devices that can store static information and instructions, or a random access memory RAM, or other types of memory devices that can store information and instructions.
  • the dynamic storage device may also be an electrically erasable programmable read-only memory (EEPROM), which is not specifically limited here.
  • EEPROM electrically erasable programmable read-only memory
  • the memory 702 may exist independently, but is connected to the aforementioned processor 701 .
  • the memory 702 may also be integrated with the aforementioned processor 701. For example, integrated within one or more chips.
  • the memory 702 is also used to store program codes for executing the technical solutions of the embodiments of the present application.
  • the mapping rule includes a correspondence between an action feature and multiple operation types, and each operation type in the multiple operation types satisfies the action feature.
  • the device 70 also includes a communication interface 703, which is used to communicate with the server, so that the device can obtain the first recording instruction or the second recording instruction from the server.
  • the device 70 can also send a registration message to the server through the communication interface 703 .
  • the processor 701 can at least perform the functions of a monitor and an analyzer.
  • the monitor is used to monitor operations of interfaces such as a keyboard/button, mouse, and touch screen through the I/O interface to obtain original information.
  • the aforementioned raw information is transferred to the analyzer.
  • the analyzer generates semantics based on the aforementioned original information by searching and analyzing the mapping rules stored in the recording device.
  • the specific manner of generating semantics by the recording device can refer to the related introduction in step 205 above, which will not be repeated here.
  • the processor 701 can at least perform parser and UI-driven functions.
  • the parser is used for converting the aforementioned semantics into instructions based on the received semantics and mapping rules. Then, the parser transmits the aforementioned instructions to the UI driver.
  • the UI driver is used to reproduce the UI interaction situation based on the aforementioned instructions.
  • each step of the above method may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
  • the first, second, third, fourth and various numbers mentioned herein are only for convenience of description, and are not used to limit the scope of the embodiments of the present application.
  • the present application provides a computer program product comprising one or more computer instructions.
  • the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • implement the server-related method in FIG. 2 or FIG. 4 As another example, implement the method related to the recording device as in the aforementioned FIG. 2 .
  • the computer can be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (eg, infrared, wireless, microwave, etc.) to another website site, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium, (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)) wait.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a digital versatile disc (digital versatile disc, DVD)
  • a semiconductor medium for example, a solid state disk (solid state disk, SSD)
  • the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the server-related method in FIG. 2 or FIG. 4 .
  • the present application also provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is executed by a processor to implement the method related to the recording device as shown in FIG. 2 .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Television Signal Processing For Recording (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)

Abstract

本申请实施例公开了一种回放方法、录制方法以及相关设备,应用于自动化领域中,提出在用于实现自动化的语义中添加时间信息作为服务器调度分发多条语义的依据。服务器在获取到多条语义之后,服务器能够根据前述多条语义中每条语义的时间信息按照时间先后顺序将前述多条语义分发至对应的回放设备中,以使得各个回放设备能够有序执行来自服务器的语义,进而实现有序回放。由于服务器能够代替人工实现按顺序发放语义,因此,能够避免系统中各个回放设备执行语义的顺序出现混乱,进而能够保证包含多个设备的系统的自动化流程能够实现。

Description

回放方法、录制方法以及相关设备
本申请要求于2021年10月30日提交中国国家知识产权局、申请号为202111278494.6、申请名称为“回放方法、录制方法以及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及自动化领域,尤其涉及回放方法、录制方法以及相关设备。
背景技术
自动化(Automation)技术是通过一个或多个设备代替人工从事重复性操作的技术。一般地,具有规则驱动、可重复等特性的工作流程都可以作为自动化的潜在目标。
传统技术中,在将设备上需要人工介入的多个操作进行自动化时,用户可以将基于前述多个操作生成的语义拷贝至该设备中,由该设备基于前述多个语义实现对应的操作,进而实现自动化。当由多个设备构成的系统需要实现自动化时,用户需要分别基于该系统中的每个设备分别撰写语义,并且,分别将每个设备对应的语义拷贝至前述系统中的对应设备中。
然而,由于前述系统中的多个设备是分布式布置的,因此,每个设备仅感知用户输入给该设备的语义,而不感知其他设备执行语义的进度。若前述系统中的多个设备之间存在数据或信令交互(例如,该系统中某一个设备执行某一条语义之后,需要该系统中另一个设备执行另一条语义),则将导致该系统中各个设备执行语义的顺序出现混乱,进而导致该系统的自动化流程难以实现。
发明内容
本申请实施例提供了一种回放方法、录制方法以及相关设备,用于在分布式场景实现包含多个设备的系统的自动化流程。
本申请提供的回放方法可以在涉及录制设备和回放设备的场景下使用,也可以在不涉及录制设备而仅涉及回放设备的场景下使用。
第一方面,本申请提供了一种回放方法,该回放方法在涉及录制设备和回放设备的场景下使用。在该方法中,录制组中的每个录制设备基于用户在录制设备上的操作生成至少一条语义。然后,服务器接收来自录制组中的每个录制设备的至少一条语义。每条语义是描述用户在该录制设备上的操作的信息。其中,该语义包括时间信息、对象信息和动作信息。其中,时间信息用于指示该录制设备检测到该操作的时刻,能够反映用户在何时对该录制设备进行了操作。对象信息用于指示该语义对应的操作的客体,即用户对录制设备上的哪个部件进行了操作。动作信息用于指示该操作的内容,即用户在录制设备上的操作具体是哪些动作。然后,服务器根据每条该语义的时间信息,按照时间先后顺序向该回放组 中对应的回放设备发送每条语义。
可选的,当服务器接收录制组中每个录制设备生成的全部语义,该服务器可以获得多条语义。在一种示例中,前述多条语义可以是一个语义集合。此外,该服务器在分发语义之前,需要将前述语义集合中的语义进行排序,以保证服务器发送给回放组的语义是完整的,进而有利于保证回放组中回放设备基于语义执行的操作完整且无误。
应理解,前述每个录制设备的至少一条语义可以由录制设备直接发送给服务器,即服务器从录制组中的每个录制设备接收每个录制设备生成的至少一条语义;前述每个录制设备的至少一条语义也可以是录制设备发送给用于中转消息的网元(例如,代理网元、交换机等),再由该网元发送给服务器。具体此处不做限定。
本实施例中,提出在用于实现自动化的语义中添加时间信息作为服务器调度分发多条语义的依据,该服务器在获取到多条语义之后,该服务器能够根据前述多条语义中每条语义的时间信息按照时间先后顺序将前多条语义分发至对应的回放设备中,以使得各个回放设备能够有序执行来自服务器的语义,进而实现有序回放。在本申请中,由于服务器能够代替人工实现按顺序发放前述多条语义,因此,能够避免系统中各个回放设备执行语义的顺序出现混乱,进而能够保证包含多个设备的系统的自动化流程能够实现。
本申请中,服务器不仅需要获知按照哪个顺序将前多条语义中的每条语义发出,还需要确定将前述多条语义中的每条语义发送给回放组中的哪个回放设备。
在一种可能的实施方式中,该服务器存储有第一对应关系,该第一对应关系为该录制组中每个录制设备的指示信息与该回放组中的回放设备的指示信息之间的对应关系,该第一对应关系用于指示该回放设备能够执行对应的录制设备生成的语义。也可以理解为,录制组中的某一个录制设备生成的语义可以在回放组中与该录制设备存在第一对应关系的回放设备上运行。因此,服务器可以基于前述第一对应关系确定录制组中的每个录制设备生成的语义应当发送给回放组中的哪个回放设备。
应理解,前述第一对应关系可以是由人为预设,也可以由服务器根据录制设备的信息(例如,录制设备的设备类型)和回放设备的信息(例如,回放设备的设备类型)确定。应理解,该第一对应关系可以采用数组、表或者其他能够表示关联的数据结构的方式存储至服务器中。具体此处不做限定。
本实施例中,提出服务器中存储了第一对应关系,该第一对应关系为该录制组中每个录制设备的指示信息与该回放组中的回放设备的指示信息之间的对应关系。因此,服务器能够基于第一对应关系确定录制组中某一个录制设备生成的语义应当发送给回放组中的哪个回放设备进行执行。不仅有利于保证服务器分发语义时的准确率,还有利于保证服务器分发语义时的效率,避免服务器将语义分发给错误的回放设备,而导致回放设备的回放任务出现混乱。
在一种可能的实施方式中,前述第一对应关系中的指示信息包括设备标识和/或设备类型。例如,录制设备的指示信息包括录制设备的设备标识和/或录制设备的设备类型;回放设备的指示信息包括回放设备的设备标识和/或回放设备的设备类型。可选的,前述指示信息还可以是其他能够区分某一个录制设备或区分某一个回放设备的信息。
可选的,该设备类型用于指示该录制设备支持的软件类型和/或硬件类型。
其中,硬件类型指设备具有的物理的结构。示例性的,在基于用户界面(user interface,UI)的多终端自动化场景中,硬件类型包括触摸屏、键盘、鼠标等。示例性的,在涉及影音推送的多终端自动化场景中,硬件类型包括摄像头、扬声器、麦克风以及触摸屏等。示例性的,在基于制造业的自动化场景中,硬件类型包括距离传感器、红外传感器、红外测温仪等。此外,软件类型指设备能够通过运行程序实现的软件功能。示例性的,在基于用户界面(UI)应用的自动化场景中,软件类型包括记录应用调用何种功能接口的系统类型和UI存储格式的文件类型,系统类型主要包括调用浏览器等容器接口的Web应用、调用系统接口的Windows桌面应用、安卓(Andriod)/IOS/鸿蒙(HarmonyOS)原生应用;UI存储格式的文件类型主要包括基于dom树表达的应用界面、支持json格式存储的应用界面、支持xml格式存储的应用界面、支持pdf格式存储的应用界面等。示例性的,在基于制造业的自动化场景中,软件类型包括支持的上位机类型、传感器支持的应用类型。示例性的,在基于快捷操作的自动化场景中,软件类型包括执行某一业务的相关应用,例如,搜索引擎类应用、购物类应用、影音播放类应用。
在一种可能的实施方式中,该录制设备支持的软件类型与对应的回放设备支持的软件类型存在非空交集;和/或,该录制设备支持的硬件类型与对应的回放设备支持的硬件类型存在非空交集。也可以理解为,录制设备与回放设备支持的软件类型完全相同或部分相同,或者,录制设备与回放设备支持的硬件类型完全相同或部分相同。
在一种可能的实施方式中,每条该语义包括该录制设备的指示信息。该服务器根据每条该语义的时间信息,按照时间先后顺序向该回放组中对应的回放设备发送该语义,包括:该服务器根据每条该语义的时间信息、每条该语义中该录制设备的指示信息和该第一对应关系,按照该时间先后顺序向将该回放组中对应的回放设备发送该语义。
本实施方式中,提出在语义中设置录制设备的指示信息,以使得该服务器根据语义中的录制设备的指示信息确定该语义是由录制组中的哪个录制设备生成的。由于,该服务器中还存储有第一对应关系,该第一对应关系为该录制组中每个录制设备的指示信息与该回放组中的回放设备的指示信息之间的对应关系。因此,该服务器能够根据语义中的录制设备的指示信息和第一对应关系确定与该语义对应的回放设备。
在一种可能的实施方式中,该服务器存储有设备列表,该设备列表存储有录制组的信息和该回放组的信息,该录制组的信息包括该录制组中每个录制设备的设备标识,该回放组的信息包括该回放组中每个回放设备的设备标识。该服务器从录制组中的每个录制设备接收至少一条语义之前,该方法还包括:该服务器接收多个注册消息,每个该注册消息包括发送该注册消息的设备的设备标识;该服务器根据该设备列表和该注册消息中的设备的设备标识确定该设备为录制设备或回放设备。
本实施方式中,录制设备和回放设备可以通过注册的方式向服务器提供录制设备的信息(例如,录制设备的设备标识)和回放设备的信息(例如,回放设备的设备标识)。而服务器需要通过预存的设备列表确定发送注册请求的设备为录制设备还是回放设备。通过前述注册管理方式,服务器可以仅对已注册的录制设备和回放设备进行管理,有利于提高管 理录制设备和回放设备的效率。
在一种可能的实施方式中,该注册消息还包括该设备的设备类型,该设备的设备类型包括该录制设备的设备类型和该回放设备的设备类型。该服务器将该录制设备的设备类型与该录制设备的设备标识对应存储;该服务器将该回放设备的设备类型与该回放设备的设备标识对应存储。
本实施方式中,提出当注册消息中包含设备类型(例如,录制设备的设备类型或回放设备的设备类型)时,该服务器还将设备的设备标识和设备类型对应存储,以使得该服务器能够比较方便地查阅每个设备的设备类型,进而有利于方便服务器基于设备标识和设备类型做决策。
在一种可能的实施方式中,该服务器接收多个注册消息之后,该服务器接收来自录制组中的每个录制设备的至少一条语义之前,该方法还包括:该服务器向该录制组中的每个该录制设备发送第一录制指令,该第一录制指令用于指示每个该录制设备启动录制,该第一录制指令包括该服务器的系统时钟信息,该系统时钟信息用于指示该录制组中的每个录制设备按照该服务器的系统时钟进行时钟同步。
本实施方式中,提出服务器能够通过第一录制指令控制录制设备启动录制,并且,该服务器可以在第一录制指令中携带服务器的系统时钟信息,以使得录制设备基于服务器的系统时钟信息重置录制设备的系统时钟。由于该服务器是同时向录制组中的每个录制设备广播第一录制指令,因此,录制组中的每个录制设备均可以收到前述第一录制指令。因此,录制组中的每个录制设备可以基于同一个系统时钟(即服务器的系统时钟)进行重置时钟,以保证录制组中各个录制设备的系统时钟是同步的。
可选的,第一录制指令还包括至少一个录制接口,该至少一个录制接口用于获取与录制任务的任务类型对应的至少一个操作的原始信息,该原始信息为录制设备检测到的与用户在该录制设备上的操作相关的信息。示例性的,前述录制接口包括麦克风的输入/输出(input/output,I/O)接口、扬声器的I/O接口、鼠标的I/O接口、键盘的I/O接口等等,具体此处不做限定。
本实施方式中,提出服务器可能在第一录制指令中携带录制接口,以使得录制设备仅从第一录制指令中的录制接口获取原始信息。有利于服务器基于控制接口的粒度控制录制设备进行录制,而不用该录制设备获取每个接口的信息。有利于节省录制设备的处理负荷。
在一种可能的实施方式中,该服务器向该录制组中的每个该录制设备发送第一录制指令之后,该方法还包括:该服务器向该录制组中的至少一个该录制设备发送第二录制指令,该第二录制指令用于指示该录制设备停止录制。
本申请中,服务器在将前述多条语义(例如,语义集合)中的语义发送给对应的回放设备时,该服务器可以一次仅发送一条语义给对应的回放设备,也可以一次发送一组语义(包括多条语义)给对应的某一个回放设备。可选的,该服务器还可以将收到来自回放设备的通知消息作为发送下一条语义(或下一组)的触发条件。其中,前述通知消息用于指示回放设备已经执行完已收到的语义,也可以理解为,前述通知消息用于指示回放设备收到的语义已回放成功。
在一种可能的实施方式中,若前述多条语义包括N条语义,该N为大于1的整数。该服务器根据每条该语义的时序信息,将前述多条语义中的语义按该顺序发送至该回放组中对应的回放设备,包括:该服务器根据前述N条语义中每条语义的时序信息将前述N条语义进行排序,得到由该N条语义确定的第一语义序列;该服务器向该回放组中对应的回放设备发送该第一语义序列中的第i条语义;该服务器接收该第i条语义对应的通知消息,该第i条语义对应的通知消息用于指示该第i条语义回放成功,该i为大于等于1且小于等于N的整数。
本实施方式中,提出服务器每次向回放组中的回放设备发送一条语义之后,该服务器需要收到来自前述回放设备的表示以回放成功的通知消息才会触发发送下一条语义。因此,有利于回放组中的回放设备能够有序执行收到的语义,也有利于服务器在回放设备未能发送前述通知消息时向回放设备重发前述语义,以使得回放组中每个回放设备均能够执行相应的语义,进而确保整个回放任务有序进行。
在一种可能的实施方式中,若前述多条语义包括N条语义,该N为大于1的整数。该服务器根据每条该语义的时序信息,将前述多条语义中的语义按该顺序发送至该回放组中对应的回放设备,包括:该服务器根据前述N条语义中每条语义的时序信息将前述N条语义进行排序,得到由该N条语义确定的第一语义序列;该服务器将该第一语义序列划分为多个第二语义序列,每个该第二语义序列为该第一语义序列中连续的由同一回放设备执行的至少一条语义确定的序列;该服务器向该回放组中对应的回放设备发送该第二语义序列。
本实施方式中,提出服务器每次向回放组中的回放设备发送一组语义(即一个第二语义序列),该一组语义均由某一个回放设备执行。待回放设备执行完前述一组语义之后,该服务器再向回放设备发送下一组语义。本实施方式有利于节省服务器与回放设备之间的信令开销。此外,由于,每条语义中包含时间信息,因此,回放设备能够基于一组语义中的各条语义的时间信息确定执行前述一组语义中的各条语义的顺序。因此,回放组中的回放设备也能够确保整个回放任务有序进行。
第二方面,本申请提供了一种回放方法,该回放方法在涉及录制设备和回放设备的场景下使用。在该方法中,语义可以是由人工拷贝至服务器。服务器获取多条语义,每条该语义用于指示需要在回放组中的回放设备上执行的操作,该操作包括控制该回放组中的一个回放设备与该回放组中的另一个回放设备进行交互。该语义包括时序信息、对象信息和动作信息。其中,该时序信息用于指示该语义相对于前多条语义中的其他语义的顺序。该对象信息用于指示该语义对应的操作的客体,即回放设备根据该语义在回放设备的哪个部件执行操作。该动作信息用于指示该操作的内容,即回放设备根据该语义在回放设备的部件执行哪些动作。然后,该服务器根据每条该语义的时序信息指示的顺序向该回放组中对应的回放设备发送该语义。
本实施例中,提出在用于实现自动化的语义中添加时序信息作为服务器调度分发多条语义的依据,该服务器在获取到前述多条语义之后,该服务器能够根据前述多条语义中每条语义的时序信息确定分发语义的顺序,然后,按照前述时序信息指示的顺序将前述多条语义分发至对应的回放设备中,以使得各个回放设备能够有序执行来自服务器的语义,进 而实现有序回放。在本申请中,由于服务器能够代替人工实现按顺序发放语义,因此,能够避免系统中各个回放设备执行语义的顺序出现混乱,进而能够保证包含多个设备的系统的自动化流程能够实现。
在一种可能的实施方式中,该服务器存储有该回放组中每个回放设备的指示信息,每个该回放设备的指示信息用于标识该回放组中的一个回放设备。
可选的,该服务器可以通过注册的方式管理回放组中的各个回放设备。例如,回放组中的每个回放设备通过向服务器发送注册消息以向回放设备提供回放设备的指示信息。
在一种可能的实施方式中,每条该语义还包括该回放设备的指示信息,该语义中的回放设备的指示信息用于指示与该语义对应的回放设备。
本实施例中,前述每条语义包括该回放设备的指示信息,该语义中的回放设备的指示信息用于指示语义将由哪个回放设备执行,以便于服务器基于每条语义中的回放设备的指示信息将语义分发至对应的回放设备中。
在一种可能的实施方式中,该服务器根据每条该语义的时序信息指示的顺序向该回放组中对应的回放设备发送该语义,包括:该服务器根据每条该语义的时序信息和每条该语义中的该回放设备的指示信息,按照该时序信息指示的顺序向该回放设备的指示信息所指示的回放设备发送该语义。
本实施方式中,提出当每条语义中包含回放设备的指示信息,并且,该服务器中存储有回放组中各个回放设备的指示信息时,该服务器可以基于每条语义中的回放设备的指示信息确定与该条语义对应的回放设备,进而该服务器能够基于每条语义中的回放设备的指示信息将该语义发送给对应的回放设备。
在一种可能的实施方式中,该服务器根据每条该语义的时序信息指示的顺序向该回放组中对应的回放设备发送该语义之前,该方法还包括:该服务器获取第二对应关系,该第二对应关系包括该时序信息与该回放设备的指示信息之间的对应关系,该第二对应关系用于指示包含该时序信息的语义能够在该回放设备的指示信息指示的回放设备中运行;该服务器根据每条该语义的时序信息指示的顺序向该回放组中对应的回放设备发送该语义,包括:该服务器根据每条该语义的时序信息和该第二对应关系,按照该时序信息指示的顺序向该回放组中对应的回放设备发送该语义。
本实施方式中,提出服务器可以基于每条语义的时序信息确定每条语义应当发送给哪个回放设备。具体地,服务器中能够获取第二对应关系,该第二对应关系为时序信息与该回放设备的指示信息之间的对应关系。因此,该第二对应关系能够指示包含该时序信息的语义应当在该回放设备的指示信息指示的回放设备中运行。因此,该服务器可以仅基于语义的时序信息和第二对应关系确定每条语义对应的回放设备,而可以不解析语义中的其他信息。
在一种可能的实施方式中,该回放设备的指示信息包括该回放设备的设备标识和/或该回放设备的设备类型,该回放设备的设备类型用于指示该回放设备支持的软件类型和/或硬件类型。可选的,该设备类型用于指示该录制设备支持的软件类型和/或硬件类型。
其中,硬件类型指设备具有的物理的结构。示例性的,在基于用户界面UI的多终端自 动化场景中,硬件类型包括触摸屏、键盘、鼠标等。示例性的,在涉及影音推送的多终端自动化场景中,硬件类型包括摄像头、扬声器、麦克风以及触摸屏等。示例性的,在基于制造业的自动化场景中,硬件类型包括距离传感器、红外传感器、红外测温仪等。此外,软件类型指设备能够通过运行程序实现的软件功能。示例性的,在基于用户界面(UI)应用的自动化场景中,软件类型包括记录应用调用何种功能接口的系统类型和UI存储格式的文件类型,系统类型主要包括调用浏览器等容器接口的Web应用、调用系统接口的Windows桌面应用、安卓(Andriod)/IOS/鸿蒙(HarmonyOS)原生应用;UI存储格式的文件类型主要包括基于dom树表达的应用界面、支持json格式存储的应用界面、支持xml格式存储的应用界面、支持pdf格式存储的应用界面等。示例性的,在基于制造业的自动化场景中,软件类型包括支持的上位机类型、传感器支持的应用类型。示例性的,在基于快捷操作的自动化场景中,软件类型包括执行某一业务的相关应用,例如,搜索引擎类应用、购物类应用、影音播放类应用。
第三方面,本申请提供了一种录制方法,该录制方法应用于录制设备中。具体地,录制设备生成至少一条语义。然后,该录制设备向服务器发送该至少一条语义,以使得该服务器根据每条该语义的时间信息按时间先后顺序向回放组中对应的回放设备发送该语义。
其中,每条该语义是该录制设备生成的描述用户在该录制设备上的操作的信息,该语义包括时间信息、对象信息和动作信息,该时间信息用于指示该录制设备检测到该操作的时刻,该对象信息用于指示该语义对应的操作的客体,该动作信息用于指示该操作的内容。
本实施方式中,提出录制设备生成的语义具有时间信息,该时间信息为录制设备检测到该操作的时刻。当录制组中每个录制设备生成的语义均携带时间信息时,前述来自不同录制设备的语义可以通过时间信息进行排序,以使得服务器能够获知录制组中各个录制设备生成语义的时间顺序。而传统技术中,录制设备生成的语义没有时间信息,当服务器获得来自不同的录制设备的语义时,该服务器无法确定哪些语义先生成,哪些语义后生成。因此,该服务器也无法实现有序分发语义。而本申请中,提出在语义中增设时间信息,能够使得服务器获得对语义进行排序的依据(即时间信息),进而有利于服务器实现有序分发语义。
在一种可能的实施方式中,该录制设备为录制组中多个录制设备中的一个,该操作包括控制该录制组中的一个录制设备与该录制组中的另一个录制设备进行交互。
本实施方式中,提出录制组中的每个录制设备将基于前述方式生成语义,即录制组中每个录制设备生成的语义均包含时间信息。
在一种可能的实施方式中,该录制设备生成至少一条语义,包括:该录制设备获取至少一条原始信息,每条该原始信息为该录制设备检测到的与用户在该录制设备上的操作相关的信息,每条该原始信息包括操作时间、操作对象和操作类型;其中,该操作时间为该录制设备检测到用户在该录制设备的操作的时刻,该操作对象为该录制设备检测到的用户在该录制设备上操作的客体,该操作类型为该录制设备检查到的用户通过该录制设备支持的硬件和/或软件执行的动作类型。该录制设备确定该操作时间为该语义的时间信息;该录制设备根据该操作对象确定该语义的对象信息;该录制设备根据该操作类型确定该语义的 动作信息。
可选的,该语义还包括该录制设备的设备类型。
在一种可能的实施方式中,该录制设备根据该操作类型确定该语义的动作信息,包括:该录制设备根据该操作类型和映射规则确定该操作类型对应的动作特征为该语义的动作信息,该映射规则包括一种动作特征与多种操作类型之间的对应关系,该多种操作类型中的每种操作类型均满足该动作特征。
本实施方式中,提出录制设备中存储有映射规则,该映射规则用于将原始信息中的操作类型转换为语义中的动作信息。该语义中的动作信息是基于操作类型而抽象出来的动作特征,该动作特征能够适用于多种系统。有利于提升语义的通用性,以使得语义在不同的系统均可以被执行。
示例性的,该多种操作类型包括第一操作类型和第二操作类型,该第一操作类型为通过触摸屏在用户界面上按下,该第二操作类型为在显示屏上按下左键;与该第一操作类型和该第二操作类型对应的第一动作特征为按下。
示例性的,该多种操作类型包括第三操作类型和第四操作类型,该第三操作类型为通过触摸屏在用户界面上向第一方向滑动,该第四操作类型为通过鼠标沿该第一方向滚动进度条;与该第三操作类型和该第四操作类型对应的第二动作特征为沿该第一方向移动。
在一种可能的实施方式中,该录制设备生成至少一条语义之前,该方法还包括:该录制设备向该服务器发送注册消息,该注册消息包括该录制设备的指示信息,该录制设备的指示信息包括该录制设备的设备类型和该录制设备的设备标识。
在一种可能的实施方式中,该录制设备向该服务器发送注册消息之后,该方法还包括:
该录制设备从该服务器接收第一录制指令,该第一录制指令用于指示该录制设备启动录制,该第一录制指令包括该服务器的系统时钟信息,该系统时钟信息用于指示该录制组中的每个录制设备按照该服务器的系统时钟进行时钟同步。
本实施方式中,提出录制设备能够从服务器接收第一录制指令,并基于第一录制指令启动录制。此外,由于第一录制指令中携带服务器的系统时钟信息,因此录制设备可以基于服务器的系统时钟信息重置录制设备的系统时钟。当该服务器能够同时向录制组中的每个录制设备广播第一录制指令时,录制组中的每个录制设备均可以收到前述第一录制指令,并且,录制组中的每个录制设备可以基于同一个系统时钟(即服务器的系统时钟)进行重置时钟。因此,有利于保证录制组中各个录制设备的系统时钟是同步的。
在一种可能的实施方式中,该录制设备从该服务器接收第一录制指令之后,该方法还包括:该录制设备从该服务器接收第二录制指令,该第二录制指令用于指示该录制设备停止录制。
第四方面,本申请提供了一种服务器,当服务器从录制组中获取语义时,该服务器包括:收发模块和处理模块。其中,收发模块,用于接收来自录制组中的每个录制设备的至少一条语义,每条该语义是描述用户在该录制设备上的操作的信息,该语义包括时间信息、对象信息和动作信息,该时间信息用于指示该录制设备检测到该操作的时刻,该对象信息用于指示该语义对应的操作的客体,该动作信息用于指示该操作的内容。处理模块,用于 根据每条语义的时间信息确定各条语义的时间先后顺序,并且,控制收发模块按照时间先后顺序向该回放组中对应的回放设备发送该语义。
在一种可能的实施方式中,该服务器还包括存储模块,该存储模块用于存储有第一对应关系,该第一对应关系为该录制组中每个录制设备的指示信息与该回放组中的回放设备的指示信息之间的对应关系,该第一对应关系用于指示该回放设备能够执行对应的录制设备生成的语义。
可选的,该指示信息包括设备标识和/或设备类型,该设备类型用于指示该录制设备支持的软件类型和/或硬件类型。
可选的,该录制设备支持的软件类型与对应的回放设备支持的软件类型存在非空交集;和/或,该录制设备支持的硬件类型与对应的回放设备支持的硬件类型存在非空交集。
在一种可能的实施方式中,当每条语义包括录制设备的指示信息时,处理模块具体用于根据每条该语义的时间信息、每条该语义中该录制设备的指示信息和该第一对应关系,按照该时间先后顺序向将该回放组中对应的回放设备发送该语义。
在一种可能的实施方式中,该服务器中的存储模块还用于存储设备列表。该设备列表存储有录制组的信息和该回放组的信息。其中,该录制组的信息包括该录制组中每个录制设备的设备标识,该回放组的信息包括该回放组中每个回放设备的设备标识。此时,服务器中的收发模块,还用于接收多个注册消息,每个该注册消息包括发送该注册消息的设备的设备标识;该服务器中的处理模块,还用于根据该设备列表和该注册消息中的设备的设备标识确定该设备为录制设备或回放设备。
在一种可能的实施方式中,该注册消息还包括该设备的设备类型,该设备的设备类型包括该录制设备的设备类型和该回放设备的设备类型。当该注册消息还包括设备的设备类型时,服务器中的存储模块还用于将该录制设备的设备类型与该录制设备的设备标识对应存储;以及,将该回放设备的设备类型与该回放设备的设备标识对应存储。
在一种可能的实施方式中,该服务器中的收发模块,还用于向该录制组中的每个该录制设备发送第一录制指令,该第一录制指令用于指示每个该录制设备启动录制,该第一录制指令包括该服务器的系统时钟信息,该系统时钟信息用于指示该录制组中的每个录制设备按照该服务器的系统时钟进行时钟同步。
在一种可能的实施方式中,该服务器中的收发模块,还用于向该录制组中的至少一个该录制设备发送第二录制指令,该第二录制指令用于指示该录制设备停止录制。
需要说明的是,本申请实施例还有多种其他的实施方式,具体可参见第一方面的具体实施方式和其有益效果,在此不再赘述。
第五方面,本申请提供了一种服务器,该服务器可以直接获得人工拷贝的多条语义,得到语义集合。此时,该服务器包括获取模块和处理模块。其中,获取模块,用于获取多条语义。处理模块,用于根据每条该语义的时序信息指示的顺序控制收发模块向该回放组中对应的回放设备发送该语义。
其中,每条该语义用于指示需要在回放组中的回放设备上执行的操作,该操作包括控制该回放组中的一个回放设备与该回放组中的另一个回放设备进行交互。此外,该语义包 括时序信息、对象信息和动作信息。其中,该时序信息用于指示该语义相对于前述多条语义中的其他语义的顺序,该对象信息用于指示该语义对应的操作的客体,该动作信息用于指示该操作的内容。
在一种可能的实施方式中,该服务器存储有该回放组中每个回放设备的指示信息,每个该回放设备的指示信息用于标识该回放组中的一个回放设备。
在一种可能的实施方式中,每条该语义还包括该回放设备的指示信息,该语义中的回放设备的指示信息用于指示与该语义对应的回放设备。
在一种可能的实施方式中,该处理模块,具体用于根据每条该语义的时序信息和每条该语义中的该回放设备的指示信息,然后,按照该时序信息指示的顺序控制收发模块向该回放设备的指示信息所指示的回放设备发送该语义。
在一种可能的实施方式中,该获取模块,还用于获取第二对应关系,该第二对应关系包括该时序信息与该回放设备的指示信息之间的对应关系,该第二对应关系用于指示包含该时序信息的语义能够在该回放设备的指示信息指示的回放设备中运行。处理模块,还用于根据每条该语义的时序信息和该第二对应关系确定每条语义对应的回放设备,并且,按照该时序信息指示的顺序控制收发模块向该回放组中对应的回放设备发送该语义。
在一种可能的实施方式中,该回放设备的指示信息包括该回放设备的设备标识和/或该回放设备的设备类型,该回放设备的设备类型用于指示该回放设备支持的软件类型和/或硬件类型。
需要说明的是,本申请实施例还有多种其他的实施方式,具体可参见第二方面的具体实施方式和其有益效果,在此不再赘述。
第六方面,本申请提供了一种录制设备,该录制设备包括处理模块和收发模块。其中,处理模块,用于生成至少一条语义,每条该语义是该录制设备生成的描述用户在该录制设备上的操作的信息,该语义包括时间信息、对象信息和动作信息,该时间信息用于指示该录制设备检测到该操作的时刻,该对象信息用于指示该语义对应的操作的客体,该动作信息用于指示该操作的内容。收发模块,用于向服务器发送该至少一条语义,以使得该服务器根据每条该语义的时间信息按时间先后顺序向回放组中对应的回放设备发送该语义。
在一种可能的实施方式中,该录制设备为录制组中多个录制设备中的一个,该操作包括控制该录制组中的一个录制设备与该录制组中的另一个录制设备进行交互。
可选的,该语义还包括该录制设备的设备类型。
在一种可能的实施方式中,该处理模块,具体用于:
获取至少一条原始信息,每条该原始信息为该录制设备检测到的与用户在该录制设备上的操作相关的信息,每条该原始信息包括操作时间、操作对象和操作类型;其中,该操作时间为该录制设备检测到用户在该录制设备的操作的时刻,该操作对象为该录制设备检测到的用户在该录制设备上操作的客体,该操作类型为该录制设备检查到的用户通过该录制设备支持的硬件和/或软件执行的动作类型;
确定该操作时间为该语义的时间信息;
根据该操作对象确定该语义的对象信息;
根据该操作类型确定该语义的动作信息。
在一种可能的实施方式中,该处理模块,具体用于根据该操作类型和映射规则确定该操作类型对应的动作特征为该语义的动作信息,该映射规则包括一种动作特征与多种操作类型之间的对应关系,该多种操作类型中的每种操作类型均满足该动作特征。
在一种可能的实施方式中,该收发模块,还用于向服务器发送注册消息,该注册消息包括该录制设备的指示信息,该录制设备的指示信息包括该录制设备的设备类型和该录制设备的设备标识。
在一种可能的实施方式中,该收发模块,还用于从该服务器接收第一录制指令,该第一录制指令用于指示该录制设备启动录制,该第一录制指令包括该服务器的系统时钟信息,该系统时钟信息用于指示该录制组中的每个录制设备按照该服务器的系统时钟进行时钟同步。
在一种可能的实施方式中,该收发模块,还用于从该服务器接收第二录制指令,该第二录制指令用于指示该录制设备停止录制。
需要说明的是,本申请实施例还有多种其他的实施方式,具体可参见第三方面的具体实施方式和其有益效果,在此不再赘述。
第七方面,本申请提供了一种服务器,该服务器包括处理器和存储器;其中,存储器存储有计算机程序;该处理器调用该计算机程序以使得该服务器执行第一方面或第一方面的任一种实施方式中的方法,或者,以使得该服务器执行第二方面或第二方面的任一种实施方式中的方法。
第八方面,本申请提供了一种录制设备,该录制设备包括处理器和存储器;其中,存储器存储有计算机程序;该处理器调用该计算机程序以使得该录制设备执行第三方面或第三方面的任一种实施方式中的方法。
第九方面,本申请提供了一种自动化系统,该自动化系统包括:回放设备,上述第四方面以及第四方面的任一种实施方式中的服务器,以及,上述第六方面以及第六方面的任一种实施方式中的录制设备。
第十方面,本申请提供了一种自动化系统,该自动化系统包括:回放设备,以及,上述第四方面以及第四方面的任一种实施方式中的服务器。
第十一方面,本申请提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得该计算机执行如前述第一方面、第二方面或第三方面,以及前述各个方面的各种实施方式中的任一种实施方式所介绍的方法。
第十二方面,本申请实施例提供了一种计算机可读存储介质,包括指令,当该指令在计算机上运行时,以使得计算机执行如前述第一方面、第二方面或第三方面,以及前述各个方面的各种实施方式中的任一种实施方式所介绍的方法。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例。
图1A为本申请提出的方法适用的一个系统架构图;
图1B为本申请提出的方法适用的一个场景示例图;
图1C为本申请提出的方法适用的另一个场景示例图;
图1D为本申请提出的方法适用的另一个场景示例图;
图2为本申请中的回放方法和录制方法的一个流程图;
图3为本申请中的语义的一个示例图;
图4为本申请中的回放方法的另一个流程图;
图5为本申请中的服务器的一个实施例示意图;
图6为本申请中的服务器的另一个实施例示意图;
图7为本申请中的设备的一个实施例示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为便于理解,下面先对本申请实施例涉及的一些术语进行介绍:
语义:是使用一种特定的描述性语言,依据一定的格式编写的可执行文件。该语义能够被设备识别,以使得该设备基于该语义控制该设备中的软件和/或硬件,进而使得该设备执行语义对应的操作。一般地,一条语义对应一个操作。在一些场景中,语义也被称为脚本(Script)。在本申请的不同实施例中,前述语义可以是由录制设备生成的语义,也可以是由人工编码的语义。
录制:指设备将用户在设备上的操作采用计算机语言(例如,脚本、语义等)记录下来的过程。例如,录制流程包括:控件查找→执行并记录操作→生成语义。本申请中,将在录制流程中生成语义的设备称为录制设备,包含多个录制设备的一组设备称为录制组。
回放:指设备基于计算机语言(例如,脚本、语义等)查找该计算机语言描述的对象,并执行该计算机语言对应的操作的过程。例如,回放流程包括:解析语义→查找控件→执行操作。本申请中,将在回放流程中解析语义的设备称为回放设备,包含多个回放设备的一组设备称为回放组。
多端协同:是一种多设备交互的场景,指多个分布式设计的设备相互协助以完成同一项任务。其中,协同可以是软件能力协同、硬件能力协同以及软件和硬件能力协同。
跨端迁移:将某一个设备生成的语义传输至另一个设备上进行运行,以使得前述另一个设备能够执行前述语义对应的操作。
下面对本申请提出的回放方法和录制方法涉及的系统架构和应用场景进行介绍:
如图1A所示,为本申请提出的回放方法和录制方法适用的系统架构图。该系统包括服务器01和回放组02。其中,服务器01为本申请在该系统中新增的结构,用于向回放组02中的各个回放设备(例如,回放设备1和回放设备2)分发语义。而回放组02中的各个回放设备(例如,回放设备1和回放设备2)用于从服务器01接收语义并根据语义执行该语义对应的操作,以协同完成某一项任务。
可选的,该系统还可以包括录制组03。该录制组03包括多个录制设备(例如,录制设备1和录制设备2),用于检测录制设备上的操作并基于检测到的操作生成语义。由于,前述系统新增了服务器01,该录制组中的录制设备还可以将生成的语义发送给前述服务器01,以使得服务器01对录制设备生成的语义进行调度。应理解,录制组03中的录制设备的数量与回放组02中的回放设备的数量不一定相同。
应理解,本申请涉及的设备(例如,录制设备和回放设备),可以是手机(mobile phone)、平板电脑(Pad)等移动终端(mobile terminal,MT);也可以是虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备;还可以是其他可能有自动化需求的领域的终端设备,例如,工业控制(industrial control)中的终端设备、无人驾驶(self-driving)中的终端设备、远程手术(remote medical surgery)中的终端设备、智能电网(smart grid)中的终端设备、运输安全(transportation safety)中的终端设备、智慧城市(smart city)中的终端设备、智慧家庭(smart home)中的终端设备等等。应理解,本申请涉及的设备还可以是其他的可以执行脚本或语义的设备,或者,其他有自动化需求的设备。本申请对设备所采用的具体技术和具体形态不做限定。
此外,本申请提出的回放方法和录制方法主要应用于涉及多个设备的自动化场景。
示例性的,前述涉及多个设备的自动化场景可以是基于人机交互的自动化场景。例如,图1B所示,可以是由手机和电脑同时编辑邮件的场景。在该场景下,手机031和电脑032作为录制组03中的录制设备。其中,手机031将用户输入文字或图片的操作转换为语义并向服务器01发送该手机031生成的语义,电脑032将用户在邮件中输入文字的操作转换语义并向服务器01发送该电脑032生成的语义。然后,服务器01将收到的语义分发给回放组02中的手机021和电脑022进行回放,以使得手机021和电脑022能够相互协作以实现邮件编辑。
示例性的,前述涉及多个设备的自动化场景可以是涉及影音推送的多终端自动化场景中。例如,图1C所示,手机033作为录制组03中的录制设备,该手机033将视频编辑调试等一系列操作转换为语义并上报至服务器01。然后,服务器01将收到的语义分发给回放组02中的电脑024和耳机023进行回放,以使得电脑024执行语义实现回放视频的画面,耳机023执行语义实现回放视频的音频。
示例性的,前述涉及多个设备的自动化场景可以是制造领域的多生产设备之间的自动化场景。例如,图1D所示,可以是由一个生产设备和另一个生产设备协同制造某一部件的 场景。在该场景中,用户通过电脑034在虚拟的软件中录制两个生产设备(例如生产设备A和生产设备B)的操作,并将生成的语义上报给服务器01。然后,服务器01向两个生产设备分发语义,以使得生产设备A先对部件进行打孔处理,然后,由生产设备B对前述部件进行切削处理,再由生产设备A对部件进行进一步打孔处理。进而促使两个生产设备相互协作以完成制造流程。
应理解,前述图1B、图1C和图1D仅是本申请方法可以应用的涉及多个设备的自动化场景的示例。在实际应用中,前述回放方法和录制方法还可以应用于单设备的自动化场景。例如,录制组和回放组均只包含一个设备,服务器01从录制组中的录制设备收集语义,然后,该服务器再向回放组中的回放设备分发语义。具体此处不予赘述。
如图2所示,当本申请提出的回放方法涉及录制设备时,服务器、录制设备和回放设备将执行如下步骤:
步骤201a,录制设备向服务器发送注册消息;相应地,服务器从录制设备接收注册消息。
步骤201b,回放设备向服务器发送注册消息;相应地,服务器从回放设备接收注册消息。
本实施例中,录制设备能够通过前述注册消息向服务器提供该录制设备的信息,以使得该录制设备注册到该服务器,进而使得该服务器基于前述录制设备的信息对该录制设备进行管理。类似的,回放设备能够通过前述注册消息向服务器提供该回放设备的信息,以使得该回放设备注册到该服务器,进而使得该服务器基于前述回放设备的信息对该回放设备进行管理。
由于,在本实施例的系统中既包括录制设备又包括回放设备,因此,对于服务器而言,前述注册消息可能是来自录制组中的录制设备,也可能是来自回放组中的回放设备。因此,服务器需要根据每个注册消息的内容确定发送注册消息的设备为录制设备或回放设备。
具体地,前述注册消息包括发送该注册消息的设备的设备标识。该设备标识可以是互联网协议(internet protocol,IP)地址、设备出厂编号等能够唯一标识一个设备的信息。具体地,若发送该注册消息的设备为录制设备,则该注册消息携带录制设备的设备标识;若发送该注册消息的设备为回放设备,则该注册消息携带回放设备的设备标识。因此,若服务器已知录制设备的设备标识和回放设备的设备标识,则该服务器可以通过注册消息携带的内容确定该注册消息的发送方为录制设备或回放设备。
可选的,前述注册消息还包括设备的设备类型。具体地,当发送前述注册消息的设备为录制设备时,该注册消息中携带的设备类型为录制设备的设备类型;当发送前述注册消息的设备为回放设备时,该注册消息中携带的设备类型为回放设备的设备类型。
其中,前述设备类型用于指示设备支持的硬件类型和/或软件类型。
其中,硬件类型指设备具有的物理的结构。示例性的,在基于用户界面(user interface,UI)的多终端自动化场景中,硬件类型包括触摸屏、键盘、鼠标等。示例性的,在涉及影音推送的多终端自动化场景中,硬件类型包括摄像头、扬声器、麦克风以及触摸屏等。示 例性的,在基于制造业的自动化场景中,硬件类型包括距离传感器、红外传感器、红外测温仪等。
此外,软件类型指设备能够通过运行程序实现的软件功能。示例性的,在基于用户界面UI的多终端自动化场景中,软件类型包括记录应用调用何种功能接口的系统类型和UI存储格式的文件类型。其中,系统类型主要包括调用浏览器等容器接口的Web应用、调用系统接口的Windows桌面应用、安卓(Andriod)/IOS/鸿蒙(HarmonyOS)原生应用;UI存储格式的文件类型主要包括基于dom树表达的应用界面、支持json格式存储的应用界面、支持xml格式存储的应用界面、支持pdf格式存储的应用界面等。示例性的,在基于制造业的自动化场景中,软件类型包括支持的上位机类型、传感器支持的应用类型。示例性的,在基于快捷操作的自动化场景中,软件类型包括执行某一业务的相关应用,例如,搜索引擎类应用、购物类应用、影音播放类应用。
应理解,对于不同的应用领域和不同的应用场景,前述硬件类型的具体实现方式不同,前述软件类型的具体实现方式也不同,具体本申请不对硬件类型的具体实现和软件类型的具体实现方式进行限定。
应理解,本实施例中,服务器可以多次执行前述步骤201a和步骤201b,直到该服务器接收完录制组中全部录制设备的注册消息和回放组中全部回放设备的注册消息。在一种实现方式中,服务器可以在同一时段接收多个注册消息,例如,录制组中的录制设备和回放组中的回放设备均在某一预设时间范围内向服务器发送注册消息。在另一种实现方式中,该服务器也可以先接收来自录制组中全部的录制设备的注册消息,再在之后的某一时段,接收来自回放组中全部的回放设备的注册消息。
此外,每当服务器收到前述注册消息之后,该服务器将根据该注册消息的内容确定发送注册消息的设备为录制设备或回放设备。
在一种可能的实施方式中,服务器存储有设备列表,该设备列表存储有录制组的信息和该回放组的信息。其中,录制组的信息包括该录制组中每个录制设备的设备标识,回放组的信息包括该回放组中每个回放设备的设备标识。每当服务器收到一个注册消息之后,该服务器将该注册消息中的设备标识与设备列表中的设备标识(即录制设备的设备标识或回放设备的设备标识)进行比对。当注册消息中的设备标识与录制设备的设备标识一致时,确定发送该注册消息的设备是录制设备;当注册消息中的设备标识与回放设备的设备标识一致时,确定发送该注册消息的设备是回放设备。
应理解,该设备列表包含一个录制组中每个录制设备的设备标识,因此,该服务器不仅可以基于注册消息确定发送该注册消息的设备是否为录制设备,还可以确定该录制组中的录制设备是否均已注册到该服务器。类似的,该设备列表包含一个回放组中每个回放设备的设备标识,因此,该服务器不仅可以基于注册消息确定发送该注册消息的设备是否为回放设备,还可以确定该回放组中的回放设备是否全部都已注册到该服务器。
示例性的,该设备列表可以如下表1-1所示:
表1-1
录制组1 LZ-01;LZ-02;LZ-03;
回放组1 HF-01;HF-02;HF-03;
在表1-1所示的设备列表中,录制组1中包含3个录制设备的设备标识,分别为“LZ-01”、“LZ-02”和“LZ-03”;回放组1中包含3个回放设备的设备标识,分别为“HF-01”、“HF-02”和“HF-03”。若该服务器收到的一个注册消息中携带的设备标识为“LZ-02”,则该服务器可以确定发送该注册消息的设备为录制组1中的录制设备。当该服务器从已接收的三个注册消息中分别获取到“LZ-01”、“LZ-02”和“LZ-03”,则该服务器可以确定录制组1中全部的录制设备均已注册。
可选的,当该服务器接收的注册消息中包括设备的设备类型(例如,录制设备的设备类型和回放设备的设备类型)时,服务器可以将设备类型对应存储至设备列表中,以便于后续过程查阅录制设备的设备类型和/或回放设备的设备类型。具体地,服务器可以将录制设备的设备类型与该录制设备的设备标识对应存储,将回放设备的设备类型与该回放设备的设备标识对应存储。
示例性的,在基于人机交互的多终端自动化场景中,该设备列表可以如下表1-2所示:
表1-2
Figure PCTCN2022125809-appb-000001
步骤202,服务器获取第一对应关系,该第一对应关系用于指示回放设备能够执行对应的录制设备生成的语义。
本实施例中,该第一对应关系为录制组中每个录制设备的指示信息与回放组中的回放设备的指示信息之间的对应关系。其中,指示信息包括设备标识和/或设备类型。可选的,该指示信息还可以是其他能够区分不同的录制设备的信息,以及其他能够区分不同的回放设备的信息。
在一种可能的实施方式中,前述指示信息为设备标识,即第一对应关系中的录制设备的指示信息为录制设备的设备标识,第一对应关系中的回放设备的指示信息为回放设备的设备标识。以前述表1-1中的设备标识为例,该第一对应关系包括:“LZ-01”与“HF-02” 对应;“LZ-02”与“HF-03”对应;“LZ-03”与“HF-01”对应。
本实施方式可以应用于录制组中的录制设备的设备类型与回放组中回放设备的设备类型相同或相似的场景。此时,采用各个设备的设备标识表示第一对应关系,有利于确保录制设备与回放设备明确对应,避免混淆。
在另一种可能的实施方式中,前述指示信息为设备类型,即第一对应关系中的录制设备的指示信息为录制设备的设备类型,第一对应关系中的回放设备的指示信息为回放设备的设备类型。以前述表1-2中的设备类型为例,该第一对应关系包括:“支持Windows的录制设备”与“支持Windows的回放设备”对应;“支持Android的录制设备”与“支持Android的回放设备”对应;“支持IOS的录制设备”与“支持IOS的回放设备”对应。又例如,该第一对应关系包括:“支持IOS的录制设备”与“支持Windows的回放设备”对应;“支持Android的录制设备”与“支持Android的回放设备”对应;“支持Windows的录制设备”与“支持IOS的回放设备”对应。又例如,该第一对应关系包括:“支持键盘和鼠标的录制设备”与“支持键盘和鼠标的回放设备”对应;“支持触摸屏的录制设备”与“支持触摸屏的回放设备”对应;“支持扬声器的录制设备”与“支持扬声器的回放设备”对应。在实际应用中,还有其他采用设备类型表示第一对应关系的示例,具体此处不予赘述。
在实际应用中,该第一对应关系还可以采用设备类型中的某至少一种硬件类型和/或至少一种软件类型表示。例如,该第一对应关系包括:“支持键盘、鼠标和xml格式的录制设备”与“支持键盘、鼠标和xml格式的回放设备”对应;“支持扬声器和Android系统的录制设备”与“支持扬声器和IOS系统的回放设备”对应;“支持触摸屏和Android系统的录制设备”与“支持触摸屏和Android系统的回放设备”对应。具体此处不再一一列举。
应理解,该第一对应关系可以采用数组、表或者其他能够表示关联的数据结构的方式存储至服务器中。具体此处不做限定。
本实施例中,前述第一对应关系可以是由人为预设,也可以由服务器根据录制设备的设备类型和回放设备的设备类型确定。下面分别进行介绍:
在一种可能的实施方式中,第一对应关系是预设的对应关系。此时,服务器获取第一对应关系的步骤可以理解为是服务器从存储介质读取前述第一对应关系,也可以是服务器通过输入/输出(input/output,I/O)接口获取人工设置的第一对应关系。
在另一种可能的实施方式中,该第一对应关系是由服务器基于录制设备的设备类型和回放设备的设备类型确定的。具体地,该服务器可以从步骤201a中的注册消息中获取到每个录制设备的设备标识和设备类型,从步骤201b中的注册消息中获取到每个回放设备的设备标识和设备类型,进而得到包含录制设备的设备标识、录制设备的设备类型、回放设备的设备标识和回放设备的设备类型的设备列表。例如,前述表1-2所示的设备列表。
在一种实现方式中,该服务器可以将支持相同的设备类型的录制设备和回放设备确定为具有第一对应关系。也可以理解为,该录制设备支持的软件类型与对应的回放设备(即与该录制设备具有第一对应关系的回放设备)支持的软件类型存在非空交集;和/或,该录制设备支持的硬件类型与对应的回放设备(即与该录制设备具有第一对应关系的回放设备)支持的硬件类型存在非空交集。例如,服务器确定录制组支持Windows系统的录制设备和 回放组中支持Windows系统的回放设备具有第一对应关系。又例如,服务器确定录制组支持摄像头的录制设备和回放组中支持摄像头的回放设备具有第一对应关系。又例如,服务器确定录制组支持扬声器的录制设备和回放组中支持扬声器的回放设备具有第一对应关系。具体此处不做限定。
示例性的,该第一对应关系可以如下表2-1所示:
表2-1
Figure PCTCN2022125809-appb-000002
在表2-1所示的示例中,位于同一行的录制设备和回放设备具有第一对应关系。以表2-1中的第二行为例,录制组中的支持Windows系统且支持键盘和鼠标的录制设备LZ-01与回放组中的支持Windows系统且支持键盘和鼠标的录制设备HF-01,具有第一对应关系。以表2-1中的第三行为例,录制组中的支持Android系统且支持触摸屏的录制设备LZ-02与回放组中的支持Android系统且支持触摸屏的录制设备HF-02,具有第一对应关系。以此类推,具体此处不再一一列举。
可选的,若服务器中存储有记录录制设备的录制任务的任务列表,则前述非空交集与录制设备的录制任务相关。也可以理解为,录制设备支持的软件类型和回放设备支持的软件类型均与录制任务相关;和/或,录制设备支持的硬件类型和回放设备支持的硬件类型均与录制任务相关。
其中,该任务列表包括录制组中每个录制设备的任务信息,任务信息包括录制设备的任务类型以及该任务类型需要设备支持的硬件类型和/或软件类型。一般地,不同的任务类型需要设备支持不同的软件类型和/或硬件类型。具体地,该服务器将基于每项任务的任务类型和该任务类型需要设备支持的硬件类型和/或软件类型,确定具有第一对应关系的录制设备和回放设备。例如,对于涉及拍照、录像等任务,要求录制设备和回放设备均支持摄像头。又例如,对于涉及音频播放的任务,要求录制设备和回放设备均支持扬声器。又例如,对于涉及语音通话的任务,要求录制设备和回放设备均支持麦克风。具体此处不再一一列举。
应注意,具有第一对应关系的录制设备的设备类型和回放设备的设备类型不一定完全相同。例如,对于涉及拍照、录像等任务,要求录制设备和回放设备均支持摄像头,但是,不一定要求录制设备和回放设备均支持相同的系统类型。此时,可以确定支持Android系统且支持摄像头的录制设备和支持IOS系统且支持摄像头的回放设备具有第一对应关系。又例如,对于涉及邮件编辑的任务,要求录制设备和回放设备均支持某一种邮箱应用,但是,不一定要求录制设备和回放设备均支持触摸屏输入。此时,可以确定支持前述邮箱应用且支持触摸屏输入的手机作为录制设备,并且,确定支持前述邮箱应用且支持键盘输入的电脑作为回放设备。
应理解,步骤201a、步骤201b和步骤202可以都在步骤203之前执行,即在录制之前,录制设备和回放设备均注册到服务器,并且,服务器获取到第一对应关系。步骤201b和步骤202也可以都在步骤203之后且步骤206之前执行,即录制组中的录制设备先注册到服务器上,并在服务器的指令控制下进行录制,而回放组中的回放设备仅需要在服务器分发语义之前注册到服务器即可。
步骤203,服务器向该录制组中的每个录制设备发送第一录制指令;相应地,录制设备从服务器接收第一录制指令。
其中,该第一录制指令用于指示每个录制设备启动录制。当录制设备收到前述第一录制指令之后,该录制设备将启动录制。其中,启动录制指录制设备开始检测用户在该录制设备上的操作,并基于该录制设备检测到的操作生成语义的过程。
可选的,该第一录制指令包括服务器的系统时钟信息,该系统时钟信息用于指示该录制组中的每个录制设备按照该服务器的系统时钟进行时钟同步。具体地,每个录制设备收到前述第一录制指令中的系统时钟信息之后,录制设备可以重置系统时钟。该实施方式,有利于保证录制组中的各个录制设备的系统时钟是同步的。
可选的,当服务器中存储有任务列表,并且,该任务列表中的任务信息包括每个任务对应录制接口时,前述第一录制指令还包括至少一个录制接口,该至少一个录制接口与前述任务相关。示例性的,前述录制接口包括麦克风的I/O接口、扬声器的I/O接口、鼠标的I/O接口、键盘的I/O接口等等,具体此处不做限定。
步骤204,录制设备生成至少一条语义。
其中,前述语义是该录制设备生成的描述用户在该录制设备上的操作的信息。也可以理解为,前述语义是录制设备对用户在录制设备上的操作的抽象表达式。该语义包括时间信息、对象信息和动作信息。其中,时间信息用于指示该录制设备检测到该操作的时刻,能够反映用户在何时对该录制设备进行了操作。对象信息用于指示该语义对应的操作的客体,即用户对录制设备上的哪个部件进行了操作。动作信息用于指示该操作的内容,即用户在录制设备上的操作具体是哪些动作。
本实施例中,当录制设备收到前述第一录制指令之后,该录制设备将启动录制并生成语义。具体地,该录制设备将通过录制接口检测用户在录制设备上的操作,得到前述操作对应的原始信息,并基于一条或多条前述原始信息生成一条语义。应理解,若前述第一录制指令中包括至少一个录制接口,则该录制设备在录制时仅检测前述至少一个录制接口中的各个接口的操作。示例性的,若第一录制指令中包括鼠标的I/O接口和键盘的I/O接口,而不包括麦克风的I/O接口和扬声器的I/O接口,则该录制设备在录制时仅从鼠标的I/O接口和键盘的I/O接口获取与用户操作相关的信息,而不从麦克风的I/O接口和扬声器的I/O接口获取信息。
此外,前述每条语义包括该录制设备的指示信息,该语义中的录制设备的指示信息用于指示语义是由哪个录制设备生成的,以便于服务器基于每条语义中的录制设备的指示信息将语义分发至对应的回放设备中。
本实施例中,该录制设备在检测到用户的操作时,能够获取该操作对应的原始信息, 然后,基于前述原始信息生成语义。其中,每条原始信息为录制设备检测到的与用户在该录制设备上的操作相关的信息。每条原始信息包括操作时间、操作对象和操作类型。其中,操作时间为该录制设备检测到用户在该录制设备的操作的时刻;操作对象为该录制设备检测到的用户在该录制设备上操作的客体;操作类型为该录制设备检查到的用户通过该录制设备支持的硬件和/或软件执行的动作类型。然后,该录制设备将前述操作时间确定为语义的时间信息。此外,该录制设备根据操作对象确定该语义的对象信息。与此同时,该录制设备根据操作类型确定该语义的动作信息。
其中,该录制设备中存储有用于确定动作信息的映射规则,该映射规则包括一种动作特征与多种操作类型之间的对应关系,前述多种操作类型中的每种操作类型均满足对应的动作特征。具体地,该录制设备将根据操作类型和映射规则确定操作类型对应的动作特征为语义的动作信息。示例性的,若该映射规则中的多种操作类型包括第一操作类型和第二操作类型,并且,前述第一操作类型为通过触摸屏在用户界面上按下,前述第二操作类型为通过鼠标在显示屏上按下左键,则与该第一操作类型和该第二操作类型对应的第一动作特征为按下。示例性的,若该映射规则中的多种操作类型包括第三操作类型和第四操作类型,并且,该第三操作类型为通过触摸屏在用户界面上向第一方向滑动,该第四操作类型为通过鼠标沿该第一方向滚动进度条,则与该第三操作类型和该第四操作类型对应的第二动作特征为沿该第一方向移动。
为便于理解,以基于用户界面UI的多终端自动化场景为例。若录制设备通过触摸屏的I/O接口检测到用户在触摸屏上的坐标为(x,y)的A点处施加动作按下,并且,当前的系统时间为T1,则该录制设备将获取到原始信息{T1;A(x,y);在触摸屏上按下}。其中,“T1”为操作时间,“A(x,y)”为操作对象,“在触摸屏上按下”为操作类型。此时,该录制设备将确定“T1”为语义的时间信息。与此同时,该录制设备将确定坐标A(x,y)所在位置的元素或图片为对象信息。此外,录制设备还将基于操作类型和映射规则确定动作信息。
示例性的,若此时录制设备中存储的映射规则如下表3-1所示,则该录制设备将确定动作信息为“按下”。
表3-1
Figure PCTCN2022125809-appb-000003
示例性的,在基于用户界面UI的多终端自动化场景中,例如,基于UI的前端测试场景。前述录制设备生成的某条语义可以如图3所示。其中,“end_id:LZ-01”表示录制设备的设备标识为“LZ-01”。“end_type:Android,file_type:XML”指录制设备的设备类型,其中,该录制设备的录制任务需要支持“Android”系统类型和“XML”文件类型。“time:T1”表示时间信息,指录制设备检测到用户在录制设备上的操作的时刻为T1。“object_type:element;object_value:{name:name_string;class:class_string;path:element_path_string}”表示对象信息,其中,“object_type:element”表示对象信息是用户界面中的某个元素;“object_value:{name:name_string;class:class_string;path:element_path_string}”表示在用户界面找到前述元素,也可以理解为,表示前述元素的特征。其中,“name:name_string”表示该元素在系统中的名称为“name_string”,“class:class_string”表示该元素在系统中的元素等级为“class_string”;“path:element_path_string”表示该元素在系统中的查找路径为“path:element_path_string”。“action_type:point_down;action_value”表示动作信息,其中,“point_down”表示动作特征为按下,“action_value”用于记录与前述动作相关的其他信息。
示例性的,若定义一条巴科斯范式(backus normal form,BNF)来表示录制设备生成的语义,则可以通过如下表4-1所列举的范式和含义来表示录制设备生成的语义。
表4-1
Figure PCTCN2022125809-appb-000004
应理解,前文图3和表4-1所列举的示例仅仅是本实施例的众多示例中的一种。在实际应用中,还可以采用其他的方式表示前述语义。具体本实施例对语义的具体实现方式不做限定。
本实施例中,该录制设备将基于检测到的原始信息生成语义,直到该录制设备收到来自服务器的第二录制指令,该第二录制指令用于指示该录制设备停止录制;或者,直到录 制设备完成录制任务中的全部操作。
步骤205,录制设备向服务器发送前述至少一条语义;相应地,服务器从录制设备接收前述至少一条语义。
本实施例中,录制设备生成语义之后,该录制设备需要将语义发送给服务器。具体地,该录制设备可以每生成一条语义便将该语义发送给服务器;该录制设备也可以在停止录制之后再向服务器发送该录制设备生成的全部语义,具体此处不做限定。
应理解,录制设备向服务器发送语义,可以是该录制设备之间将携带语义的数据包发送给服务器,也可以录制设备将携带语义的数据包发送给中转消息的网元(例如,代理网元、交换机等),再由该网元发送给服务器。具体此处不做限定。
应理解,服务器将从录制组中的每个录制设备接收至少一条语义,将获得多条语义。示例性的,前述多条语义可以构成一个语义集合,该语义集合包括录制组中每个录制设备生成的全部语义。为便于介绍,在后文中以语义集合为例进行介绍。
步骤206,服务器根据每条语义的时间信息,按照时间先后顺序向回放组中对应的回放设备发送语义。
本步骤中,服务器将先确定每条语义对应的回放设备(即每条语义应当发送给回放组中哪个回放设备);然后,服务器解析每条语义的时间信息,将语义集合中的全部语义按照时间先后顺序排序;然后,服务器按照时间先后顺序将语义集合中的语义发送至回放组中对应的回放设备。
其中,服务器可以根据前文介绍的第一对应关系确定与每条语义对应的回放设备。由于,每条语义包含录制设备的指示信息,而第一对应关系存储有录制组中每个录制设备的指示信息与回放组中的回放设备的指示信息之间的对应关系,因此,该服务器基于录制设备的指示信息和前述第一对应关系能够确定与该语义对应的回放设备。为便于理解,以第一对应关系为前文表2-1为例,若服务器确定语义01中携带的录制设备的指示信息为“LZ-01”,则该服务器能够确定与语义01对应的回放设备是指示信息为“HF-01”的回放设备。
此外,服务器在将语义集合中的语义发送给对应的回放设备时,该服务器一次仅发送一条语义给对应的回放设备,也可以一次发送一组语义(包括多条语义)给对应的某一个回放设备。可选的,该服务器还可以将收到来自回放设备的通知消息作为发送下一条语义(或下一组)的触发条件。其中,前述通知消息用于指示回放设备已经执行完已收到的语义,也可以理解为,前述通知消息用于指示回放设备收到的语义已回放成功。
在一种可能的实施方式中,该语义集合包括N条语义,该N为大于1的整数。该服务器根据该语义集合中N条该语义的时序信息将该语义集合中的该语义排序,得到由该N条语义确定的第一语义序列。然后,服务器向该回放组中对应的回放设备发送第一语义序列中的第i条语义(其中,i的取值为大于或等于1且小于或等于N的整数)。然后,服务器接收第i条语义对应的通知消息,该第i条语义对应的通知消息用于指示该第i条语义回放成功。
本实施方式中,提出服务器每次向回放组中的回放设备发送一条语义之后,该服务器 需要收到来自前述回放设备的表示以回放成功的通知消息才会触发发送下一条语义。因此,有利于回放组中的回放设备能够有序执行收到的语义,也有利于服务器在回放设备未能发送前述通知消息时向回放设备重发前述语义,以使得回放组中每个回放设备均能够执行相应的语义,进而确保整个回放任务有序进行。
在另一种可能的实施方式中,该语义集合包括N条语义,该N为大于1的整数。该服务器根据该语义集合中N条该语义的时序信息将该语义集合中的该语义排序,得到由该N条语义确定的第一语义序列。然后,服务器将该第一语义序列划分为多个第二语义序列,每个第二语义序列为该第一语义序列中连续的由同一回放设备执行的至少一条语义确定的序列。然后,服务器按顺序向回放组中对应的回放设备发送第二语义序列,直到服务器将基于前述语义集合确定的全部第二语义序列均发送至回放设备。
本实施方式中,提出服务器每次向回放组中的回放设备发送一组语义(即一个第二语义序列),该一组语义均由某一个回放设备执行。待回放设备执行完前述一组语义之后,该服务器再向回放设备发送下一组语义。本实施方式有利于节省服务器与回放设备之间的信令开销。此外,由于,每条语义中包含时间信息,因此,回放设备能够基于一组语义中的各条语义的时间信息确定执行前述一组语义中的各条语义的顺序。因此,回放组中的回放设备也能够确保整个回放任务有序进行。
本实施例中,提出在用于实现自动化的语义中添加时间信息作为服务器调度分发多条语义的依据,该服务器在获取到多条语义(例如,语义集合)之后,该服务器能够根据前述多条语义中每条语义的时间信息按照时间先后顺序将前述多条语义分发至对应的回放设备中,以使得各个回放设备能够有序执行来自服务器的语义,进而实现有序回放。在本申请中,由于服务器能够代替人工实现按顺序发放前述多条语义,因此,能够避免系统中各个回放设备执行语义的顺序出现混乱,进而能够保证包含多个设备的系统的自动化流程能够实现。
如图4所示,当本申请提出的回放方法仅涉及回放设备时,服务器和回放设备将执行如下步骤:
步骤401,服务器获取多条语义。
其中,前述多条语义可以是用户通过I/O接口直接输入该服务器,也可以是服务器从外部存储介质中读取,具体此处不做限定。示例性的,前述多条语义可以构成一个语义集合。为便于介绍,在后文中以语义集合为例进行介绍。
其中,每条语义用于指示需要在回放组中的回放设备上执行的操作,该操作包括控制该回放组中的一个回放设备与该回放组中的另一个回放设备进行交互。
该语义包括时序信息、对象信息和动作信息。其中,时序信息用于指示该语义相对于该语义集合中的其他语义的顺序。例如,前述时序信息可以是“1”、“2”、“3”等能够表示顺序的阿拉伯数字。该对象信息用于指示该语义对应的操作的客体,即回放设备根据该语义在回放设备的哪个部件执行操作。该动作信息用于指示该操作的内容,即回放设备根据该语义在回放设备的部件执行哪些动作。
可选的,前述每条语义包括该回放设备的指示信息,该语义中的回放设备的指示信息用于指示语义将由哪个回放设备执行,以便于服务器基于每条语义中的回放设备的指示信息将语义分发至对应的回放设备中。
其中,回放设备的指示信息包括回放设备的设备标识和/或回放设备的设备类型。
在一种可能的实施方式中,回放设备的指示信息为回放设备的设备标识。此时,回放设备的设备标识可以是回放设备的IP地址、回放设备的出厂编号等能够唯一标识一个回放设备的信息。
在另一种可能的实施方式中,回放设备的指示信息为回放设备的设备类型。其中,回放设备的设备类型用于指示该回放设备支持的软件类型和/或硬件类型。其中,硬件类型指设备具有的物理的结构。示例性的,在基于用户界面UI的多终端自动化场景中,硬件类型包括触摸屏、键盘、鼠标等。示例性的,在涉及影音推送的多终端自动化场景中,硬件类型包括摄像头、扬声器、麦克风以及触摸屏等。示例性的,在基于制造业的自动化场景中,硬件类型包括距离传感器、红外传感器、红外测温仪等。此外,软件类型指设备能够通过运行程序实现的软件功能。示例性的,在基于用户界面UI的多终端自动化场景中,软件类型包括记录应用调用何种功能接口的系统类型和UI存储格式的文件类型。其中,系统类型主要包括调用浏览器等容器接口的Web应用、调用系统接口的Windows桌面应用、安卓(Andriod)/IOS/鸿蒙(HarmonyOS)原生应用;UI存储格式的文件类型主要包括基于dom树表达的应用界面、支持json格式存储的应用界面、支持xml格式存储的应用界面、支持pdf格式存储的应用界面等。具体请参阅前文步骤201a和步骤201b中关于设备类型的介绍,具体此处不予赘述。
应理解,对于不同的应用领域和不同的应用场景,前述硬件类型的具体实现方式不同,前述软件类型的具体实现方式也不同,具体本申请不对硬件类型的具体实现和软件类型的具体实现方式进行限定。
此外,本实施例中的语义的表示方式可以参阅前文图3和表4-1所介绍的示例,具体此处不予赘述。
步骤402,服务器获取回放设备的信息。
本实施方式中,该服务器可以通过接收来自回放设备的注册消息以获得回放设备的信息。具体地,服务器将接收一个或多个注册消息,每个注册消息包含回放设备的设备标识、设备类型等信息。然后,服务器存储每个回放设备的设备标识和设备类型,以便于该服务器在后续分发语义的过程中能够获取到各个回放设备的信息。
步骤403,服务器根据每条语义的时序信息指示的顺序向回放组中对应的回放设备发送语义。
本步骤中,服务器将先确定每条语义对应的回放设备(即每条语义应当发送给回放组中哪个回放设备);然后,服务器解析每条语义的时序信息,按照该时序信息指示的顺序将语义集合中的语义发送至回放组中对应的回放设备。
本实施例中,服务器有多种确定每条语义对应的回放设备的方式,下面分别进行介绍:
在一种可能的实施方式中,每条语义包括回放设备的指示信息,该语义中的回放设备 的指示信息用于指示语义将由哪个回放设备执行。因此,该服务器将解析收到的语义以获取该语义中的回放设备的指示信息,然后,基于该语义中的回放设备的指示信息确定与该语义对应的回放设备,进而将该语义集合中的语义发送至与每条语义对应的回放设备中。
在另一可能的实施方式中,服务器能够获取第二对应关系,该第二对应关系包括时序信息与回放设备的指示信息之间的对应关系,该第二对应关系用于指示包含该时序信息的语义能够在该回放设备的指示信息指示的回放设备中运行。于是,该服务器可以根据每条该语义的时序信息和第二对应关系确定每条语义对应的回放设备,并且,按照该时序信息指示的顺序将语义发送至回放组中对应的回放设备。
示例性的,该第二对应关系可以如下表5-1所示:
表5-1
时序信息 回放设备的指示信息
1,3,5 HF-01
2,4,6 HF-02
在表5-1所示示例中,“HF-01”和“HF-02”表示回放设备的设备标识;阿拉伯数字表示时序信息。其中,第二行表示时序信息为“1”、“3”和“5”的语义,应当发送给设备标识为“HF-01”的回放设备执行;第三行表示时序信息为“2”、“4”和“6”的语义,应当发送给设备标识为“HF-02”的回放设备执行。
此外,服务器在将语义集合中的语义发送给对应的回放设备时,该服务器一次仅发送一条语义给对应的回放设备,也可以一次发送一组语义(包括多条语义)给对应的某一个回放设备。可选的,该服务器还可以将收到来自回放设备的通知消息作为发送下一条语义(或下一组)的触发条件。其中,前述通知消息用于指示回放设备已经执行完已收到的语义,也可以理解为,前述通知消息用于指示回放设备收到的语义已回放成功。具体地,请参阅前述步骤207中的相关介绍,此处不予赘述。
本实施例中,提出在用于实现自动化的语义中添加时序信息作为服务器调度分发多条语义的依据,该服务器在获取到多条语义之后,该服务器能够根据前述多条语义中每条语义的时序信息确定分发语义的顺序,然后,按照前述时序信息指示的顺序将前述多条语义分发至对应的回放设备中,以使得各个回放设备能够有序执行来自服务器的语义,进而实现有序回放。在本申请中,由于服务器能够代替人工实现按顺序发放前述多条语义,因此,能够避免系统中各个回放设备执行语义的顺序出现混乱,进而能够保证包含多个设备的系统的自动化流程能够实现。
此外,如图5所示,本申请还提供了一种服务器50,图5为本申请提供的服务器50的结构示意图。该服务器可以是云服务器,也可以本地服务器。该服务器可以作为SaaS(Software as a Service)的形式向用户提供服务。用户可以通过录制设备上的网页访问、应用软件及插件、开源代码或工具包等来获取服务器50的服务。应当理解的是,前述图2或图4对应的方法实施例中的服务器均可以基于本实施例中图5所示的服务器50的结构。
如图5所示,服务器50可以包括处理器510、存储器520和收发器530。其中,该处理器510与该存储器520耦合连接,该处理器510与该收发器530耦合连接。
其中,前述收发器530也可以称为收发单元、收发机、收发装置等。可选的,可以将收发单元中用于实现接收功能的器件视为接收单元,将收发单元中用于实现发送功能的器件视为发送单元,即收发单元包括接收单元和发送单元,接收单元也可以称为接收机、输入口、接收电路等,发送单元可以称为发射机、发射器或者发射电路等。本申请中,该收发器530可以接收注册消息(例如,来自录制设备的注册消息或来自回放设备的注册消息)。该收发器530可以向录制设备发送消息,例如,向录制设备发送第一录制指令或第二录制指令等。
其中,前述处理器510可以是中央处理器(central processing unit,CPU)、专用集成电路(application-specific integrated circuit,ASIC)、可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。处理器510可以是指一个处理器,也可以包括多个处理器,具体此处不做限定。
此外,前述该存储器520主要用于存储软件程序和数据。存储器520可以是独立存在,与处理器510相连。可选的,该存储器520可以和该处理器510集成于一体,例如集成于一个或多个芯片之内。其中,该存储器520能够存储执行本申请实施例的技术方案的程序代码,并由处理器510来控制执行,被执行的各类计算机程序代码也可被视为是处理器510的驱动程序。存储器520可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器520还可以包括上述种类的存储器的组合。存储器520可以是指一个存储器,也可以包括多个存储器。示例性的,存储器520,用于存储录制设备的信息(例如,录制设备的设备标识和设备类型)和回放设备的信息(例如,回放设备的设备标识和设备类型)。该存储器520还用于存储前文介绍的第一对应关系或第二对应关系。其中,该第一对应关系为该录制组中每个录制设备的指示信息与该回放组中的回放设备的指示信息之间的对应关系,该第一对应关系用于指示该回放设备能够执行对应的录制设备生成的语义。该第二对应关系包括时序信息与回放设备的指示信息之间的对应关系,该第二对应关系用于指示包含该时序信息的语义能够在该回放设备的指示信息指示的回放设备中运行。
在一个实现方式中,存储器520中存储有计算机可读指令,所述计算机可读指令包括多个软件模块,例如发送模块521、处理模块522和接收模块523。处理器510执行各个软件模块后可以按照各个软件模块的指示进行相应的操作。在本实施例中,一个软件模块所执行的操作实际上是指处理器510根据所述软件模块的指示而执行的操作。
具体地,当服务器50用于执行前述图2对应实施例中的方法时,服务器50中的发送模块521、处理模块522和接收模块523的主要功能如下:
接收模块523用于接收来自录制组中的每个录制设备的至少一条语义。处理模块522,用于根据每条语义的时间信息确定各条语义的时间先后顺序,并且,控制收发模块按照时间先后顺序向该回放组中对应的回放设备发送该语义。其中,每条该语义是描述用户在该录制设备上的操作的信息,该语义包括时间信息、对象信息和动作信息,该时间信息用于指示该录制设备检测到该操作的时刻,该对象信息用于指示该语义对应的操作的客体,该动作信息用于指示该操作的内容。
在一种可能的实施方式中,存储器520用于存储有第一对应关系,该第一对应关系为该录制组中每个录制设备的指示信息与该回放组中的回放设备的指示信息之间的对应关系,该第一对应关系用于指示该回放设备能够执行对应的录制设备生成的语义。
可选的,该指示信息包括设备标识和/或设备类型,该设备类型用于指示该录制设备支持的软件类型和/或硬件类型。
可选的,该录制设备支持的软件类型与对应的回放设备支持的软件类型存在非空交集;和/或,该录制设备支持的硬件类型与对应的回放设备支持的硬件类型存在非空交集。
在一种可能的实施方式中,当每条语义包括录制设备的指示信息时,处理模块522具体用于根据每条该语义的时间信息、每条该语义中该录制设备的指示信息和该第一对应关系,按照该时间先后顺序向将该回放组中对应的回放设备发送该语义。
在一种可能的实施方式中,该服务器50中的存储器520还用于存储设备列表。该设备列表存储有录制组的信息和该回放组的信息。其中,该录制组的信息包括该录制组中每个录制设备的设备标识,该回放组的信息包括该回放组中每个回放设备的设备标识。此时,接收模块523,还用于接收多个注册消息,每个该注册消息包括发送该注册消息的设备的设备标识;处理模块522还用于控制存储器520根据该设备列表和该注册消息中的设备的设备标识确定该设备为录制设备或回放设备。
在一种可能的实施方式中,该注册消息还包括该设备的设备类型,该设备的设备类型包括该录制设备的设备类型和该回放设备的设备类型。当该注册消息还包括设备的设备类型时,服务器中的存储模块还用于将该录制设备的设备类型与该录制设备的设备标识对应存储;以及,将该回放设备的设备类型与该回放设备的设备标识对应存储。
在一种可能的实施方式中,发送模块521还用于向该录制组中的每个该录制设备发送第一录制指令,该第一录制指令用于指示每个该录制设备启动录制,该第一录制指令包括该服务器的系统时钟信息,该系统时钟信息用于指示该录制组中的每个录制设备按照该服务器的系统时钟进行时钟同步。
在一种可能的实施方式中,发送模块521还用于向该录制组中的至少一个该录制设备发送第二录制指令,该第二录制指令用于指示该录制设备停止录制。
具体地,当服务器50用于执行前述图4对应实施例中的方法时,服务器50中的发送模块521、处理模块522和接收模块523的主要功能如下:处理模块522控制外部接口获取多条语义。此外,处理模块522根据每条该语义的时序信息指示的顺序控制收发模块向该回放组中对应的回放设备发送该语义。其中,每条该语义用于指示需要在回放组中的回放设备上执行的操作,该操作包括控制该回放组中的一个回放设备与该回放组中的另一个 回放设备进行交互。此外,该语义包括时序信息、对象信息和动作信息。其中,该时序信息用于指示该语义相对于前述多条语义中的其他语义的顺序,该对象信息用于指示该语义对应的操作的客体,该动作信息用于指示该操作的内容。
在一种可能的实施方式中,该服务器50中的存储器520存储有该回放组中每个回放设备的指示信息,每个该回放设备的指示信息用于标识该回放组中的一个回放设备。
在一种可能的实施方式中,每条该语义还包括该回放设备的指示信息,该语义中的回放设备的指示信息用于指示与该语义对应的回放设备。
在一种可能的实施方式中,处理模块522用于根据每条该语义的时序信息和每条该语义中的该回放设备的指示信息,然后,按照该时序信息指示的顺序控制收发模块向该回放设备的指示信息所指示的回放设备发送该语义。
在一种可能的实施方式中,处理模块522控制外部接口获取第二对应关系,该第二对应关系包括该时序信息与该回放设备的指示信息之间的对应关系,该第二对应关系用于指示包含该时序信息的语义能够在该回放设备的指示信息指示的回放设备中运行。处理模块522还用于根据每条该语义的时序信息和该第二对应关系确定每条语义对应的回放设备,并且,按照该时序信息指示的顺序控制收发模块向该回放组中对应的回放设备发送该语义。
在一种可能的实施方式中,该回放设备的指示信息包括该回放设备的设备标识和/或该回放设备的设备类型,该回放设备的设备类型用于指示该回放设备支持的软件类型和/或硬件类型。
其余可以参考图2或图4对应实施例中服务器的方法,此处不再赘述。
示例性的,当前述服务器50应用于基于用户界面UI的多终端自动化场景中时,该服务器50中的处理模块522可以按功能划分为图6所示的结构。该处理模块522包括录制控制器5223、语义排序调度模块5222以及回放控制器5221。
其中,录制控制器5223是对录制设备的录制过程进行控制的功能模块。在录制进行之前,录制组中各个录制设备通过录制控制器5223进行注册,服务器50通过接收模块523接收注册消息。其中,注册消息包括录制设备的设备标识和录制设备的设备类型。可选的,该注册消息还包括录制设备的系统时钟信息。在录制过程中,录制控制器5223发布指示启动录制的指令(即第一录制指令)和停止录制的指令(即第二录制指令),获得录制组中各个录制设备生成的语义,进而获得包含多条语义的语义集合。
语义排序调度模块5222是服务器50的数据存储与维护结构。用于根据时间信息将语义集合中的语义按照时间先后顺序进行排序,然后,在回放阶段也是按照前述时间先后的顺序进行分发。此外,该语义排序调度模块5222还存储有第一对应关系,该第一对应关系为该录制组中每个录制设备的指示信息与该回放组中的回放设备的指示信息之间的对应关系,该第一对应关系用于指示该回放设备能够执行对应的录制设备生成的语义。
回放控制器5221是对回放过程进行控制的功能模块。在回放进行之前,回放组中各个回放设备通过回放控制器5221进行注册。服务器50通过接收模块523接收注册消息。其中,注册消息包括回放设备的设备标识和回放设备的设备类型。可选的,该注册消息还包 括回放设备的系统时钟信息。在回放过程中,回放控制器5221将前述语义集合中的语义按照时间先后顺序分发至回放组中各个回放设备中。可选的,该回放控制器5221还可以收集回放设备回复的通知消息,该通知消息用于指示该回放设备已执行某一条语义,以使得该回放控制器5221控制发送模块521发送下一条语义。
如图7所示,为本申请提供的一种设备70的结构示意图。该设备70可以是录制设备或回放设备。前述设备可以是手机(mobile phone)、平板电脑(Pad)等移动终端(mobile terminal,MT);还可以是虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备;还可以是其他可能有自动化需求的领域的终端设备,例如,工业控制(industrial control)中的终端设备、无人驾驶(self-driving)中的终端设备、远程手术(remote medical surgery)中的终端设备、智能电网(smart grid)中的终端设备、运输安全(transportation safety)中的终端设备、智慧城市(smart city)中的终端设备、智慧家庭(smart home)中的终端设备等等。应理解,前述设备70还可以是其他的可以执行脚本或语义的设备,或者,其他有自动化需求的设备。前述图2和图4对应的方法实施例中的设备(例如,录制设备或回放设备)均可以基于图7所示的录制设备70的结构。
该录制设备70包括至少一个处理器701和至少一个存储器702。应当理解的是,图7仅示出了一个处理器701和一个存储器702。
其中,该处理器701可以是通用中央处理单元CPU、微处理器、网络处理器(network processor,NP)或特定应用集成电路(application-specific integrated circuit),或一个或多个用于控制本申方案的程序执行的集成电路。前述处理器701可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。处理器701可以指一个或多个装置、电路和/或用于处理数据(例如计算机程序指令)的处理核。此外,该处理器701可以是个单独的半导体芯片,也可以跟其他电路一起集成为一个半导体芯片,例如,可以跟其他电路(如编解码电路、硬件加速电路或各种总线和接口电路)构成一个片上系统(system-on-a-chip,SoC),或者也可以作为一个特殊应用集成电路(application specific integrated circuit,ASIC)的内置处理器集成在所述ASIC当中,该集成了处理器的ASIC可以单独封装或者也可以跟其他电路封装在一起。
此外,前述存储器702可以是只读存储器ROM,也可以是可存储静态信息和指令的其他类型的静态存储设备,也可以是随机存取存储器RAM,也可以是可存储信息和指令的其他类型的动态存储设备,还可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM),具体此处不做限定。该存储器702可以是独立存在,但与前述处理器701相连。可选的,该存储器702也可以和前述处理器701集成于一体。例如,集成于一个或多个芯片之内。
此外,该存储器702还用于存储执行本申请实施例的技术方案的程序代码。例如,前述实施例所介绍的映射规则,该映射规则包括一种动作特征与多种操作类型之间的对应关系,所述多种操作类型中的每种操作类型均满足所述动作特征。
此外,该设备70还包括通信接口703,该通信接口703用于与服务器进行通信,以使 得该设备可以从服务器获取第一录制指令或第二录制指令。该设备70还可以通过通信接口703向服务器发送注册消息。
其余可以参考图2以及图4对应实施例中录制设备和回放设备的方法,此处不再赘述。
当前述设备70为录制设备时,该处理器701至少能够执行监视器和分析器的功能。其中,监视器用于通过I/O接口监控键盘/按键、鼠标、触摸屏等接口的操作,以获得原始信息。然后,将前述原始信息传输至分析器中。该分析器通过查找、分析录制设备中存储的映射规则,基于前述原始信息生成语义。其中,录制设备生成语义的具体方式可以参阅前文步骤205中的相关介绍,此处不予赘述。
当前述设备70为回放设备时,该处理器701至少能够执行解析器和UI驱动的功能。其中,解析器用于基于收到的语义和映射规则将前述语义转换为指令。然后,解析器将前述指令传输至UI驱动。该UI驱动用于基于前述指令复现UI交互情形。
应理解,在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。还应理解,本文中涉及的第一、第二、第三、第四以及各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围。
此外,本申请提供了一种计算机程序产品,该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。例如,实现如前述图2或图4中的服务器相关的方法。又例如,实现如前述图2中的录制设备相关的方法。该计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如,同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如,红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
此外,本申请还提供了一种计算机可读存储介质,该存储介质存储有计算机程序,该计算机程序被处理器执行以实现如前述图2或图4中的服务器相关的方法。
此外,本申请还提供了一种计算机可读存储介质,该存储介质存储有计算机程序,该计算机程序被处理器执行以实现如前述图2中的录制设备相关的方法。
应理解,本申请中的术语“和/或”,仅仅是一种描述关联对象的关联关系。术语“和/或”表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B, 以及单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (28)

  1. 一种回放方法,其特征在于,包括:
    服务器接收来自录制组中的每个录制设备的至少一条语义,每条所述语义是描述用户在所述录制设备上的操作的信息,所述操作包括控制所述录制组中的一个录制设备与所述录制组中的另一个录制设备进行交互,所述语义包括时间信息、对象信息和动作信息,所述时间信息用于指示所述录制设备检测到所述操作的时刻,所述对象信息用于指示所述语义对应的操作的客体,所述动作信息用于指示所述操作的内容;
    所述服务器根据每条所述语义的时间信息,按照时间先后顺序向所述回放组中对应的回放设备发送所述语义。
  2. 根据权利要求1所述的方法,其特征在于,所述服务器存储有第一对应关系,所述第一对应关系为所述录制组中每个录制设备的指示信息与所述回放组中的回放设备的指示信息之间的对应关系,所述第一对应关系用于指示所述回放设备能够执行对应的录制设备生成的语义。
  3. 根据权利要求2所述的方法,其特征在于,所述指示信息包括设备标识和/或设备类型,所述设备类型用于指示所述录制设备支持的软件类型和/或硬件类型。
  4. 根据权利要求3所述的方法,其特征在于,所述录制设备支持的软件类型与对应的回放设备支持的软件类型存在非空交集;和/或,所述录制设备支持的硬件类型与对应的回放设备支持的硬件类型存在非空交集。
  5. 根据权利要求2至4中任意一项所述的方法,其特征在于,每条所述语义包括所述录制设备的指示信息;
    所述服务器根据每条所述语义的时间信息,按照时间先后顺序向所述回放组中对应的回放设备发送所述语义,包括:
    所述服务器根据每条所述语义的时间信息、每条所述语义中所述录制设备的指示信息和所述第一对应关系,按照所述时间先后顺序向将所述回放组中对应的回放设备发送所述语义。
  6. 根据权利要求2至5中任意一项所述的方法,其特征在于,所述服务器存储有设备列表,所述设备列表存储有录制组的信息和所述回放组的信息,所述录制组的信息包括所述录制组中每个录制设备的设备标识,所述回放组的信息包括所述回放组中每个回放设备的设备标识;
    所述服务器接收来自录制组中的每个录制设备的至少一条语义之前,所述方法还包括:
    所述服务器接收多个注册消息,每个所述注册消息包括发送所述注册消息的设备的设备标识;
    所述服务器根据所述设备列表和所述注册消息中的设备的设备标识确定所述设备为录制设备或回放设备。
  7. 根据权利要求6所述的方法,其特征在于,所述注册消息还包括所述设备的设备类型,所述设备的设备类型包括所述录制设备的设备类型和所述回放设备的设备类型;
    所述方法还包括:
    所述服务器将所述录制设备的设备类型与所述录制设备的设备标识对应存储;
    所述服务器将所述回放设备的设备类型与所述回放设备的设备标识对应存储。
  8. 根据权利要求6或7所述的方法,其特征在于,所述服务器接收多个注册消息之后,所述服务器接收来自录制组中的每个录制设备的至少一条语义之前,所述方法还包括:
    所述服务器向所述录制组中的每个所述录制设备发送第一录制指令,所述第一录制指令用于指示每个所述录制设备启动录制,所述第一录制指令包括所述服务器的系统时钟信息,所述系统时钟信息用于指示所述录制组中的每个录制设备按照所述服务器的系统时钟进行时钟同步。
  9. 根据权利要求8所述的方法,其特征在于,所述服务器向所述录制组中的每个所述录制设备发送第一录制指令之后,所述方法还包括:
    所述服务器向所述录制组中的至少一个所述录制设备发送第二录制指令,所述第二录制指令用于指示所述录制设备停止录制。
  10. 一种回放方法,其特征在于,包括:
    服务器获取多条语义,每条所述语义用于指示需要在回放组中的回放设备上执行的操作,所述操作包括控制所述回放组中的一个回放设备与所述回放组中的另一个回放设备进行交互,所述语义包括时序信息、对象信息和动作信息,所述时序信息用于指示所述语义相对于所述多条语义中的其他语义的顺序,所述对象信息用于指示所述语义对应的操作的客体,所述动作信息用于指示所述操作的内容;
    所述服务器根据每条所述语义的时序信息指示的顺序向所述回放组中对应的回放设备发送所述语义。
  11. 根据权利要求10所述的方法,其特征在于,所述服务器存储有所述回放组中每个回放设备的指示信息,每个所述回放设备的指示信息用于标识所述回放组中的一个回放设备。
  12. 根据权利要求11所述的方法,其特征在于,每条所述语义还包括所述回放设备的指示信息,所述语义中的回放设备的指示信息用于指示与所述语义对应的回放设备。
  13. 根据权利要求12所述的方法,其特征在于,所述服务器根据每条所述语义的时序信息指示的顺序向所述回放组中对应的回放设备发送所述语义,包括:
    所述服务器根据每条所述语义的时序信息和每条所述语义中的所述回放设备的指示信息,按照所述时序信息指示的顺序向所述回放设备的指示信息所指示的回放设备发送所述语义。
  14. 根据权利要求11所述的方法,其特征在于,所述服务器根据每条所述语义的时序信息指示的顺序向所述回放组中对应的回放设备发送所述语义之前,所述方法还包括:
    所述服务器获取第二对应关系,所述第二对应关系包括所述时序信息与所述回放设备的指示信息之间的对应关系,所述第二对应关系用于指示包含所述时序信息的语义能够在所述回放设备的指示信息指示的回放设备中运行;
    所述服务器根据每条所述语义的时序信息指示的顺序向所述回放组中对应的回放设备发送所述语义,包括:
    所述服务器根据每条所述语义的时序信息和所述第二对应关系,按照所述时序信息指 示的顺序向所述回放组中对应的回放设备发送所述语义。
  15. 根据权利要求11至14中任意一项所述的方法,其特征在于,所述回放设备的指示信息包括所述回放设备的设备标识和/或所述回放设备的设备类型,所述回放设备的设备类型用于指示所述回放设备支持的软件类型和/或硬件类型。
  16. 一种录制方法,其特征在于,包括:
    录制设备生成至少一条语义,每条所述语义是所述录制设备生成的描述用户在所述录制设备上的操作的信息,所述语义包括时间信息、对象信息和动作信息,所述时间信息用于指示所述录制设备检测到所述操作的时刻,所述对象信息用于指示所述语义对应的操作的客体,所述动作信息用于指示所述操作的内容;
    所述录制设备向服务器发送所述至少一条语义,以使得所述服务器根据每条所述语义的时间信息按时间先后顺序向回放组中对应的回放设备发送所述语义。
  17. 根据权利要求16所述的方法,其特征在于,所述录制设备为录制组中多个录制设备中的一个,所述操作包括控制所述录制组中的一个录制设备与所述录制组中的另一个录制设备进行交互。
  18. 根据权利要求16或17所述的方法,其特征在于,所述录制设备生成至少一条语义,包括:
    所述录制设备获取至少一条原始信息,每条所述原始信息为所述录制设备检测到的与用户在所述录制设备上的操作相关的信息,每条所述原始信息包括操作时间、操作对象和操作类型;其中,所述操作时间为所述录制设备检测到用户在所述录制设备的操作的时刻,所述操作对象为所述录制设备检测到的用户在所述录制设备上操作的客体,所述操作类型为所述录制设备检查到的用户通过所述录制设备支持的硬件和/或软件执行的动作类型;
    所述录制设备确定所述操作时间为所述语义的时间信息;
    所述录制设备根据所述操作对象确定所述语义的对象信息;
    所述录制设备根据所述操作类型确定所述语义的动作信息。
  19. 根据权利要求18所述的方法,其特征在于,所述录制设备根据所述操作类型确定所述语义的动作信息,包括:
    所述录制设备根据所述操作类型和映射规则确定所述操作类型对应的动作特征为所述语义的动作信息,所述映射规则包括一种动作特征与多种操作类型之间的对应关系,所述多种操作类型中的每种操作类型均满足所述动作特征。
  20. 根据权利要求16至19中任意一项所述的方法,其特征在于,所述语义还包括所述录制设备的设备类型。
  21. 根据权利要求16至20中任意一项所述的方法,其特征在于,所述录制设备生成至少一条语义之前,所述方法还包括:
    所述录制设备向所述服务器发送注册消息,所述注册消息包括所述录制设备的指示信息,所述录制设备的指示信息包括所述录制设备的设备类型和所述录制设备的设备标识。
  22. 根据权利要求21所述的方法,其特征在于,所述录制设备向所述服务器发送注册消息之后,所述方法还包括:
    所述录制设备从所述服务器接收第一录制指令,所述第一录制指令用于指示所述录制设备启动录制,所述第一录制指令包括所述服务器的系统时钟信息,所述系统时钟信息用于指示所述录制组中的每个录制设备按照所述服务器的系统时钟进行时钟同步。
  23. 根据权利要求22所述的方法,其特征在于,所述录制设备从所述服务器接收第一录制指令之后,所述方法还包括:
    所述录制设备从所述服务器接收第二录制指令,所述第二录制指令用于指示所述录制设备停止录制。
  24. 一种服务器,其特征在于,包括处理器和存储器;
    其中,存储器存储有计算机程序;
    所述处理器调用所述计算机程序以使得所述服务器执行如权利要求1至9中任意一项所述的方法,或者,执行如权利要求10至15中任意一项所述的方法。
  25. 一种录制设备,其特征在于,包括处理器和存储器;
    其中,存储器存储有计算机程序;
    所述处理器调用所述计算机程序以使得所述录制设备执行如权利要求16至23中任意一项所述的方法。
  26. 一种自动化系统,其特征在于,包括:
    回放设备,执行如权利要求1至9中任意一项所述方法的服务器,以及,执行如权利要求16至23中任意一项所述的方法的录制设备;
    回放设备,以及执行如权利要求10至15中任意一项所述方法的服务器。
  27. 一种计算机可读存储介质,存储有指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1至9中任意一项所述的方法,或者,执行如权利要求10至15中任意一项所述的方法,或者,执行如权利要求16至23中任意一项所述的方法。
  28. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求1至9中任意一项所述的方法,或者,执行如权利要求10至15中任意一项所述的方法,或者,执行如权利要求16至23中任意一项所述的方法。
PCT/CN2022/125809 2021-10-30 2022-10-18 回放方法、录制方法以及相关设备 WO2023071857A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111278494.6 2021-10-30
CN202111278494.6A CN116069975A (zh) 2021-10-30 2021-10-30 回放方法、录制方法以及相关设备

Publications (1)

Publication Number Publication Date
WO2023071857A1 true WO2023071857A1 (zh) 2023-05-04

Family

ID=86159141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/125809 WO2023071857A1 (zh) 2021-10-30 2022-10-18 回放方法、录制方法以及相关设备

Country Status (2)

Country Link
CN (1) CN116069975A (zh)
WO (1) WO2023071857A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110138417A1 (en) * 2009-12-04 2011-06-09 Rovi Technologies Corporation Systems and methods for providing interactive content with a media asset on a media equipment device
CN102799428A (zh) * 2012-06-28 2012-11-28 北京大学 交互式软件中的操作记录与回放方法
CN107050850A (zh) * 2017-05-18 2017-08-18 腾讯科技(深圳)有限公司 虚拟场景的录制和回放方法、装置以及回放系统
EP3474558A2 (en) * 2017-10-20 2019-04-24 Apple Inc. Encapsulating and synchronizing state interactions between devices
CN112579596A (zh) * 2020-12-09 2021-03-30 北京天融信网络安全技术有限公司 一种数据回放方法、装置、存储介质和电子设备
CN113271292A (zh) * 2021-04-07 2021-08-17 中国科学院信息工程研究所 一种基于词向量的恶意域名集群检测方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110138417A1 (en) * 2009-12-04 2011-06-09 Rovi Technologies Corporation Systems and methods for providing interactive content with a media asset on a media equipment device
CN102799428A (zh) * 2012-06-28 2012-11-28 北京大学 交互式软件中的操作记录与回放方法
CN107050850A (zh) * 2017-05-18 2017-08-18 腾讯科技(深圳)有限公司 虚拟场景的录制和回放方法、装置以及回放系统
EP3474558A2 (en) * 2017-10-20 2019-04-24 Apple Inc. Encapsulating and synchronizing state interactions between devices
CN112579596A (zh) * 2020-12-09 2021-03-30 北京天融信网络安全技术有限公司 一种数据回放方法、装置、存储介质和电子设备
CN113271292A (zh) * 2021-04-07 2021-08-17 中国科学院信息工程研究所 一种基于词向量的恶意域名集群检测方法及装置

Also Published As

Publication number Publication date
CN116069975A (zh) 2023-05-05

Similar Documents

Publication Publication Date Title
US8407290B2 (en) Dynamic data sharing using a collaboration-enabled web browser
CN110309005B (zh) 一种功能调用方法、装置、终端设备及存储介质
US11204681B2 (en) Program orchestration method and electronic device
CN112306851A (zh) 一种自动化测试方法和装置
CN110232091A (zh) 用于同步数据的方法、系统和装置
EP4300303A1 (en) Animation resource information processing method and apparatus, device, medium and product
CN115062046A (zh) 数据库查询方法、装置、电子设备及存储介质
CN111813685B (zh) 自动化测试方法和装置
CN109218338B (zh) 信息处理系统、方法和装置
WO2023071857A1 (zh) 回放方法、录制方法以及相关设备
CN110839079B (zh) 工作流系统中的bi节点执行方法、装置、设备及介质
CN110489326B (zh) 基于ids的httpapi调试方法装置、介质和设备
CN111382039A (zh) 上报用户行为事件的方法、装置、电子设备及存储介质
CN112511636B (zh) 数据传输系统、方法、装置、计算机设备及存储介质
WO2021244548A1 (zh) 即时消息处理方法和装置
CN114064429A (zh) 审计日志的采集方法、装置、存储介质和服务器
CN114979256A (zh) 一种消息推送方法、装置、电子设备及计算机可读介质
CN110262912B (zh) 一种过程调用gRPC的调用方法及装置
CN111382038B (zh) 上报业务数据的方法、装置、电子设备及存储介质
CN112732457A (zh) 图像传输方法、装置、电子设备和计算机可读介质
CN112668061B (zh) 电子设备及其设备编码上报方法
CN112929858B (zh) 一种门禁卡的模拟方法和终端
CN113778886B (zh) 一种测试用例的处理方法和装置
CN114253520B (zh) 接口代码生成方法和装置
CN112311833B (zh) 数据更新方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22885735

Country of ref document: EP

Kind code of ref document: A1