[go: up one dir, main page]

CN120723233A - Web service system of lightweight embedded Bootloader - Google Patents

Web service system of lightweight embedded Bootloader

Info

Publication number
CN120723233A
CN120723233A CN202510608195.6A CN202510608195A CN120723233A CN 120723233 A CN120723233 A CN 120723233A CN 202510608195 A CN202510608195 A CN 202510608195A CN 120723233 A CN120723233 A CN 120723233A
Authority
CN
China
Prior art keywords
data
web
bootloader
command
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202510608195.6A
Other languages
Chinese (zh)
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.)
ADTECH (SHENZHEN) TECHNOLOGY CO LTD
Original Assignee
ADTECH (SHENZHEN) TECHNOLOGY 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 ADTECH (SHENZHEN) TECHNOLOGY CO LTD filed Critical ADTECH (SHENZHEN) TECHNOLOGY CO LTD
Priority to CN202510608195.6A priority Critical patent/CN120723233A/en
Publication of CN120723233A publication Critical patent/CN120723233A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a lightweight embedded Bootloader Web service system which comprises a Web front end and a Web back end server, wherein the Web front end comprises a UI module and a data processing module, and the UI module comprises a home page and each sub page and is used for viewing and operating Bootloader data with different classifications on different sub pages. The Web back-end server comprises a communication module and a Bootloader control module, wherein the newly added module only needs to expand a corresponding page and main.js interaction logic, so that the back-end expandability is realized, the function expansion is realized through a macro definition command, and the newly added command does not need to modify a communication task main logic.

Description

