Embedded remote development test system and method

Through the embedded remote development test system, the browser module and the web embedded development service module are connected, the problem of inconvenient switching of equipment is solved, efficient remote development is achieved, and complexity and configuration time is reduced.

CN119201706AInactive Publication Date: 2024-12-27BEIJING TENGYUN RAMBO TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411256679.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional embedded development and testing methods are inconvenient when switching devices, and users need to reconfigure the development environment, resulting in high complexity and low efficiency.

Method used

An embedded remote development and testing system was designed, including client devices, backend servers and transit network devices. It is connected to the web embedded development service module through the browser module, parsing debugging information and forwarding commands to the embedded device, realizing remote development , supports reverse proxy and database management to ensure load balancing and device status control.

Benefits of technology

Users can remotely develop embedded devices through the browser without installing specific software, which significantly improves remote development efficiency and reduces the complexity and configuration time of device switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201706A_ABST
    Figure CN119201706A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of embedded development, and discloses an embedded remote development test system and method, and the system comprises a client device, a background server, a transit network device and at least one embedded device. A browser module is deployed in the client device, and a Web embedded development service module is deployed in the background server; the browser module inputs a target access address so as to be connected to the Web embedded development service module through a network, and debugging information is input into a webpage fed back by the Web embedded development service module; the Web embedded development service module analyzes the debugging information to obtain a debugging command, and sends the debugging command to the transfer network equipment; and the transfer network equipment forwards the debugging command to the embedded equipment for embedded development. The remote development efficiency of the embedded device is improved, the problem that the personal computer development environment is reconfigured due to replacement of the working environment is avoided, and the complexity of embedded remote development is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded development, and in particular to an embedded remote development test system and method. Background Art

[0002] At present, in the traditional embedded development and testing method, the staff needs to directly connect various embedded development boards and debugging devices through cables on the work computer. The management of embedded devices is chaotic, and the same set of physical equipment may be passed between multiple staff members, which is easy to lose, easy to damage and consumes a lot of time. Some technologies have proposed remote development methods for embedded devices. For example, Chinese patent CN115658501A provides a development and debugging system and method for remote sharing of embedded boards based on cloud accounts. This type of method can connect the remote host and the embedded device through a line, and then deploy a connection agent unit software module on the remote host device, and then deploy a connection client software module on the developer-side device. Through the connection client and the connection agent unit, network communication is carried out, so that the connection client sends the development and debugging command to the connection agent unit, and the remote host interacts with the embedded board through the connection agent unit. Although this method allows users to remotely develop embedded devices through the network, users must perform remote development on a computer where the connection client software module is deployed. If the user changes the working device, the development environment needs to be reconfigured on the personal computer, which is very inconvenient to use. Summary of the invention

[0003] In view of this, the present invention provides an embedded remote development and testing system and method, which solves the problem of inconvenient scene switching in remote development and testing of embedded devices.

[0004] In a first aspect, the present invention provides an embedded remote development and testing system, comprising: a client device, a background server, a transit network device and at least one embedded device; a browser module is deployed in the client device, and a Web embedded development service module is deployed in the background server; the browser module is used to input a target access address to connect to the Web embedded development service module through a network, and input debugging information in a web page fed back by the Web embedded development service module; the Web embedded development service module is also used to parse the debugging information, obtain a debugging command, and send the debugging command to the transit network device; the transit network device and the embedded device are connected by a line, and the transit network device is used to forward the debugging command to the embedded device through a network, so that the embedded device performs embedded operations in response to the debugging command.

[0005] In an optional implementation, the system further includes a reverse proxy service, the number of the backend servers is at least two, the client device performs network communication with the backend servers via the reverse proxy service, and the reverse proxy service is used to perform information protection and load balancing for each backend server.

[0006] In an optional implementation, a command line module and a command line tool are also deployed in the client device, and the command line tool is used to call the command line module so that the user can access the Web embedded development service module through the command line module, and send debugging information to the Web embedded development service module through the command line module.

[0007] In an optional implementation, the background server is further deployed with a management module, and the management module is used to manage and configure the user data and embedded device data of the background server.

[0008] In an optional implementation, the background server is also deployed with a database and an edge service module; the database is used to store the embedded device data and the user data, and to receive and respond to the debugging commands and read and write the status data in the embedded device data; the edge service module is used to receive the debugging commands issued by the Web embedded development service module through the Restful API, and send the debugging commands to the transit network device.

