CN110266701B - Intelligent device data transmission method, device, medium and electronic device - Google Patents

Intelligent device data transmission method, device, medium and electronic device Download PDF

Info

Publication number
CN110266701B
CN110266701B CN201910549326.2A CN201910549326A CN110266701B CN 110266701 B CN110266701 B CN 110266701B CN 201910549326 A CN201910549326 A CN 201910549326A CN 110266701 B CN110266701 B CN 110266701B
Authority
CN
China
Prior art keywords
intelligent equipment
server
intelligent
online platform
api
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201910549326.2A
Other languages
Chinese (zh)
Other versions
CN110266701A (en
Inventor
索蒂里奥斯·斯塔西诺普洛斯
保罗·所罗门·奥拉弟美即
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bople Technology Beijing Co ltd
Original Assignee
Bople Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bople Technology Beijing Co ltd filed Critical Bople Technology Beijing Co ltd
Priority to CN201910549326.2A priority Critical patent/CN110266701B/en
Publication of CN110266701A publication Critical patent/CN110266701A/en
Application granted granted Critical
Publication of CN110266701B publication Critical patent/CN110266701B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B19/00Teaching not covered by other main groups of this subclass
    • G09B19/0053Computers, e.g. programming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure relates to a data transmission method, a device, a medium and an electronic device for an intelligent device, wherein the method comprises the following steps: the method comprises the steps that the intelligent equipment establishes websocket communication with an online platform; the API of the intelligent equipment starts an SSH server on the intelligent equipment, and receives the command and the program file sent by the online platform; operating the program file according to the command to generate an operation result; and sending the operation result to the online platform. The method provided by the disclosure establishes communication between the terminal equipment where the online platform is located and the intelligent equipment, so that the intelligent equipment can receive the instruction and the program file sent by the online platform in real time and operate according to the instruction and the program file, and the communication efficiency is improved; the intelligent device feeds the operation result back to the online platform in real time and performs visual display, the use scene is not limited to the research and development test stage, the intelligent device can be applied to the actual use stage, and the use scene is wider.

Description

Intelligent device data transmission method, device, medium and electronic device
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for data transmission of an intelligent device.
Background
At present, programming education is the most common part of out-of-class learning of primary and secondary school students, and not only off-line teaching but also on-line teaching modes are adopted, so that a platform capable of on-line programming learning is mainly provided for learners.
In the existing scheme, a platform for on-line programming teaching is provided, and a robot connected with the platform is further controlled through a programming result. For example, after a learner completes software programming on a computer (PC) used by the learner, the written codes are transmitted to robot hardware by using a data line, so that the robot completes corresponding control operations according to the programmed codes on the PC, but the learner has the defect that the codes cannot be modified at any time. Also for example, a virtual environment is established using the developed online platform to program and control a virtual robot, but it cannot be connected to a hardware operating system (Ubuntu, etc.) of the robot, so that there is a disadvantage in that a real robot cannot be controlled by a result of the programming of the virtual environment.
Based on the above, the existing online programming teaching still has the defect that the operation result of the robot cannot be fed back to the online platform in real time.
The above drawbacks are expected to be overcome by those skilled in the art.
Disclosure of Invention
Technical problem to be solved
In order to solve the above problems in the prior art, the present disclosure provides a method, an apparatus, a medium, and an electronic device for transmitting data of an intelligent device, so as to overcome, at least to a certain extent, a disadvantage that an operation result of a robot cannot be fed back to an online platform in real time in the existing online programming teaching.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or may be learned by practice of the disclosure.
(II) technical scheme
In order to achieve the above purpose, the present disclosure adopts a main technical solution including:
an embodiment of the present disclosure provides a method for transmitting data of an intelligent device, including:
the method comprises the steps that the intelligent equipment establishes websocket communication with an online platform;
the API of the intelligent equipment starts an SSH server on the intelligent equipment, and receives the command and the program file sent by the online platform;
operating the program file according to the command to generate an operation result;
and sending the operation result to the online platform.
In an embodiment of the present disclosure, before the smart device establishes websocket communication with the online platform, the method further includes:
the intelligent device establishes communication with the server through a wireless network and sends the IP address of the intelligent device to the server.
In an embodiment of the present disclosure, the establishing, by the smart device, communication with a server through a wireless network, and sending an IP address of the smart device to the server includes:
the intelligent equipment is connected to a wireless network, and a preset intelligent equipment end API is operated on the intelligent equipment;
the server side API running in the server is connected through the intelligent equipment side API;
and the intelligent equipment end API sends the IP address of the intelligent equipment to the server end API.
In an embodiment of the present disclosure, the establishing, by the smart device, websocket communication with the online platform includes:
the online platform establishes communication with the server through the Internet;
the online platform is connected to the server side API and receives the IP address of the intelligent equipment through the server side API;
and the online platform establishes communication connection with the intelligent equipment through the websocket based on the IP address of the intelligent equipment.
In an embodiment of the present disclosure, the starting, by the API of the intelligent device, the SSH server on the intelligent device, where the receiving, by the API of the intelligent device, the command and the program file sent by the online platform includes:
starting an SSH server based on the intelligent equipment side API;
receiving a command and a program file sent by the online platform through an API of the intelligent equipment;
the API of the intelligent equipment saves the program file to a file system of the intelligent equipment;
and the API of the intelligent equipment forwards the command to an SSH server on the intelligent equipment.
In an embodiment of the present disclosure, the method further includes:
creating a program and an editing command on the online platform through an editor, and editing the command on the online platform through a virtual terminal to obtain the command and the program file;
and sending the program file to the server and storing the program file in the server.
In an embodiment of the present disclosure, when the program files are multiple, the intelligent device receives multiple program files one by one or receives multiple program files at a time according to a set instruction;
if the program files are sent from different online platforms, after receiving the program files, the method further includes:
and respectively and independently storing the plurality of program files according to different online platforms.
Another aspect of the embodiments of the present disclosure provides an intelligent device data transmission apparatus, which includes:
establishing a communication module for establishing websocket communication between the intelligent equipment and the online platform;
the file receiving module is used for starting an SSH server on the intelligent equipment by the API of the intelligent equipment, and the API of the intelligent equipment receives the command and the program file sent by the online platform;
the program running module is used for running the program file according to the command to generate a running result;
and the result feedback module is used for feeding the operation result back to the online platform so as to be displayed on the online platform.
According to a third aspect of the embodiments of the present disclosure, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the intelligent device data transmission method described above.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
one or more processors;
a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the smart device data transmission method described above.
(III) advantageous effects
The beneficial effects of this disclosure are: on one hand, the intelligent device can receive the instruction and the program file sent by the online platform in real time and operate according to the instruction and the program file by establishing communication between the terminal device where the online platform is located and the intelligent device, so that the communication efficiency is improved; on the other hand, the intelligent device feeds back the operation result to the online platform in real time, so that the online platform can visually display the feedback result in real time, a user can conveniently check the feedback result, the use scene is not limited in a research and development test stage, the intelligent device can be applied to an actual use stage, and the use scene is wider.
Drawings
Fig. 1 is a system scenario block diagram illustrating a method and apparatus for data transmission of an intelligent device according to an exemplary embodiment;
fig. 2 is a flowchart of a data transmission method for an intelligent device according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of one embodiment of the present disclosure before step S210 in FIG. 2;
FIG. 4 is a flowchart illustrating step S210 in FIG. 2 according to an embodiment of the present disclosure;
FIG. 5 is a flowchart illustrating step S220 in FIG. 2 according to an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating an overall process of data transmission of the smart device according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of an intelligent device data transmission apparatus according to another embodiment of the present disclosure;
fig. 8 is a schematic structural diagram illustrating a computer system of an electronic device according to an embodiment of the present disclosure.
Detailed Description
For the purpose of better explaining the present disclosure, and to facilitate understanding thereof, the present disclosure will be described in detail below by way of specific embodiments with reference to the accompanying drawings.
All technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein in the description of the disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In the embodiment related to the present disclosure, the bluetooth technology (mobile phone/computer/tablet computer, etc.) can be utilized by developing software, so that the software can realize programming and robot control, but the disadvantage is that only simple programming and robot control can be performed. The SSH (Secure Shell) can be used for remotely controlling the terminal of the robot system, but the method cannot realize visual feedback, is only convenient for research and development in a test period, and cannot be applied to a teaching scene.
Based on the above, in the related embodiments, the online programming teaching fails to feed back the operation result of the robot to the online platform in real time, so the present disclosure provides an intelligent device data transmission method, apparatus, medium, and electronic device, and the following specifically introduces the technical scheme of the present disclosure.
Fig. 1 is a system scenario block diagram illustrating a method and apparatus for data transmission of an intelligent device according to an exemplary embodiment.
As shown in fig. 1, the system architecture 100 may include caller's terminal devices 101, 102, 103, a network 104, a server 105 for a server, and a smart device 106. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 101, 102, 103 interact with a server 105 via a network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as an online programming education platform, i.e., an online platform, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server that provides various services, such as a background server that supports service requests made by the terminal devices 101, 102, 103, or may be a server that supports service requests made by the terminal devices 101, 102, 103. The server 105 may analyze and perform other processing on the received service request and the related data, and feed back a processing result to the terminal device, that is, the caller calls the data from the server.
The intelligent device 106 may be an internet of things device such as a robot, an intelligent watch, an intelligent fitting mirror, or a programmable device, that is, a program stored locally in the intelligent device is run according to a received command, or a local program file of the intelligent device and files such as stored pictures and texts are modified according to the received command, and the modified files are stored in the intelligent device.
The calling requests can be generated through the terminal devices 101, 102 and 103, the terminal devices 101, 102 and 103 can establish communication with the server, acquire the IP address of the intelligent device based on the server, establish websocket communication between the terminal devices and the intelligent device according to the IP address of the intelligent device, send commands and program files to the intelligent device through the websocket communication, and acquire feedback results of the intelligent device executing the program files according to the commands through the websocket communication, and visually display the feedback results. The server 105 may, for example, obtain an IP address of the smart device and send the obtained IP address of the smart device to the online platform by communicating with the online platform of the terminal device; the server 105 may, for example, receive and save program files sent by the terminal device.
The intelligent device 106 uploads an IP address to the server, establishes websocket communication with the terminal device based on the IP address, receives a command and a program file sent by the terminal device, stores the program file in a special folder, runs the program file according to the command, and feeds back a running result to the terminal device through websocket communication.
It should be noted that the data transmission method for the intelligent device provided by the embodiment of the present disclosure may be executed by the terminal device, and accordingly, the data transmission apparatus for the intelligent device may be disposed in the terminal device.
Fig. 2 is a flowchart of a data transmission method for an intelligent device according to an embodiment of the present disclosure, and as shown in fig. 2, the method includes the following steps:
as shown in fig. 2, in step S210, the smart device establishes websocket communication with the online platform;
as shown in fig. 2, in step S220, the API of the smart device starts the SSH server on the smart device, and the API of the smart device receives the command and the program file sent by the online platform;
as shown in fig. 2, in step S230, the program file is executed according to the command, and an execution result is generated;
as shown in fig. 2, in step S240, the operation result is fed back to the online platform for displaying on the online platform.
On one hand, the intelligent device can receive the instruction and the program file sent by the online platform in real time and operate according to the instruction and the program file by establishing communication between the terminal device where the online platform is located and the intelligent device, so that the communication efficiency is improved; on the other hand, the intelligent device feeds back the operation result to the online platform in real time, so that the online platform can visually display the feedback result in real time, a user can conveniently check the feedback result, the use scene is not limited in a research and development test stage, the intelligent device can be applied to an actual use stage, and the use scene is wider.
The specific implementation of each step of the embodiment shown in fig. 2 is explained in detail below:
in step S210, the smart device establishes websocket communication with the online platform.
In an embodiment of the present disclosure, before the smart device in this step establishes websocket communication with the online platform, the method further includes:
the intelligent device establishes communication with the server through a wireless network and sends the IP address of the intelligent device to the server, for example, in this embodiment, the intelligent device may be automatically connected to a WiFi network and connected to the server based on the WiFi network.
Fig. 3 is a flowchart of an embodiment of the disclosure before step S210 in fig. 2, and as shown in fig. 3, the method specifically includes the following steps:
in step S301, the smart device connects to a wireless network, and runs a preset smart device API (i.e., API) on the smart deviceR). An Application Programming Interface (API for short) is automatically run by the intelligent device, so that the terminal device or the server and the like can directly send instructions to the intelligent device, and the intelligent device is based on the APIRCommands or program files may be received.
In step S302, the server API (i.e. API) running on the server is connected through the smart device APIS)。
In step S303, the intelligent device API sends the IP address of the intelligent device to the server API.
Fig. 4 is a flowchart illustrating step S210 in fig. 2 according to an embodiment of the disclosure, and as shown in fig. 4, the method specifically includes the following steps:
in step S401, the online platform establishes communication with the server through the internet. After the intelligent device is connected to the server in the steps, the intelligent device can log in an online platform by opening a web browser on the terminal device, so that the intelligent device can be connected to the server-side API (namely API)S) I.e. to establish communication between the terminal device and the server.
In step S402, the online platform is connected to the server API, and receives the IP address of the intelligent device through the server API, that is, the online platform can obtain the IP address of the intelligent device in the local WiFi network through communication with the server.
In step S403, the online platform establishes a communication connection with the smart device through the websocket based on the IP address of the smart device.
Based on the steps, the IP address of the intelligent device can be obtained through communication between the server and the terminal device and communication between the server and the intelligent terminal, and therefore websocket communication between the terminal device and the intelligent device is established. The websocket is a duplex communication protocol newly added to html5, and two ends of websocket communication can perform two-way communication between a browser (i.e., an online platform) of a user and an SSH server running on a smart device through an API. The user can send commands and program files to the SSH server without polling the server. Through the websocket communication, a plurality of users can be connected to the same intelligent device, and can communicate through the API and obtain responses immediately.
The online platform in this embodiment runs on a terminal device (e.g., a computer), and provides a programming environment and a visualization environment for a user through the online platform, where the programming environment may be used for the user to write code, and may be specifically implemented by a program programmer, and a completely written program is created and written in the form of the program programmer provided based on the online platform. The online platform may be connected to a server via the internet, or may be connected to a smart device (e.g., a robot) via a local wireless network.
In an embodiment of the present disclosure, a program is created on the online platform through an editor, and the program file is obtained; further, the program file is sent to the server and stored in the server. By saving the completely written program file to the server, the online platform automatically loads the program saved in the server after the user logs in the online platform next time. And the program files stored in the server can be retrieved through the online platform, so that the program files which are written and stored before can be directly called, and the repeated work is reduced.
In an embodiment of the present disclosure, a certain permission may also be set for the online platform to retrieve and view the program file stored in the server as needed, which is convenient for security management. In addition, because the server can communicate with the intelligent device through the websocket, the intelligent device can call the required program file from the server at any time so as to run the program file on the intelligent device.
In step S220, the API of the smart device starts the SSH server on the smart device, and the API of the smart device receives the command and the program file sent by the online platform.
Fig. 5 is a flowchart of step S220 in fig. 2 according to an embodiment of the disclosure, and as shown in fig. 5, the method specifically includes the following steps:
in step S501, an SSH server is started based on the smart device side API.
In one embodiment of the present disclosure, the API (i.e., API) is run on the smart device by running the smart device side API on the smart deviceR) By running APIsRThe SSH server is started. SSH is an abbreviation of security protocol (Secure Shell) built on the application layer basis, which is currently a more reliable protocol dedicated to security for telnet sessions and other network services. The SSH protocol can effectively prevent the problem of information leakage in the remote management process. SSH, when used correctly, can remedy vulnerabilities in the network. SSH clients are adaptable to a variety of platforms, and almost all UNIX platforms-including HP-UX, Linux, AIX, Solaris, Digital UNIX, Irix, and others-can run SSH.
SSH is a remote connection tool, and the connection principle is as follows: the SSH service is a daemon process (demon), the background of the system monitors the connection of the client, the process name of the SSH service is SSHD, and the SSH service is responsible for monitoring the request (generally, an IP 22 port) of the client in real time, and includes information such as exchange of public keys and the like.
In step S502, a command and a program file sent by the online platform are received through the API of the smart device.
In step S503, the API of the smart device saves the program file to the file system of the smart device.
In step S504, the API of the smart device forwards the command to the SSH server on the smart device.
The commands and the program files sent by the online platform can be obtained by creating a program on the online platform through an editor, editing the commands on the online platform through a virtual terminal, and then sending the commands and the program files to the intelligent device side API by the online platform. Wherein the online platform can send commands to the smart device based on the terminal simulator Xterm and SSH2 protocols. SSH2 adds a Diffe _ Hellman mechanism to confirm the correctness of the connection, and the Server checks the correctness of the data source every time the data is transmitted, so as to avoid the invasion of hackers. SSH2 supports RSA, an acronym for Digital Signature Algorithm, and DSA keys, which RSA can both digitally sign and encrypt. The command refers to a shortcut instruction of the computer, such as: gpedit. msc-group policy; sndrec 32-recorder; nshookup-IP address detector; explor-opens a resource manager; logoff-logoff command; tsshutdn- -60 second countdown shutdown command; msc — native user and group; service. msc — local service setting; oobe/msoobe/a- -check if XP is active, etc.
The intelligent equipment receives the command and the program file sent by the terminal equipment through the websocket communication and sends the command and the program file to the APIRAfter receiving the program file, the intelligent terminal stores the program file in the file system of the intelligent device, so that the stored program file can be executed and operated according to the command after receiving the command subsequently.
It should be further noted that, when there are multiple users, the multiple users may communicate with the same intelligent device on the online platforms of multiple different terminal devices at the same time by using the same access terminal IP address, store/retrieve the program file on the intelligent device, and control the intelligent device to operate the program file by sending a command to the intelligent device. Since each intelligent device has a specific IP (the IP is the IP address of the local network), multiple users are allowed to simultaneously access the same intelligent device by using the same access terminal IP, and program files sent by different users are stored in separate folders corresponding to the users in the intelligent device and are dedicated to the specific users. For example, the user A, B, C may log in the online platform, send an instruction and a program file to the smart device, and store the three folders for the three users at the smart device end, so that the corresponding program file may be called by the user to run when the smart device is used.
In an embodiment of the present disclosure, when a plurality of users log on the online platform on different terminal devices, the intelligent device may store the program files sent by the plurality of terminal devices one by one or all at once, and may make corresponding adjustments according to usage scenarios.
In step S230, the program file is executed according to the command, and an execution result is generated.
In an embodiment of the present disclosure, the API forwards the command to the SSH server, and runs the command in the SSH server. For the intelligent device, after receiving the command through websocket communication, the program file stored in the SSH server on the intelligent device can be run according to the command, so that in this step, the online platform can establish websocket communication with the intelligent device, so as to execute the command and the program file, and control the intelligent device. Because the local WiFi network sends commands and program files to the intelligent equipment at high speed, a user can seamlessly wirelessly interact with the intelligent equipment, high-speed real-time programming can be realized, and the program files sent by the online platform can be run on the intelligent equipment in real time. For example, when the SSH server stores the program file W, if the user wants to run the program on the smart device, the user needs to send a command Z for executing the program file W to the smart device API, the smart device API sends the command Z to the SSH server, and then the SSH server runs the command Z, thereby executing the program file W.
Because the intelligent equipment can also be provided with information acquisition equipment such as a camera, a temperature sensor, an infrared sensor and the like according to the requirements of a use scene, a command received by the intelligent equipment can be hardware such as a directly started camera or a program file is operated, the camera is started to work according to a certain period in the program file, and the camera is closed after working for a certain time. Therefore, the intelligent device can work directly according to the command or work by combining with the stored program file, and the intelligent device can generate a corresponding operation result after operation regardless of the mode.
In step S240, the operation result is fed back to the online platform for displaying on the online platform.
In an embodiment of the present disclosure, the result is fed back by executing the command on the SSH server of the smart device, including feeding back any possible error to the user and the result of the operation of the smart device after the operation according to the command, and by using the websocket, the result is fed back by the APIRThe feedback result can be status information (such as system fault information) of the Ubuntu or ROS system, and the like, and can also be a visual feedback result such as text, image, video, and the like. The form of the operation result received and displayed by the online platform therefore includes at least one of text, picture or video.
In the step, the API of the intelligent device stores the program file sent by the online platform in a file system of the intelligent device, and after receiving the command sent by the online platform, the API operates the program file stored in the intelligent device according to the command. For example, a camera or a temperature sensor and other sensors are installed on the intelligent device, the intelligent device runs a program file according to a command, the operation corresponding to the program file is to open the camera for shooting, at this time, correspondingly, the intelligent device executes the running result of the program file according to the command, namely, a video or a picture shot by the camera, and the video or the picture is stored in the intelligent device; and then the intelligent equipment sends the operation result to an online platform through websocket communication, and the online platform carries out visual display on the operation result, namely, the operation result is displayed as a shot video or picture. For example, the operation corresponding to the program file is to acquire the ambient temperature based on a temperature sensor, and at this time, correspondingly, the intelligent device executes the operation result of the program file according to the command, namely the temperature data, and the temperature data is stored in the intelligent device in a text form; and then the intelligent device end API sends the operation result to an online platform through websocket communication, and the online platform displays the operation result in a visual mode, namely the operation result is the temperature data in a text form.
Based on the foregoing, the online platform in this step may also obtain a visual feedback result from the execution of the commands and programs, and visually display the result for the user to view in real time.
Fig. 6 is an overall flowchart of data transmission of an intelligent device in an embodiment of the present disclosure, where fig. 6 specifically includes the following steps, taking a robot as an example for the intelligent device, as shown in fig. 6:
step S601, the robot is started and automatically connected with a WiFi network, and the robot automatically runs an APIRBy running APIRServer side API for connecting robot to serverSAnd transmits the IP address to the server.
Step S602, the user logs on to the online platform through the Internet browser on the computer, so as to connect to the API on the serverS
Step S603, the APIS of the online server sends the IP address of the robot to the online platform running on the user computer, so that the online platform obtains the IP address of the robot on the local WiFi network.
Step S604, the online platform running on the user computer opens the API with the robot through the websocket by using the IP address of the robot through the local WiFi networkRThe connection of (2).
Step S605, API run on robotRAn SSH server is started on the robot so that the robot can receive commands in a format compatible with the SSH protocol, which commands can be used in the terminal.
Step S606, terminal on line platform, user inserts and executes command based on Xterm and SSH2 under programming environment.
In step S607, the command and its execution instruction are transmitted locally (on the local network), and transmitted from the online platform on the user' S computer to the API through the websocketRAnd transferred from the online platform to the machine operating on the sameOn the human SSH server, thereby letting the robot execute commands.
In step S608, the robot executes the results of the command on the SSH server, including feedback to the user of any possible errors. Based on websocket communication, by APIRTransmitted to the online platform of the user's computer and displayed on the terminal of the online platform.
In the method, a program can be created based on an editor on an online platform and sent to an API on a serverSAnd thus the program file is saved at the server. And based on the online platform, the presentation file can also be sent to the API running on the robotRUnder a special folder dedicated to a particular user in the robot file system. The robot can run the program in the program file according to the command by using the command on the terminal in real time.
Step S609, the feedback result of the robot for the program file, such as text, image or video, is received based on the online platform, and may be transmitted to the online platform running on the user computer through the local network, and displayed on the terminal device. The method can be realized based on a data transmission and control system consisting of an online platform, a server and a robot.
For example, on the terminal device, the user may view the visual feedback result by clicking a corresponding button on the interface, and if there is no visual feedback result such as text, image, or video, the feedback is null. Therefore, no matter the result is a visual feedback result or an empty result, the user can check the result on the visual interface of the terminal equipment, and the program running result is obtained in real time according to the feedback result of the visual robot. The method can be realized based on a data transmission and control system consisting of the terminal equipment, the server and the intelligent equipment which operate the online platform.
In summary, with the data transmission method for the intelligent device provided by the embodiment of the present disclosure, on one hand, the server establishes communication between the terminal device where the online platform is located and the intelligent device, and the user can seamlessly wirelessly interact with the intelligent device, so that the robot can receive the instruction and the program file sent by the online platform in real time and operate according to the instruction and the program file, thereby improving communication efficiency; on the other hand, the intelligent device can feed back the operation result to the online platform in real time, so that the feedback result can be visually displayed, the user can conveniently check the operation result, the use scene is not limited to the research and development test stage, the operation result can be applied to the actual use stage, and the use scene is wide; on the other hand, the method only needs to use a network browser, does not need to use a network cable to connect the terminal equipment and the intelligent equipment, does not need to install a program created on a special software online platform on the terminal equipment of a user to be stored on a server through the Internet, can retrieve from the server at any time, and can also run on the intelligent equipment at any time.
Corresponding to the above intelligent device data transmission method, fig. 7 is a schematic diagram of an intelligent device data transmission apparatus according to another embodiment of the present disclosure, and referring to fig. 7, an intelligent device data transmission apparatus 700 includes: a setup communication module 710, a file receiving module 720, a program execution module 730, and a result feedback module 630.
The establishing communication module 710 is used for establishing the websocket communication between the intelligent equipment and the online platform; the file receiving module 720 is used for enabling the SSH server on the intelligent device by the API of the intelligent device, where the API of the intelligent device receives the command and the program file sent by the online platform; the program running module 730 is configured to run the program file according to the command to generate a running result; the result feedback module 740 is configured to feed back the operation result to the online platform so as to be displayed on the online platform.
It should be noted that, in addition to the data transmission device of the intelligent device shown in fig. 7, the intelligent device shown in fig. 1 may further include a master controller connected to the data transmission device, and hardware devices such as a camera, a temperature sensor, an infrared sensor and the like connected to the master controller, which may be selected according to a specific application scenario and are not limited specifically herein.
For details that are not disclosed in the embodiment of the apparatus of the present disclosure, please refer to the embodiment of the foregoing intelligent device data transmission method of the present disclosure for details that are not disclosed in the embodiment of the apparatus of the present disclosure.
In summary, the technical effects of the data transmission apparatus for intelligent devices provided by the embodiments of the present disclosure refer to the technical effects of the above method, and are not described herein again.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use in implementing an electronic device of an embodiment of the present invention. The computer system 800 of the electronic device shown in fig. 8 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for system operation are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the method for block chain-based medical data management as described in the above embodiments.
For example, the electronic device may implement the following as shown in fig. 2: step S210, establishing websocket communication between the intelligent equipment and an online platform; step S220, the API of the intelligent equipment starts an SSH server on the intelligent equipment, and the API of the intelligent equipment receives the command and the program file sent by the online platform; step S230, operating the program file according to the command to generate an operating result; and step S240, sending the operation result to the online platform.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (7)