Web service system of lightweight embedded Bootloader
Technical Field
The invention relates to the technical field of computers, in particular to a lightweight embedded Bootloader Web service system.
Background
In the present day of interconnection, embedded systems play an increasingly important role in various devices. These systems often require periodic updates of their firmware to fix vulnerabilities or to add new functionality. Bootloader is a special program responsible for loading an operating system or application at device start-up. In embedded devices, bootloader management and firmware updates become particularly critical.
With the advent of internet of things (IoT) technology, many devices need to be managed over a network. Traditional Bootloader management methods generally depend on command line interfaces or special software and hardware, which have limitations on user experience and operation convenience, and existing technical solutions depend on complex command line operations, are not intuitive enough, and lack flexibility in user interface design. In addition, part of solutions have high resource occupation in embedded environments and are not suitable for equipment with limited resources, and most of the existing solutions are relatively fixed in function and difficult to rapidly expand according to the requirements of users.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention have been developed to provide a lightweight embedded Bootloader Web service system that overcomes or at least partially solves the foregoing problems.
In order to achieve the above purpose, the invention provides a lightweight embedded Bootloader Web service system, which comprises a Web front end and a Web back end server;
the Web front end comprises a UI module and a data processing module, wherein the UI module comprises a home page and each sub page and is used for viewing and operating Bootloader data with different classifications on different sub pages. The data processing module is only a main.js file, and the main.js file is used for receiving and transmitting state data and control data of the Bootloader, and packaging and analyzing the state data and the control data;
The Web back-end server comprises a communication module and a Bootloader control module, wherein the communication module calls an interface application socket of Lwip, is responsible for Web server initialization, receiving and transmitting Web data and analyzing http requests, sends control commands to the Bootloader control module according to analysis results, obtains corresponding data packages and sends return data to the Web, and the Bootloader control module realizes the control of Bootloader by calling a Bootloader base interface, puts status data for executing Bootloader control into a sending queue and sends the status data to the Web front end by the communication module.
Preferably, the Web front end adopts Layui frames to develop a modularized front end interface, and the function partition is realized through the structure of index.
Preferably, the main.js file includes variables of front-end and back-end interactions defined in the form of global variables;
The global variable can be used for html call of each sub-page. The global variables comprise Bootloader control commands, received data analysis codes and local global variables.
Preferably, the Web front end sends the control command to the back end server and its data are all sent by the post_ requst () function defined in main.
Preferably, a timer is defined in the index home page in the Web front end, and periodically invokes a poll_form_server () function in main.js to poll Bootloader status data in the back end server.
Preferably, the macro definition mode is adopted to define a Web command, the value of the Web command corresponds to a received data analysis code in the Web front end, the Web command is put into a transmission queue by a Bootloader control module, the communication module takes out queue data in an execution function of a poll command and sends the queue data to the Web front end through TCP, and then the browser analyzes specific data according to the received data analysis code.
Preferably, the control data sent to the Web server by the Web front end through the post request is packaged in json format, and the corresponding key value needs to be resolved according to the json key name in the Web server.
Preferably, the http_post request in the Web server communication task is mainly used for interacting with a Bootloader control task.
Preferably, the control command of the Web service system comprises a poll command which is sent by a Web periodically through a post request and is used for periodically acquiring the state data and log information of the Bootloader;
The fixed data comprises CPU temperature and DDR voltage, the fixed data needs to be sent to the Web front end in real time for the graph display of the Web front end, and each poll can send the data to the Web front end;
the non-fixed data comprises data which is generated by a Bootloader control task and stored in a data queue, wherein the data is taken out from the data queue and packed into json format when a poll command is executed, and then the data is sent to the Web front end through tcp, and the Web front end executes corresponding operation after analyzing.
When the front end of Web sends out uploading request, firstly, building up a post request, the post request contains file stream separator and file stream size describing the follow-up file stream of the uploading file, after the post request, analyzing the file information of the uploading file, recording the socket number of the request, storing in the corresponding data structure, distinguishing whether the request is the data stream of the file or not through the socket number in the next used request, if yes, carrying out data stream extraction and storing operation until the file stream end separator is found to indicate that the uploading of the file is completed.
The Web service system of the lightweight embedded Bootloader comprises a Web front end and a Web back end server, wherein the Web front end comprises a UI module and a data processing module, and the UI module comprises a home page and each sub page and is used for viewing and operating Bootloader data with different classifications on different sub pages. The system comprises a data processing module, a Web back-end server, a Web server and a system architecture, wherein the data processing module is only a main.js file which is used for receiving and transmitting state data and control data of a Bootloader and packaging and analyzing, the Web back-end server comprises a communication module and a Bootloader control module, the communication module calls an Lwip interface to apply for socket sockets, is responsible for Web server initialization, receiving and transmitting Web data and analyzing http requests, a control command is sent to the Bootloader control module according to an analysis result, corresponding data packaging is achieved, and then return data is sent to the Web, the Bootloader control module is used for controlling the Bootloader by calling a Bootloaderbase library interface, the state data for executing Bootloader control is put into a transmission queue, the communication module is used for transmitting the Bootloader control data to the Web front end through a Web interface, a user can intuitively operate, a use threshold is reduced, a lightweight protocol and a real-time operation system are adopted, the system architecture design is suitable for a resource limited environment, the addition and modification of a subsequent function become simpler, the front end is realized, a new page independent management function is realized through a sub page independent management function, a new page is only needs to be correspondingly expanded, a new page is required to be expanded, a new task is only needs to be required to be expanded, and a logic command is required to be expanded, and a new logic command is only needs to be required to be expanded to be executed to be expanded, and a communication task is required to be expanded, and a new logic task is required to be expanded to be correspondingly expanded.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of a lightweight embedded Bootloader Web service system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a Web front-end module partition in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of a Bootloader control command according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an example of a received data resolution code according to an embodiment of the present invention;
FIG. 5 is an exemplary schematic diagram of a local global variable according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a post_ requst function according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a Bootloaderweb back-end server according to one embodiment of the present invention;
FIG. 8 is a diagram illustrating an example of a Bootloader control command macro definition in accordance with an embodiment of the present invention;
FIG. 9 is an exemplary diagram of a Bootloader web serverWEB command macro definition according to an embodiment of the present invention;
FIG. 10 is an exemplary diagram of a Webjson data-resolution key name macro definition according to one embodiment of the present invention;
FIG. 11 is a schematic diagram of a Bootloaderweb server initialization process according to one embodiment of the present invention;
FIG. 12 is a schematic diagram of a Bootloader web server communication task flow in accordance with one embodiment of the present invention;
FIG. 13 is an exemplary diagram of a Web control command in accordance with an embodiment of the present invention;
FIG. 14 is a schematic diagram of a Web control command parsing function in accordance with an embodiment of the present invention;
FIG. 15 is an exemplary diagram of a file upload data structure in accordance with an embodiment of the present invention;
FIG. 16 is a schematic diagram of a Bootloader control task functional block diagram in accordance with an embodiment of the invention;
FIG. 17 is a Bootloaderweb management flow diagram of an embodiment of the present invention;
FIG. 18 is an internal block diagram of a computer device of one embodiment.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects solved by the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to FIG. 1, an architecture diagram of a lightweight embedded Bootloader Web service system according to an embodiment of the present invention is shown, where the system includes a Web front end and a Web back end server;
The invention discloses a man-machine interaction system for managing Bootloader through browser operation, and aims to provide a man-machine interaction interface for efficient and convenient Bootloader management aiming at the fact that the traditional Bootloader management mode generally depends on a command line interface or special software and hardware. The invention provides the function of Bootloader similar to the traditional serial port command operation, such as system state display, system parameter setting, encryption management, program uploading, program updating and the like. The invention realizes the function of setting and managing various parameters of the Bootloader by establishing the Web server in the machine and enabling the user to access the corresponding IP address only through the browser of the PC end.
The front end part of the invention adopts the languages such as HTML+JAVA script+CSS and the like for development, and develops the UI interface based on the open source framework, the invention has the characteristics of simple structure, good portability, high degree of freedom and good extensible performance, and the control protocol of the rear-end Bootloader is customized. The back end is developed by adopting a C language based on Lwip socket network programming, all functions are developed according to actual requirements, redundant codes are not excessive, precious embedded software and hardware resources are greatly saved, and meanwhile, the real-time performance of control is ensured.
The front end of the invention adopts Layui as a template to develop the Web front end, and develops a Web back end server based on uC/OS-III and Lwip under the ZYNQ PS end. The back-end server develops from two sub-modules, namely a Web back-end service module and a Bootloader control module. The functional block diagram is shown in fig. 1.
The Web service module is used for providing an operation environment for the Web front end and exchanging control data and state data between the Web front end and the Bootloader control module. The Bootloader control module is used for controlling the Bootloader system mainly according to control data from the Web service module. The Bootloader control module is independent of the original Bootloader control system, and Web operation does not affect Bootloader functions which are originally operated by a serial port, a touch screen or keys.
The Web front end comprises a UI module and a data processing module, wherein the UI module comprises a home page and each sub page and is used for viewing and operating Bootloader data with different classifications on different sub pages. The data processing module is only a main.js file, and the main.js file is used for receiving and transmitting state data and control data of the Bootloader, and packaging and analyzing the state data and the control data;
The Web back-end server comprises a communication module and a Bootloader control module, wherein the communication module calls an interface application socket of Lwip, is responsible for Web server initialization, receiving and transmitting Web data and analyzing http requests, sends control commands to the Bootloader control module according to analysis results, obtains corresponding data packages and sends return data to the Web, and the Bootloader control module realizes the control of Bootloader by calling a Bootloader base interface, puts status data for executing Bootloader control into a sending queue and sends the status data to the Web front end by the communication module.
The Web front end UI framework adopts an index. And switching to different sub pages through the home menu item, wherein each sub page corresponds to one html source file. The Web front end is generally divided into two modules, a UI module and a data processing module. The UI module consists of a home page and each sub page, and a user can view and operate Bootloader data with different classifications on different sub pages. The data processing module is only a main.js file, and is used for transceiving, packing and analyzing the status data and the control data of the Bootloader, and finally transmitting the data stream in a TCP mode, as shown in fig. 2.
In the embodiment of the invention, the Web front end adopts Layui frames to develop the modularized front end interface, and the function partition is realized through the structure of index.
Preferably, the main.js file comprises variables of front-end and back-end interaction defined in a global variable form, and the global variable can be called by html of each sub-page. The global variables comprise Bootloader control commands, received data analysis codes and local global variables.
In the embodiment of the present invention, the Web front end sends the control command and the data thereof to the back end server by the post_ requst () function defined in main.
The front-end Web sends control commands and their data to the back-end server, both by the post_ requst () function defined in main.js, as shown in fig. 6. The parameter cmdR in post_ requst () is the target url, and the Web server performs command parsing through url, and when in use, cmdR directly refers to the Bootloader control command variable shown in fig. 3 (the variable must be the same as the macro definition defined by the Web server for parsing the Bootloader control command, otherwise, the parsing cannot be successfully performed). The parameter dataR is target data to be transmitted, and the transmitted data must be encapsulated in json format. Sync is a determination of whether to synchronize or asynchronously request when a post request. The Sync is asynchronous transmission when true. Sync is a synchronous transmission when it is false.
Preferably, a timer is defined in the index home page in the Web front end, and periodically invokes a poll_form_server () function in main.js to poll Bootloader status data in the back end server.
If a certain data in the server needs to be acquired quickly and needs to be processed immediately, the data returned by the function can be sent in a synchronous mode as shown in fig. 6, the data returned by the function is the target data needing to be acquired, and the returned data is packaged in json format.
A timer is defined in the index home page in the Web, and periodically calls the poll_form_server () function in main.js to poll Bootloader state data in the back-end server. For data that needs to be used multiple times or needs to be updated periodically, the method is adopted for periodic acquisition. For example, the CPU temperature data, the voltage data, the system time data, the system log data, and the like of the device are periodically acquired in this manner. The returned data is stored in the local global variable shown in fig. 5 for each sub-page after being resolved by the received data resolving code shown in fig. 4.
In the embodiment of the invention, a Web command is defined in a Web back-end server in a macro definition mode, the value of the Web command corresponds to a received data analysis code in a Web front-end, the Web command is put into a transmission queue by a Bootloader control module, a communication module takes out queue data in an execution function of a poll command and transmits the queue data to the Web front-end through a TCP, and a browser analyzes specific data according to the received data analysis code.
As shown in fig. 8, the Bootloader control command is defined in a macro definition manner, and the macro definition values correspond to the Bootloader control command values shown in fig. 3 in the Web front end. After receiving the post request, the Web server analyzes the Bootloader control command through the data and the macro definition command.
In fig. 9, a Web command is defined in a macro definition manner, and the value of the Web command corresponds to the received data parsing code in the front-end Web, and the command is usually put into a transmission queue by a Bootloader control module. The communication module takes out the queue data in the execution function of the poll command and sends the queue data to the Web front end through the TCP, and the browser analyzes specific data according to the received data analysis code.
The control data sent to the Web server by the Web front end through the post request is packaged in json format, so that corresponding key values need to be analyzed according to the key names of json in the Web server, fig. 10 is a macro definition of each json data key name, and the key values of the macro definition are consistent with the key values sent by the Web front end.
The initialization flow chart of the Web server is shown in FIG. 11, and a Web server communication task and a Bootloader control task and a data transmission queue thereof are created after the initialization is completed.
Bootloader web server the communication task flow is shown in figure 12. The http_get request in the Web server communication task is mainly used for a browser to acquire a webpage file, send the webpage file to the browser, and then render the webpage by the browser. The http_post request in the Web server communication task is mainly used for interacting with the Bootloader control task, so that the basic function of the Bootloader is realized. When the http post request is processed, a Web control command analysis function shown in fig. 14 is called, and the control command in the post request is analyzed according to the Web control command defined in fig. 13. And if the command obtained through analysis is a simple command, the command can be executed in the task and corresponding data can be returned, and if the command is executed with a long time, the command is transmitted into a Bootloader control task for execution.
The control command of the Web service system comprises a poll command, wherein one special command in the control command is the poll command, and the poll command is sent by a post request periodically by the Web and is used for periodically acquiring the status data and log information of the Bootloader. Wherein the data is divided into fixed data and non-fixed data. Fixed data such as CPU temperature, DDR voltage and the like are required to be sent to the Web front end in real time and displayed by a graph of the Web front end, and each poll can send the data to the Web front end. The non-fixed data is usually related data generated by a Bootloader control task and stored in a data queue. And when the poll command is executed, the data are taken out from the data queue and packed into json format, then are sent to the Web front end through tcp, and the Web front end executes corresponding operation after analyzing. For example, the running log of Bootloader, the progress data of progress bar and the prompt content of prompt popup are non-fixed data.
Further, the control command comprises a file uploading command, the file stream in the Web server communication task requests to use the file uploading command, and the file uploading command is another more special command in the control command. When the Web front end sends an upload request, there is a post request first, where the post request includes information such as a file stream separator and a file stream size that describe a subsequent file stream of the upload file. The network request immediately following this post request is the data stream of the file, with other requests also currently interleaved. Therefore, the file information of the uploaded file must be parsed in the post request, and the socket number of the request is recorded and stored in the corresponding data structure as shown in fig. 15. And in the next used request, distinguishing whether the request is the data stream of the file or not through the socket number, if so, carrying out data stream extraction and storage operation until the file stream end separator is found and the uploading of the file is completed, so that the file is uploaded.
The Bootloader control task is used for executing a time-consuming task command, firstly analyzing the time-consuming task command transmitted by the Web server communication task, then starting to specifically execute a corresponding function, if necessary, putting information which is reacted in the Web reaction in the execution process into a data queue, and then taking out and packaging the information from the data queue by the Web server communication task when executing the poll command, and then sending the information to the Web front end.
Bootloader control task functions are shown in fig. 16.
Bootloaderweb the management flow chart is shown in figure 17. The user opens the browser and enters Bootloaderweb the login interface after entering the device IP in the address bar. After the correct password is input, the device enters a device state display interface, and the interface can monitor information such as device voltage, temperature, log information, software version number and the like. And then selecting corresponding management functions according to the requirements. Any of the following functions may be selected for operation, as described below:
Network management, namely setting information such as network IP addresses. Disk management, which is used for formatting the disk and formatting the disk partition. Program update, which is used for checking and updating the firmware program of the equipment. Encryption management, which is used for encrypting and authorizing the equipment. And the system self-checking is used for self-checking the DDR, the ferroelectric chip and the screen of the equipment. System settings for setting the device's start-up options and language, etc. And an operation log is generated after the operation is performed, so that subsequent debugging and problem tracking are facilitated. The user may continue with other operations or exit the management after each operation is completed.
In the embodiment of the invention, a lightweight Web service architecture based on a Zynq platform and an implementation method thereof are provided, wherein a dual-task model is constructed on an ARM processor (PS end) of the Zynq platform through integrating a uC/OS-III real-time operating system and an Lwip lightweight TCP/IP protocol stack, a GET request (Web page file transmission) and a POST request (control command analysis) are realized based on an HTTP protocol processing module of the Lwip, and a front-end instruction is rapidly matched through a JSON key value macro definition (figure 10). High-time-consuming operations (such as program updating and disk formatting) are independently executed, and the front-end operation blockage is avoided by asynchronously interacting with the communication task through the shared data queue. The macro definition mode (figures 8-9) is adopted to uniformly manage the command and the status code, so that the code redundancy is reduced, the low memory occupancy rate is realized, and most of embedded chip platforms can be met.
Based on Layui front end framework development modular interface, adopting index.html nested sub-page structure (figure 2), supporting dynamic loading function module (such as network configuration, firmware updating page), replacing traditional command line operation. The mixed communication mode is synchronous request, instant response (such as parameter setting and encryption authorization) for key instructions, asynchronous polling (Poll command), and the front-end graph is updated in real time by periodically acquiring device state data (CPU temperature and voltage) through a timer (figure 4).
In the embodiment of the invention, the custom protocol and the efficient data transmission are realized, wherein the JSON data encapsulation specification comprises the steps of defining global variables (shown in figures 3-5) to uniformly manage control commands, analysis codes and state data, and realizing front-end and back-end data decoupling. The staged file uploading technology (figure 15) comprises the steps that a front end uploads a file stream based on XMLHttpRequest fragments, the file boundary is marked through a custom separator, the back end tracks uploading session through Socket numbers, and the uploading session is checked and stored according to the sequence of fragments, so that system resource exhaustion caused by large file transmission is avoided.
In the embodiment of the invention, through a Web interface, a user can intuitively operate, the use threshold is reduced, a lightweight protocol and a real-time operating system are adopted, the system architecture design enables the addition and modification of subsequent functions to be simpler, front-end modularization is realized, through the independent management function of sub pages, a newly added module only needs to expand corresponding pages and main.js interaction logic, rear-end expandability is realized, function expansion is realized through macro definition commands, the newly added commands do not need to modify communication task main logic, and analysis and execution codes only need to be added in control tasks.
In one embodiment, a computer device is provided, which may be a PC or a ZYNQ platform device, or an integral system device formed by the two, and the internal structure of the computer device may be shown in fig. 18. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by the processor, implements a lightweight embedded Bootloader Web service system. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 18 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor implementing steps corresponding to the above-described system when the computer program is executed.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps corresponding to the system described above. In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing describes the invention in detail, and specific examples are provided herein to illustrate the principles and embodiments of the invention, and the description of the foregoing examples is only for aiding in the understanding of the method and core concept of the invention, and meanwhile, for those skilled in the art, there are variations in the specific embodiments and application scope according to the inventive concept, so the disclosure should not be construed as limiting the invention.