[0009] In an optional implementation, the transit network device includes a power management device, a switch and several interface servers; the power supply device is used to supply power to the switch, the interface server and the embedded device; the switch is connected to each interface server line, the switch is connected to the background server line, the switch is used to receive the debug command sent by the background server, and forward the debug command to the target interface server corresponding to the target embedded device interface type, and the target interface server sends the debug command to the target embedded device according to a preset interface protocol.

[0010] In an optional implementation, the interface server includes a serial port server, and the Web embedded development service module is deployed with a WebSSH service, and the WebSSH service is used to convert debugging information in text format into debugging information of the SSH protocol.

[0011] In an optional implementation, the database also includes an occupation status field and an occupation time field, the occupation status field being used to indicate whether the embedded device is currently occupied by a client device, so that when the occupation status field indicates that any embedded device is occupied, the Web embedded development service module refuses to forward debugging commands to the transit network device for other client devices; when any occupied embedded device is manually released or automatically released, the corresponding occupation status field is changed from occupied to unoccupied; the occupation time field is used to indicate the limit time of the occupation status of the embedded device, so that when the database determines that a certain occupation status reaches the limit time, the corresponding embedded device is automatically released.

[0012] In a second aspect, the present invention provides an embedded remote development and testing method, the method comprising: a client device sends an access request to a background server through a browser module according to a target access address; the background server receives the access request through a Web embedded development service module, and feeds back a web page to the browser module of the client device; the client device inputs debugging information in the browser module; the background server receives the debugging information through the Web embedded development service module and parses the debugging information to obtain a debugging command, and then sends the debugging command to a transit network device; the transit network device forwards the debugging command to the embedded device through a network; the embedded device performs embedded operations in response to the debugging command.

[0013] In an optional implementation, the backend server receives an access request sent by a client device through a browser module through a Web embedded development service module, and feeds back a web page to the browser module of the client device, including: a reverse proxy service receives an access request sent by a client device through a browser module; the reverse proxy service sends the access request to a target backend server based on current load information of each backend server; the target backend server receives the access request through the Web embedded development service module; the target backend server feeds back a web page to the browser module of the client device through the reverse proxy service based on the access request.

[0014] In an optional implementation, before the backend server receives the debugging information through the Web embedded development service module and parses the debugging information, it also includes: the client device starts a command line tool; the client device calls a command line module through the command line tool; the client device inputs the debugging information through the command line module, and sends the debugging information to the backend server through the command line module.

[0015] In an optional implementation, sending the debugging command to the transit network device includes: changing or reading the status data of the embedded device in the database according to the debugging command; and sending the debugging command to the transit network device through an edge service module.

[0016] In an optional implementation, before sending the debugging command to the transit network device, it also includes: the target background server determines whether the target embedded device currently to be operated by the client device is occupied through the occupancy status field in the database; when the target embedded device is occupied, the target background server refuses to forward the debugging command of the current client device through the Web embedded development service module; the target background server determines whether the corresponding occupancy time of the target embedded device reaches the corresponding limit time through the occupancy time field in the database, and releases the occupancy status field in the database when the limit time is reached.

[0017] The technical solution provided by the present invention has the following advantages:

[0018] The present invention deploys a Web embedded development service module in a background server; enables the client to connect to the Web embedded development service module through a network by installing a browser module and inputting a target access address, so that the background server provides a remote development environment for the client in a Web manner through the web page fed back by the Web embedded development service module, and provides the client with the ability to input debugging information in the web page. Afterwards, the Web embedded development service module is used to parse the debugging information, obtain the debugging command, and send the debugging command to a transit network device; the transit network device is connected to the embedded device line, and the transit network device is used to forward the debugging command to the embedded device through the network, so that the embedded device responds to the debugging command to perform embedded development. Based on the above scheme, the user does not need to install specific application software on any personal computer to remotely develop the embedded board, and only needs to access the specified web page through the browser to realize remote development. The remote development mechanism of the web page is realized by the background server, which significantly improves the remote development efficiency of the embedded device, avoids the problem of reconfiguring the personal computer development environment due to changing the working environment, and reduces the complexity of embedded remote development. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 is a structural diagram of an embedded remote development and testing system according to an embodiment of the present invention;

[0021] Figure 2 is another structural schematic diagram of an embedded remote development and testing system according to an embodiment of the present invention;