1. A data transmission method for intelligent equipment is characterized by comprising the following steps:
in an online programming teaching scene, an intelligent device establishes communication with a background server through a wireless network and sends an IP address of a local wireless network of the intelligent device to the server, and the method comprises the following steps: the intelligent equipment is automatically connected to a wireless network, and a preset intelligent equipment end API is automatically operated on the intelligent equipment; the server side API running in the server is connected through the intelligent equipment side API; the intelligent equipment side API sends the IP address of the intelligent equipment to the server side API;
the intelligent equipment establishes websocket communication with the online platforms of a plurality of users, and the websocket communication method comprises the following steps: the online platform establishes communication with the server through the Internet; the online platform is connected to the server side API and receives the IP address of the intelligent equipment through the server side API; the online platform establishes communication connection with the intelligent equipment through a websocket based on the IP address of the intelligent equipment; the online platform is an online programming education platform which is loaded through a browser and provides a programming environment and a visual environment in any user terminal equipment; the intelligent equipment is programmable Internet of things equipment;
the API of the intelligent equipment starts an SSH server on the intelligent equipment, and receives the command and the program file sent by the online platform;
operating the program file according to the command to generate an operation result;
and feeding back the operation result to the online platform so as to be displayed visually on the online platform.
2. The intelligent device data transmission method according to claim 1, wherein the API of the intelligent device starts the SSH server on the intelligent device, and the receiving of the command and the program file by the API of the intelligent device from the online platform includes:
starting an SSH server based on the intelligent equipment side API;
receiving a command and a program file sent by the online platform through an API of the intelligent equipment;
the API of the intelligent equipment saves the program file to a file system of the intelligent equipment;
and the API of the intelligent equipment forwards the command to an SSH server on the intelligent equipment.
3. The intelligent device data transmission method of claim 2, further comprising:
creating a program and an editing command on the online platform through an editor, and editing the command on the online platform through a virtual terminal to obtain the command and the program file;
and sending the program file to the server and storing the program file in the server.
4. The intelligent device data transmission method according to claim 3, wherein when the program file is plural, the intelligent device receives the plural program files one by one or receives the plural program files at a time according to a set instruction;
if the program files are sent from different online platforms, after receiving the program files, the method further includes:
and respectively and independently storing the plurality of program files according to different online platforms.
5. An intelligent equipment data transmission device, comprising:
the first communication establishing module is used for establishing communication between the intelligent equipment and a background server through a wireless network in an online programming teaching scene and sending an IP address of a local wireless network of the intelligent equipment to the server, and comprises the following steps: the intelligent equipment is connected to a wireless network, and a preset intelligent equipment end API is operated on the intelligent equipment; the server side API running in the server is connected through the intelligent equipment side API; the intelligent equipment side API sends the IP address of the intelligent equipment to the server side API;
the second establishes communication module for smart device and a plurality of users' online platform establish websocket communication, including: the online platform establishes communication with the server through the Internet; the online platform is connected to the server side API and receives the IP address of the intelligent equipment through the server side API; the online platform establishes communication connection with the intelligent equipment through a websocket based on the IP address of the intelligent equipment; the online platform is an online programming education platform which is loaded through a browser and provides a programming environment and a visual environment in any user terminal equipment; the intelligent equipment is programmable Internet of things equipment;
the file receiving module is used for starting an SSH server on the intelligent equipment by the API of the intelligent equipment, and the API of the intelligent equipment receives the command and the program file sent by the online platform;
the program running module is used for running the program file according to the command to generate a running result; wherein, operating the program file according to the command comprises:
storing the program file at the SSH server;
the API of the intelligent equipment forwards the command to the SSH server;
the SSH server runs the command and executes the program file;
and the result feedback module is used for feeding the operation result back to the online platform so as to be displayed on the online platform.
6. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the smart device data transmission method according to any one of claims 1 to 4.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the smart device data transmission method as claimed in any one of claims 1 to 4.
CN201910549326.2A 2019-06-24 2019-06-24 Intelligent device data transmission method, device, medium and electronic device Expired - Fee Related CN110266701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910549326.2A CN110266701B (en) 2019-06-24 2019-06-24 Intelligent device data transmission method, device, medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910549326.2A CN110266701B (en) 2019-06-24 2019-06-24 Intelligent device data transmission method, device, medium and electronic device