Claims (10)

1. A lightweight embedded Bootloader Web service system is characterized by comprising a Web front end and a Web back end server;
The Web front end comprises a UI module and a data processing module, wherein the UI module comprises a home page and each sub page and is used for viewing and operating Bootloader data with different classifications on different sub pages, and the data processing module is only a main.js file which is used for receiving and transmitting state data and control data of the Bootloader, and packaging and analyzing the state data and the control data of the Bootloader;
The Web back-end server comprises a communication module and a Bootloader control module, wherein the communication module calls an interface application socket of Lwip, is responsible for Web server initialization, receiving and transmitting Web data and analyzing http requests, sends control commands to the Bootloader control module according to analysis results, obtains corresponding data packages and sends return data to the Web, and the Bootloader control module realizes the control of Bootloader by calling a Bootloader base interface, puts status data for executing Bootloader control into a sending queue and sends the status data to the Web front end by the communication module.
2. The Web service system of the lightweight embedded Bootloader according to claim 1, wherein the Web front end adopts Layui frames to develop a modularized front end interface, and the functional partition is realized through the structure of index.
3. The Web service system of the lightweight embedded Bootloader according to claim 1, wherein the main.js file includes variables of front-end and back-end interactions defined in the form of global variables, and the global variables are available for html calls of each sub-page. The global variables comprise Bootloader control commands, received data analysis codes and local global variables.
4. The Web service system of claim 1, wherein the Web front end sends control commands and data thereof to the back end server by a post_ requst () function defined in main.
5. The lightweight embedded Bootloader Web service system according to claim 1, wherein a timer is defined in the index front page in the Web front end, and periodically invokes a poll_form_server () function in main.js to poll Bootloader state data in the back end server.
6. The Web service system of the lightweight embedded Bootloader according to claim 1, wherein the Web command is defined in a macro-defined manner, a value of the Web command corresponds to a received data analysis code in a Web front end, the Web command is put into a transmission queue by a Bootloader control module, the communication module takes out queue data in an execution function of a poll command and transmits the queue data to the Web front end through a TCP, and the browser analyzes specific data according to the received data analysis code.
7. The Web service system of the lightweight embedded Bootloader according to claim 1, wherein the control data sent to the Web server by the post request is packaged in json format, and the corresponding key value needs to be resolved according to the key name of json in the Web server.
8. The Web service system of the lightweight embedded Bootloader of claim 1, wherein an http_post request in the Web server communication task is mainly used for interacting with a Bootloader control task.
9. The Web service system of the lightweight embedded Bootloader according to claim 1, wherein the control command of the Web service system includes a poll command, which is issued by the Web periodically through a post request, for periodically acquiring status data and log information of the Bootloader;
The fixed data comprises CPU temperature and DDR voltage, the fixed data needs to be sent to the Web front end in real time for the graph display of the Web front end, and each poll can send the data to the Web front end;
the non-fixed data comprises data which is generated by a Bootloader control task and stored in a data queue, wherein the data is taken out from the data queue and packed into json format when a poll command is executed, and then the data is sent to the Web front end through tcp, and the Web front end executes corresponding operation after analyzing.
10. The Web service system of claim 9, wherein the control command includes a file upload command, the file upload command is used in a file stream request in a Web server communication task, when the Web front end sends an upload request, a post request is first established, the post request includes a file stream separator and a file stream size describing a subsequent file stream of the upload file, the data stream of the file after the post request is analyzed in the post request, a socket number of the request is recorded and stored in a corresponding data structure, whether the request is a data stream of the file is distinguished in a next request by the socket number, if so, a data stream extraction and storage operation is performed until the file stream end separator is found to indicate that the uploading of the file is completed.
CN202510608195.6A 2025-05-13 2025-05-13 Web service system of lightweight embedded Bootloader Pending CN120723233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510608195.6A CN120723233A (en) 2025-05-13 2025-05-13 Web service system of lightweight embedded Bootloader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510608195.6A CN120723233A (en) 2025-05-13 2025-05-13 Web service system of lightweight embedded Bootloader