[0022] Figure 3 The figure is a flow chart of an embedded remote development and testing method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] According to an embodiment of the present invention, an embedded remote development and testing system is provided. Figure 1 As shown, the system includes a client device, a backend server, a transit network device and at least one embedded device. In the embodiment of the present invention, the client device refers to an intelligent terminal device used by individual users including but not limited to a personal computer, a tablet computer, a mobile phone, etc., and the backend server refers to a server device including but not limited to a blade server, a tower server, etc. The number of client devices is not unique, so that different users can access the backend server through different client devices.

[0025] Among them, a browser module is deployed in the client device, and a Web embedded development service module is deployed in the background server. The browser module refers to the browser software program such as Chrome and IE for browsing web pages. The Web embedded development service module is a self-developed Web web page framework, which is divided into a Web front-end and a Web back-end. The Web front-end includes the composition, layout, links, and controls of the web page, which is used to interact directly with the user. The Web back-end includes a logic program, which is used to generate corresponding background program commands according to the corresponding operations of the Web front-end.

[0026] Based on this, the browser module of the client device of the present invention provides the user with the ability to input the target access address, which is the URL address generated by the Web embedded development service module according to the IP, so that the client device is connected to the Web embedded development service module of the background server through the network. The background server serves as a network communication bridge between the client device and the embedded device. After receiving the access request of the client device, the Web embedded development service module feeds back the corresponding graphic interactive web page to the client device, so that the client device can input debugging information in the web page in a graphic interactive mode through the browser module.

[0027] Among them, the debugging information input by the client is a series of information for operating the embedded device. The information can be input text, code, selection operations on some controls and links, etc. The graphical interactive web page includes some preset web page information, which is used to represent the development operation of the embedded device. The user can operate these preset web page information by clicking, selecting, pulling down menus, dragging, and other interactive operations on the graphical interactive web page, and input debugging information to represent the operation of the embedded device. The debugging information may include development information for the initial development of the embedded device, and may also include test information for testing the embedded device after the development is completed. The Web embedded development service module is also used to parse the debugging information, obtain the debugging command that actually instructs the operation of the embedded device, and send the debugging command to the transit network device.

[0028] Among them, the transit network device and the embedded device line are connected, and the transit network device refers to a hardware device including a gateway, a power supply or other network interface conversion device. The transit network device is used to send the debugging command to the embedded device through the network so that the embedded device responds to the debugging command for embedded development.

[0029] Based on the above solution, users do not need to install specific application software on any personal computer to remotely develop embedded boards. They can achieve remote development by simply accessing the specified web page through a browser. The remote development mechanism of the web page is implemented by the background server, which significantly improves the remote development efficiency of embedded devices, avoids the problem of reconfiguring the personal computer development environment due to changing the working environment, and reduces the complexity of embedded remote development.

[0030] In some optional embodiments, the embedded remote development system provided by the present invention also includes a reverse proxy service, the number of backend servers is at least two, the client device communicates with the backend servers through the reverse proxy service, and the reverse proxy service is used to perform information protection and load balancing on each backend server.

[0031] Specifically, the reverse proxy service is a technology mainly used to protect the backend server in the network link relative to the forward proxy. Through the reverse proxy service, the client does not know that the reverse proxy server it accesses is not the real backend server. The reverse proxy service hides the real address of the server from the accessing client, thereby improving the security of the backend server. The present invention can deploy the reverse proxy server through the Nginx reverse proxy service. The Nginx reverse proxy service can be deployed on an independent service device other than all the backend servers, or it can be deployed in some backend servers. In addition, for the scenario of deploying multiple backend servers, when the client access volume increases and the pressure on the server increases, the reverse proxy service can support the balanced distribution of the access pressure on multiple backend servers, thereby achieving the effect of load balancing and reducing the risk of the backend server crashing due to high load.

[0032] Based on the mechanism of reverse proxy service, the client provided by the present invention first accesses the reverse proxy service (which can be an independent server other than the background server or a certain background server) through the target access address, and the reverse proxy service receives the access request sent by the client device through the browser module, and then the reverse proxy service evaluates according to the current load information of each background server, determines the target background server with the lowest current load, and then sends the access request to the target background server; the target background server receives the access request through the Web embedded development service module, and then feeds back the web page to the browser module of the client device through the reverse proxy service according to the access request, thereby realizing a load-balanced remote development method for embedded devices.