Publications (2)

Publication Number Publication Date
CN110266701A CN110266701A (en) 2019-09-20
CN110266701B true CN110266701B (en) 2021-11-09

Family

ID=67920835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910549326.2A Expired - Fee Related CN110266701B (en) 2019-06-24 2019-06-24 Intelligent device data transmission method, device, medium and electronic device

Country Status (1)

Country Link
CN (1) CN110266701B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674061B (en) * 2019-09-24 2023-04-07 上海商汤临港智能科技有限公司 Control method and device of machine equipment and storage medium
CN111786893B (en) * 2020-07-14 2022-08-30 博为科技有限公司 method and device for synchronizing software versions of wireless routers in mesh networking
CN113986431B (en) * 2021-10-27 2024-02-02 武汉戴维南科技有限公司 Visual debugging method and system for automatic robot production line

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297300A (en) * 2013-04-16 2013-09-11 北京航空航天大学 Interaction system and method of mobile intelligent terminal and server-side
CN104898459A (en) * 2015-04-13 2015-09-09 南京阿凡达机器人科技有限公司 Robot test system and robot test method based on command line interface
CN106182005A (en) * 2016-08-08 2016-12-07 江阴市雷奥机器人技术有限公司 A kind of robot remote adjustment method
CN106325876A (en) * 2016-08-29 2017-01-11 中山市天启智能科技有限公司 Method and system for graphically programming and controlling embedded equipment on line
CN106657119A (en) * 2016-12-31 2017-05-10 深圳市愚公科技有限公司 Method and apparatus for managing home service robot
CN107471213A (en) * 2017-08-03 2017-12-15 大陆智源科技(北京)有限公司 A kind of robot simulation's system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8924011B2 (en) * 2012-04-03 2014-12-30 Knu-Industry Cooperation Foundation Intelligent robot apparatus responsive to environmental change and method of controlling and reconfiguring intelligent robot apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297300A (en) * 2013-04-16 2013-09-11 北京航空航天大学 Interaction system and method of mobile intelligent terminal and server-side
CN104898459A (en) * 2015-04-13 2015-09-09 南京阿凡达机器人科技有限公司 Robot test system and robot test method based on command line interface
CN106182005A (en) * 2016-08-08 2016-12-07 江阴市雷奥机器人技术有限公司 A kind of robot remote adjustment method
CN106325876A (en) * 2016-08-29 2017-01-11 中山市天启智能科技有限公司 Method and system for graphically programming and controlling embedded equipment on line
CN106657119A (en) * 2016-12-31 2017-05-10 深圳市愚公科技有限公司 Method and apparatus for managing home service robot
CN107471213A (en) * 2017-08-03 2017-12-15 大陆智源科技(北京)有限公司 A kind of robot simulation's system

