TWI743853B - Device control method, electronic device and medium thereof - Google Patents
Device control method, electronic device and medium thereof Download PDFInfo
- Publication number
- TWI743853B TWI743853B TW109121221A TW109121221A TWI743853B TW I743853 B TWI743853 B TW I743853B TW 109121221 A TW109121221 A TW 109121221A TW 109121221 A TW109121221 A TW 109121221A TW I743853 B TWI743853 B TW I743853B
- Authority
- TW
- Taiwan
- Prior art keywords
- controlled device
- program code
- control instruction
- control
- instruction
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/418—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
- G05B19/4183—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by data acquisition, e.g. workpiece identification
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/418—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
- G05B19/41835—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by programme execution
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/418—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
- G05B19/41845—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by system universality, reconfigurability, modularity
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/418—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
- G05B19/4185—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by the network communication
- G05B19/41855—Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by the network communication by local area network [LAN], network structure
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0212—Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
- G05D1/0221—Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving a learning process
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0231—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
- G05D1/0246—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0276—Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle
- G05D1/0278—Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle using satellite positioning signals, e.g. GPS
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0287—Control of position or course in two dimensions specially adapted to land vehicles involving a plurality of land vehicles, e.g. fleet or convoy travelling
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
- G05D1/12—Target-seeking control
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Abstract
Description
本申請關於智慧設備控制技術,尤其關於一種設備控制方法、電子設備、電腦儲存介質。This application relates to smart device control technology, in particular to a device control method, electronic device, and computer storage medium.
目前,對智慧設備的遠端控制方法可以應用於多個領域,例如,可以適用於遙控領域或程式設計教育領域。相關技術中,在對智慧設備進行控制時,可通過固定命令按鈕發送相應的控制指令。At present, the remote control method for smart devices can be applied to many fields, for example, it can be applied to the field of remote control or programming education. In related technologies, when controlling smart devices, corresponding control instructions can be sent through fixed command buttons.
本申請實施例提出了一種設備控制方法、電子設備、電腦儲存介質。The embodiment of the application proposes a device control method, an electronic device, and a computer storage medium.
本申請實施例提供了一種設備控制方法,所述方法包括: 通過本地代理(agent)程式獲取用於控制第一受控設備工作的程式碼; 通過所述本地代理程式將所述程式碼發送至所述第一受控設備,使所述第一受控設備運行所述程式碼。The embodiment of the present application provides a device control method, and the method includes: Obtain the code used to control the work of the first controlled device through the local agent program; The program code is sent to the first controlled device through the local agent program, so that the first controlled device runs the program code.
在本申請的一些實施例中,所述方法還包括: 在將所述程式碼發送至所述第一受控設備後,接收所述第一受控設備的回饋資訊,所述回饋資訊由所述第一受控設備運行所述程式碼後生成。In some embodiments of the present application, the method further includes: After the program code is sent to the first controlled device, the feedback information of the first controlled device is received, and the feedback information is generated by the first controlled device after running the program code.
可以看出,通過接收回饋資訊,可以獲知上述程式碼運行情況,進而便於針對該程式碼進行處理,例如,在程式碼的運行情況不符合預期時,可以修改該程式碼。It can be seen that by receiving the feedback information, the operation status of the above-mentioned code can be obtained, and the processing of the code can be facilitated. For example, when the operation of the code does not meet expectations, the code can be modified.
在本申請的一些實施例中,所述方法還包括: 在接收所述第一受控設備的回饋資訊後,將所述回饋資訊在所述本地代理程式所在的終端進行載入和/或顯示。In some embodiments of the present application, the method further includes: After receiving the feedback information of the first controlled device, the feedback information is loaded and/or displayed on the terminal where the local agent program is located.
可以看出,通過對回饋資訊的載入和/或顯示,便於使用者直觀地獲知上述程式碼運行情況。It can be seen that by loading and/or displaying the feedback information, it is convenient for the user to intuitively know the operation of the above-mentioned code.
在本申請的一些實施例中,所述回饋資訊包括所述程式碼的執行結果。In some embodiments of the present application, the feedback information includes the execution result of the program code.
可以看出,通過對回饋資訊的載入和/或顯示,便於使用者直觀地獲知上述程式碼的執行結果。It can be seen that by loading and/or displaying the feedback information, it is convenient for the user to intuitively know the execution result of the above-mentioned code.
在本申請的一些實施例中,所述通過本地代理程式獲取用於控制受控設備工作的程式碼,包括: 通過所述本地代理程式獲取使用者基於網路(WEB)頁面提交的所述程式碼。In some embodiments of the present application, the obtaining the program code for controlling the operation of the controlled device through the local agent program includes: Obtain the program code submitted by the user based on the web (WEB) page through the local agent program.
這樣,在本地代理程式運行的情況下,本地代理程式可以收集到相應的程式碼;可以看出,使用者可以基於WEB頁面,較為方便地提交程式碼。In this way, when the local agent is running, the local agent can collect the corresponding code; it can be seen that the user can submit the code more conveniently based on the WEB page.
本申請實施例還提供了另一種設備控制方法,應用於第一受控設備中,所述方法包括: 接收終端通過本地代理程式發送的用於控制所述第一受控設備工作的程式碼;所述程式碼是由所述本地代理程式收集的; 運行所述程式碼。The embodiment of the present application also provides another device control method, which is applied to the first controlled device, and the method includes: Receiving a program code for controlling the operation of the first controlled device sent by the terminal through a local agent program; the program code is collected by the local agent program; Run the code.
在本申請的一些實施例中,所述方法還包括: 運行所述程式碼生成回饋資訊,並將所述回饋資訊發送至所述終端。In some embodiments of the present application, the method further includes: Run the program code to generate feedback information, and send the feedback information to the terminal.
可以看出,通過將回饋資訊發送至終端,可以使終端獲知上述程式碼運行情況,進而便於針對該程式碼進行處理,例如,在程式碼的運行情況不符合預期時,可以修改該程式碼。It can be seen that by sending the feedback information to the terminal, the terminal can be informed of the operation of the above-mentioned program code, which is convenient for processing the program code. For example, when the operation of the program code does not meet expectations, the program code can be modified.
在本申請的一些實施例中,所述回饋資訊包括所述程式碼的執行結果。In some embodiments of the present application, the feedback information includes the execution result of the program code.
可以看出,通過將回饋資訊發送至終端,可以使終端獲知上述程式碼的執行結果。It can be seen that by sending the feedback information to the terminal, the terminal can be informed of the execution result of the above-mentioned code.
在本申請的一些實施例中,所述方法還包括: 通過運行所述程式碼,生成第二受控設備的控制指令,其中,所述第一受控設備和所述第二受控設備形成通信連接; 將所述第二受控設備的控制指令發送至第二受控設備,使所述第二受控設備執行所述第二受控設備的控制指令; 接收所述第二受控設備發送的指令執行結果,根據所述指令執行結果,生成所述第一受控設備的控制指令,執行所述第一受控設備的控制指令;其中,所述指令執行結果是所述第二受控設備在執行所述第二受控設備的控制指令後得到的。In some embodiments of the present application, the method further includes: By running the program code, a control instruction of the second controlled device is generated, wherein the first controlled device and the second controlled device form a communication connection; Sending the control instruction of the second controlled device to the second controlled device, so that the second controlled device executes the control instruction of the second controlled device; Receive the instruction execution result sent by the second controlled device, generate the control instruction of the first controlled device according to the instruction execution result, and execute the control instruction of the first controlled device; wherein, the instruction The execution result is obtained by the second controlled device after executing the control instruction of the second controlled device.
可以看出,本申請實施例針對第一受控設備和第二受控設備,給出了協同控制方案,在本申請的一些實施例中,可以基於上述程式碼實現對第一受控設備和第二受控設備的協同控制。It can be seen that the embodiments of the present application provide a cooperative control scheme for the first controlled device and the second controlled device. In some embodiments of the present application, the first controlled device and the second controlled device can be realized based on the above-mentioned code. Cooperative control of the second controlled device.
在本申請的一些實施例中,所述方法還包括: 獲取工作模式切換資訊;所述工作模式切換資訊用於指示所述第一受控設備和所述第二受控設備將當前工作模式切換為目標工作模式; 根據所述工作模式切換資訊,控制所述第一受控設備切換工作模式;將所述工作模式切換資訊發送至第二受控設備,使所述第二受控設備基於所述工作模式切換資訊切換工作模式。In some embodiments of the present application, the method further includes: Acquiring work mode switching information; the work mode switching information is used to instruct the first controlled device and the second controlled device to switch the current working mode to the target working mode; According to the work mode switching information, control the first controlled device to switch the work mode; send the work mode switch information to the second controlled device so that the second controlled device is based on the work mode switch information Switch working mode.
這樣,針對每個受控設備,可以設置多種工作模式,在處於不同的工作模式時,受控設備的工作方式是不同的。可以看出,本申請實施例可以實現第一受控設備和第二受控設備的工作模式的同步切換。In this way, for each controlled device, multiple working modes can be set. When in different working modes, the working mode of the controlled device is different. It can be seen that the embodiments of the present application can realize synchronous switching of the working modes of the first controlled device and the second controlled device.
在本申請的一些實施例中,所述第二受控設備的控制指令為圖像檢測指令,所述指令執行結果為圖像檢測結果; 所述根據所述指令執行結果,生成所述第一受控設備的控制指令,執行所述第一受控設備的控制指令,包括: 根據所述圖像檢測結果,生成所述第一受控設備的控制指令,所述第一受控設備的控制指令為人體跟蹤指令; 根據所述人體跟蹤指令,控制所述第一受控設備的運動狀態。In some embodiments of the present application, the control instruction of the second controlled device is an image detection instruction, and the execution result of the instruction is an image detection result; The generating the control instruction of the first controlled device according to the instruction execution result, and executing the control instruction of the first controlled device includes: Generating a control instruction of the first controlled device according to the image detection result, and the control instruction of the first controlled device is a human tracking instruction; According to the human body tracking instruction, the movement state of the first controlled device is controlled.
可以看出,在本申請實施例中,可以在對第一受控設備和第二受控設備的協同控制的基礎上,實現人體跟蹤。It can be seen that, in the embodiment of the present application, human body tracking can be realized on the basis of the coordinated control of the first controlled device and the second controlled device.
在本申請的一些實施例中,所述根據所述圖像檢測結果,生成所述第一受控設備的控制指令,包括: 回應於所述圖像檢測結果表示人體變小的情況,生成用於控制所述第一受控設備前進的控制指令; 回應於所述圖像檢測結果表示人體變大的情況,生成用於控制所述第一受控設備保持靜止的控制指令; 回應於所述圖像檢測結果表示人體位於所述第一受控設備的左側的情況,生成用於控制所述第一受控設備左轉的控制指令; 回應於所述圖像檢測結果表示人體位於所述第一受控設備的右側的情況,生成用於控制所述第一受控設備右轉的控制指令。In some embodiments of the present application, the generating a control instruction of the first controlled device according to the image detection result includes: In response to the image detection result indicating that the human body has become smaller, generating a control instruction for controlling the advancement of the first controlled device; In response to the image detection result indicating that the human body becomes larger, generating a control instruction for controlling the first controlled device to remain stationary; In response to the image detection result indicating that the human body is located on the left side of the first controlled device, generating a control instruction for controlling the first controlled device to turn left; In response to the image detection result indicating that the human body is located on the right side of the first controlled device, a control instruction for controlling the first controlled device to turn right is generated.
可以看出,在本申請實施例中,通過對第一受控設備的運動狀態的控制,可以準確地實現人體跟蹤。It can be seen that, in the embodiment of the present application, human body tracking can be accurately achieved by controlling the motion state of the first controlled device.
在本申請的一些實施例中,所述第一受控設備和所述第二受控設備通過有線連接方式進行連接。In some embodiments of the present application, the first controlled device and the second controlled device are connected through a wired connection.
如此,可以確保第一受控設備與第二受控設備之間的通信可靠性。In this way, the reliability of the communication between the first controlled device and the second controlled device can be ensured.
本申請實施例還提供了一種終端,所述終端包括獲取模組和第一處理模組,其中, 獲取模組,配置為通過本地代理程式獲取用於控制第一受控設備工作的程式碼; 第一處理模組,配置為通過所述本地代理程式將所述程式碼發送至所述第一受控設備,使所述第一受控設備運行所述程式碼。The embodiment of the present application also provides a terminal, the terminal includes an acquisition module and a first processing module, wherein: The obtaining module is configured to obtain the code used to control the work of the first controlled device through the local agent program; The first processing module is configured to send the program code to the first controlled device through the local agent program, so that the first controlled device runs the program code.
在本申請的一些實施例中,所述第一處理模組,還配置為在將所述程式碼發送至所述第一受控設備後,接收所述第一受控設備的回饋資訊,所述回饋資訊由所述第一受控設備運行所述程式碼後生成。In some embodiments of the present application, the first processing module is further configured to receive feedback information from the first controlled device after sending the program code to the first controlled device, so The feedback information is generated after the first controlled device runs the program code.
可以看出,通過接收回饋資訊,可以獲知上述程式碼運行情況,進而便於針對該程式碼進行處理,例如,在程式碼的運行情況不符合預期時,可以修改該程式碼。It can be seen that by receiving the feedback information, the operation status of the above-mentioned code can be obtained, and the processing of the code can be facilitated. For example, when the operation of the code does not meet expectations, the code can be modified.
在本申請的一些實施例中,所述第一處理模組,還配置為在在接收所述第一受控設備的回饋資訊後,將所述回饋資訊在所述本地代理程式所在的終端進行載入和/或顯示。In some embodiments of the present application, the first processing module is further configured to, after receiving the feedback information of the first controlled device, perform the feedback information on the terminal where the local agent program is located. Load and/or display.
可以看出,通過對回饋資訊的載入和/或顯示,便於使用者直觀地獲知上述程式碼運行情況。It can be seen that by loading and/or displaying the feedback information, it is convenient for the user to intuitively know the operation of the above-mentioned code.
在本申請的一些實施例中,所述回饋資訊包括所述程式碼的執行結果。In some embodiments of the present application, the feedback information includes the execution result of the program code.
可以看出,通過對回饋資訊的載入和/或顯示,便於使用者直觀地獲知上述程式碼的執行結果。It can be seen that by loading and/or displaying the feedback information, it is convenient for the user to intuitively know the execution result of the above-mentioned code.
在本申請的一些實施例中,所述獲取模組,配置為通過所述本地代理程式獲取使用者基於WEB頁面提交的所述程式碼。In some embodiments of the present application, the obtaining module is configured to obtain the program code submitted by the user based on the WEB page through the local agent program.
這樣,在本地代理程式運行的情況下,本地代理程式可以收集到相應的程式碼;可以看出,使用者可以基於WEB頁面,較為方便地提交程式碼。In this way, when the local agent is running, the local agent can collect the corresponding code; it can be seen that the user can submit the code more conveniently based on the WEB page.
本申請實施例還提供了一種第一受控設備,所述第一受控設備包括接收模組和第二處理模組,其中, 接收模組,配置為接收終端通過本地代理程式發送的用於控制所述第一受控設備工作的程式碼;所述程式碼是由所述本地代理程式收集的; 第二處理模組,配置為運行所述程式碼。An embodiment of the present application also provides a first controlled device. The first controlled device includes a receiving module and a second processing module, wherein: A receiving module, configured to receive a program code for controlling the operation of the first controlled device sent by the terminal through a local agent program; the program code is collected by the local agent program; The second processing module is configured to run the program code.
在本申請的一些實施例中,所述第二處理模組,還配置為運行所述程式碼生成回饋資訊,並將所述回饋資訊發送至所述終端。In some embodiments of the present application, the second processing module is further configured to run the program code to generate feedback information, and send the feedback information to the terminal.
可以看出,通過將回饋資訊發送至終端,可以使終端獲知上述程式碼運行情況,進而便於針對該程式碼進行處理,例如,在程式碼的運行情況不符合預期時,可以修改該程式碼。It can be seen that by sending the feedback information to the terminal, the terminal can be informed of the operation of the above-mentioned program code, which is convenient for processing the program code. For example, when the operation of the program code does not meet expectations, the program code can be modified.
在本申請的一些實施例中,所述回饋資訊包括所述程式碼的執行結果。In some embodiments of the present application, the feedback information includes the execution result of the program code.
可以看出,通過將回饋資訊發送至終端,可以使終端獲知上述程式碼的執行結果。It can be seen that by sending the feedback information to the terminal, the terminal can be informed of the execution result of the above-mentioned code.
在本申請的一些實施例中,所述第二處理模組,還配置為: 通過運行所述程式碼,生成第二受控設備的控制指令,其中,所述第一受控設備和所述第二受控設備形成通信連接; 將所述第二受控設備的控制指令發送至第二受控設備,使所述第二受控設備執行所述第二受控設備的控制指令; 接收所述第二受控設備發送的指令執行結果,根據所述指令執行結果,生成所述第一受控設備的控制指令,執行所述第一受控設備的控制指令;其中,所述指令執行結果是所述第二受控設備在執行所述第二受控設備的控制指令後得到的。In some embodiments of the present application, the second processing module is further configured to: By running the program code, a control instruction of the second controlled device is generated, wherein the first controlled device and the second controlled device form a communication connection; Sending the control instruction of the second controlled device to the second controlled device, so that the second controlled device executes the control instruction of the second controlled device; Receive the instruction execution result sent by the second controlled device, generate the control instruction of the first controlled device according to the instruction execution result, and execute the control instruction of the first controlled device; wherein, the instruction The execution result is obtained by the second controlled device after executing the control instruction of the second controlled device.
可以看出,本申請實施例針對第一受控設備和第二受控設備,給出了協同控制方案,在本申請的一些實施例中,可以基於上述程式碼實現對第一受控設備和第二受控設備的協同控制。It can be seen that the embodiments of the present application provide a cooperative control scheme for the first controlled device and the second controlled device. In some embodiments of the present application, the first controlled device and the second controlled device can be realized based on the above-mentioned code. Cooperative control of the second controlled device.
在本申請的一些實施例中,所述第二處理模組,還配置為獲取工作模式切換資訊;根據所述工作模式切換資訊,控制所述第一受控設備切換工作模式;將所述工作模式切換資訊發送至第二受控設備,使所述第二受控設備基於所述工作模式切換資訊切換工作模式;所述工作模式切換資訊用於指示所述第一受控設備和所述第二受控設備將當前工作模式切換為目標工作模式。In some embodiments of the present application, the second processing module is further configured to obtain work mode switching information; control the first controlled device to switch work modes according to the work mode switching information; The mode switching information is sent to the second controlled device so that the second controlled device switches the working mode based on the working mode switching information; the working mode switching information is used to instruct the first controlled device and the second controlled device 2. The controlled device switches the current working mode to the target working mode.
這樣,針對每個受控設備,可以設置多種工作模式,在處於不同的工作模式時,受控設備的工作方式是不同的。可以看出,本申請實施例可以實現第一受控設備和第二受控設備的工作模式的同步切換。In this way, for each controlled device, multiple working modes can be set. When in different working modes, the working mode of the controlled device is different. It can be seen that the embodiments of the present application can realize synchronous switching of the working modes of the first controlled device and the second controlled device.
在本申請的一些實施例中,所述第二受控設備的控制指令為圖像檢測指令,所述指令執行結果為圖像檢測結果; 所述第二處理模組,配置為根據所述圖像檢測結果,生成所述第一受控設備的控制指令,所述第一受控設備的控制指令為人體跟蹤指令;根據所述人體跟蹤指令,控制所述第一受控設備的運動狀態。In some embodiments of the present application, the control instruction of the second controlled device is an image detection instruction, and the execution result of the instruction is an image detection result; The second processing module is configured to generate a control instruction of the first controlled device according to the image detection result, and the control instruction of the first controlled device is a human body tracking instruction; according to the human body tracking Instructions to control the motion state of the first controlled device.
可以看出,在本申請實施例中,可以在對第一受控設備和第二受控設備的協同控制的基礎上,實現人體跟蹤。It can be seen that, in the embodiment of the present application, human body tracking can be realized on the basis of the coordinated control of the first controlled device and the second controlled device.
在本申請的一些實施例中,所述第二處理模組,配置為回應於所述圖像檢測結果表示人體變小的情況,生成用於控制所述第一受控設備前進的控制指令;回應於所述圖像檢測結果表示人體變大的情況,生成用於控制所述第一受控設備保持靜止的控制指令;回應於所述圖像檢測結果表示人體位於所述第一受控設備的左側的情況,生成用於控制所述第一受控設備左轉的控制指令;回應於所述圖像檢測結果表示人體位於所述第一受控設備的右側的情況,生成用於控制所述第一受控設備右轉的控制指令。In some embodiments of the present application, the second processing module is configured to generate a control instruction for controlling the advancement of the first controlled device in response to the image detection result indicating that the human body becomes smaller; In response to the image detection result indicating that the human body becomes larger, a control instruction for controlling the first controlled device to remain stationary is generated; and in response to the image detection result indicating that the human body is located on the first controlled device In the case of the left side of the first controlled device, a control instruction for controlling the first controlled device to turn left is generated; in response to the image detection result indicating that the human body is located on the right side of the first controlled device, a control instruction for controlling the first controlled device is generated The control instruction for the first controlled device to turn right.
可以看出,在本申請實施例中,通過對第一受控設備的運動狀態的控制,可以準確地實現人體跟蹤。It can be seen that, in the embodiment of the present application, human body tracking can be accurately achieved by controlling the motion state of the first controlled device.
在本申請的一些實施例中,所述第一受控設備和所述第二受控設備通過有線連接方式進行連接。In some embodiments of the present application, the first controlled device and the second controlled device are connected through a wired connection.
如此,可以確保第一受控設備與第二受控設備之間的通信可靠性。In this way, the reliability of the communication between the first controlled device and the second controlled device can be ensured.
本申請實施例還提供了一種終端,所述終端包括處理器和用於儲存能夠在處理器上運行的電腦程式的記憶體;其中, 所述處理器用於運行所述電腦程式時,執行應用於終端的上述任意一種設備控制方法。The embodiment of the present application also provides a terminal, the terminal includes a processor and a memory for storing a computer program that can run on the processor; wherein, When the processor is used to run the computer program, any one of the above-mentioned device control methods applied to the terminal is executed.
本申請實施例還提供了一種電子設備,所述設備包括處理器和用於儲存能夠在處理器上運行的電腦程式的記憶體;其中, 所述處理器用於運行所述電腦程式時,執行應用於第一受控設備的上述任意一種設備控制方法。An embodiment of the present application also provides an electronic device, which includes a processor and a memory for storing a computer program that can run on the processor; wherein, When the processor is used to run the computer program, any one of the above-mentioned device control methods applied to the first controlled device is executed.
本申請實施例還提供了一種電腦儲存介質,其上儲存有電腦程式,該電腦程式被處理器執行時實現上述任意一種設備控制方法。The embodiment of the present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned device control methods is implemented.
本申請實施例還提供了一種電腦程式,包括電腦可讀代碼,當所述電腦可讀代碼在終端中運行時,所述終端中的處理器執行應用於終端的上述任意一種設備控制方法。The embodiment of the present application also provides a computer program, including computer-readable code, and when the computer-readable code runs in a terminal, a processor in the terminal executes any one of the above-mentioned device control methods applied to the terminal.
本申請實施例還提供了另一種電腦程式,包括電腦可讀代碼,當所述電腦可讀代碼在電子設備中運行時,所述電子設備中的處理器執行應用於第一受控設備的上述任意一種設備控制方法。The embodiment of the present application also provides another computer program, including computer-readable code. When the computer-readable code runs in an electronic device, the processor in the electronic device executes the above-mentioned application applied to the first controlled device. Any kind of equipment control method.
本申請實施例提出的設備控制方法、電子設備、電腦儲存介質中,通過本地代理程式獲取用於控制第一受控設備工作的程式碼;通過所述本地代理程式將所述程式碼發送至所述第一受控設備,使所述第一受控設備運行所述程式碼。本申請實施例的技術方案,可以基於本地代理程式獲取程式碼並推送,進而可以基於程式碼來實現對第一受控設備的控制,而程式碼是可以靈活編輯的,如此,可以更加靈活地對第一受控設備進行控制。In the device control method, electronic device, and computer storage medium proposed in the embodiments of the present application, the program code used to control the operation of the first controlled device is obtained through a local agent program; the program code is sent to all through the local agent program The first controlled device enables the first controlled device to run the program code. The technical solution of the embodiment of the present application can obtain and push the program code based on the local agent program, and then can realize the control of the first controlled device based on the program code, and the program code can be flexibly edited, so that it can be more flexible Control the first controlled device.
應當理解的是,以上的一般描述和後文的細節描述僅是示例性和解釋性的,而非限制本申請。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the application.
以下結合附圖及實施例,對本申請進行進一步詳細說明。應當理解,此處所提供的實施例僅僅用以解釋本申請,並不用於限定本申請。另外,以下所提供的實施例是用於實施本申請的部分實施例,而非提供實施本申請的全部實施例,在不衝突的情況下,本申請實施例記載的技術方案可以任意組合的方式實施。The application will be further described in detail below in conjunction with the drawings and embodiments. It should be understood that the embodiments provided here are only used to explain the application, and are not used to limit the application. In addition, the embodiments provided below are part of the embodiments for implementing the application, rather than providing all the embodiments for implementing the application. In the case of no conflict, the technical solutions described in the embodiments of the application can be combined in any manner. Implement.
需要說明的是,在本申請實施例中,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的方法或者裝置不僅包括所明確記載的要素,而且還包括沒有明確列出的其他要素,或者是還包括為實施方法或者裝置所固有的要素。在沒有更多限制的情況下,由語句“包括一個......”限定的要素,並不排除在包括該要素的方法或者裝置中還存在另外的相關要素(例如方法中的步驟或者裝置中的單元,例如的單元可以是部分電路、部分處理器、部分程式或軟體等等)。It should be noted that in the embodiments of the present application, the terms "including", "including" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or device including a series of elements not only includes what is clearly stated Elements, but also include other elements not explicitly listed, or elements inherent to the implementation of the method or device. Without more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other related elements (such as steps or steps in the method) in the method or device that includes the element. The unit in the device, for example, the unit may be part of the circuit, part of the processor, part of the program or software, etc.).
例如,本申請實施例提供的設備控制方法包含了一系列的步驟,但是本申請實施例提供的設備控制方法不限於所記載的步驟,同樣地,本申請實施例提供的終端和受控設備包括了一系列模組,但是本申請實施例提供的終端和受控設備不限於包括所明確記載的模組,還可以包括為獲取相關資訊、或基於資訊進行處理時所需要設置的模組。For example, the device control method provided in the embodiment of the application includes a series of steps, but the device control method provided in the embodiment of the application is not limited to the recorded steps. Similarly, the terminal and controlled device provided in the embodiment of the application include A series of modules are provided, but the terminals and controlled equipment provided in the embodiments of the present application are not limited to include the explicitly recorded modules, and may also include modules that need to be set to obtain related information or perform processing based on the information.
本文中術語“和/或”,僅僅是一種描述關聯物件的關聯關係,表示可以存在三種關係,例如,A和/或B,可以表示:單獨存在A,同時存在A和B,單獨存在B這三種情況。另外,本文中術語“至少一種”表示多種中的任意一種或多種中的至少兩種的任意組合,例如,包括A、B、C中的至少一種,可以表示包括從A、B和C構成的集合中選擇的任意一個或多個元素。The term "and/or" in this article is only an association relationship describing related objects, which means that there can be three relationships. For example, A and/or B can mean: A alone exists, A and B exist at the same time, and B exists alone. three conditions. In addition, the term "at least one" herein means any one or any combination of at least two of the multiple, for example, including at least one of A, B, and C, and may mean including those made from A, B, and C Any one or more elements selected in the set.
本申請實施例可以應用於終端和受控設備組成的控制系統中,並可以與眾多其它通用或專用計算系統環境或配置一起操作。這裡,終端可以是瘦客戶機、厚客戶機、手持或膝上設備、基於微處理器的系統、機上盒、可程式設計消費電子產品、網路個人電腦、小型電腦系統,等等,受控設備可以是智慧車等電子設備。本申請實施例提供的設備控制方法還可以通過處理器執行電腦程式代碼實現。The embodiments of the present application can be applied to a control system composed of a terminal and a controlled device, and can be operated with many other general-purpose or special-purpose computing system environments or configurations. Here, the terminal can be a thin client, a thick client, a handheld or laptop device, a microprocessor-based system, a set-top box, a programmable consumer electronics product, a networked personal computer, a small computer system, etc. The control device may be an electronic device such as a smart car. The device control method provided in the embodiments of the present application can also be implemented by executing computer program codes by a processor.
終端、受控設備等電子設備可以在由電腦系統執行的電腦系統可執行指令(諸如程式模組)的一般語境下描述。通常,程式模組可以包括常式、程式、目的程式、元件、邏輯、資料結構等等,它們執行特定的任務或者實現特定的抽象資料類型。Electronic devices such as terminals and controlled devices can be described in the general context of computer system executable instructions (such as program modules) executed by the computer system. Generally, program modules can include routines, programs, target programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types.
在本申請的一些實施例中,教育機器人是現代程式設計教育的一個通用教具模型,可以利用WEB方式或者移動應用程式(Application,APP)用戶端實現對教育機器人控制;在相關的智慧設備控制方案中,通常是通過藍牙、無線視頻進行傳輸,然後在伺服器側進行資訊處理;在第一個示例性的方案中,提出了一種基於Wi-Fi (Wireless Fidelity)通信的意念控制視頻車系統,該系統由腦電採集卡、智慧手機、移動小車和個人電腦四部分組成,通過藍牙實現智慧手機和腦電採集卡連接,進而可以實現移動小車的遠端控制;在第二個示例性的方案中,提出了一種遠端控制除草機器人,在實際實施時,可以在機器人本體上安裝攝影頭和全球定位系統(Global Positioning System,GPS)晶片,小車完成視頻採集然後通過無線通訊方式傳輸到上位機,在完成相關處理後,在將指令下發到機器人;在第三個示例性的方案中,提出了一種掃地車遠端系統管理方案,在實際實施時,可以利用通信模組將手機資訊無線傳輸到網管伺服器,再由管理平臺向使用者提供服務,該方案主要利用WEB方式提供相關服務,方便使用者對設備的管理。In some embodiments of the present application, the educational robot is a general teaching aid model for modern programming education, which can be controlled by WEB or mobile application (Application, APP) user terminal; in the related smart device control scheme , Usually through Bluetooth, wireless video transmission, and then information processing on the server side; in the first exemplary solution, a concept based on Wi-Fi (Wireless Fidelity) communication is proposed to control the video car system, The system consists of four parts: an EEG acquisition card, a smart phone, a mobile car, and a personal computer. The connection between the smart phone and the EEG acquisition card is realized through Bluetooth, and the remote control of the mobile car can be realized; in the second example In the solution, a remote control weeding robot is proposed. In actual implementation, a camera and a Global Positioning System (GPS) chip can be installed on the robot body. The car completes video capture and then transmits it through wireless communication. To the host computer, after completing the relevant processing, the instructions are issued to the robot; in the third exemplary solution, a remote system management solution for the sweeper is proposed. In actual implementation, the communication module can be used to The mobile phone information is wirelessly transmitted to the network management server, and then the management platform provides services to the users. The solution mainly uses the WEB method to provide related services to facilitate the user's management of the equipment.
在上述的智慧設備控制方案中,只能無線通訊方式完成固定命令傳輸,只能通過固定命令按鈕發送固定的控制指令;無線通訊網路的通信品質會影響到上下位機之間的通信。In the above-mentioned smart device control scheme, only wireless communication can be used to complete fixed command transmission, and only fixed command buttons can be used to send fixed control commands; the communication quality of the wireless communication network will affect the communication between upper and lower computers.
在相關技術中,基於WEB方式實現對智慧設備的遠端控制是一種高效且方便的方案,在遙控領域和教育領域有著極為重要作用;但是為了實現準確且即時的控制還存在較多問題亟待解決;首先由於上下位機之間採用了無線連接方式,但是無線網路不穩定且丟包率較大,在性能要求較高的場合存在較大問題,限制了應用場景;其次,相關技術中只實現了從上位機到下位機控制指令傳輸,不能收集回饋資訊或者對回饋資訊進行有效處理,上位機側WEB端的控制指令的下發和下位機側執行指令的回饋資訊的收集及上報也需要設計靈活複雜的架構。In related technologies, remote control of smart devices based on WEB is an efficient and convenient solution, which plays an extremely important role in the field of remote control and education; however, there are still many problems that need to be resolved in order to achieve accurate and instant control. ; First, because the upper and lower computers use wireless connection, but the wireless network is unstable and the packet loss rate is large, there are big problems in the occasions with high performance requirements, which limits the application scenarios; secondly, only related technologies The transmission of control commands from the upper computer to the lower computer is realized, and feedback information cannot be collected or effectively processed. The issuance of control instructions on the WEB side of the upper computer and the collection and reporting of the feedback information of the execution commands on the lower computer side are also required Design a flexible and complex architecture.
針對上述技術問題,在本申請的一些實施例中,提出了一種設備控制的技術方案,本申請實施例可以在教育機器人、遠端控制、智慧遙控等場景實施。In view of the foregoing technical problems, in some embodiments of the present application, a technical solution for device control is proposed. The embodiments of the present application can be implemented in scenarios such as educational robots, remote control, and smart remote control.
本申請實施例提出了一種設備控制方法;圖1為本申請實施例的設備控制方法的流程圖一,如圖1所示,該流程可以包括如下。An embodiment of the present application proposes a device control method; FIG. 1 is a first flow chart of the device control method according to an embodiment of the present application. As shown in FIG. 1, the flow may include the following.
步驟101:終端通過本地代理程式獲取用於控制第一受控設備工作的程式碼; 本申請實施例中,第一受控設備可以是智慧車、嵌入式開發設備、智慧型機器人等電子設備;第一受控設備可以包括感測器、攝影頭等器件,終端可以提供人機交互介面。本申請實施例中,第一受控設備可以是一個單獨的電子設備,也可以是集成的電子設備。Step 101: The terminal obtains the program code used to control the operation of the first controlled device through the local agent program; In the embodiments of this application, the first controlled device may be an electronic device such as a smart car, an embedded development device, or a smart robot; the first controlled device may include a sensor, a camera, etc., and the terminal may provide human-computer interaction interface. In the embodiment of the present application, the first controlled device may be a separate electronic device or an integrated electronic device.
在實際應用中,可以在終端中安裝本地代理(agent)程式,本地代理程式至少用於收集使用者提交的程式碼,這裡,用戶提交的程式碼可以是用於控制第一受控設備工作的程式碼,如此,通過運行本地代理程式,可以收集到用於控制第一受控設備工作的程式碼。In practical applications, a local agent program can be installed in the terminal. The local agent program is at least used to collect the code submitted by the user. Here, the code submitted by the user can be used to control the work of the first controlled device. Program code, in this way, by running the local agent program, the program code used to control the operation of the first controlled device can be collected.
在本申請的一些實施例中,可以通過本地代理程式獲取使用者基於WEB頁面提交的所述程式碼,也就是說,使用者可以通過終端的WEB頁面提交用於控制第一受控設備工作的程式碼,在本地代理程式運行的情況下,本地代理程式可以收集到相應的程式碼;可以看出,使用者可以基於WEB頁面,較為方便地提交程式碼。In some embodiments of the present application, the program code submitted by the user based on the WEB page can be obtained through the local agent program, that is, the user can submit the code for controlling the work of the first controlled device through the WEB page of the terminal. Code, when the local agent is running, the local agent can collect the corresponding code; it can be seen that the user can submit the code more conveniently based on the WEB page.
本申請實施例中,並不對上述程式碼的種類進行限定,上述程式碼的種類可以根據實際應用需求預先確定,例如,上述程式碼可以是python代碼或其他程式碼。In the embodiments of the present application, the type of the above-mentioned program code is not limited, and the type of the above-mentioned program code can be predetermined according to actual application requirements. For example, the above-mentioned program code may be python code or other program codes.
步驟102:終端通過本地代理程式將程式碼發送至第一受控設備。Step 102: The terminal sends the program code to the first controlled device through the local agent program.
在實際應用中,可以預先建立終端與第一受控設備的通信連接,本申請實施例中並不對終端與第一受控設備的通信連接的連接方式進行限定,例如,終端與第一受控設備可以通過有線連接方式或各種無線連接方式進行資料交互。In practical applications, a communication connection between the terminal and the first controlled device can be established in advance. The embodiment of this application does not limit the connection mode of the communication connection between the terminal and the first controlled device. For example, the terminal and the first controlled device are connected. The equipment can conduct data interaction through wired connection or various wireless connection methods.
在本申請的一些實施例中,上述本地代理程式可以用於建立終端與第一受控設備的通信連接,例如,在運行上述本地代理程式時,終端可以通過廣播方式在局域網內下發位址解析通訊協定(Address Resolution Protocol,ARP)資料包,該局域網內的第一受控設備在收到ARP資料包會回復相應的資料包,上述本地代理程式可以對第一受控設備回復的資料包進行解析,得到第一受控設備的互聯網協定(Internet Protocol ,IP)位址,如此,可以建立終端與第一受控設備的通信連接;在本申請的一些實施例中,當在上述局域網記憶體在多個受控設備時,如果上述本地代理程式接收到多個受控設備回復的資料包,可以生成用於表示多個受控設備的智慧設備清單,使用者可以在多個受控設備的智慧設備清單中,選擇多個受控設備中的至少一個受控設備;基於本地代理程式可以建立終端與選擇的受控設備的通信連接。In some embodiments of the present application, the above-mentioned local agent program can be used to establish a communication connection between the terminal and the first controlled device. For example, when the above-mentioned local agent program is running, the terminal can issue an address in the local area network by broadcasting. Parse the address resolution protocol (ARP) data packet, the first controlled device in the local area network will reply the corresponding data packet upon receiving the ARP data packet, and the above-mentioned local agent can reply to the data packet of the first controlled device Perform analysis to obtain the Internet Protocol (IP) address of the first controlled device. In this way, a communication connection between the terminal and the first controlled device can be established; In the case of multiple controlled devices, if the above-mentioned local agent receives data packets from multiple controlled devices, it can generate a smart device list representing multiple controlled devices. The user can log in to multiple controlled devices In the list of smart devices, select at least one controlled device among multiple controlled devices; a communication connection between the terminal and the selected controlled device can be established based on the local agent program.
在本申請的一些實施例中,在建立終端與第一受控設備的通信連接後,還可以對終端與第一受控設備的通信連接進行監控,以獲知終端與第一受控設備的通信連接狀況;例如,基於上述本地代理程式,終端可以繼續通過廣播方式在局域網內下發ARP資料包,如此,終端可以根據針對ARP資料包的回復情況,判斷終端與第一受控設備的通信連接狀況;例如,終端在向第一受控設備發送ARP資料包後,如果在設定時長內未收到針對ARP資料包的回復資料包,則可以認為終端與第一受控設備的通信連接中斷;如果在設定時長內收到針對ARP資料包的回復資料包,則可以認為終端與第一受控設備之間保持通信連接;設定時長可以根據實際需求設置,例如,設定時長可以是1至3秒。In some embodiments of the present application, after the communication connection between the terminal and the first controlled device is established, the communication connection between the terminal and the first controlled device can also be monitored to learn about the communication between the terminal and the first controlled device Connection status; for example, based on the above-mentioned local agent, the terminal can continue to send ARP data packets in the local area network by broadcasting. In this way, the terminal can determine the communication connection between the terminal and the first controlled device based on the response to the ARP data packet Status; for example, after the terminal sends an ARP data packet to the first controlled device, if it does not receive a reply data packet for the ARP data packet within the set time period, it can be considered that the communication connection between the terminal and the first controlled device is interrupted ; If the reply data packet for the ARP data packet is received within the set time, it can be considered that the terminal and the first controlled device maintain a communication connection; the set time can be set according to actual needs, for example, the set time can be 1 to 3 seconds.
本申請實施例中,終端可以根據預先建立終端與第一受控設備的通信連接,將上述程式碼發送至第一受控設備。In the embodiment of the present application, the terminal may send the above-mentioned program code to the first controlled device according to the pre-established communication connection between the terminal and the first controlled device.
步驟103:第一受控設備接收並運行上述程式碼。Step 103: The first controlled device receives and runs the above-mentioned program code.
在實際應用中,第一受控設備可以運行上傳程式碼,以生成相應的控制指令,第一受控設備可以執行控制指令;如此,由於控制指令是根據程式碼生成的,因而,終端可以通過上述程式碼實現對第一受控設備的控制。In practical applications, the first controlled device can run the uploaded program code to generate corresponding control instructions, and the first controlled device can execute the control instructions; in this way, since the control instructions are generated based on the program code, the terminal can pass The above-mentioned code realizes the control of the first controlled device.
例如,當第一受控設備包括智慧車時,通過運行上述程式碼,可以生成控制指令,該控制指令可以指示智慧車的運動狀態。For example, when the first controlled device includes a smart car, by running the above-mentioned program code, a control command can be generated, and the control command can indicate the motion state of the smart car.
實際應用中,步驟101至步驟102可以基於終端的處理器實現,步驟103可以基於第一受控設備的處理器實現,上述處理器可以為特定用途積體電路(Application Specific Integrated Circuit ,ASIC)、數位訊號處理器(Digital Signal Processor,DSP)、數位信號處理裝置(Digital Signal Processing Device,DSPD)、可程式設計邏輯裝置(Programmable Logic Device,PLD)、現場可程式設計閘陣列(Field Programmable Gate Array ,FPGA)、中央處理器(Central Processing Unit,CPU)、控制器、微控制器、微處理器中的至少一種。可以理解地,對於不同的終端或受控設備,用於實現上述處理器功能的電子器件還可以為其它,本申請實施例不作具體限定。In practical applications, steps 101 to 102 can be implemented based on the processor of the terminal, and step 103 can be implemented based on the processor of the first controlled device. The aforementioned processor can be an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (Field Programmable Gate Array, At least one of FPGA, Central Processing Unit (CPU), controller, microcontroller, and microprocessor. It is understandable that, for different terminals or controlled devices, the electronic devices used to implement the foregoing processor functions may also be other, which is not specifically limited in the embodiment of the present application.
可以看出,採用本申請實施例的技術方案,可以基於本地代理程式獲取程式碼並推送,進而可以基於程式碼來實現對第一受控設備的控制,而程式碼是可以靈活編輯的,如此,可以更加靈活地對第一受控設備進行控制。It can be seen that using the technical solution of the embodiment of the present application, the program code can be obtained and pushed based on the local agent program, and then the control of the first controlled device can be realized based on the program code, and the program code can be flexibly edited. , Can control the first controlled device more flexibly.
在本申請的一些實施例中,第一受控設備運行程式碼生成回饋資訊,然後,可以將上述回饋資訊發送至終端。In some embodiments of the present application, the first controlled device runs the program code to generate feedback information, and then the feedback information can be sent to the terminal.
本申請實施例中,回饋資訊可以用於表示對程式碼運行情況的回饋,例如,回饋資訊可以包括上述程式碼的執行結果。In the embodiment of the present application, the feedback information may be used to indicate the feedback on the running status of the code. For example, the feedback information may include the execution result of the above-mentioned code.
可以看出,通過將回饋資訊發送至終端,可以使終端獲知上述程式碼運行情況,進而便於針對該程式碼進行處理,例如,在程式碼的運行情況不符合預期時,可以修改該程式碼。It can be seen that by sending the feedback information to the terminal, the terminal can be informed of the operation of the above-mentioned program code, which is convenient for processing the program code. For example, when the operation of the program code does not meet expectations, the program code can be modified.
在本申請的一些實施例中,終端在接收到上述第一受控設備發送的回饋資訊後,可以在終端進行載入和/或,在終端的顯示介面顯示回饋資訊。In some embodiments of the present application, after the terminal receives the feedback information sent by the first controlled device, it can load the feedback information on the terminal and/or display the feedback information on the display interface of the terminal.
可以看出,通過對回饋資訊在終端本地的載入和/或顯示,便於使用者直觀地獲知上述程式碼運行情況。It can be seen that by loading and/or displaying the feedback information locally on the terminal, it is convenient for the user to intuitively know the operation of the above-mentioned code.
本申請實施例中,並不對終端載入回饋資訊的實現方式進行限定,在本申請的一些實施例中,終端以同步載入或非同步載入的方式載入回饋資訊。In the embodiments of the present application, the implementation manner of loading the feedback information by the terminal is not limited. In some embodiments of the present application, the terminal loads the feedback information in a synchronous or asynchronous loading manner.
在本申請的一些實施例中,終端可以將回饋資訊在WEB前端進行載入和/或顯示,便於使用者直觀地通過WEB前端獲知上述程式碼運行情況。In some embodiments of the present application, the terminal may load and/or display the feedback information on the WEB front end, so that the user can intuitively know the running status of the above-mentioned code through the WEB front end.
在本申請的一些實施例中,第一受控設備可以通過運行程式碼,生成第二受控設備的控制指令,其中,第一受控設備和所述第二受控設備形成通信連接; 本申請實施例中,可以設置一個第二受控設備,也可以設置多個第二受控設備;第二受控設備可以是樹莓派等電子設備;第二受控設備可以包括感測器、攝影頭等器件;第二受控設備與第一受控設備的種類可以相同,也可以不同。In some embodiments of the present application, the first controlled device may generate a control instruction of the second controlled device by running the program code, wherein the first controlled device and the second controlled device form a communication connection; In the embodiment of this application, one second controlled device or multiple second controlled devices may be set; the second controlled device may be an electronic device such as a Raspberry Pi; the second controlled device may include a sensor , Camera and other devices; the second controlled device and the first controlled device can be of the same type or different.
第一受控設備在生成第二受控設備的控制指令後,可以將第二受控設備的控制指令發送至第二受控設備;第二受控設備可以執行第二受控設備的控制指令,得到指令執行結果。After the first controlled device generates the control instruction of the second controlled device, it can send the control instruction of the second controlled device to the second controlled device; the second controlled device can execute the control instruction of the second controlled device , Get the instruction execution result.
第二受控設備可以將指令執行結果發送至第一受控設備;第一受控設備可以根據指令執行結果,生成第一受控設備的控制指令,執行第一受控設備的控制指令。The second controlled device may send the instruction execution result to the first controlled device; the first controlled device may generate the control instruction of the first controlled device according to the instruction execution result, and execute the control instruction of the first controlled device.
可以看出,本申請實施例針對第一受控設備和第二受控設備,給出了協同控制方案,在本申請的一些實施例中,可以基於上述程式碼實現對第一受控設備和第二受控設備的協同控制。It can be seen that the embodiments of the present application provide a cooperative control scheme for the first controlled device and the second controlled device. In some embodiments of the present application, the first controlled device and the second controlled device can be realized based on the above-mentioned code. Cooperative control of the second controlled device.
在本申請的一些實施例中,第一受控設備和第二受控設備通過有線連接方式進行連接,例如,第一受控設備和第二受控設備通過串口進行連接;如此,可以確保第一受控設備與第二受控設備之間的通信可靠性。In some embodiments of the present application, the first controlled device and the second controlled device are connected through a wired connection, for example, the first controlled device and the second controlled device are connected through a serial port; in this way, the first controlled device can be ensured The reliability of communication between a controlled device and a second controlled device.
在本申請的一些實施例中,第一受控設備還可以獲取工作模式切換資訊;工作模式切換資訊用於指示第一受控設備和第二受控設備將當前工作模式切換為目標工作模式; 這樣,第一受控設備可以根據工作模式切換資訊,控制第一受控設備切換工作模式;第一受控設備還可以將工作模式切換資訊發送至第二受控設備;第二受控設備在接收到工作模式切換資訊後,可以基於工作模式切換資訊切換工作模式。In some embodiments of the present application, the first controlled device may also obtain working mode switching information; the working mode switching information is used to instruct the first controlled device and the second controlled device to switch the current working mode to the target working mode; In this way, the first controlled device can control the first controlled device to switch the working mode according to the working mode switching information; the first controlled device can also send the working mode switching information to the second controlled device; the second controlled device is in After receiving the work mode switching information, the work mode can be switched based on the work mode switching information.
也就是說,本申請實施例中,針對每個受控設備,可以設置多種工作模式,在處於不同的工作模式時,受控設備的工作方式是不同的。可以看出,本申請實施例可以實現第一受控設備和第二受控設備的工作模式的同步切換。That is to say, in the embodiment of the present application, for each controlled device, multiple working modes can be set, and when in different working modes, the working mode of the controlled device is different. It can be seen that the embodiments of the present application can realize synchronous switching of the working modes of the first controlled device and the second controlled device.
在本申請的一些實施例中,第二受控設備的控制指令為圖像檢測指令,指令執行結果為圖像檢測結果;此時,第一受控設備可以根據接收的圖像檢測結果,生成人體跟蹤指令;然後,可以根據人體跟蹤指令,控制第一受控設備的運動狀態,進而實現人體跟蹤。In some embodiments of the present application, the control instruction of the second controlled device is an image detection instruction, and the execution result of the instruction is the image detection result; at this time, the first controlled device may generate the image detection result according to the received image detection result. Human body tracking instruction; then, according to the human body tracking instruction, the movement state of the first controlled device can be controlled to realize human body tracking.
可以看出,在本申請實施例中,可以在對第一受控設備和第二受控設備的協同控制的基礎上,實現人體跟蹤。It can be seen that, in the embodiment of the present application, human body tracking can be realized on the basis of the coordinated control of the first controlled device and the second controlled device.
在本申請的一些實施例中,第一受控設備回應於所述圖像檢測結果表示人體變小的情況,生成用於控制所述第一受控設備前進的控制指令;回應於所述圖像檢測結果表示人體變大的情況,生成用於控制所述第一受控設備保持靜止的控制指令;回應於所述圖像檢測結果表示人體位於所述第一受控設備的左側的情況,生成用於控制所述第一受控設備左轉的控制指令;回應於所述圖像檢測結果表示人體位於所述第一受控設備的右側的情況,生成用於控制所述第一受控設備右轉的控制指令。In some embodiments of the present application, in response to the image detection result indicating that the human body becomes smaller, the first controlled device generates a control instruction for controlling the advancement of the first controlled device; in response to the image The image detection result indicates that the human body has become larger, and a control instruction for controlling the first controlled device to remain still is generated; in response to the image detection result indicating that the human body is located on the left side of the first controlled device, Generate a control instruction for controlling the first controlled device to turn left; in response to the image detection result indicating that the human body is on the right side of the first controlled device, generate a control instruction for controlling the first controlled device Control instructions for turning the device to the right.
可以看出,在本申請實施例中,通過對第一受控設備的運動狀態的控制,可以準確地實現人體跟蹤。It can be seen that, in the embodiment of the present application, human body tracking can be accurately achieved by controlling the motion state of the first controlled device.
下面結合一個應用場景對本申請進行進一步說明。The application will be further explained below in conjunction with an application scenario.
在該應用場景中,第一受控設備可以包括EV3智慧車、電機、相關感測器等器件;EV3智慧車可以通過電機驅動相關感測器運動;第二受控設備可以包括樹莓派、電機、攝影頭等器件;圖2為本申請實施例中EV3智能車與樹莓派的連接關係示意圖,如圖2所示,樹莓派201可以通過通用序列匯流排(Universal Serial Bus,USB)連接方式連接攝影頭202,可以即時採集周圍視頻或圖像資訊;樹莓派201還可以通過電機驅動攝影頭轉動;樹莓派201可以通過串口轉接線連接至EV3智慧車203;EV3智慧車203還可以連接相關感測器204、第一驅動輪205和第二驅動輪206;在一個示例中,相關感測器204可以是觸碰感測器,觸碰感測器被觸碰時產生的觸發信號,可以用於同步修改樹莓派201和EV3智慧車203的功能模式;EV3智慧車203還可以驅動第一驅動輪205和第二驅動輪206進行工作;在本申請的一些實施例中,觸碰感測器可以在被觸碰時,產生觸發信號給直接相連的EV3智慧車203,進而改變EV3智慧車203的功能模式標誌位元,並且將該標誌位元通過串口發送給樹莓派201,進而觸發樹莓派201的功能模式標誌位元的更改,從而實現樹莓派201和EV3智慧車203的功能模式的同步切換。In this application scenario, the first controlled device can include EV3 smart cars, motors, and related sensors; the EV3 smart car can drive related sensors to move through the motors; the second controlled device can include Raspberry Pi, Motors, camera heads and other devices; Figure 2 is a schematic diagram of the connection relationship between the EV3 smart car and the Raspberry Pi in an embodiment of the application. As shown in Figure 2, the
在一個示例中,樹莓派201與EV3智慧車203的連接線對應關係可以如表1所示,從表1中可以看出樹莓派201的介面與連接線顏色的對應關係。
表1樹莓派201與EV3智能車203的連接關係表
終端中可以安裝上述記載的本地代理程式;圖3為本申請實施例中EV3智慧車與終端的連接關係示意圖,如圖3所示,EV3智慧車203可以通過無線連接方式與終端301進行連接,這樣終端301本地代理程式獲取程式碼後,可以將程式碼即時推送至EV3智慧車203,為了實現EV3智慧車203與終端301的無線連接,可以在EV3智慧車203的USB介面外接無線網卡;在本申請的一些實施例中,可以使EV3智慧車203與終端301處於同一網段,如此,可以保證無線網路連接穩定性以及EV3智慧車203與終端301之間的通信可靠性。The above-mentioned local agent program can be installed in the terminal; Figure 3 is a schematic diagram of the connection relationship between the EV3 smart car and the terminal in an embodiment of this application. As shown in Figure 3, the EV3
圖4為本申請實施例的設備控制方法的流程圖二,如圖4所示,該流程可以包括如下。FIG. 4 is a second flowchart of the device control method according to an embodiment of the application. As shown in FIG. 4, the process may include the following.
步驟401:連接EV3智慧車203和樹莓派201,並連接EV3智慧車203和終端301。Step 401: Connect the EV3
本步驟的實現方式已經在前述記載的內容中作出說明,這裡不再贅述。The implementation of this step has been described in the aforementioned content, and will not be repeated here.
步驟402:在終端側,基於本地代理程式實現WEB前端的程式碼收集,並將收集的程式碼推送至EV3智能車203。Step 402: On the terminal side, the program code collection of the WEB front-end is implemented based on the local agent program, and the collected program code is pushed to the EV3
這裡,可以基於本地代理程式收集使用者提交的python代碼,在將python代碼推送至EV3智慧車203後,可以使EV3智慧車203基於python代碼工作,也就是說,可以基於python代碼實現對EV3智慧車203的遠端控制,如此,可以更加靈活多樣地控制EV3智慧車203等受控設備;在教育場景中,可以通過學生不斷試錯及驗證新穎的控制方案,可以培養學生程式設計流程思維。Here, the python code submitted by the user can be collected based on the local agent program. After the python code is pushed to the EV3
為了實現EV3智慧車203和終端301的連接,需要在EV3智慧車203一側開啟使用者資料包通訊協定(User Datagram Protocol,UDP)服務,本地代理程式的實施需要以EV3智慧車203開啟的UDP服務為基礎。In order to realize the connection between the EV3
圖5為本申請實施例中代理程式的功能流程示意圖,參照圖5,該流程可以包括如下。FIG. 5 is a schematic diagram of the functional flow of the agent program in an embodiment of the application. Referring to FIG. 5, the flow may include the following.
步驟A1:通過廣播方式獲取終端301同一網段下的智慧車列表。Step A1: Obtain a list of smart cars in the same network segment of the terminal 301 by broadcasting.
在本申請的一些實施例中,在運行本地代理程式時,終端301可以通過廣播方式在局域網內下發ARP資料包,該局域網內的EV3智慧車203在收到ARP資料包會回復相應的資料包,上述本地代理程式可以對EV3智慧車203回復的資料包進行解析,得到EV3智慧車203的IP地址;當得到多個EV3智慧車203的IP位址,可以生成終端301同一網段下的EV3智慧車列表。In some embodiments of the present application, when running the local agent program, the terminal 301 can issue an ARP data packet in the local area network by broadcasting, and the EV3
步驟A2:選擇EV3智慧車203並建立連接。Step A2: Select the EV3
在本申請的一些實施例中,可以在上述EV3智慧車列表選擇特定的智慧車,然後創建與相應的智慧車的UDP連接。In some embodiments of the present application, a specific smart car can be selected from the above-mentioned EV3 smart car list, and then a UDP connection with the corresponding smart car can be created.
步驟A3:推送程式碼至EV3智慧車203,接收EV3智慧車203的回饋資訊。Step A3: Push the program code to the EV3
在本申請的一些實施例中,在終端側的WEB前端,用戶可以提交程式碼,當使用者點擊提交按鈕後,本地代理程式可以收集使用者提交的程式碼,然後,可以將該程式碼推送至選擇的EV3智能車203中;EV3智慧車203可以運行程式碼,生成回饋資訊,並將該回饋資訊發送至終端301。In some embodiments of this application, at the WEB front end on the terminal side, the user can submit the code. When the user clicks the submit button, the local agent can collect the code submitted by the user, and then can push the code To the selected EV3
步驟A4:通過非同步載入的方式在WEB前端載入回饋資訊。Step A4: Load feedback information on the front end of the WEB through asynchronous loading.
步驟A5:在程式碼執行完畢後,可以斷開終端301與EV3智慧車203的連接,並回收資源。Step A5: After the program code is executed, the connection between the terminal 301 and the EV3
在本申請的一些實施例中,在接收或載入回饋資訊後,可以認為程式碼執行完畢,此時,通過斷開終端301與EV3智慧車203的連接,可以釋放終端301與EV3智慧車203之間的網路傳輸資源,在終端301一側,也可以釋放相應的硬體資源和/或軟體資源(例如,WEB前端資源)。In some embodiments of the present application, after receiving or loading the feedback information, the program code can be considered to be executed. At this time, by disconnecting the terminal 301 and the EV3
步驟403:EV3智慧車203接收並運行程式碼,將圖像檢測指令推送至樹莓派201。Step 403: The EV3
在本申請的一些實施例中,EV3智慧車203啟動對應的UDP服務,該服務可以持續監聽固定埠的資訊,本地代理程式將程式碼推送到該EV3智慧車203以後,EV3智慧車203可以運行接收到的程式碼(可以封裝在資料包中),得到控制指令;如果控制指令中涉及到影像處理任務,則可以生成圖像檢測指令,啟動對應的服務模式,將圖像檢測指令推送至樹莓派201,以指示樹莓派201執行圖像檢測任務,如此,可以從樹莓派201獲取圖像檢測結果。In some embodiments of this application, the EV3
在本申請的一些實施例中,EV3智慧車203和樹莓派201可以具有多種工作模式,下面通過表2示例性地說明EV3智慧車203和樹莓派201的幾種工作模式。
表2 EV3智慧車203和樹莓派201的工作模式表
步驟404:樹莓派201執行圖像檢測指令,並將圖像檢測結果(也稱為影像處理結果)傳輸至EV3智慧車203,EV3智慧車203根據圖像檢測結果執行相應的控制指令。Step 404: The
在本申請的一些實施例中,圖像檢測指令可以封裝在資料包中發送,樹莓派201接收來自EV3智慧車203的資料包,通過解析得出自身的工作模式,然後執行對應的圖像檢測任務,並將圖像檢測結果發送至EV3智慧車203。在同一工作模式下,EV3智慧車203和樹莓派201協同執行特定任務。In some embodiments of the present application, the image detection command can be encapsulated in a data packet and sent. The
圖6為本申請實施例中人體跟蹤模式下EV3智慧車203和樹莓派201的處理流程示意圖,如圖6所示,可以從影像處理階段,檢測資料處理階段和指令執行階段說明EV3智慧車203和樹莓派201的處理流程;在影像處理階段可以通過EV3智慧車203推送圖像檢測指令觸發,首先,利用攝影頭202採集圖片,然後,針對採集的圖像基於深度學習技術實現人體檢測,得到人體座標;資料處理階段主要實現人體ID識別和位置座標處理;資料處理的結果被發送至EV3智慧車203,EV3智慧車203可以根據圖6所示的邏輯控制電機運轉,通過這種方式就可以實現基礎的人體跟蹤功能;參照圖6,當確定人體變小時,通過電機驅動EV3智慧車203前進;當確定人體變大時,通過電機驅動方式控制EV3智慧車203靜止;當確定人體位於左側時,通過電機驅動EV3智慧車203左轉;當確定人體位於右側時,通過電機驅動EV3智慧車203右轉。Fig. 6 is a schematic diagram of the processing flow of the EV3
步驟405:EV3智慧車203收集回饋資訊,並將回饋資訊發送至終端301。Step 405: The EV3
這裡,基於步驟401至步驟405,已經實現基於WEB前端對EV3智慧車203的遠端控制,但是還需要配合設計一套完善的回饋流程,以保證雙向資訊流的完整性。Here, based on
圖7為本申請實施例中針對回饋資訊的處理流程示意圖,如圖7所示,在EV3智能車203一側(圖7中記為EV3側),當接收到python代碼後,可以基於自身的python解譯器,完成原始代碼和位元組碼的轉換,之後再轉換成機器碼,以便於執行指令。程式碼的執行結果可以重定向到文字檔中,在EV3側啟動UDP通信模組時,基於UDP通信模組可以建立EV3智慧車203與終端301之間的通信連接;UDP通信模組可以即時檢測上述文字檔是否被更新,在文本資訊被更新後,會讀取其中內容(即回饋資訊);然後通過建立的通信連接將讀取的回饋資訊主動推送到終端301的本地代理程式中;本地代理程式基於JAVA框架,可以採用非同步載入方式將回饋資訊載入到WEB前端,WEB前端經過一系列渲染後在指定的區域部分回饋資訊。Figure 7 is a schematic diagram of the processing flow for feedback information in an embodiment of this application. The python interpreter completes the conversion of the original code and the byte code, and then converts it into machine code to facilitate the execution of instructions. The execution result of the program code can be redirected to a text file. When the UDP communication module is started on the EV3 side, the communication connection between the EV3
可以看出,本申請實施例中,提出了一種完整的基於EV3智慧車203的遠端控制方案,可通過WEB端完成程式碼輸入,然後即時傳輸到下位機(即EV3智慧車),並實現下位機回復回饋資訊;進一步地,通過本地代理程式,可以支援完成對WEB前端python代碼收集,並基於UDP連接推送到下位機側執行程式碼;通過本地代理程式,可以實現終端301和EV3智慧車203的資訊交互,傳輸高效且可靠;進一步地,設計了終端、EV3智慧車203、樹莓派201以及相關外設之間的連接方案,可以保證連接高效可行性,同時相容大多數嵌入式開發設備。It can be seen that in the embodiment of this application, a complete remote control solution based on EV3
在相關技術中,通常是針對EV3智慧車和樹莓派進行獨立控制,未給出EV3智慧車和樹莓派的協同控制方案;並且,針對實現對EV3智慧車或樹莓派的單一工作模式控制,不能針對EV3智慧車或樹莓派,實現不同工作模式的切換。In related technologies, it is usually for independent control of EV3 smart cars and Raspberry Pi, and no collaborative control scheme for EV3 smart cars and Raspberry Pi is given; and, for the realization of a single working mode control for EV3 smart cars or Raspberry Pi, It is not possible to switch between different working modes for EV3 smart cars or Raspberry Pi.
而在本申請實施例中,針對EV3智慧車和樹莓派的連接、以及EV3智慧車和樹莓派的控制,給出了一種完整的實現方案;並且,可以針對EV3智慧車和樹莓派,實現不同工作模式的同步切換機制,可以保證不同工作模式下資訊交互一致性。In the embodiment of this application, a complete implementation scheme is given for the connection between the EV3 smart car and the Raspberry Pi, as well as the control of the EV3 smart car and the Raspberry Pi; moreover, different implementations can be achieved for the EV3 smart car and the Raspberry Pi. The synchronous switching mechanism of working modes can ensure the consistency of information interaction in different working modes.
基於前述實施例記載的內容,下面從終端的角度,來說明本申請實施例的一種設備控制方法。Based on the content recorded in the foregoing embodiment, the following describes a device control method according to an embodiment of the present application from the perspective of a terminal.
圖8為本申請實施例的設備控制方法的流程圖三,如圖8所示,該流程可以包括如下。FIG. 8 is the third flow chart of the device control method according to the embodiment of the application. As shown in FIG. 8, the flow may include the following.
步驟801:通過本地代理程式獲取用於控制第一受控設備工作的程式碼; 本申請實施例中,第一受控設備可以是智慧車、嵌入式開發設備等電子設備;第一受控設備可以包括感測器、攝影頭等器件,終端可以提供人機交互介面。本申請實施例中,第一受控設備可以是一個單獨的電子設備,也可以集成多個電子設備。Step 801: Obtain the program code for controlling the operation of the first controlled device through the local agent program; In the embodiment of the present application, the first controlled device may be an electronic device such as a smart car or an embedded development device; the first controlled device may include a sensor, a camera, and other devices, and the terminal may provide a human-computer interaction interface. In the embodiment of the present application, the first controlled device may be a single electronic device, or may integrate multiple electronic devices.
在實際應用中,可以在終端中安裝本地代理程式,本地代理程式至少用於收集使用者提交的程式碼,這裡,用戶提交的程式碼可以是用於控制第一受控設備工作的程式碼,如此,通過運行本地代理程式,可以收集到用於控制第一受控設備工作的程式碼。In practical applications, a local agent can be installed in the terminal. The local agent is at least used to collect the code submitted by the user. Here, the code submitted by the user can be the code used to control the operation of the first controlled device. In this way, by running the local agent program, the code used to control the operation of the first controlled device can be collected.
本申請實施例中,並不對上述程式碼的種類進行限定,上述程式碼的種類可以根據實際應用需求預先確定,例如,上述程式碼可以是python代碼或其他程式碼。In the embodiments of the present application, the type of the above-mentioned program code is not limited, and the type of the above-mentioned program code can be predetermined according to actual application requirements. For example, the above-mentioned program code may be python code or other program codes.
步驟802:通過所述本地代理程式將所述程式碼發送至所述第一受控設備,使所述第一受控設備運行所述程式碼。Step 802: Send the program code to the first controlled device through the local agent program, so that the first controlled device runs the program code.
在實際應用中,可以預先建立終端與第一受控設備的通信連接,本申請實施例中並不對終端與第一受控設備的通信連接的連接方式進行限定,例如,終端與第一受控設備可以通過有線連接方式或各種無線連接方式進行資料交互。In practical applications, a communication connection between the terminal and the first controlled device can be established in advance. The embodiment of this application does not limit the connection mode of the communication connection between the terminal and the first controlled device. For example, the terminal and the first controlled device are connected. The equipment can conduct data interaction through wired connection or various wireless connection methods.
在實際應用中,第一受控設備可以運行上傳程式碼,以生成相應的控制指令,第一受控設備可以執行控制指令;如此,由於控制指令是根據程式碼生成的,因而,終端可以通過上述程式碼實現對第一受控設備的控制。In practical applications, the first controlled device can run the uploaded program code to generate corresponding control instructions, and the first controlled device can execute the control instructions; in this way, since the control instructions are generated based on the program code, the terminal can pass The above-mentioned code realizes the control of the first controlled device.
實際應用中,步驟801至步驟802可以基於終端的處理器實現,上述處理器可以為ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微處理器中的至少一種。可以理解地,對於不同的終端或受控設備,用於實現上述處理器功能的電子器件還可以為其它,本申請實施例不作具體限定。In practical applications, step 801 to step 802 can be implemented based on the processor of the terminal, and the aforementioned processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It is understandable that, for different terminals or controlled devices, the electronic devices used to implement the foregoing processor functions may also be other, which is not specifically limited in the embodiment of the present application.
可以看出,採用本申請實施例的技術方案,可以基於本地代理程式獲取程式碼並推送,進而可以基於程式碼來實現對第一受控設備的控制,而程式碼是可以靈活編輯的,如此,可以更加靈活地對第一受控設備進行控制。It can be seen that using the technical solution of the embodiment of the present application, the program code can be obtained and pushed based on the local agent program, and then the control of the first controlled device can be realized based on the program code, and the program code can be flexibly edited. , Can control the first controlled device more flexibly.
在本申請的一些實施例中,所述方法還包括: 在將所述程式碼發送至所述第一受控設備後,接收所述第一受控設備的回饋資訊,所述回饋資訊由所述第一受控設備運行所述程式碼後生成。In some embodiments of the present application, the method further includes: After the program code is sent to the first controlled device, the feedback information of the first controlled device is received, and the feedback information is generated by the first controlled device after running the program code.
在本申請的一些實施例中,所述回饋資訊包括所述程式碼的執行結果。In some embodiments of the present application, the feedback information includes the execution result of the program code.
可以看出,通過將回饋資訊發送至控制設備,可以使終端獲知上述程式碼運行情況,進而便於針對該程式碼進行處理,例如,在程式碼的運行情況不符合預期時,可以修改該程式碼。It can be seen that by sending the feedback information to the control device, the terminal can be informed of the operation of the above-mentioned code, so that the code can be processed easily. For example, when the operation of the code does not meet expectations, the code can be modified .
在本申請的一些實施例中,所述方法還包括: 在接收所述第一受控設備的回饋資訊後,將所述回饋資訊在所述本地代理程式所在的終端進行載入和/或顯示。In some embodiments of the present application, the method further includes: After receiving the feedback information of the first controlled device, the feedback information is loaded and/or displayed on the terminal where the local agent program is located.
可以看出,通過對回饋資訊在終端本地的載入和/或顯示,便於使用者直觀地獲知上述程式碼運行情況。It can be seen that by loading and/or displaying the feedback information locally on the terminal, it is convenient for the user to intuitively know the operation of the above-mentioned code.
在本申請的一些實施例中,所述通過本地代理程式獲取用於控制受控設備工作的程式碼,包括: 通過所述本地代理程式獲取使用者基於WEB頁面提交的所述程式碼。In some embodiments of the present application, the obtaining the program code for controlling the operation of the controlled device through the local agent program includes: The program code submitted by the user based on the WEB page is obtained through the local agent program.
可以看出,使用者可以基於WEB頁面,較為方便地提交程式碼,進而,有利於本地代理程式收集到使用者提交的程式碼。It can be seen that the user can submit the code more conveniently based on the WEB page, which in turn facilitates the local agent program to collect the code submitted by the user.
基於前述實施例記載的內容,下面從第一受控設備的角度,來說明本申請實施例的另一種設備控制方法。Based on the content recorded in the foregoing embodiment, the following describes another device control method of the embodiment of the present application from the perspective of the first controlled device.
圖9為本申請實施例的設備控制方法的流程圖四,如圖9所示,該流程可以包括如下。FIG. 9 is a fourth flowchart of the device control method according to an embodiment of the application. As shown in FIG. 9, the process may include the following.
步驟901:接收終端通過本地代理程式發送的用於控制所述第一受控設備工作的程式碼;所述程式碼是由所述本地代理程式收集的。Step 901: A program code for controlling the operation of the first controlled device sent by a terminal through a local agent program is received; the program code is collected by the local agent program.
本申請實施例中,第一受控設備可以是智慧車、嵌入式開發設備等電子設備;第一受控設備可以包括感測器、攝影頭等器件,終端可以提供人機交互介面。本申請實施例中,第一受控設備可以是一個單獨的電子設備,也可以集成多個電子設備。In the embodiment of the present application, the first controlled device may be an electronic device such as a smart car or an embedded development device; the first controlled device may include a sensor, a camera, and other devices, and the terminal may provide a human-computer interaction interface. In the embodiment of the present application, the first controlled device may be a single electronic device, or may integrate multiple electronic devices.
在實際應用中,可以在終端中安裝本地代理程式,本地代理程式至少用於收集使用者提交的程式碼,這裡,用戶提交的程式碼可以是用於控制第一受控設備工作的程式碼,如此,通過運行本地代理程式,可以收集到用於控制第一受控設備工作的程式碼。In practical applications, a local agent can be installed in the terminal. The local agent is at least used to collect the code submitted by the user. Here, the code submitted by the user can be the code used to control the operation of the first controlled device. In this way, by running the local agent program, the code used to control the operation of the first controlled device can be collected.
本申請實施例中,並不對上述程式碼的種類進行限定,上述程式碼的種類可以根據實際應用需求預先確定,例如,上述程式碼可以是python代碼或其他程式碼。In the embodiments of the present application, the type of the above-mentioned program code is not limited, and the type of the above-mentioned program code can be predetermined according to actual application requirements. For example, the above-mentioned program code may be python code or other program codes.
在實際應用中,可以預先建立終端與第一受控設備的通信連接,本申請實施例中並不對終端與第一受控設備的通信連接的連接方式進行限定,例如,終端與第一受控設備可以通過有線連接方式或各種無線連接方式進行資料交互。In practical applications, a communication connection between the terminal and the first controlled device can be established in advance. The embodiment of this application does not limit the connection mode of the communication connection between the terminal and the first controlled device. For example, the terminal and the first controlled device are connected. The equipment can conduct data interaction through wired connection or various wireless connection methods.
步驟902:運行所述程式碼。Step 902: Run the program code.
在實際應用中,第一受控設備可以運行上傳程式碼,以生成相應的控制指令,第一受控設備可以執行控制指令;如此,由於控制指令是根據程式碼生成的,因而,終端可以通過上述程式碼實現對第一受控設備的控制。In practical applications, the first controlled device can run the uploaded program code to generate corresponding control instructions, and the first controlled device can execute the control instructions; in this way, since the control instructions are generated based on the program code, the terminal can pass The above-mentioned code realizes the control of the first controlled device.
可以看出,採用本申請實施例的技術方案,可以基於本地代理程式獲取程式碼並推送,進而可以基於程式碼來實現對第一受控設備的控制,而程式碼是可以靈活編輯的,如此,可以更加靈活地對第一受控設備進行控制。It can be seen that using the technical solution of the embodiment of the present application, the program code can be obtained and pushed based on the local agent program, and then the control of the first controlled device can be realized based on the program code, and the program code can be flexibly edited. , Can control the first controlled device more flexibly.
在本申請的一些實施例中,所述方法還包括: 運行所述程式碼生成回饋資訊,並將所述回饋資訊發送至所述終端。In some embodiments of the present application, the method further includes: Run the program code to generate feedback information, and send the feedback information to the terminal.
在本申請的一些實施例中,所述回饋資訊包括所述程式碼的執行結果。In some embodiments of the present application, the feedback information includes the execution result of the program code.
可以看出,通過將回饋資訊發送至控制設備,可以使終端獲知上述程式碼運行情況,進而便於針對該程式碼進行處理,例如,在程式碼的運行情況不符合預期時,可以修改該程式碼。It can be seen that by sending the feedback information to the control device, the terminal can be informed of the operation of the above-mentioned code, so that the code can be processed easily. For example, when the operation of the code does not meet expectations, the code can be modified .
在本申請的一些實施例中,所述方法還包括: 通過運行所述程式碼,生成第二受控設備的控制指令,其中,所述第一受控設備和所述第二受控設備形成通信連接; 將所述第二受控設備的控制指令發送至第二受控設備,使所述第二受控設備執行所述第二受控設備的控制指令; 接收所述第二受控設備發送的指令執行結果,根據所述指令執行結果,生成所述第一受控設備的控制指令,執行所述第一受控設備的控制指令;其中,所述指令執行結果是所述第二受控設備在執行所述第二受控設備的控制指令後得到的。In some embodiments of the present application, the method further includes: By running the program code, a control instruction of the second controlled device is generated, wherein the first controlled device and the second controlled device form a communication connection; Sending the control instruction of the second controlled device to the second controlled device, so that the second controlled device executes the control instruction of the second controlled device; Receive the instruction execution result sent by the second controlled device, generate the control instruction of the first controlled device according to the instruction execution result, and execute the control instruction of the first controlled device; wherein, the instruction The execution result is obtained by the second controlled device after executing the control instruction of the second controlled device.
可以看出,本申請實施例針對第一受控設備和第二受控設備,給出了協同控制方案,在本申請的一些實施例中,可以基於上述程式碼實現對第一受控設備和第二受控設備的協同控制。It can be seen that the embodiments of the present application provide a cooperative control scheme for the first controlled device and the second controlled device. In some embodiments of the present application, the first controlled device and the second controlled device can be realized based on the above-mentioned code. Cooperative control of the second controlled device.
在本申請的一些實施例中,所述方法還包括: 獲取工作模式切換資訊;所述工作模式切換資訊用於指示所述第一受控設備和所述第二受控設備將當前工作模式切換為目標工作模式; 根據所述工作模式切換資訊,控制所述第一受控設備切換工作模式;將所述工作模式切換資訊發送至第二受控設備,使所述第二受控設備基於所述工作模式切換資訊切換工作模式。In some embodiments of the present application, the method further includes: Acquiring work mode switching information; the work mode switching information is used to instruct the first controlled device and the second controlled device to switch the current working mode to the target working mode; According to the work mode switching information, control the first controlled device to switch the work mode; send the work mode switch information to the second controlled device so that the second controlled device is based on the work mode switch information Switch working mode.
也就是說,本申請實施例中,針對每個受控設備,可以設置多種工作模式,在處於不同的工作模式時,受控設備的工作方式是不同的。可以看出,本申請實施例可以實現第一受控設備和第二受控設備的工作模式的同步切換。That is to say, in the embodiment of the present application, for each controlled device, multiple working modes can be set, and when in different working modes, the working mode of the controlled device is different. It can be seen that the embodiments of the present application can realize synchronous switching of the working modes of the first controlled device and the second controlled device.
在本申請的一些實施例中,所述第二受控設備的控制指令為圖像檢測指令,所述指令執行結果為圖像檢測結果; 所述根據所述指令執行結果,生成所述第一受控設備的控制指令,執行所述第一受控設備的控制指令,包括: 根據所述圖像檢測結果,生成所述第一受控設備的控制指令,所述第一受控設備的控制指令為人體跟蹤指令; 根據所述人體跟蹤指令,控制所述第一受控設備的運動狀態。In some embodiments of the present application, the control instruction of the second controlled device is an image detection instruction, and the execution result of the instruction is an image detection result; The generating the control instruction of the first controlled device according to the instruction execution result, and executing the control instruction of the first controlled device includes: Generating a control instruction of the first controlled device according to the image detection result, and the control instruction of the first controlled device is a human tracking instruction; According to the human body tracking instruction, the movement state of the first controlled device is controlled.
可以看出,在本申請實施例中,可以在對第一受控設備和第二受控設備的協同控制的基礎上,實現人體跟蹤。It can be seen that, in the embodiment of the present application, human body tracking can be realized on the basis of the coordinated control of the first controlled device and the second controlled device.
在本申請的一些實施例中,所述根據所述圖像檢測結果,生成所述第一受控設備的控制指令,包括: 回應於所述圖像檢測結果表示人體變小的情況,生成用於控制所述第一受控設備前進的控制指令; 回應於所述圖像檢測結果表示人體變大的情況,生成用於控制所述第一受控設備保持靜止的控制指令; 回應於所述圖像檢測結果表示人體位於所述第一受控設備的左側的情況,生成用於控制所述第一受控設備左轉的控制指令; 回應於所述圖像檢測結果表示人體位於所述第一受控設備的右側的情況,生成用於控制所述第一受控設備右轉的控制指令。In some embodiments of the present application, the generating a control instruction of the first controlled device according to the image detection result includes: In response to the image detection result indicating that the human body has become smaller, generating a control instruction for controlling the advancement of the first controlled device; In response to the image detection result indicating that the human body becomes larger, generating a control instruction for controlling the first controlled device to remain stationary; In response to the image detection result indicating that the human body is located on the left side of the first controlled device, generating a control instruction for controlling the first controlled device to turn left; In response to the image detection result indicating that the human body is located on the right side of the first controlled device, a control instruction for controlling the first controlled device to turn right is generated.
可以看出,在本申請實施例中,通過對第一受控設備的運動狀態的控制,可以準確地實現人體跟蹤。It can be seen that, in the embodiment of the present application, human body tracking can be accurately achieved by controlling the motion state of the first controlled device.
在本申請的一些實施例中,所述第一受控設備和所述第二受控設備通過有線連接方式進行連接;如此,可以確保第一受控設備與第二受控設備之間的通信可靠性。In some embodiments of the present application, the first controlled device and the second controlled device are connected by a wired connection; in this way, the communication between the first controlled device and the second controlled device can be ensured reliability.
本領域技術人員可以理解,在具體實施方式的上述方法中,各步驟的撰寫順序並不意味著嚴格的執行順序而對實施過程構成任何限定,各步驟的具體執行順序應當以其功能和可能的內在邏輯確定。Those skilled in the art can understand that in the above-mentioned methods of the specific implementation, the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possibility. The inner logic is determined.
在前述實施例提出的設備控制方法的基礎上,本申請實施例提出了一種終端。On the basis of the device control method proposed in the foregoing embodiment, the embodiment of the present application proposes a terminal.
圖10為本申請實施例的一種終端的組成結構示意圖,如圖10所示,該設備包括獲取模組1001和第一處理模組1002,其中,
獲取模組1001,配置為通過本地代理程式獲取用於控制第一受控設備工作的程式碼;
第一處理模組1002,配置為通過本地代理程式將程式碼發送至所述第一受控設備,使第一受控設備運行程式碼。FIG. 10 is a schematic diagram of the composition structure of a terminal according to an embodiment of the application. As shown in FIG. 10, the device includes an
在一實施方式中,所述第一處理模組1002,還配置為在將所述程式碼發送至所述第一受控設備後,接收所述第一受控設備的回饋資訊,所述回饋資訊由所述第一受控設備運行所述程式碼後生成。In one embodiment, the
在一實施方式中,所述第一處理模組1002,還配置為在在接收所述第一受控設備的回饋資訊後,將所述回饋資訊在所述本地代理程式所在的終端進行載入和/或顯示。In one embodiment, the
在一實施方式中,所述回饋資訊包括所述程式碼的執行結果。In one embodiment, the feedback information includes the execution result of the program code.
在一實施方式中,所述獲取模組1001,配置為通過所述本地代理程式獲取使用者基於WEB頁面提交的所述程式碼。In one embodiment, the obtaining
上述獲取模組1001和第一處理模組1002均可由位於終端中的處理器實現,上述處理器為ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微處理器中的至少一種。Both the
另外,在本申請實施例中的各功能模組可以集成在一個處理單元中,也可以是各個單元單獨物理存在,也可以兩個或兩個以上單元集成在一個單元中。上述集成的單元既可以採用硬體的形式實現,也可以採用軟體功能模組的形式實現。In addition, the functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be realized either in the form of hardware or in the form of software functional modules.
所述集成的單元如果以軟體功能模組的形式實現並非作為獨立的產品進行銷售或使用時,可以儲存在一個電腦可讀取儲存介質中,基於這樣的理解,本申請實施例的技術方案本質上或者說對現有技術做出貢獻的部分或者該技術方案的全部或部分可以以軟體產品的形式體現出來,該電腦軟體產品儲存在一個儲存介質中,包括若干指令用以使得一台電腦設備(可以是個人電腦,伺服器,或者網路設備等)或processor(處理器)執行本申請實施例所述方法的全部或部分步驟。而前述的儲存介質包括:U盤、移動硬碟、唯讀記憶體(Read Only Memory ,ROM)、隨機存取記憶體(Random Access Memory,RAM)、磁碟或者光碟等各種可以儲存程式碼的介質。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the essence of the technical solution of the embodiment of the application is The above or the part that contributes to the existing technology or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions to make a computer device ( It may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage media include: U disk, removable hard disk, read-only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other various types of programs that can store code medium.
具體來講,本申請實施例中的一種設備控制方法對應的電腦程式指令可以被儲存在光碟,硬碟,U盤等儲存介質上,當儲存介質中的與一種設備控制方法對應的電腦程式指令被一終端讀取或被執行時,實現前述實施例中應用於終端的任意一種設備控制方法。Specifically, the computer program instructions corresponding to a device control method in the embodiments of the present application can be stored on storage media such as optical disks, hard disks, and USB flash drives. When the storage medium contains computer program instructions corresponding to a device control method When read or executed by a terminal, any device control method applied to the terminal in the foregoing embodiments is implemented.
基於前述實施例相同的技術構思,參見圖11,其示出了本申請實施例提供的另一種終端,可以包括:第一記憶體1101和第一處理器1102;其中,
所述第一記憶體1101,配置為儲存電腦程式和資料;
所述第一處理器1102,配置為執行所述第一記憶體中儲存的電腦程式,以實現前述實施例中應用於終端的任意一種設備控制方法。Based on the same technical concept of the foregoing embodiment, refer to FIG. 11, which shows another terminal provided by an embodiment of the present application, which may include: a
在實際應用中,上述第一記憶體1101可以是易失性記憶體(volatile memory),例如RAM;或者非易失性記憶體(non-volatile memory),例如ROM,快閃記憶體(flash memory),硬碟(Hard Disk Drive,HDD)或固態硬碟(Solid-State Drive,SSD);或者上述種類的記憶體的組合,並向第一處理器1102提供指令和資料。In practical applications, the above-mentioned
上述第一處理器1102可以為ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微處理器中的至少一種。可以理解地,對於不同的設備,用於實現上述處理器功能的電子器件還可以為其它,本申請實施例不作具體限定。The above-mentioned
在前述實施例提出的另一種設備控制方法的基礎上,本申請實施例提出了一種受控設備。On the basis of another device control method proposed in the foregoing embodiment, an embodiment of the present application proposes a controlled device.
圖12為本申請實施例的一種第一受控設備的組成結構示意圖,如圖12所示,所述設備包括接收模組1201和第二處理模組1202,其中,
接收模組1201,配置為接收終端通過本地代理程式發送的用於控制所述第一受控設備工作的程式碼;所述程式碼是由所述本地代理程式收集的;
第二處理模組1202,配置為運行所述程式碼。FIG. 12 is a schematic diagram of the composition structure of a first controlled device according to an embodiment of the application. As shown in FIG. 12, the device includes a
在一實施方式中,所述第二處理模組1202,還配置為運行所述程式碼生成回饋資訊,並將所述回饋資訊發送至所述終端。In one embodiment, the
在一實施方式中,所述回饋資訊包括所述程式碼的執行結果。In one embodiment, the feedback information includes the execution result of the program code.
在一實施方式中,所述第二處理模組1202,還配置為:
通過運行所述程式碼,生成第二受控設備的控制指令,其中,所述第一受控設備和所述第二受控設備形成通信連接;
將所述第二受控設備的控制指令發送至第二受控設備,使所述第二受控設備執行所述第二受控設備的控制指令;
接收所述第二受控設備發送的指令執行結果,根據所述指令執行結果,生成所述第一受控設備的控制指令,執行所述第一受控設備的控制指令;其中,所述指令執行結果是所述第二受控設備在執行所述第二受控設備的控制指令後得到的。In one embodiment, the
在一實施方式中,所述第二處理模組1202,還配置為獲取工作模式切換資訊;根據所述工作模式切換資訊,控制所述第一受控設備切換工作模式;將所述工作模式切換資訊發送至第二受控設備,使所述第二受控設備基於所述工作模式切換資訊切換工作模式;所述工作模式切換資訊用於指示所述第一受控設備和所述第二受控設備將當前工作模式切換為目標工作模式。In one embodiment, the
在一實施方式中,所述第二受控設備的控制指令為圖像檢測指令,所述指令執行結果為圖像檢測結果;
所述第二處理模組1202,配置為根據所述圖像檢測結果,生成所述第一受控設備的控制指令,所述第一受控設備的控制指令為人體跟蹤指令;根據所述人體跟蹤指令,控制所述第一受控設備的運動狀態。In one embodiment, the control instruction of the second controlled device is an image detection instruction, and the execution result of the instruction is an image detection result;
The
在一實施方式中,所述第二處理模組1202,配置為回應於所述圖像檢測結果表示人體變小的情況,生成用於控制所述第一受控設備前進的控制指令;回應於所述圖像檢測結果表示人體變大的情況,生成用於控制所述第一受控設備保持靜止的控制指令;回應於所述圖像檢測結果表示人體位於所述第一受控設備的左側的情況,生成用於控制所述第一受控設備左轉的控制指令;回應於所述圖像檢測結果表示人體位於所述第一受控設備的右側的情況,生成用於控制所述第一受控設備右轉的控制指令。In one embodiment, the
在一實施方式中,所述第一受控設備和所述第二受控設備通過有線連接方式進行連接。In an embodiment, the first controlled device and the second controlled device are connected through a wired connection.
上述接收模組1201和第二處理模組1202均可由位於第一受控設備中的處理器實現,上述處理器為ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微處理器中的至少一種。Both the
另外,在本申請實施例中的各功能模組可以集成在一個處理單元中,也可以是各個單元單獨物理存在,也可以兩個或兩個以上單元集成在一個單元中。上述集成的單元既可以採用硬體的形式實現,也可以採用軟體功能模組的形式實現。In addition, the functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be realized either in the form of hardware or in the form of software functional modules.
所述集成的單元如果以軟體功能模組的形式實現並非作為獨立的產品進行銷售或使用時,可以儲存在一個電腦可讀取儲存介質中,基於這樣的理解,本申請實施例的技術方案本質上或者說對現有技術做出貢獻的部分或者該技術方案的全部或部分可以以軟體產品的形式體現出來,該電腦軟體產品儲存在一個儲存介質中,包括若干指令用以使得一台電腦設備(可以是個人電腦,伺服器,或者網路設備等)或processor(處理器)執行本申請實施例所述方法的全部或部分步驟。而前述的儲存介質包括:U盤、移動硬碟、唯讀記憶體(Read Only Memory ,ROM)、隨機存取記憶體(Random Access Memory,RAM)、磁碟或者光碟等各種可以儲存程式碼的介質。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the essence of the technical solution of the embodiment of the application is The above or the part that contributes to the existing technology or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions to make a computer device ( It may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage media include: U disk, removable hard disk, read-only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other various types of programs that can store code medium.
具體來講,本申請實施例中的另一種設備控制方法對應的電腦程式指令可以被儲存在光碟,硬碟,U盤等儲存介質上,當儲存介質中的與另一種設備控制方法對應的電腦程式指令被一電子設備讀取或被執行時,實現前述實施例中應用於第一受控設備的任意一種設備控制方法。Specifically, the computer program instructions corresponding to another device control method in this embodiment of the present application can be stored on storage media such as optical disks, hard disks, and U disks. When the storage medium contains a computer corresponding to another device control method When the program instructions are read or executed by an electronic device, any device control method applied to the first controlled device in the foregoing embodiments is implemented.
基於前述實施例相同的技術構思,參見圖13,其示出了本申請實施例提供的一種電子設備,可以包括:第二記憶體1301和第二處理器1302;其中,
所述第二記憶體1301,配置為儲存電腦程式和資料;
所述第二處理器1302,配置為執行所述第二記憶體中儲存的電腦程式,以實現前述實施例中應用於第一受控設備的任意一種設備控制方法。Based on the same technical concept of the foregoing embodiment, refer to FIG. 13, which shows an electronic device provided by an embodiment of the present application, which may include: a
在實際應用中,上述第二記憶體1301可以是易失性記憶體,例如RAM;或者非易失性記憶體,例如ROM,快閃記憶體, HDD或SSD;或者上述種類的記憶體的組合,並向第二處理器1302提供指令和資料。In practical applications, the above-mentioned
上述第二處理器1302可以為ASIC、DSP、DSPD、PLD、FPGA、CPU、控制器、微控制器、微處理器中的至少一種。可以理解地,對於不同的電子設備,用於實現上述處理器功能的電子器件還可以為其它,本申請實施例不作具體限定。The aforementioned
在一些實施例中,本申請實施例提供的裝置具有的功能或包含的模組可以用於執行上文方法實施例描述的方法,其具體實現可以參照上文方法實施例的描述,為了簡潔,這裡不再贅述。In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the methods described in the above method embodiments. For specific implementation, refer to the description of the above method embodiments. For brevity, I won't repeat it here.
上文對各個實施例的描述傾向於強調各個實施例之間的不同之處,其相同或相似之處可以互相參考,為了簡潔,本文不再贅述。The above description of the various embodiments tends to emphasize the differences between the various embodiments, and the same or similarities can be referred to each other. For the sake of brevity, the details are not repeated herein.
本申請所提供的各方法實施例中所揭露的方法,在不衝突的情況下可以任意組合,得到新的方法實施例。The methods disclosed in the method embodiments provided in this application can be combined arbitrarily without conflict to obtain new method embodiments.
本申請所提供的各產品實施例中所揭露的特徵,在不衝突的情況下可以任意組合,得到新的產品實施例。The features disclosed in the product embodiments provided in this application can be combined arbitrarily without conflict to obtain new product embodiments.
本申請所提供的各方法或設備實施例中所揭露的特徵,在不衝突的情況下可以任意組合,得到新的方法實施例或設備實施例。The features disclosed in each method or device embodiment provided in this application can be combined arbitrarily without conflict to obtain a new method embodiment or device embodiment.
通過以上的實施方式的描述,本領域的技術人員可以清楚地瞭解到上述實施例方法可借助軟體加必需的通用硬體平臺的方式來實現,當然也可以通過硬體,但很多情況下前者是更佳的實施方式。基於這樣的理解,本申請的技術方案本質上或者說對現有技術做出貢獻的部分可以以軟體產品的形式體現出來,該電腦軟體產品儲存在一個儲存介質(如ROM/RAM、磁碟、光碟)中,包括若干指令用以使得一台終端(可以是手機,電腦,伺服器,空調器,或者網路設備等)執行本申請各個實施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be achieved by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) ) Includes several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.
上面結合附圖對本申請的實施例進行了描述,但是本申請並不局限於上述的具體實施方式,上述的具體實施方式僅僅是示意性的,而不是限制性的,本領域的普通技術人員在本申請的啟示下,在不脫離本申請宗旨和申請專利範圍所保護的範圍情況下,還可做出很多形式,這些均屬於本申請的保護之內。The embodiments of the application are described above with reference to the accompanying drawings, but the application is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are only illustrative and not restrictive. Those of ordinary skill in the art are Under the enlightenment of this application, many forms can be made without departing from the purpose of this application and the protection scope of the patent application, and these are all within the protection of this application.
工業實用性 本申請實施例公開了一種設備控制方法、電子設備、介質,該方法包括:通過本地代理程式獲取用於控制第一受控設備工作的程式碼;通過所述本地代理程式將所述程式碼發送至所述第一受控設備,使所述第一受控設備運行所述程式碼。本申請實施例的技術方案,可以基於本地代理程式獲取程式碼並推送,進而可以基於程式碼來實現對第一受控設備的控制,而程式碼是可以靈活編輯的,如此,可以更加靈活地對第一受控設備進行控制。Industrial applicability The embodiment of the application discloses a device control method, electronic device, and medium. The method includes: obtaining a program code for controlling the operation of a first controlled device through a local agent program; and sending the program code through the local agent program To the first controlled device to enable the first controlled device to run the program code. The technical solution of the embodiment of the present application can obtain and push the program code based on the local agent program, and then can realize the control of the first controlled device based on the program code, and the program code can be flexibly edited, so that it can be more flexible Control the first controlled device.
1001:獲取模組 1002:第一處理模組 1101:第一記憶體 1102:第一處理器 1201:接收模組 1202:第二處理模組 1301:第二記憶體 1302:第二處理器1001: Obtain the module 1002: The first processing module 1101: first memory 1102: the first processor 1201: receiving module 1202: second processing module 1301: second memory 1302: second processor
此處的附圖被併入說明書中並構成本說明書的一部分,這些附圖示出了符合本申請的實施例,並與說明書一起用於說明本申請實施例的技術方案。 圖1為本申請實施例的設備控制方法的流程圖一; 圖2為本申請實施例中EV3智能車與樹莓派的連接關係示意圖; 圖3為本申請實施例中EV3智慧車與終端的連接關係示意圖; 圖4為本申請實施例的設備控制方法的流程圖二; 圖5為本申請實施例中代理程式的功能流程示意圖; 圖6為本申請實施例中人體跟蹤模式下EV3智慧車和樹莓派的處理流程示意圖; 圖7為本申請實施例中針對回饋資訊的處理流程示意圖; 圖8為本申請實施例的設備控制方法的流程圖三; 圖9為本申請實施例的設備控制方法的流程圖四; 圖10為本申請實施例的一種終端的組成結構示意圖; 圖11為本申請實施例的另一種終端的結構示意圖 圖12為本申請實施例的一種第一受控設備的組成結構示意圖; 圖13為本申請實施例的一種電子設備的結構示意圖。The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments that conform to the application, and are used together with the specification to illustrate the technical solutions of the embodiments of the application. FIG. 1 is a first flowchart of a device control method according to an embodiment of the application; Figure 2 is a schematic diagram of the connection relationship between the EV3 smart car and the Raspberry Pi in an embodiment of the application; FIG. 3 is a schematic diagram of the connection relationship between the EV3 smart car and the terminal in an embodiment of the application; FIG. 4 is a second flowchart of a device control method according to an embodiment of the application; FIG. 5 is a schematic diagram of the functional flow of the agent program in an embodiment of the application; FIG. 6 is a schematic diagram of the processing flow of the EV3 smart car and the Raspberry Pi in the human tracking mode in the embodiment of the application; FIG. 7 is a schematic diagram of a processing flow for feedback information in an embodiment of the application; FIG. 8 is a third flowchart of a device control method according to an embodiment of the application; FIG. 9 is a fourth flowchart of a device control method according to an embodiment of the application; FIG. 10 is a schematic diagram of the composition structure of a terminal according to an embodiment of the application; FIG. 11 is a schematic structural diagram of another terminal according to an embodiment of the application FIG. 12 is a schematic diagram of the composition structure of a first controlled device according to an embodiment of the application; FIG. 13 is a schematic structural diagram of an electronic device according to an embodiment of the application.
101:步驟 101: steps
102:步驟 102: Step
103:步驟 103: Step
Claims (14)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910578882.2A CN110297472A (en) | 2019-06-28 | 2019-06-28 | Apparatus control method, terminal, controlled plant, electronic equipment and storage medium |
CN201910578882.2 | 2019-06-28 |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202122944A TW202122944A (en) | 2021-06-16 |
TWI743853B true TWI743853B (en) | 2021-10-21 |
Family
ID=68029509
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109121221A TWI743853B (en) | 2019-06-28 | 2020-06-22 | Device control method, electronic device and medium thereof |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN110297472A (en) |
TW (1) | TWI743853B (en) |
WO (1) | WO2020259154A1 (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110297472A (en) * | 2019-06-28 | 2019-10-01 | 上海商汤智能科技有限公司 | Apparatus control method, terminal, controlled plant, electronic equipment and storage medium |
CN111262912B (en) * | 2020-01-09 | 2021-06-29 | 北京邮电大学 | System, method and device for controlling vehicle motion |
CN112001827A (en) * | 2020-09-25 | 2020-11-27 | 上海商汤临港智能科技有限公司 | Teaching aid control method and device, teaching equipment and storage medium |
CN112860522A (en) * | 2021-03-02 | 2021-05-28 | 北京梧桐车联科技有限责任公司 | Program operation monitoring method, device and equipment |
CN113903218B (en) * | 2021-10-21 | 2024-03-15 | 优必选(湖北)科技有限公司 | Educational programming method, electronic equipment and computer readable storage medium |
CN114070659B (en) * | 2021-10-29 | 2023-11-17 | 深圳市优必选科技股份有限公司 | Equipment locking method and device and terminal equipment |
CN115118699A (en) * | 2022-06-21 | 2022-09-27 | 国仪量子(合肥)技术有限公司 | Data transmission method, device, system, upper computer and storage medium |
CN115442450A (en) * | 2022-08-24 | 2022-12-06 | 山东浪潮科学研究院有限公司 | Cloud sharing method and storage medium for programmable artificial intelligent vehicle |
CN115827516A (en) * | 2023-02-03 | 2023-03-21 | 北京融合未来技术有限公司 | Equipment control method and device, data acquisition system, equipment and medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6853867B1 (en) * | 1998-12-30 | 2005-02-08 | Schneider Automation Inc. | Interface to a programmable logic controller |
US20060168575A1 (en) * | 2005-01-21 | 2006-07-27 | Ankur Bhatt | Defining a software deployment |
US20060168581A1 (en) * | 2005-01-21 | 2006-07-27 | Karl Goger | Software deployment system |
US20100131084A1 (en) * | 2008-11-25 | 2010-05-27 | Van Camp Kim O | Software deployment manager integration within a process control system |
US20110066960A1 (en) * | 2009-09-14 | 2011-03-17 | Ricoh Company, Limited | Program download system, program download method, image forming apparatus, program delivery server, and download program |
TW201233096A (en) * | 2011-01-31 | 2012-08-01 | Fuither Tech Co Ltd | Remote assistance service method for embedded operation system |
CN105760106A (en) * | 2016-03-08 | 2016-07-13 | 网易(杭州)网络有限公司 | Interaction method and interaction device of intelligent household equipment |
TW201732289A (en) * | 2015-10-30 | 2017-09-16 | Alibaba Group Services Ltd | Sample quality detection method and detection data registering method, apparatus, and system encapsulate collected detection data into predetermined data transmission format by establishing data transmission channel between detection apparatus and registering end |
US20170351226A1 (en) * | 2016-06-01 | 2017-12-07 | Rockwell Automation Technologies, Inc. | Industrial machine diagnosis and maintenance using a cloud platform |
CN109166404A (en) * | 2018-10-12 | 2019-01-08 | 山东爱泊客智能科技有限公司 | The implementation method and device of self-editing process control based on shared controllable model |
Family Cites Families (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2003238111A1 (en) * | 2003-06-25 | 2005-01-04 | Avecontrol Oy | Signal processing method and signal processing system |
TWI337691B (en) * | 2007-07-24 | 2011-02-21 | Apparatus and method for positioning control | |
CN102520665A (en) * | 2011-12-23 | 2012-06-27 | 中国科学院自动化研究所 | Open robot demonstration device and robot control system |
CN102981758B (en) * | 2012-11-05 | 2015-05-13 | 福州瑞芯微电子有限公司 | Connection method between electronic devices |
CN104808600B (en) * | 2014-01-26 | 2017-07-07 | 广东美的制冷设备有限公司 | Controlled terminal multi-control modes self-adaptation control method, system and control terminal |
CN104175308A (en) * | 2014-08-12 | 2014-12-03 | 湖南信息职业技术学院 | Self-service robot |
CN104932298A (en) * | 2015-04-28 | 2015-09-23 | 中国地质大学(武汉) | Controller of teaching robot |
CN105045153A (en) * | 2015-07-31 | 2015-11-11 | 中国地质大学(武汉) | Three-mode control system based on mobile robot platform |
CN204965043U (en) * | 2015-09-23 | 2016-01-13 | 苏州工业园区宅艺智能科技有限公司 | Intelligent house control system based on cloud platform |
CN105488815B (en) * | 2015-11-26 | 2018-04-06 | 北京航空航天大学 | A kind of real-time objects tracking for supporting target size to change |
CN105760824B (en) * | 2016-02-02 | 2019-02-01 | 北京进化者机器人科技有限公司 | A kind of moving human hand tracking method and system |
CN105871670A (en) * | 2016-05-20 | 2016-08-17 | 珠海格力电器股份有限公司 | Method, device and system for controlling terminal equipment |
CN106737676B (en) * | 2016-12-28 | 2019-03-15 | 南京埃斯顿机器人工程有限公司 | It is a kind of based on script can secondary development industrial robot programing system |
CN108958103A (en) * | 2018-06-25 | 2018-12-07 | 珠海格力电器股份有限公司 | Control method, controlled method, apparatus, intelligent terminal and intelligent electric appliance |
CN110297472A (en) * | 2019-06-28 | 2019-10-01 | 上海商汤智能科技有限公司 | Apparatus control method, terminal, controlled plant, electronic equipment and storage medium |
-
2019
- 2019-06-28 CN CN201910578882.2A patent/CN110297472A/en active Pending
-
2020
- 2020-05-22 WO PCT/CN2020/091915 patent/WO2020259154A1/en active Application Filing
- 2020-06-22 TW TW109121221A patent/TWI743853B/en active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6853867B1 (en) * | 1998-12-30 | 2005-02-08 | Schneider Automation Inc. | Interface to a programmable logic controller |
US20060168575A1 (en) * | 2005-01-21 | 2006-07-27 | Ankur Bhatt | Defining a software deployment |
US20060168581A1 (en) * | 2005-01-21 | 2006-07-27 | Karl Goger | Software deployment system |
US20100131084A1 (en) * | 2008-11-25 | 2010-05-27 | Van Camp Kim O | Software deployment manager integration within a process control system |
US20110066960A1 (en) * | 2009-09-14 | 2011-03-17 | Ricoh Company, Limited | Program download system, program download method, image forming apparatus, program delivery server, and download program |
TW201233096A (en) * | 2011-01-31 | 2012-08-01 | Fuither Tech Co Ltd | Remote assistance service method for embedded operation system |
TW201732289A (en) * | 2015-10-30 | 2017-09-16 | Alibaba Group Services Ltd | Sample quality detection method and detection data registering method, apparatus, and system encapsulate collected detection data into predetermined data transmission format by establishing data transmission channel between detection apparatus and registering end |
CN105760106A (en) * | 2016-03-08 | 2016-07-13 | 网易(杭州)网络有限公司 | Interaction method and interaction device of intelligent household equipment |
US20170351226A1 (en) * | 2016-06-01 | 2017-12-07 | Rockwell Automation Technologies, Inc. | Industrial machine diagnosis and maintenance using a cloud platform |
CN109166404A (en) * | 2018-10-12 | 2019-01-08 | 山东爱泊客智能科技有限公司 | The implementation method and device of self-editing process control based on shared controllable model |
Also Published As
Publication number | Publication date |
---|---|
CN110297472A (en) | 2019-10-01 |
WO2020259154A1 (en) | 2020-12-30 |
TW202122944A (en) | 2021-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI743853B (en) | Device control method, electronic device and medium thereof | |
KR101969624B1 (en) | Gesture control method, apparatus and system | |
CN111283680B (en) | System and method for wireless remote control of robot | |
US10591999B2 (en) | Hand gesture recognition method, device, system, and computer storage medium | |
US10419822B2 (en) | Method, device, and system for switching at a mobile terminal of a smart television and acquiring information at a television terminal | |
US20140223300A1 (en) | Remote assistance method, system and terminal | |
WO2022127829A1 (en) | Self-moving robot, and path planning method, apparatus and device therefor, and storage medium | |
CN109992111B (en) | Augmented reality extension method and electronic device | |
WO2019057089A1 (en) | Network card image packet capture method, terminal, and readable storage medium | |
WO2017012499A1 (en) | Unmanned aerial vehicle control method, apparatus and system | |
WO2022178985A1 (en) | Abnormality handling method and apparatus for material pushing robot, and server and storage medium | |
WO2020032249A1 (en) | Information processing device, mediation device, simulate system, and information processing method | |
Velamala et al. | Development of ROS-based GUI for control of an autonomous surface vehicle | |
CN116483357A (en) | Method for constructing robot online simulation training platform based on ROS | |
US10218816B2 (en) | Information processing system, information processing method, server, and control method and control program of server | |
CN109246800B (en) | Wireless connection method and device | |
US20210205991A1 (en) | Providing logistical support for robots | |
TWI543626B (en) | Mobile device remote image-monitoring system and method thereof | |
CN110554966A (en) | Drive debugging method, behavior analysis method and drive debugging system | |
JP2010067190A (en) | Information sharing system and relay apparatus | |
CN110896442A (en) | Equipment monitoring method, device and system and camera equipment | |
CN206226618U (en) | A kind of embedded RGB D video flowing acquisition systems | |
WO2016070827A1 (en) | Method and apparatus for issuing and transmitting recognition information, and information recognition system | |
Rojc et al. | Finite-state machine based distributed framework DATA for intelligent ambience systems | |
JP6930553B2 (en) | Information processing system, information processing device, information processing method and program |