[0033] In some optional implementations, a command line module and a command line tool are also deployed in the client device. The command line tool is used to call the command line module so that the user can access the Web embedded development service module through the command line module, and send debugging information to the Web embedded development service module through the command line module.

[0034] Specifically, the Web embedded development service module provided by the present invention also supports the information input function of the command line, so that the Web embedded development service module in the background server is used as the backend, and the command line module is deployed in the client device as the frontend, that is, the command line module in the client device and the Web frontend share a backend, and the client device calls the command line module through the command of the command line tool such as CMD. The command line tool refers to the command input window preset by the client device through the system, such as CMD, PowerShell, MobaXterm, etc. under the Windows system. After calling the self-developed command line module through the command line tool in this embodiment, the user can directly input some characters and symbols through the preset command language, and directly input the debugging information in command mode, thereby converting it into the corresponding debugging command. The command line module can also be used as a "developer" role to power on, off, restart, connect serial ports, upload image files, etc. to the embedded device. According to the needs of the user, choose between the Web frontend and the command line module, where the use of the Web frontend in a graphical interactive way is more intuitive, which is convenient for developers who are not familiar with the background commands to perform simple operations, and the command line module is more efficient, which is convenient for developers who are more familiar with the background commands to directly achieve the effect of rapid development by entering commands, reducing the process of parsing the interactive operation of the web page. In addition, the command line module has the advantage of being able to be combined with other command scripts. If the user compiles an automated test script on the client, the continuous integration / continuous release process can be achieved by calling the command line module through the script. Based on the command line module, it can also solve the problem of reconfiguring the personal computer development environment due to changing the working environment, and make the Web embedded development service module more adaptable, and can flexibly provide users with the ability to develop embedded devices through a Web browser according to user needs.

[0035] In some optional implementations, the background server is further deployed with a management module, and the management module is used to manage and configure the user data and embedded device data of the background server.

[0036] Specifically, the embodiment of the present invention also deploys a management module on the background server to act as an "administrator", and configures and manages various system background data (including user data, permission data, embedded device data, etc.) through the management module application. For example, in some optional implementations, the management module is used to manage various embedded device data in the laboratory, and the hardware information and status data of the embedded device will be saved to the background server, and an interface is provided for the management module to add, delete, check and modify the embedded device information. Through the management module, the background server can manage the device, and the client device can control the embedded device through the Web front end.

[0037] In some optional implementations, the management module provided by the present invention can be implemented based on technologies including but not limited to PythonDjango, Python Flask, Java, and C#. For the management of user data, user and permission management is provided through users and groups. Each user corresponds to an account, and a group contains multiple accounts. As long as permissions are set for the group, all accounts under the group have corresponding permissions, and different permissions can also be set for each user. For example, an administrator account is provided in the management module and all background permissions are assigned. The administrator account can perform add, delete, query, and modify operations on all tables in the database.

[0038] Through the management module provided by the embodiment of the present invention, flexible entry, deletion, modification and other management and configuration effects are achieved for the user data of the background server and the embedded device data, thereby improving the flexibility of data management.

[0039] In some optional implementations, the background server is also deployed with a database and an edge service module; the database is used to store embedded device data and user data, and to receive and respond to debugging commands, and to read and write status data in the embedded device data; the edge service module is used to receive debugging commands issued by the Web embedded development service module through the Restful API, and send the debugging commands to the transit network device.

[0040] Specifically, in an embodiment of the present invention, a database and an edge service module are deployed on the background server respectively, and the process of the background server controlling the embedded device is decoupled by storing the state data of the embedded device in the database. That is, some debugging commands are real operations on the embedded device, and the corresponding commands are forwarded to the embedded device through the edge service module, while some debugging commands are only for reading a certain state of the embedded device, such as reading the current temperature state, voltage state, switch state, etc. of the embedded device. In order to reduce the time loss cost and communication resource occupation cost on the communication link, the current state of the embedded device can be directly read from the database without actually accessing the embedded device.

[0041] In some optional implementations, the database can be deployed based on relational databases including but not limited to MongoDB, MySQL, SQLServer, Oracle, and non-relational databases such as Redis. The status data of the embedded device stored in the database includes but is not limited to the power-on / off status of the embedded device, the occupancy status of the device, the image file save address of the device, the properties and parameter data of the device, etc. This is only an example and is not limited to this.