Also Published As

Publication number Publication date
CN110266701A (en) 2019-09-20

Similar Documents

Publication Publication Date Title
EP2875425B1 (en) Providing access to a remote application via a web client
CN110266701B (en) Intelligent device data transmission method, device, medium and electronic device
CN110275787B (en) Online platform data transmission method, device, medium and electronic equipment
USRE46386E1 (en) Updating a user session in a mach-derived computer system environment
EP2914040B1 (en) Terminal and synchronization control method thereof
CN104081374A (en) Hierarchical display-server system and method
CN106648670B (en) Same-screen common control system and method for cloud classrooms
CN111444095A (en) Test platform system and test method of mobile equipment
Jadhav et al. Vnc architecture based remote desktop access through android mobile phones
CN113784049A (en) Camera calling method of android system virtual machine, electronic device and storage medium
CN113709243B (en) Equipment remote control method and device, electronic equipment and storage medium
CN113608997B (en) Remote debugging method and device for embedded webpage of application program and electronic equipment
CN108845946B (en) Terminal, debugging system and terminal debugging method
CN108255547B (en) Application program control method and device
WO2024061308A1 (en) Notification processing method, and terminal device, server side and computer storage medium
CN116192789A (en) Cloud document processing method and device and electronic equipment
JP2014235434A (en) Electronic information utilization apparatus, electronic information utilization system, program, and control method
CN111818177B (en) Remote control display method, server, client and system based on network
CN115348310B (en) Reverse proxy method, device, system, electronic equipment and storage medium
CN113949684B (en) Video transmission method, device, medium and computing equipment
CN117149122A (en) Method, device, system, equipment and medium for on-screen interaction
KR102160621B1 (en) Display mapping
CN113760419A (en) Method, apparatus, device and computer readable medium for displaying image
Andreev et al. Stand for Remote Development of a Display Visualization System for Civil Aircraft Cockpit
CN116628379A (en) Visualized graph generation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211109