[go: up one dir, main page]

CN104536837A - Realization method for accessing multi-platform data by embedded type web server based on Linux - Google Patents

Realization method for accessing multi-platform data by embedded type web server based on Linux Download PDF

Info

Publication number
CN104536837A
CN104536837A CN201410766920.4A CN201410766920A CN104536837A CN 104536837 A CN104536837 A CN 104536837A CN 201410766920 A CN201410766920 A CN 201410766920A CN 104536837 A CN104536837 A CN 104536837A
Authority
CN
China
Prior art keywords
data
platform
page
httpd
linux
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.)
Granted
Application number
CN201410766920.4A
Other languages
Chinese (zh)
Other versions
CN104536837B (en
Inventor
刘玉喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Taiyu Information Technology Co ltd
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201410766920.4A priority Critical patent/CN104536837B/en
Publication of CN104536837A publication Critical patent/CN104536837A/en
Application granted granted Critical
Publication of CN104536837B publication Critical patent/CN104536837B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明提供一种基于Linux的嵌入式web服务器访问多平台数据的实现方法,嵌入式设备调用httpd进程接收数据请求,并通过CGI对数据请求进行解析和分解,获取所请求数据的控制报文类型以及相应的分解数据;根据所请求数据的控制报文类型,确定数据所在平台;判断数据所在平台是否为当前平台;若是,从当前平台上直接获取所要求的数据,并返回给嵌入式设备;若否,访问数据所在平台对应的客户端,客户端再访问对应的服务端,服务端在平台上获取数据,并返回至客户端,客户端将数据返回给嵌入式设备。本发明的基于Linux的嵌入式web服务器访问多平台数据的实现方法不破坏当前各个平台的架构;实现了web服务器对多个不同平台的数据信息的访问,便于移植,易于维护。

The present invention provides a method for implementing a Linux-based embedded web server to access multi-platform data. The embedded device calls the httpd process to receive the data request, and analyzes and decomposes the data request through CGI to obtain the control message type of the requested data. And the corresponding decomposed data; according to the control message type of the requested data, determine the platform where the data is located; determine whether the platform where the data is located is the current platform; if so, directly obtain the required data from the current platform and return it to the embedded device; If not, access the client corresponding to the platform where the data is located, and then the client accesses the corresponding server. The server obtains the data on the platform and returns it to the client, and the client returns the data to the embedded device. The implementation method of the Linux-based embedded web server accessing multi-platform data of the present invention does not destroy the current framework of each platform; realizes the web server's access to data information of multiple different platforms, and is easy to transplant and maintain.

Description

基于Linux的嵌入式web服务器访问多平台数据的实现方法Implementation method of Linux-based embedded web server accessing multi-platform data

技术领域technical field

本发明涉及一种web服务器访问平台数据的方法,特别是涉及一种基于Linux的嵌入式web服务器访问多平台数据的实现方法。The invention relates to a method for a web server to access platform data, in particular to an implementation method for a Linux-based embedded web server to access multi-platform data.

背景技术Background technique

在采用Linux作为操作系统的嵌入式设备中,Linux系统提供各个功能模块进程之间及线程之间的通信。如何在Linux环境下实现准确且高效的数据获取成为研发中的重点所在。In an embedded device using Linux as an operating system, the Linux system provides communication between processes and threads of each functional module. How to achieve accurate and efficient data acquisition in the Linux environment has become the focus of research and development.

在嵌入式设备的研发中,为了快速运行设备和提供高效的功能,通常会将多个平台的架构放在同一个设备中运行,而且所采用的数据则分别存储在对应的平台中,各个平台有自己的数据处理机制。因此,在添加web功能时,需要获取各个平台的数据。由于各个平台的数据处理机制不同,且平台不能直接访问平台数据,会出现各个平台处理数据负荷不一致的情况,导致影响了整个设备的运行,如图1所示的情况。In the research and development of embedded devices, in order to quickly run the device and provide efficient functions, the architectures of multiple platforms are usually run on the same device, and the data used are stored in the corresponding platforms. Each platform It has its own data processing mechanism. Therefore, when adding web functions, it is necessary to obtain the data of each platform. Since the data processing mechanism of each platform is different, and the platform cannot directly access the platform data, the processing data load of each platform will be inconsistent, which will affect the operation of the entire device, as shown in Figure 1.

另外,现有技术中,嵌入式设备只是通过httpd进程通过解析后访问一个平台的数据,并不能访问多个平台的数据。In addition, in the prior art, the embedded device only accesses the data of one platform after parsing through the httpd process, and cannot access the data of multiple platforms.

发明内容Contents of the invention

鉴于以上所述现有技术的缺点,本发明的目的在于提供一种基于Linux的嵌入式web服务器访问多平台数据的实现方法,在实现更好的移植且不破坏当前各个平台的架构的基础上,在Linux系统中通过httpd进程获取多个不同平台的数据,以达到页面访问的目的。In view of the above-mentioned shortcoming of prior art, the object of the present invention is to provide a kind of implementation method based on Linux embedded web server access multi-platform data, on the basis of realizing better transplantation and not destroying the framework of current each platform , in the Linux system, the data of multiple different platforms is obtained through the httpd process, so as to achieve the purpose of page access.

为实现上述目的及其他相关目的,本发明提供一种基于Linux的嵌入式web服务器访问多平台数据的实现方法,包括以下步骤:步骤S1、当访问嵌入式设备的web页面时,嵌入式设备调用httpd进程接收数据请求,并通过CGI对数据请求进行解析和分解,获取所请求数据的控制报文类型以及相应的分解数据;步骤S2、嵌入式设备根据所请求数据的控制报文类型,确定数据所在平台;判断数据所在平台是否为当前平台;若是,转入步骤S3;若否,转入步骤S4;步骤S3、从当前平台上直接获取所要求的数据,并返回给嵌入式设备;步骤S4、访问数据所在平台对应的客户端,数据所在平台对应的客户端再访问对应的服务端,对应的服务端在数据所在平台上获取所要求的数据,并返回至数据所在平台对应的客户端,数据所在平台对应的客户端将所要求的数据返回给嵌入式设备。In order to achieve the above purpose and other related purposes, the present invention provides a method for implementing a Linux-based embedded web server to access multi-platform data, comprising the following steps: Step S1, when accessing the web page of the embedded device, the embedded device calls The httpd process receives the data request, and analyzes and decomposes the data request through CGI, obtains the control message type of the requested data and the corresponding decomposed data; step S2, the embedded device determines the data according to the control message type of the requested data The platform where the data is located; whether the platform where the data is located is the current platform; if so, proceed to step S3; if not, proceed to step S4; step S3, directly obtain the required data from the current platform, and return to the embedded device; step S4 , access the client corresponding to the platform where the data resides, the client corresponding to the platform where the data resides then visits the corresponding server, the corresponding server obtains the required data on the platform where the data resides, and returns to the client corresponding to the platform where the data resides, The client corresponding to the platform where the data resides returns the required data to the embedded device.

根据上述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其中:用户端通过设备的浏览器访问嵌入式设备的web页面。According to the implementation method for accessing multi-platform data by an embedded web server based on Linux, wherein: the client accesses the web page of the embedded device through the browser of the device.

根据上述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其中:获取所请求数据的控制报文类型时,通过页面的名字进行匹配来确定。According to the implementation method of the above-mentioned Linux-based embedded web server accessing multi-platform data, wherein: when obtaining the control message type of the requested data, it is determined by matching the name of the page.

根据上述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其中:所述步骤S1中,CGI的处理过程包括如下步骤:According to the implementation method of the above-mentioned Linux-based embedded web server accessing multi-platform data, wherein: in the step S1, the CGI process includes the following steps:

CGI接收httpd进程接收到的数据请求;CGI receives the data request received by the httpd process;

判断数据请求的报文头是否是设置操作;Determine whether the header of the data request is a setting operation;

若是设置操作,接收httpd设置数据请求,根据数据请求的页面进行解析,并将页面和数据结构表中的已知数据页面进行匹配;若存在匹配的页面,则将需要设置的功能数据存储于临时缓存中,通过页面索引将页面中所有需要保存的功能数据发送给相应的平台,平台接收数据进行处理,并将处理结果回传;若不存在匹配的页面,则丢弃该数据请求,CGI将结果发送给httpd,再由httpd发送给请求数据的http客户端;If it is a setting operation, receive httpd setting data request, analyze according to the page of the data request, and match the page with the known data page in the data structure table; if there is a matching page, store the function data that needs to be set in the temporary In the cache, all the functional data that needs to be saved in the page are sent to the corresponding platform through the page index, the platform receives the data for processing, and returns the processing result; if there is no matching page, the data request is discarded, and CGI sends the result Send it to httpd, and then httpd sends it to the http client requesting data;

若不是设置操作,接收httpd获取数据请求,接收页面数据,根据数据请求的页面进行解析,并将页面和数据结构表中的已知数据页面进行匹配;若存在匹配的页面,则通过页面索引从所在的平台中获取页面需要的所有数据,将获取的数据存储于临时缓存中,解析页面中需要的功能参数,通过功能参数表,从临时缓存中获取数据,并回传给httpd,httpd再发送给请求数据的http客户端;若不存在匹配的页面,则丢弃该数据请求,CGI将结果发送给httpd,再由httpd发送给请求数据的http客户端。If it is not a setting operation, receive httpd to obtain data requests, receive page data, analyze according to the page of the data request, and match the page with the known data page in the data structure table; if there is a matching page, use the page index from Obtain all the data required by the page in the platform where it is located, store the acquired data in the temporary cache, analyze the function parameters required in the page, obtain the data from the temporary cache through the function parameter table, and send it back to httpd, and httpd sends it again To the http client requesting data; if there is no matching page, the data request is discarded, CGI sends the result to httpd, and then httpd sends it to the http client requesting data.

根据上述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其中:所述步骤S4中,数据所在平台对应的客户端将所要求的数据返回给嵌入式设备时,所要求的数据返回给嵌入式设备的httpd进程,httpd进程再将所要求的数据返回给浏览器,以便用户看到嵌入式设备的页面信息。According to the implementation method of the above-mentioned Linux-based embedded web server accessing multi-platform data, wherein: in the step S4, when the client corresponding to the platform where the data is located returns the required data to the embedded device, the required data returns To the httpd process of the embedded device, the httpd process returns the required data to the browser so that the user can see the page information of the embedded device.

根据上述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其中:所述步骤S4中,客户端和服务端间的通信机制是采用Linux的ipc通信机制来完成。According to the implementation method of the above-mentioned Linux-based embedded web server accessing multi-platform data, wherein: in the step S4, the communication mechanism between the client and the server is completed by using the Linux ipc communication mechanism.

根据上述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其中:所述步骤S4中,客户端到服务端的过程是线程到进程、进程到进程、线程到线程或进程到线程。According to the implementation method of the above-mentioned Linux-based embedded web server accessing multi-platform data, wherein: in the step S4, the process from the client to the server is thread-to-process, process-to-process, thread-to-thread or process-to-thread.

如上所述,本发明的基于Linux的嵌入式web服务器访问多平台数据的实现方法,具有以下有益效果:As mentioned above, the implementation method of Linux-based embedded web server accessing multi-platform data of the present invention has the following beneficial effects:

(1)实现了更好的移植且不破坏当前各个平台的架构;(1) Better porting is achieved without destroying the current architecture of each platform;

(2)实现了web服务器对多个不同平台的数据信息的访问;(2) The access of the web server to the data information of multiple different platforms is realized;

(3)便于移植,易于维护。(3) Easy to transplant and easy to maintain.

附图说明Description of drawings

图1显示为现有技术中多个平台各自进行数据处理的示意图;FIG. 1 shows a schematic diagram of data processing performed by multiple platforms in the prior art;

图2显示为本发明的基于Linux的嵌入式web服务器访问多平台数据的实现方法的框架流程图;Fig. 2 is shown as the frame flow chart of the realization method that the embedded web server based on Linux of the present invention visits multi-platform data;

图3显示为本发明中CGI的处理流程图;Fig. 3 shows the processing flowchart of CGI among the present invention;

图4显示为本发明的基于Linux的嵌入式web服务器访问多平台数据的实现方法的详细流程图;Fig. 4 is shown as the detailed flowchart of the realization method that the Linux-based embedded web server of the present invention visits multi-platform data;

图5显示为本发明中客户端和服务端间的通信机制的示意图。FIG. 5 is a schematic diagram of the communication mechanism between the client and the server in the present invention.

具体实施方式Detailed ways

以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。Embodiments of the present invention are described below through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation modes, and various modifications or changes can be made to the details in this specification based on different viewpoints and applications without departing from the spirit of the present invention.

需要说明的是,本实施例中所提供的图示仅以示意方式说明本发明的基本构想,遂图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。It should be noted that the diagrams provided in this embodiment are only schematically illustrating the basic idea of the present invention, and only the components related to the present invention are shown in the diagrams rather than the number, shape and shape of the components in actual implementation. Dimensional drawing, the type, quantity and proportion of each component can be changed arbitrarily during actual implementation, and the component layout type may also be more complicated.

本发明中,web服务器需要跨平台实现对数据的访问,其中跨平台是指运行在多种不同架构上的进程或者线程。In the present invention, the web server needs to access data across platforms, where cross-platform refers to processes or threads running on multiple different architectures.

参照图2,本发明的基于Linux的嵌入式web服务器访问多平台数据的实现方法包括以下步骤:With reference to Fig. 2, the realization method that the Linux-based embedded web server of the present invention visits multi-platform data comprises the following steps:

步骤S1、当用户端访问嵌入式设备的web页面时,嵌入式设备调用httpd进程接收数据请求,并通过通用网关接口(Common Gateway Interface,CGI)对数据请求进行解析和分解,获取所请求数据的控制报文类型以及相应的分解数据。Step S1, when the client accesses the web page of the embedded device, the embedded device calls the httpd process to receive the data request, and parses and decomposes the data request through the Common Gateway Interface (CGI) to obtain the requested data Control packet type and corresponding decomposition data.

具体地,用户端通过设备如PC的浏览器访问嵌入式设备的web页面。嵌入式设备中当前平台的httpd进程接收该http数据请求,并通过CGI进行解析和分解,以获取所请求数据的控制报文类型。其中,获取所请求数据的控制报文类型时,通过页面的名字进行匹配来确定。Specifically, the client accesses the web page of the embedded device through a browser of the device such as a PC. The httpd process of the current platform in the embedded device receives the http data request, and analyzes and decomposes it through CGI to obtain the control message type of the requested data. Wherein, when obtaining the control message type of the requested data, it is determined by matching the names of the pages.

参照图3,CGI的处理过程包括如下步骤:With reference to Fig. 3, the processing procedure of CGI comprises the following steps:

CGI接收httpd进程接收到的数据请求。CGI receives data requests received by the httpd process.

判断数据请求的报文头是否是设置(set)操作。Determine whether the header of the data request is a set operation.

若是set操作,接收httpd设置数据请求,根据数据请求的页面进行解析,并将页面和数据结构表中的已知数据页面进行匹配;若存在匹配的页面,则将需要设置的功能数据存储于临时缓存中,通过页面索引将页面中所有需要保存的功能数据发送给相应的平台,平台接收数据进行处理,并将处理结果回传;若不存在匹配的页面,则丢弃该数据请求,CGI将结果发送给httpd,再由httpd发送给请求数据的http客户端。If it is a set operation, it receives the httpd setting data request, parses it according to the page of the data request, and matches the page with the known data page in the data structure table; if there is a matching page, store the function data that needs to be set in the temporary In the cache, all the functional data that needs to be saved in the page are sent to the corresponding platform through the page index, the platform receives the data for processing, and returns the processing result; if there is no matching page, the data request is discarded, and the CGI sends the result Send to httpd, and then httpd sends to the http client requesting data.

若不是set操作,接收httpd获取数据请求,接收页面数据,根据数据请求的页面进行解析,并将页面和数据结构表中的已知数据页面进行匹配;若存在匹配的页面,则通过页面索引从所在的平台中获取页面需要的所有数据,将获取的数据存储于临时缓存中,解析页面中需要的功能参数,通过功能参数表,从临时缓存中获取数据,并回传给httpd,httpd再发送给请求数据的http客户端;若不存在匹配的页面,则丢弃该数据请求,CGI将结果发送给httpd,再由httpd发送给请求数据的http客户端。If it is not a set operation, receive the data request from httpd, receive the page data, analyze the page according to the data request, and match the page with the known data page in the data structure table; if there is a matching page, use the page index from Obtain all the data required by the page in the platform where it is located, store the acquired data in the temporary cache, analyze the function parameters required in the page, obtain the data from the temporary cache through the function parameter table, and send it back to httpd, and httpd sends it again To the http client requesting data; if there is no matching page, the data request is discarded, CGI sends the result to httpd, and then httpd sends it to the http client requesting data.

步骤S2、嵌入式设备根据所请求数据的控制报文类型,确定数据所在平台;判断数据所在平台是否为当前平台;若是,转入步骤S3;若否,转入步骤S4。Step S2, the embedded device determines the platform where the data resides according to the control message type of the requested data; judges whether the platform where the data resides is the current platform; if yes, proceeds to step S3; if not, proceeds to step S4.

步骤S3、从当前平台上直接获取所要求的数据,并返回给嵌入式设备。Step S3, directly obtain the required data from the current platform, and return it to the embedded device.

步骤S4、访问数据所在平台对应的客户端,数据所在平台对应的客户端再访问对应的服务端,对应的服务端在数据所在平台上获取所要求的数据,并返回至数据所在平台对应的客户端,数据所在平台对应的客户端最后返回给嵌入式设备。Step S4, access the client corresponding to the platform where the data resides, the client corresponding to the platform where the data resides visits the corresponding server, the corresponding server obtains the required data on the platform where the data resides, and returns to the client corresponding to the platform where the data resides end, and the client corresponding to the platform where the data resides is finally returned to the embedded device.

例如,参照图4,通过页面的名字进行查找时,匹配到该页面的数据在平台a中,那么到对接平台a的客户端中请求数据;当对接a的客户端收到数据请求时,会发送到平台a的服务端,平台a的服务端收到该数据请求后,在a平台的中取出所要求的数据,并将数据返回给对接平台a的客户端,对接平台a的客户端收到数据后再返回给嵌入式设备的httpd进程,httpd进程最终将数据返回给web浏览器,使得用户可以看到嵌入式设备的页面信息。同样,获取b平台的数据也一样,在此不再赘述。For example, referring to Figure 4, when searching by the name of the page, the data matching the page is in platform a, then request data from the client of docking platform a; when the client of docking a receives the data request, it will Send to the server of platform a. After receiving the data request, the server of platform a takes out the required data from platform a and returns the data to the client of docking platform a. The client of docking platform a receives After receiving the data, it returns to the httpd process of the embedded device, and the httpd process finally returns the data to the web browser, so that the user can see the page information of the embedded device. Similarly, the same is true for obtaining the data of the b platform, which will not be repeated here.

其中,需要说明的是,步骤S4中客户端和服务端间的通信机制是采用Linux的ipc通信机制来完成,如图5所示。具体地,客户端到服务端的过程可以是线程到进程、进程到进程、线程到线程或进程到线程。具体取决于各个平台的架构形式,Linux系统提供了这些方式的通信机制。Wherein, it should be noted that the communication mechanism between the client and the server in step S4 is completed by using the ipc communication mechanism of Linux, as shown in FIG. 5 . Specifically, the process from the client to the server may be thread-to-process, process-to-process, thread-to-thread or process-to-thread. Depending on the architecture of each platform, the Linux system provides communication mechanisms in these ways.

综上所述,本发明的基于Linux的嵌入式web服务器访问多平台数据的实现方法实现了更好的移植且不破坏当前各个平台的架构;实现了web服务器对多个不同平台的数据信息的访问,便于移植,易于维护。所以,本发明有效克服了现有技术中的种种缺点而具高度产业利用价值。In summary, the implementation method of the Linux-based embedded web server accessing multi-platform data of the present invention realizes better transplantation and does not destroy the current architecture of each platform; Accessible, easy to port, easy to maintain. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial application value.

上述实施例仅例示性说明本发明的原理及其功效,而非用于限制本发明。任何熟悉此技术的人士皆可在不违背本发明的精神及范畴下,对上述实施例进行修饰或改变。因此,举凡所属技术领域中具有通常知识者在未脱离本发明所揭示的精神与技术思想下所完成的一切等效修饰或改变,仍应由本发明的权利要求所涵盖。The above-mentioned embodiments only illustrate the principles and effects of the present invention, but are not intended to limit the present invention. Anyone skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas disclosed in the present invention shall still be covered by the claims of the present invention.

Claims (7)

1.一种基于Linux的嵌入式web服务器访问多平台数据的实现方法,其特征在于:包括以下步骤:1. a kind of realization method that the embedded web server based on Linux visits multi-platform data, it is characterized in that: comprise the following steps: 步骤S1、当访问嵌入式设备的web页面时,嵌入式设备调用httpd进程接收数据请求,并通过CGI对数据请求进行解析和分解,获取所请求数据的控制报文类型以及相应的分解数据;Step S1, when accessing the web page of the embedded device, the embedded device invokes the httpd process to receive the data request, and parses and decomposes the data request through CGI, and obtains the control message type and corresponding decomposed data of the requested data; 步骤S2、嵌入式设备根据所请求数据的控制报文类型,确定数据所在平台;判断数据所在平台是否为当前平台;若是,转入步骤S3;若否,转入步骤S4;Step S2, the embedded device determines the platform where the data resides according to the control message type of the requested data; judges whether the platform where the data resides is the current platform; if so, proceeds to step S3; if not, proceeds to step S4; 步骤S3、从当前平台上直接获取所要求的数据,并返回给嵌入式设备;Step S3, directly obtain the required data from the current platform, and return to the embedded device; 步骤S4、访问数据所在平台对应的客户端,数据所在平台对应的客户端再访问对应的服务端,对应的服务端在数据所在平台上获取所要求的数据,并返回至数据所在平台对应的客户端,数据所在平台对应的客户端将所要求的数据返回给嵌入式设备。Step S4, access the client corresponding to the platform where the data resides, the client corresponding to the platform where the data resides then visits the corresponding server, the corresponding server obtains the required data on the platform where the data resides, and returns to the client corresponding to the platform where the data resides At the end, the client corresponding to the platform where the data resides returns the requested data to the embedded device. 2.根据权利要求1所述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其特征在于:用户端通过设备的浏览器访问嵌入式设备的web页面。2. the implementation method based on Linux-based embedded web server accessing multi-platform data according to claim 1, characterized in that: the client accesses the web page of the embedded device through the browser of the device. 3.根据权利要求1所述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其特征在于:获取所请求数据的控制报文类型时,通过页面的名字进行匹配来确定。3. the implementation method based on Linux-based embedded web server access multi-platform data according to claim 1, is characterized in that: when obtaining the control message type of requested data, it is determined by matching the name of the page. 4.根据权利要求1所述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其特征在于:所述步骤S1中,CGI的处理过程包括如下步骤:4. the implementation method based on Linux-based embedded web server access multi-platform data according to claim 1, is characterized in that: in described step S1, the processing procedure of CGI comprises the steps: CGI接收httpd进程接收到的数据请求;CGI receives the data request received by the httpd process; 判断数据请求的报文头是否是设置操作;Determine whether the header of the data request is a setting operation; 若是设置操作,接收httpd设置数据请求,根据数据请求的页面进行解析,并将页面和数据结构表中的已知数据页面进行匹配;若存在匹配的页面,则将需要设置的功能数据存储于临时缓存中,通过页面索引将页面中所有需要保存的功能数据发送给相应的平台,平台接收数据进行处理,并将处理结果回传;若不存在匹配的页面,则丢弃该数据请求,CGI将结果发送给httpd,再由httpd发送给请求数据的http客户端;If it is a setting operation, receive httpd setting data request, analyze according to the page of the data request, and match the page with the known data page in the data structure table; if there is a matching page, store the function data that needs to be set in the temporary In the cache, all the functional data that needs to be saved in the page are sent to the corresponding platform through the page index, the platform receives the data for processing, and returns the processing result; if there is no matching page, the data request is discarded, and the CGI sends the result Send it to httpd, and then httpd sends it to the http client requesting data; 若不是设置操作,接收httpd获取数据请求,接收页面数据,根据数据请求的页面进行解析,并将页面和数据结构表中的已知数据页面进行匹配;若存在匹配的页面,则通过页面索引从所在的平台中获取页面需要的所有数据,将获取的数据存储于临时缓存中,解析页面中需要的功能参数,通过功能参数表,从临时缓存中获取数据,并回传给httpd,httpd再发送给请求数据的http客户端;若不存在匹配的页面,则丢弃该数据请求,CGI将结果发送给httpd,再由httpd发送给请求数据的http客户端。If it is not a setting operation, receive httpd to obtain data requests, receive page data, analyze according to the page of the data request, and match the page with the known data page in the data structure table; if there is a matching page, use the page index from Obtain all the data required by the page in the platform where it is located, store the acquired data in the temporary cache, analyze the function parameters required in the page, obtain the data from the temporary cache through the function parameter table, and send it back to httpd, and httpd sends it again To the http client requesting data; if there is no matching page, the data request is discarded, CGI sends the result to httpd, and then httpd sends it to the http client requesting data. 5.根据权利要求1所述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其特征在于:所述步骤S4中,数据所在平台对应的客户端将所要求的数据返回给嵌入式设备时,所要求的数据返回给嵌入式设备的httpd进程,httpd进程再将所要求的数据返回给浏览器,以便用户看到嵌入式设备的页面信息。5. the implementation method based on Linux-based embedded web server access multi-platform data according to claim 1, is characterized in that: in described step S4, the corresponding client of data place platform returns required data to embedded When the device is installed, the required data is returned to the httpd process of the embedded device, and the httpd process returns the required data to the browser so that the user can see the page information of the embedded device. 6.根据权利要求1所述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其特征在于:所述步骤S4中,客户端和服务端间的通信机制是采用Linux的ipc通信机制来完成。6. the implementation method based on Linux-based embedded web server access multi-platform data according to claim 1, is characterized in that: in the described step S4, the communication mechanism between the client and the service end is to adopt the ipc communication mechanism of Linux To be done. 7.根据权利要求1所述的基于Linux的嵌入式web服务器访问多平台数据的实现方法,其特征在于:所述步骤S4中,客户端到服务端的过程是线程到进程、进程到进程、线程到线程或进程到线程。7. the implementation method based on Linux-based embedded web server access multi-platform data according to claim 1, is characterized in that: in described step S4, the process from client to service end is thread to process, process to process, thread to thread or process to thread.
CN201410766920.4A 2014-12-12 2014-12-12 The implementation method of the multi-platform data of embedded type web server access based on Linux Expired - Fee Related CN104536837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410766920.4A CN104536837B (en) 2014-12-12 2014-12-12 The implementation method of the multi-platform data of embedded type web server access based on Linux

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410766920.4A CN104536837B (en) 2014-12-12 2014-12-12 The implementation method of the multi-platform data of embedded type web server access based on Linux

Publications (2)

Publication Number Publication Date
CN104536837A true CN104536837A (en) 2015-04-22
CN104536837B CN104536837B (en) 2017-11-21

Family

ID=52852368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410766920.4A Expired - Fee Related CN104536837B (en) 2014-12-12 2014-12-12 The implementation method of the multi-platform data of embedded type web server access based on Linux

Country Status (1)

Country Link
CN (1) CN104536837B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113662446A (en) * 2021-09-22 2021-11-19 深圳康佳电子科技有限公司 Internet of things-based cooking assistance method and device, intelligent terminal and storage medium
CN115905708A (en) * 2022-12-23 2023-04-04 中国科学院上海高等研究院 Multi-platform cultural relics knowledge service realization method, device, terminal and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010049796A1 (en) * 2000-06-01 2001-12-06 Roth Mark L. Authentication-technology independent, non-programmatic method and apparatus for bootstrapping a user database from the WEB tier
US20030028577A1 (en) * 2001-04-30 2003-02-06 Chia-Chu Dorland HTTP distributed XML-based automated event polling for network and E-service management
CN101202684A (en) * 2006-12-15 2008-06-18 中国电信股份有限公司 Method for close judgment of user in content distributing network
CN101237449A (en) * 2008-02-01 2008-08-06 中国建设银行股份有限公司 A method and system for access to IMS database
CN102215228A (en) * 2011-05-31 2011-10-12 北京亿赞普网络技术有限公司 Web service unique user identification method based on carrier-class network platform
CN103685300A (en) * 2013-12-23 2014-03-26 蓝盾信息安全技术股份有限公司 Embedded web server
CN103856446A (en) * 2012-11-30 2014-06-11 腾讯科技(深圳)有限公司 Login method and device, and open platform system
CN103985019A (en) * 2014-06-06 2014-08-13 山东超越数控电子有限公司 Embedded type server data management system based on ten gigabit exchanger

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010049796A1 (en) * 2000-06-01 2001-12-06 Roth Mark L. Authentication-technology independent, non-programmatic method and apparatus for bootstrapping a user database from the WEB tier
US20030028577A1 (en) * 2001-04-30 2003-02-06 Chia-Chu Dorland HTTP distributed XML-based automated event polling for network and E-service management
CN101202684A (en) * 2006-12-15 2008-06-18 中国电信股份有限公司 Method for close judgment of user in content distributing network
CN101237449A (en) * 2008-02-01 2008-08-06 中国建设银行股份有限公司 A method and system for access to IMS database
CN102215228A (en) * 2011-05-31 2011-10-12 北京亿赞普网络技术有限公司 Web service unique user identification method based on carrier-class network platform
CN103856446A (en) * 2012-11-30 2014-06-11 腾讯科技(深圳)有限公司 Login method and device, and open platform system
CN103685300A (en) * 2013-12-23 2014-03-26 蓝盾信息安全技术股份有限公司 Embedded web server
CN103985019A (en) * 2014-06-06 2014-08-13 山东超越数控电子有限公司 Embedded type server data management system based on ten gigabit exchanger

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113662446A (en) * 2021-09-22 2021-11-19 深圳康佳电子科技有限公司 Internet of things-based cooking assistance method and device, intelligent terminal and storage medium
CN115905708A (en) * 2022-12-23 2023-04-04 中国科学院上海高等研究院 Multi-platform cultural relics knowledge service realization method, device, terminal and medium

Also Published As

Publication number Publication date
CN104536837B (en) 2017-11-21

Similar Documents

Publication Publication Date Title
CN106933871B (en) Short link processing method, device and short link server
TWI670611B (en) Web file sending method, webpage rendering method and device, webpage rendering system
US9088461B2 (en) Common web accessible data store for client side page processing
CN109992406B (en) Picture request method, picture request response method and client
WO2019104975A1 (en) Dubbo framework–based remote invoking method, server, and storage medium
CN108255615A (en) Across language call method, server and storage medium
CN104580192A (en) Processing method and device for network access requests of application program
CN112771518B (en) Managed machine learning model
CN113626512A (en) Data processing method, device, equipment and readable storage medium
CN105100294A (en) Webpage acquiring method, system, network server, browser and GSLB
US9407716B1 (en) Identifying content files in a cache using a response-based cache index
CN109274777B (en) A method, device, equipment and readable storage medium for exporting configuration files
CN107566477B (en) Method and device for acquiring files in distributed file system cluster
WO2014161261A1 (en) Data storage method and apparatus
CN104391868A (en) Staticizing device and method for dynamic page
CN104601534A (en) Method and system for processing CDN system images
US9742835B2 (en) System and method for backend control of frontend user interfaces
CN104468704B (en) Support the Web server system and processing method of content center network
CN103116645A (en) Method and device for browsing webpage with mobile device
CN108063835A (en) Outer net domain name analytic method, server and system
CN110943876B (en) URL state detection method, device, equipment and system
CN104980464B (en) A kind of network request processing method, network server and network system
CN105516250A (en) Internet-of-things service invoking platform and system
CN104536837B (en) The implementation method of the multi-platform data of embedded type web server access based on Linux
CN110992131A (en) Form processing method and device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201103

Address after: 318015 no.2-3167, zone a, Nonggang City, no.2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Patentee after: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210623

Address after: 201100 room 509, building 2, No. 508, Chundong Road, Minhang District, Shanghai

Patentee after: SHANGHAI TAIYU INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 318015 no.2-3167, area a, nonggangcheng, 2388 Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Patentee before: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171121