[0042] Based on this, according to the embedded remote development system provided by the present invention, when the debugging command input by the user in the client device needs to perform some unavoidable real operations on the embedded device, the Web embedded development service module of the background server will first determine whether the state data of the embedded device in the database has been changed according to the debugging command, and if it has not been changed, the debugging command will be sent to the transit network device through the edge service module to set the state of the embedded device, and then determine whether the state of the embedded device is set successfully, and if it is set successfully, the state data of the embedded device in the database will be changed. For example, if the user needs to perform a power-on operation on the embedded device, the Web embedded development service module first determines whether the state of the embedded device in the database is a power-on state, if it is a power-on state, no subsequent operations are performed, and if it is not a power-on state, a power-on signal command is sent to the edge service module, so that the edge service module sends a control command to the transit network device through the SNMP protocol, the power supply device in the transit network device powers on the corresponding embedded device, the corresponding embedded device is turned on, the background server determines that the embedded device is turned on successfully, and then changes the state of the embedded device in the database to the power-on state.

[0043] Afterwards, if the user wants to read a certain state of the embedded device, for example, the user wants to read whether the embedded device is currently powered on or off, the Web embedded development service module responds to the debugging command issued by the client device and directly reads the status data of the corresponding embedded device from the database. There is no need to send a real read request signal to the edge service module and then detect it from the embedded device. This implements a decoupling strategy for embedded device development and significantly improves the development efficiency of embedded devices by separately deploying the database and edge service modules.

[0044] In addition, in this embodiment, the instructions issued by the Web embedded development service module or management module to the database and the edge service module are all implemented through the Restful API docking. That is, the Web embedded development service module needs to uniformly convert the debugging commands of different formats into a form that can be recognized by the Restful API, and then transmit the debugging commands to the edge service module through the Restful API. Similarly, the reading and writing of data in the database is also implemented through the Restful API. The Restful API is an architecture style of the application program interface that uses HTTP requests to access or use data. The advantages of the Restful API are: 1. Lightweight, based on the HTTP protocol, and does not require support from other protocols; 2. The interface is resource-oriented, clear at a glance, and improves readability; 3. The data description is simple, generally using xml or json for data exchange; 4. Stateless, when calling an interface, there is no need to consider the context and current state, which greatly reduces the complexity; 5. Low coupling, the interface is independently deployed, and each calling end and the calling end and the API are completely decoupled. By connecting the Web embedded development service module and database, the Web embedded development service module and edge service module, the management module and database, and the management module and edge service module through the Restful API, the complexity of calls between various software modules in the background server is significantly reduced.

[0045] In some optional implementations, the transit network device provided by the present invention includes a power management device, a switch and several interface servers. Among them, the power supply device is used to supply power to the switch, the interface server and the embedded device; the switch is connected to each interface server line, the switch is connected to the background server line, the switch is used to receive the debugging command sent by the background server, and forward the debugging command to the corresponding target interface server according to the interface type of the target embedded device corresponding to the debugging command, and the target interface server sends the debugging command to the target embedded device according to the preset interface protocol.

[0046] Specifically, Figure 2As shown, it is a complete structural diagram of an embedded remote development system provided by the present invention, and the transit network device includes a power management device, a switch and an interface server. The power management device is used to power the switch, the interface server and the embedded device, and the power management device is powered on and off based on the instructions of the background server. The background server is connected to the switch through a line, and the switch is used to expand the network line to connect multiple different embedded devices. In addition, the embedded device and the switch are connected through an interface server. This is because the interfaces of embedded devices are often of various types, such as serial ports, USB ports, Type-C ports, etc., and the corresponding data transmission protocols for different interfaces are different. It is difficult to configure a large number of embedded devices using a switch or a server alone, and it is difficult to uniformly manage different types of embedded devices. Therefore, the embodiment of the present invention uses an interface server to connect embedded devices with different types of interfaces. For example, the interface server can include a serial port server, a USB server, a KVM server supporting video interfaces such as HDMI, a relay, a programmable power supply and other devices. All embedded devices that communicate through serial ports in the system are connected to the serial port server, and all embedded devices that communicate through USB in the system are connected to the USB server. The same is true for others. The address information of the serial port, USB interface, network port of the switch and other address information used by the embedded device are all configured in the background server. When the user needs to debug a certain embedded device, the background server directly sends the debugging command according to the address information. The switch is used to receive the debugging command sent by the background server and directly forward the debugging command to the corresponding target interface server (such as the serial port server) according to the address information. After that, the target interface server sends the debugging command to the target embedded device according to the preset interface protocol (such as the serial port protocol). Based on the scheme provided by the embodiment of the present invention, a variety of different types of embedded devices can be flexibly accessed. The embedded device only needs to be connected to the corresponding interface server according to its own interface type. The interface server has been configured with the transmission protocol according to the interface type. Compared with the traditional technology, there is no need to configure the transmission protocol for each new embedded device added, which reduces the configuration difficulty of different types of embedded devices. In some optional implementations, the embedded device can also support network port communication, so that the embedded device can be directly connected to the switch according to the structure of the embedded device.