Publications (1)

Publication Number Publication Date
CN120723233A true CN120723233A (en) 2025-09-30

Family

ID=97161310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510608195.6A Pending CN120723233A (en) 2025-05-13 2025-05-13 Web service system of lightweight embedded Bootloader

Country Status (1)

Country Link
CN (1) CN120723233A (en)

Similar Documents

Publication Publication Date Title
KR102493449B1 (en) Edge computing test methods, devices, electronic devices and computer-readable media
US8190274B2 (en) Method and control device for controlling an automating system
RU2466450C2 (en) Method and system to develop it-oriented server network applications
JP6921200B2 (en) Service processing method and device
EP3011442B1 (en) Method and apparatus for customized software development kit (sdk) generation
KR101507629B1 (en) Browser-based proxy server for customization and distribution of existing applications
US20120284696A1 (en) Method, Apparatuses and a System for Compilation
CN111444103B (en) A Web page automated testing method and related equipment
CN111427594B (en) Application program running method and device
US20170286040A1 (en) Display and operating unit and method of operating a field instrument having a display and operating unit
US10178170B2 (en) Browser-based virtual media administration
EP3872630A2 (en) Request processing method and apparatus, electronic device, and computer storage medium
JP2013080404A (en) System, computer, method, and program which call java method on client
CN111078104A (en) Redirection method of multi-point touch equipment on cloud desktop and computer equipment
US12045631B2 (en) Page loading method and display apparatus
CN112154417B (en) Sharing code libraries between stand-alone and Web-based versions of an application via an emulated network communication channel
JP5039946B2 (en) Technology for relaying communication between client devices and server devices
CN118939382B (en) Virtual machine operation data acquisition method and terminal
CN109408057B (en) Method, device, medium and computing equipment for automatically generating codes
CN112491940A (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
CN118259922B (en) Compiling method, compiling device, compiling product, compiling device, compiling equipment and compiling medium for application program
CN120723233A (en) Web service system of lightweight embedded Bootloader
US20060080636A1 (en) Method of building intelligent platform management interface firmware architecture
CN108667902B (en) Remote control system, method, device and equipment of iOS equipment
JP5959535B2 (en) Server, method, and program for causing a computer to function as a server for accessing a mobile terminal from a client via a network

Legal Events

Date Code Title Description
PB01 Publication