[0047] In some optional implementations, the interface server includes a serial port server, and the Web embedded development service module is deployed with a WebSSH service, which is used to convert debugging information in text format into debugging information of the SSH protocol.

[0048] Specifically, the present invention implements the serial port connection operation of the device based on the serial port server plus the WebSSH service. The serial port server is used to convert serial port data and network data. The serial port data can be converted into network data. For example, the result of the operation of the embedded device can be returned to the browser module through the network and presented to the user; the network data can also be converted into serial port data, so as to transmit the serial port command to the embedded device. Since the data format of the client device and the background server are both text, the data in the text format cannot be recognized by the serial port server. By deploying the WebSSH service on the background server, the device with the SSH service enabled can be remotely accessed through the browser in the form of a web page through the SSH protocol. The serial port server can identify the data of the SSH protocol type. The architecture of the serial port server + WebSSH service allows users to conveniently perform input and output operations on the serial port of the embedded device through the Web browser window, avoiding the problem of no response to commands.

[0049] In some optional embodiments, the database deployed on the background server of the present invention also includes an occupation status field and an occupation time field. The occupation status field is used to indicate whether the embedded device is currently occupied by a client device, so that when the occupation status field indicates that any embedded device is occupied, the Web embedded development service module refuses to forward debugging commands to the transit network device for other client devices; the occupation time field is used to indicate the limit time of the occupation status of the embedded device, so that when the database determines that a certain occupation status reaches the limit time, the corresponding embedded device is released.

[0050] Specifically, this solution constrains the user's behavior of using embedded devices through databases and program logic to achieve the purpose of "time-sharing reuse" of resources. "Time-sharing reuse" means that an embedded device can only be occupied by one client at a specific time, and multiple clients can operate the same embedded device through the background server, but the reuse of the same embedded device by each client needs to be carried out separately in different time periods. The specific implementation method is:

[0051] 1. Create a piece of user data for each user and save it in the database;

[0052] 2. Create an embedded device data for each embedded device and save it in the database;

[0053] 3. Each piece of embedded device data contains an "occupancy status field" and an "occupancy time field" and may also include an "occupant" field. The "occupancy time field" includes a set of occupation start time and occupation end time;

[0054] 4. When a user needs to use an embedded device, he first uses the user data to log in to the background server through a client, so that the current client can establish communication with the background server; then the background server checks whether the "occupancy status field" of the embedded device data in the database is in an unoccupied idle state. If it is currently in the "occupied" state, it means that the device has been occupied by other users and the current user is not allowed to operate. The background server refuses to forward the debugging command of the current client device to the embedded device through the Web embedded development service module; if it is currently in the "unoccupied" state, it means that the device is currently idle and the current client can occupy it. Then the system will modify the "occupancy status field" of the device data to "occupied", set the "occupier" field of the device data to the user logged in by the current client, and set the "occupancy start time" and "occupancy end time" fields of the device data to the time specified by the user;

[0055] 5. After the user successfully occupies the device, the device can be operated and the debugging command can be sent to the transit network device. At the same time, if other users want to operate the current embedded device through other clients, the occupation will fail, so that each embedded device can only be exclusively occupied by one client in the same time period. If other users want to use the device, they need to occupy the device in other time ranges (that is, the occupation status field of the device data is not "occupied"), so as to achieve the purpose of "time-sharing multiplexing" of embedded devices by multiple users.

[0056] 6. In addition, the backend server uses the occupied time field in the database to determine in real time whether the corresponding embedded device has been occupied for the corresponding time limit, and automatically releases the occupied status field in the database when the time limit is reached, so that other users can develop the current embedded device. In addition, the current user can also manually modify the "occupancy status field" after using the embedded device, so as to actively release the current embedded device manually, which is convenient for other users to operate.

[0057] In some optional implementations, the remote development system provided by the present invention can quickly and securely deploy services through containerization. Deployment through containerization can be easily expanded, which is very helpful for system expansion. Container isolation allows programs running in containers to effectively avoid being affected by malicious code, ensuring security, and there is no impact between containers. When a problem occurs in one container, other containers can still operate normally, ensuring the stability of the system. In addition, an embodiment of the present invention also provides a file mirroring service for saving the firmware of the embedded device, so that the embedded device can pull the image file stored on the background server to the local operation through the tftp service during the startup process, thereby realizing remote loading and startup.

[0058] According to an embodiment of the present invention, an embodiment of an embedded remote development method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0059] In this embodiment, an embedded remote development method is provided, which can be used in the above-mentioned embedded remote development system. Figure 3 1 is a flow chart of an embedded remote development method according to an embodiment of the present invention, the flow chart includes the following steps:

[0060] Step S300: The client device sends an access request to the backend server according to the target access address through the browser module;

[0061] Step S301, the backend server receives the access request through the Web embedded development service module, and feeds back the web page to the browser module of the client device;

[0062] Step S302, the client device inputs debugging information into the browser module;

[0063] Step S303, the backend server receives the debugging information through the Web embedded development service module and parses the debugging information to obtain the debugging command, and then sends the debugging command to the transit network device;

[0064] Step S304, the transit network device forwards the debugging command to the embedded device via the network;

[0065] Step S305: the embedded device performs embedded development in response to the debugging command.

[0066] Specifically, the explanation of the implementation principle of this embodiment can refer to the relevant description of the aforementioned system embodiment, which will not be repeated here.

[0067] In some optional implementations, the above step S301 includes:

[0068] Step a1, the reverse proxy service receives an access request sent by the client device through the browser module;

[0069] Step a2, the reverse proxy service sends the access request to the target backend server according to the current load information of each backend server;

[0070] Step a3, the target backend server receives the access request through the Web embedded development service module;

[0071] Step a4: the target backend server feeds back the web page to the browser module of the client device through the reverse proxy service according to the access request.

[0072] Specifically, the explanation of the implementation principle of this embodiment can refer to the relevant description of the aforementioned system embodiment, which will not be repeated here.

[0073] In some optional implementation manners, before the above step S303, the method further includes:

[0074] Step b1, the client device starts a command line tool;

[0075] Step b2, the client device calls the command line module through the command line tool;

[0076] Step b3: The client device inputs debugging information through the command line module, and sends the debugging information to the background server through the command line module.

[0077] Specifically, the explanation of the implementation principle of this embodiment can refer to the relevant description of the aforementioned system embodiment, which will not be repeated here.

[0078] In some optional implementations, the above step S303 includes:

[0079] Step c1, modifying or reading the state data of the embedded device in the database according to the debugging command;

[0080] Step c2: Send the debugging command to the transit network device through the edge service module.

[0081] Specifically, the explanation of the implementation principle of this embodiment can refer to the relevant description of the aforementioned system embodiment, which will not be repeated here.

[0082] In some optional implementation manners, before sending the debugging command to the transit network device, the method further includes:

[0083] Step d1, the target backend server determines whether the target embedded device currently to be operated by the client device is occupied through the occupation status field in the database;

[0084] Step d2, when the target embedded device is occupied, the target background server refuses to forward the debugging command of the current client device through the Web embedded development service module.

[0085] Step d3, the target background server determines whether the occupancy time corresponding to the target embedded device reaches the corresponding limit time through the occupancy time field in the database, and releases the occupancy status field in the database when the limit time is reached.

[0086] Specifically, the explanation of the implementation principle of this embodiment can refer to the relevant description of the aforementioned system embodiment, which will not be repeated here.

[0087] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An embedded remote development and testing system, characterized in that: include: Client device, backend server, transit network device and at least one embedded device; The client device is equipped with a browser module, and the backend server is equipped with a Web embedded development service module; The browser module is used to input a target access address to connect to the Web embedded development service module through a network, and input debugging information into a web page fed back by the Web embedded development service module; The Web embedded development service module is also used to parse the debugging information, obtain the debugging command, and send the debugging command to the transit network device; The transit network device is connected to the embedded device by a line, and the transit network device is used to forward the debugging command to the embedded device through a network, so that the embedded device performs embedded operations in response to the debugging command.

2. The system according to claim 1, characterized in that The system also includes a reverse proxy service, the number of the backend servers is at least two, the client device performs network communication with the backend servers via the reverse proxy service, and the reverse proxy service is used to perform information protection and load balancing on each backend server.

3. The system according to claim 1, characterized in that The client device also has a command line module and a command line tool deployed therein. The command line tool is used to call the command line module so that the user can access the Web embedded development service module through the command line module, and to send debugging information to the Web embedded development service module through the command line module.

4. The system according to claim 1 or 3, characterized in that: The backend server is also deployed with a management module, and the management module is used to manage and configure the user data and embedded device data of the backend server.

5. The system according to claim 4, characterized in that The backend server is also deployed with a database and an edge service module; The database is used to store the embedded device data and the user data, and is used to receive and respond to the debugging command, and read and write the status data in the embedded device data; The edge service module is used to receive the debugging command issued by the Web embedded development service module through the Restful API, and send the debugging command to the transit network device.

6. The system according to claim 1, characterized in that The transit network equipment includes a power management device, a switch and several interface servers; The power supply device is used to supply power to the switch, the interface server and the embedded device; The switch is connected to each interface server line, and the switch is connected to the background server line. The switch is used to receive the debugging command sent by the background server and forward the debugging command to the target interface server corresponding to the target embedded device interface type. The target interface server sends the debugging command to the target embedded device according to the preset interface protocol.

7. The system according to claim 6, characterized in that The interface server includes a serial port server, and the Web embedded development service module is deployed with a WebSSH service, which is used to convert debugging information in text format into debugging information of the SSH protocol.

8. The system according to claim 5, characterized in that The database further includes an occupation status field and an occupation time field, wherein the occupation status field is used to indicate whether the embedded device is currently occupied by a certain client device, so that when the occupation status field indicates that any embedded device is occupied, the Web embedded development service module refuses to forward debugging commands to the transit network device for other client devices; when any occupied embedded device is manually released or automatically released, the corresponding occupation status field is changed from occupied to unoccupied; The occupation time field is used to indicate the limit time of the occupation state of the embedded device, so that when the database determines that a certain occupation state reaches the limit time, the corresponding embedded device is automatically released.

9. An embedded remote development and testing method, characterized in that: The method comprises: The client device sends an access request to the backend server through the browser module according to the target access address; The backend server receives the access request through the Web embedded development service module and feeds back the web page to the browser module of the client device; The client device inputs debugging information into the browser module; The backend server receives the debugging information through the Web embedded development service module and parses the debugging information to obtain a debugging command, and then sends the debugging command to the transit network device; The transit network device forwards the debugging command to the embedded device via the network; The embedded device performs an embedded operation in response to the debugging command.

10. The method according to claim 9, characterized in that The backend server receives the access request sent by the client device through the browser module through the Web embedded development service module, and feeds back the web page to the browser module of the client device, including: The reverse proxy service receives access requests sent by the client device through the browser module; The reverse proxy service sends the access request to the target backend server according to the current load information of each backend server; The target backend server receives the access request through the Web embedded development service module; The target backend server feeds back a web page to a browser module of a client device through the reverse proxy service according to the access request.

11. The method according to claim 9, characterized in that Before the backend server receives the debugging information through the Web embedded development service module and parses the debugging information, it also includes: The client device starts a command line tool; The client device calls the command line module through the command line tool; The client device inputs the debugging information through the command line module, and sends the debugging information to the background server through the command line module.

12. The method according to claim 9, characterized in that The sending the debugging command to the transit network device includes: Modify or read the state data of the embedded device in the database according to the debugging command; The debugging command is sent to the transit network device through the edge service module.

13. The method according to claim 9, characterized in that Before sending the debugging command to the transit network device, the method further includes: The target backend server determines whether the target embedded device currently to be operated by the client device is occupied through the occupation status field in the database; When the target embedded device is occupied, the target backend server refuses to forward the debugging command of the current client device through the Web embedded development service module; The target background server determines whether the occupancy time corresponding to the target embedded device reaches the corresponding limit time through the occupancy time field in the database, and releases the occupancy status field in the database when the limit time is reached.

Citation Information

Patent Citations

  • Development and debugging system and method for remotely sharing and using embedded board based on cloud account

    CN115658501A

  • Remote experiment method for embedded equipment

    CN112380034A

  • Web-based software debugging apparatus and method for remote debugging

    US20110252404A1

  • Remote debugging in an embedded system environment

    WO2001097039A1