TWI815098B - Web request processing method, device, electronic device, and computer-readable recording medium with stored program - Google Patents

Web request processing method, device, electronic device, and computer-readable recording medium with stored program Download PDF

Info

Publication number
TWI815098B
TWI815098B TW110110397A TW110110397A TWI815098B TW I815098 B TWI815098 B TW I815098B TW 110110397 A TW110110397 A TW 110110397A TW 110110397 A TW110110397 A TW 110110397A TW I815098 B TWI815098 B TW I815098B
Authority
TW
Taiwan
Prior art keywords
processing
web request
data
request
function
Prior art date
Application number
TW110110397A
Other languages
Chinese (zh)
Other versions
TW202139767A (en
Inventor
焦旭
Original Assignee
大陸商北京微動數聯科技有限公司
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 大陸商北京微動數聯科技有限公司 filed Critical 大陸商北京微動數聯科技有限公司
Publication of TW202139767A publication Critical patent/TW202139767A/en
Application granted granted Critical
Publication of TWI815098B publication Critical patent/TWI815098B/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

一種涉及電腦技術領域,具體提供了一種Web請求處理方法,應用於可配置Wi-Fi參數的Wi-Fi晶片,該方法包含:接收Web請求,為該Web請求建立連接;遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理;返回處理結果資料。還對應提供了裝置、設備和介質。本發明中的Web請求處理方法能夠基於Wi-Fi晶片實現Web伺服器的功能,搭建了Web伺服器架構。 One relates to the field of computer technology and specifically provides a Web request processing method, which is applied to a Wi-Fi chip with configurable Wi-Fi parameters. The method includes: receiving a Web request, establishing a connection for the Web request; remotely calling a LUA script, Select the processing function corresponding to the Web request for processing; return the processing result data. Apparatus, equipment, and media are also provided accordingly. The Web request processing method in the present invention can realize the function of the Web server based on the Wi-Fi chip, and builds the Web server architecture.

Description

Web請求處理方法、裝置、電子設備以及內儲程式之 電腦可讀取記錄媒體 Web request processing method, device, electronic device and stored program Computer-readable recording media

本發明係關於一種電腦技術領域,尤其是一種Web(網路)請求處理方法、一種Web請求處理裝置、一種電子設備和一種電腦存儲介質。 The invention relates to the field of computer technology, in particular to a Web (network) request processing method, a Web request processing device, an electronic device and a computer storage medium.

現有技術Wi-Fi晶片常作為Wi-Fi適配器來使用,例如,樂鑫公司開發的ESP8266晶片,提供了-套高度集成的Wi-Fi晶片解決方案,其具有低功耗、緊湊設計和高穩定性等特點。只需通過SPI(串列外設介面)/SDIO(安全數位輸入輸出)介面或UART(通用非同步收發傳輸器)介面即可作為Wi-Fi適配器,應用到基於各種微控制器的設計中。詳細的功能說明可見其官方網站:「https://www.espressif.com/zh-hans/products/hardware/esp8266ex/overview」。 Existing Wi-Fi chips are often used as Wi-Fi adapters. For example, the ESP8266 chip developed by Espressif Systems provides a highly integrated Wi-Fi chip solution with low power consumption, compact design and high stability. sexual characteristics. It can be used as a Wi-Fi adapter through the SPI (Serial Peripheral Interface)/SDIO (Secure Digital Input and Output) interface or UART (Universal Asynchronous Transceiver and Transmitter) interface and can be applied to designs based on various microcontrollers. Detailed function description can be found on its official website: "https://www.espressif.com/zh-hans/products/hardware/esp8266ex/overview".

由於ESP8266的價格比較低,現在已經應用於多種物聯網系統中。但由於其作為Wi-Fi晶片的本質,性能受限,目前所提供的軟體僅限於在Wi-Fi配置方面的功能,而無法提供更豐富的功能。如果想提供更豐富的Web服務,則需要提升硬體設定以運行Web伺服器,從而會導致整個系統的成本大幅增加。 Because the price of ESP8266 is relatively low, it has been used in a variety of IoT systems. However, due to its nature as a Wi-Fi chip, its performance is limited. The software currently provided is limited to Wi-Fi configuration functions and cannot provide richer functions. If you want to provide richer Web services, you need to upgrade the hardware settings to run the Web server, which will significantly increase the cost of the entire system.

而要基於諸如ESP8266這樣的Wi-Fi晶片實現伺服器的功能的話,會面臨幾個問題:首先是該晶片沒有提供直接的伺服器軟體或相關必要的函數,功能不全;其次,由於Wi-Fi晶片自身硬體的限制,在實現伺服器 功能的時候,所處理的資料訪問量會顯得記憶體不足。 If you want to implement server functions based on Wi-Fi chips such as ESP8266, you will face several problems: First, the chip does not provide direct server software or related necessary functions, and its functions are incomplete; second, due to Wi-Fi Due to the limitations of the chip's own hardware, when implementing the server function, the amount of data access processed will appear to be insufficient memory.

本發明為了解決現有技術中,可配置參數的Wi-Fi晶片功能有限的問題,提出了一種利用Wi-Fi晶片搭建Web伺服器功能的技術,具體地,第一方面,提供了一種Web請求處理方法,應用於可配置Wi-Fi參數的Wi-Fi晶片,該方法包含:接收Web請求,為該Web請求建立連接。 In order to solve the problem in the prior art that the Wi-Fi chip with configurable parameters has limited functions, the present invention proposes a technology that uses Wi-Fi chips to build Web server functions. Specifically, in the first aspect, a Web request processing is provided The method is applied to a Wi-Fi chip with configurable Wi-Fi parameters. The method includes: receiving a Web request and establishing a connection for the Web request.

遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理。 Call the LUA script remotely and select the processing function corresponding to the Web request for processing.

返回處理結果資料。 Return processing result data.

進一步地,該遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理的步驟包含:觸發receive事件。 Further, the step of calling the LUA script remotely and selecting a processing function corresponding to the Web request for processing includes: triggering a receive event.

解析請求資料,獲取到LUA檔案名。 Parse the request data and obtain the LUA file name.

載入檔獲取LUA函數。 Load the file to obtain the LUA function.

執行LUA函數。 Execute LUA functions.

觸發sent事件,發送執行該LUA函數所獲取到的結果。 Trigger the sent event and send the results obtained by executing the LUA function.

進一步地,該載入檔獲取LUA函數的步驟包含:採用dofile方式載入檔獲取該LUA函數。 Further, the step of obtaining the LUA function from the loaded file includes: using dofile mode to load the file to obtain the LUA function.

進一步地,該選擇與該Web請求對應的處理函數進行處理的步驟包含:創建與該Web請求對應的協同程式。 Further, the step of selecting a processing function corresponding to the Web request for processing includes: creating a coroutine corresponding to the Web request.

為該協同程式指定處理函數。 Specify the handler function for this coroutine.

利用該處理函數進行處理。 Use this processing function for processing.

進一步地,該利用該處理函數進行處理的步驟包含: Further, the steps of using the processing function include:

S121:喚醒協同程式,執行處理函數得到返回資料。 S121: Wake up the coroutine and execute the processing function to obtain the return data.

S1221:回應於返回資料需要切片,而進行資料切片。 S1221: In response to the need to slice the returned data, perform data slicing.

S1222:回應於獲取到閾值個切片,掛起該協同程式,並發送該閾值個切片。 S1222: In response to obtaining the threshold number of slices, suspend the coroutine and send the threshold number of slices.

S1223:回應於資料未發送完畢,迴圈執行步驟S121~S1222。 S1223: In response to the fact that the data has not been sent, the loop executes steps S121~S1222.

進一步地,該利用該處理函數進行處理的步驟還包含:回應於返回資料不需要切片,直接進行資料發送。 Further, the step of using the processing function also includes: responding to the returned data without slicing and directly sending the data.

進一步地,該利用該處理函數進行處理的步驟還包含:資料發送後,判斷該協同程式為掛起狀態時,關閉該連接。 Further, the step of using the processing function also includes: after the data is sent, when it is determined that the coroutine is in a suspended state, the connection is closed.

第二方面,本發明實施例提供了一種Web請求處理裝置,應用於可配置Wi-Fi參數的Wi-Fi晶片,該裝置包含:一連接建立模組,被配置為基於接收到的Web請求,為該Web請求建立連接。 In a second aspect, embodiments of the present invention provide a Web request processing device, which is applied to a Wi-Fi chip with configurable Wi-Fi parameters. The device includes: a connection establishment module configured to based on a received Web request, Establish a connection for this web request.

一資料處理模組,被配置為遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理。 A data processing module is configured to remotely call the LUA script and select the processing function corresponding to the Web request for processing.

一發送模組,被配置為返回處理結果資料。 A sending module is configured to return processing result data.

協力廠商面,本發明實施例提供了一種電子設備,包含:一個或多個處理器。 For third parties, embodiments of the present invention provide an electronic device, including: one or more processors.

一存儲裝置,用於存儲一個或多個程式。 A storage device for storing one or more programs.

當該一個或多個程式被該一個或多個處理器執行,使得該一個或多個處理器實現上述的方法。 When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

第四方面,本發明實施例提供了一種內儲程式之電腦可讀取記 錄媒體,其上存儲有電腦程式,該程式被處理器執行時實現上述的方法。 In a fourth aspect, embodiments of the present invention provide a computer-readable record of a stored program A recording medium has a computer program stored thereon, and when the program is executed by the processor, the above method is implemented.

本發明實施例中的方法、裝置、電子設備和內儲程式之電腦可讀取記錄媒體,實現利用存儲和處理資源有限的可配置參數的Wi-Fi晶片,搭建Web伺服器,在Wi-Fi晶片上實現更豐富的功能。 The methods, devices, electronic equipment and computer-readable recording media with stored programs in the embodiments of the present invention enable the use of configurable parameter Wi-Fi chips with limited storage and processing resources to build a Web server. Implement richer functions on the chip.

〔本發明〕 [Invention]

200:Web請求處理裝置 200:Web request processing device

210:連接建立模組 210:Connect to establish module

220:資料處理模組 220:Data processing module

230:發送模組 230:Send module

1100:電子設備 1100: Electronic equipment

1110:處理單元 1110: Processing unit

1120:存儲單元 1120:Storage unit

11201:隨機存取存儲單元 11201: Random access memory unit

11202:快取記憶體存儲單元 11202: Cache memory storage unit

11203:唯讀存儲單元 11203: Read-only storage unit

11204:程式/實用工具 11204:Programs/Utilities

11205:程式模組 11205:Program module

1130:匯流排 1130:Bus

1140:顯示單元 1140:Display unit

1150:輸入/輸出介面 1150:Input/output interface

1160:網路介面卡 1160:Network interface card

1200:外部設備 1200:External device

S110:步驟 S110: Steps

S120:步驟 S120: Steps

S1231:步驟 S1231: Steps

S1232:步驟 S1232: Steps

S1233:步驟 S1233: Steps

S1234:步驟 S1234: Steps

S1235:步驟 S1235: Steps

S1236:步驟 S1236: Steps

S130:步驟 S130: Steps

〔第1圖〕本發明一實施例中的Web請求處理方法的流程示意圖。 [Figure 1] A schematic flow chart of a Web request processing method in an embodiment of the present invention.

〔第2圖〕本發明一實施例中的Wi-Fi晶片配置過程流程示意圖。 [Figure 2] Schematic flow chart of the Wi-Fi chip configuration process in an embodiment of the present invention.

〔第3圖〕本發明一實施例中的利用協同程式處理請求的流程示意圖。 [Figure 3] A schematic flow chart of request processing using a coroutine in an embodiment of the present invention.

〔第4圖〕本發明一實施例中的對Web請求進行資料處理的流程示意圖示意圖。 [Figure 4] A schematic flowchart of data processing for Web requests in an embodiment of the present invention.

〔第5圖〕本發明一實施例中的實現LUA腳本遠端調用的流程示意圖。 [Figure 5] A schematic flow chart of remote calling of LUA scripts in an embodiment of the present invention.

〔第6圖〕本發明一實施例中的Web請求處理裝置的結構示意圖。 [Figure 6] A schematic structural diagram of a Web request processing device in an embodiment of the present invention.

〔第7圖〕本發明一實施例中的電子設備的結構示意圖。 [Figure 7] A schematic structural diagram of an electronic device in an embodiment of the present invention.

為了能夠更清楚地理解本發明的上述目的、特徵和優點,下面結合圖式和具體實施方式對本發明進行進一步的詳細描述。需要說明的是,在不衝突的情況下,本申請的實施例及實施例中的特徵可以相互組合。 In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be described in further detail below in conjunction with the drawings and specific embodiments. It should be noted that, as long as there is no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.

在下面的描述中闡述了很多具體細節以便於充分理解本發明,但是,本發明還可以採用其他不同於在此描述的其他方式來實施,因此,本發明的保護範圍並不受下面公開的具體實施例的限制。 Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described here. Therefore, the protection scope of the present invention is not limited by the specific details disclosed below. Limitations of Examples.

如第1圖所示,本發明實施例提供了一種Web請求處理方法, 應用於可配置Wi-Fi參數的Wi-Fi晶片,該方法包含: As shown in Figure 1, this embodiment of the present invention provides a Web request processing method. Applied to a Wi-Fi chip with configurable Wi-Fi parameters, this method includes:

S110:接收Web請求,為該Web請求建立連接;本發明實施例中的Wi-Fi晶片,例如ESP8266晶片,分為兩種運行模式,分別是配置模式和工作模式,兩種模式通過開關進行切換。設備初次使用要先進入配置模式,操作方法是將開關置於開狀態。配置模式的執行邏輯是將設備的WI-FI模組進行初始化,將其置為AP模式,然後開啟WEB服務,該服務可以對HTTP請求進行處理。用戶端接入設備的WI-FI網路,通過流覽器訪問Web服務。Web伺服器偵聽http請求並進行處理,將處理後結果返回給用戶端。配置模式支援對Wi-Fi資訊、雲伺服器資訊進行配置。配置完成後將開關置為關,重啟設備便可進入工作模式。在工作模式下,設備首先連接Wi-Fi,然後對設備進行校時,接著連接雲伺服器,完成以上工作後設備便開始傳輸資料。工作流程如第2圖所示。 S110: Receive a Web request and establish a connection for the Web request; the Wi-Fi chip in the embodiment of the present invention, such as the ESP8266 chip, is divided into two operating modes, namely the configuration mode and the working mode. The two modes are switched by a switch. . When using the device for the first time, you must first enter the configuration mode. The operation method is to turn the switch on. The execution logic of the configuration mode is to initialize the WI-FI module of the device, set it to AP mode, and then enable the WEB service, which can process HTTP requests. The client connects to the WI-FI network of the device and accesses the Web service through the browser. The web server listens to http requests and processes them, and returns the processed results to the client. Configuration mode supports configuring Wi-Fi information and cloud server information. After the configuration is completed, turn the switch off and restart the device to enter working mode. In working mode, the device first connects to Wi-Fi, then adjusts the device's time, and then connects to the cloud server. After completing the above tasks, the device starts transmitting data. The workflow is shown in Figure 2.

S120:遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理;根據Web請求進行解析獲取相應的處理函數進行資料處理,例如,資料查詢、資料計算、資料打包等操作,形成處理結果。 S120: Call the LUA script remotely and select the processing function corresponding to the Web request for processing; parse the Web request to obtain the corresponding processing function for data processing, such as data query, data calculation, data packaging and other operations to form the processing result. .

S130:返回處理結果資料;獲取處理結果之後,根據採用的資料協定進行資料打包發送,例如採用http協定方式進行發送。 S130: Return the processing result data; after obtaining the processing result, the data is packaged and sent according to the adopted data protocol, for example, using the http protocol.

本發明實施例中採用Wi-Fi晶片搭建伺服器功能,由於Wi-Fi晶片新能受限沒有成熟的Web服務框架,為了滿足提供Web服務的需求,基於LUA基礎庫實現一套Web服務框架。LUA是一種輕量小巧的指令碼語言,該Wi-Fi晶片能夠承載此類指令碼語言函數進行運行,通過遠端調用LUA腳本實現伺服器功能。 In the embodiment of the present invention, a Wi-Fi chip is used to build the server function. Since the new capabilities of the Wi-Fi chip are limited and there is no mature Web service framework, in order to meet the demand for providing Web services, a set of Web service framework is implemented based on the LUA basic library. LUA is a lightweight and compact script language. The Wi-Fi chip can host such script language functions to run, and implement server functions by remotely calling LUA scripts.

Web伺服器關鍵技術包含創建TCP server(傳輸控制協議伺服器),捕捉http(超文字傳輸協定)請求並建立連接,對請求資料進行解析和 處理,將結果以http形式返回用戶端,關閉連接。本實施例主要實現對http請求資料的解析和處理。根據選擇可實現具有特點如下: The key technologies of the Web server include creating a TCP server (Transmission Control Protocol server), capturing http (Hypertext Transfer Protocol) requests and establishing connections, parsing and parsing the request data. Process, return the result to the client in http form, and close the connection. This embodiment mainly implements the analysis and processing of http request data. Depending on the selection, the following features can be achieved:

1)支援多種請求方式,包含get(獲取)、post(張貼)、put(放置)等,根據不同的Web請求方式,進行解析。 1) Supports multiple request methods, including get (get), post (post), put (place), etc., and perform analysis according to different web request methods.

2)支持http訪問認證。 2) Support http access authentication.

3)實現http方式遠端調用LUA腳本。 3) Implement remote calling of LUA scripts via HTTP.

4)支援多種請求編碼。 4) Supports multiple request encodings.

5)能夠正確處理單次請求返回較大資料量的場景。 5) Ability to correctly handle scenarios in which a single request returns a large amount of data.

本發明實施例中採用遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理的步驟包含:觸發receive事件,解析請求資料,獲取到LUA檔案名,載入檔獲取LUA函數,執行LUA函數,觸發sent事件,發送執行該LUA函數所獲取到的結果。 In the embodiment of the present invention, the remote call LUA script is used to select the processing function corresponding to the Web request for processing. The steps include: triggering the receive event, parsing the request data, obtaining the LUA file name, loading the file to obtain the LUA function, and executing the LUA function, triggers the sent event and sends the result obtained by executing the LUA function.

本發明實施例中,該載入檔獲取LUA函數的步驟包含:採用dofile方式載入檔獲取該LUA函數。 In the embodiment of the present invention, the step of loading the file to obtain the LUA function includes: loading the file in dofile mode to obtain the LUA function.

為了在性能受限的Wi-Fi晶片實現處理較大資料量的場景,本發明實施中的處理Web請求的方式採用協同程式來處理,能夠減小對設備性能的要求,同時不會造成資料傳輸錯誤。具體地,該選擇與該Web請求對應的處理函數進行處理的步驟包含:創建與該Web請求對應的協同程式;為該協同程式指定處理函數;以及利用該處理函數進行處理。進一步地,如第3圖所示,該利用該處理函數進行處理的步驟包含: In order to realize the scenario of processing a large amount of data on a Wi-Fi chip with limited performance, the method of processing Web requests in the implementation of the present invention is processed by a coroutine, which can reduce the requirements on device performance without causing data transmission. Mistake. Specifically, the step of selecting a processing function corresponding to the Web request for processing includes: creating a coroutine corresponding to the Web request; specifying a processing function for the coroutine; and using the processing function for processing. Further, as shown in Figure 3, the steps of using the processing function include:

S1231:喚醒協同程式,執行處理函數得到返回資料。 S1231: Wake up the coroutine and execute the processing function to obtain the return data.

S1232:回應於返回資料需要切片,而進行資料切片。 S1232: In response to the need to slice the returned data, perform data slicing.

S1233:回應於獲取到閾值個切片,掛起該協同程式,並發送 該閾值個切片。 S1233: In response to obtaining the threshold number of slices, suspend the coroutine and send The threshold slices.

S1234:回應於資料未發送完畢,迴圈執行步驟S1231至步驟S1233。 S1234: In response to the fact that the data has not been sent, loop through steps S1231 to S1233.

本發明實施例中通過協同程式執行處理函數得到返回資料,當資料量較大時,對應進行資料切片,然後發送,發送時,掛起該協同程式,降低對晶片性能要求,迴圈發送直到資料發送完畢。上述協同程式和資料發送可以類似並行的方式進行,例如,當發送資料時掛起協同程式,切片的資料發送完之後又喚醒該協同程式繼續執行,獲取返回資料,然後適應性選擇切片,掛起協同程式然後發送資料。採用協同程式保證了,多個處理請求都能被執行,避免由於單個請求獲取資料較多造成其他請求不被處理的情況。為了減小對晶片性能的要求,本發明實施例中,可以獲取到1個切片後即進行發送。 In the embodiment of the present invention, the coroutine executes the processing function to obtain the returned data. When the amount of data is large, the data is sliced and then sent. When sending, the coroutine is suspended to reduce the performance requirements of the chip, and the data is sent in a loop until the data is sent. Sent completed. The above coroutine and data sending can be performed in a similar parallel manner. For example, when sending data, the coroutine is suspended. After the sliced data is sent, the coroutine is awakened to continue execution, obtains the returned data, and then adaptively selects the slice and suspends it. The coroutine then sends the data. The use of coroutines ensures that multiple processing requests can be executed, avoiding the situation where other requests are not processed due to a single request obtaining too much data. In order to reduce the requirements on chip performance, in the embodiment of the present invention, one slice can be sent after being obtained.

本發明實施例中當獲取的返回資料資料量較小時,或者沒有其他協同程式要運行時,可以進行直接發送。具體地,該處理函數進行處理的步驟還包含: In the embodiment of the present invention, when the amount of returned data obtained is small, or there is no other coroutine to run, it can be sent directly. Specifically, the processing steps of this processing function also include:

S1235:回應於返回資料不需要切片,直接進行資料發送。 S1235: In response to the return data, slicing is not required and the data is sent directly.

如第4圖所示,本發明實施例中使用協同程式解決設備記憶體不足問題,保證對較大資料量訪問場景的支援,用戶發送Web請求,為請求建立連接,對請求資料進行解析,選擇相應的處理函數對請求進行處理,返回處理結果資料並關閉連接。資料處理過程採用協同程式,為每次請求創建協同程式並指定處理函數,處理流程是:首先喚醒協同程式,執行處理函數得到返回資料;然後,對返回資料按序進行切片,每獲取一個切片便進行發送,發送前將協同程式掛起,發送完後喚醒並繼續切片操作直到資料發送完;最後關閉連接完成一次請求過程。協同程式保證同一請求的返回資料能夠連 續正確地發送。 As shown in Figure 4, in the embodiment of the present invention, a collaborative program is used to solve the problem of insufficient device memory and ensure support for large data access scenarios. The user sends a Web request, establishes a connection for the request, parses the requested data, and selects The corresponding processing function processes the request, returns the processing result data and closes the connection. The data processing process uses a coroutine, which creates a coroutine for each request and specifies a processing function. The processing flow is: first wake up the coroutine and execute the processing function to obtain the returned data; then, the returned data is sliced in order, and each slice is obtained. Send, suspend the coroutine before sending, wake up after sending and continue the slicing operation until the data is sent; finally close the connection to complete a request process. The coroutine ensures that the return data of the same request can be connected Continue to send correctly.

進一步地,該利用該處理函數進行處理的步驟還包含:S1236:資料發送後,判斷該協同程式為掛起狀態時,關閉該連接。及時清空資源的佔用。 Further, the step of using the processing function also includes: S1236: After the data is sent, when the coroutine is judged to be in a suspended state, the connection is closed. Clear resources occupied in a timely manner.

如第5圖所示,本發明實施例可以實現通過http方式遠端調用LUA腳本,請求到達後,觸發receive的回呼函數,該函數對請求資料進行解析,獲取到LUA檔案名稱,然後用dofile方式載入檔便得到該腳本定義的處理函數,將請求的參數傳遞給該函數完成資料處理工作。此方式要求LUA腳本遵循格式定義為:return function(connection,req,args)。 As shown in Figure 5, the embodiment of the present invention can remotely call the LUA script through http. After the request arrives, the callback function of receive is triggered. This function parses the request data, obtains the LUA file name, and then uses dofile By loading the file, you will get the processing function defined by the script, and pass the requested parameters to the function to complete the data processing. This method requires the LUA script to follow the format definition: return function (connection, req, args).

本發明實施例基於可配置參數的Wi-Fi晶片,提供了一種針對Web請求的處理方法。能夠基於有限的記憶體資源處理較大資料請求的場景,也能實現遠端調用LUA腳本。 The embodiment of the present invention provides a processing method for Web requests based on a Wi-Fi chip with configurable parameters. It can process large data requests based on limited memory resources, and can also remotely call LUA scripts.

如第6圖所示,本發明實施例還提供了一種Web請求處理裝置200,應用於可配置Wi-Fi參數的Wi-Fi晶片,該裝置200包含: As shown in Figure 6, an embodiment of the present invention also provides a Web request processing device 200, which is applied to a Wi-Fi chip with configurable Wi-Fi parameters. The device 200 includes:

一連接建立模組210,被配置為基於接收到的Web請求,為該Web請求建立連接。 A connection establishment module 210 is configured to establish a connection based on the received Web request for the Web request.

一資料處理模組220,被配置為遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理。 A data processing module 220 is configured to remotely call the LUA script and select the processing function corresponding to the Web request for processing.

一發送模組230,被配置為返回處理結果資料。 A sending module 230 is configured to return processing result data.

進一步地,該資料處理模組220配置為:觸發receive事件,解析請求資料,獲取到LUA檔案名,載入檔獲取LUA函數,執行LUA函數,觸發sent事件,發送執行該LUA函數所獲取到的結果。 Further, the data processing module 220 is configured to: trigger the receive event, parse the request data, obtain the LUA file name, load the file to obtain the LUA function, execute the LUA function, trigger the sent event, and send the data obtained by executing the LUA function. result.

進一步地,該資料處理模組220採用dofile方式載入檔獲取該 LUA函數。進一步地,該資料處理模組220還被配置為,創建與該Web請求對應的協同程式;為該協同程式指定處理函數;利用該處理函數進行處理。 Further, the data processing module 220 uses dofile mode to load the file to obtain the LUA functions. Further, the data processing module 220 is also configured to create a coroutine corresponding to the Web request; specify a processing function for the coroutine; and use the processing function to perform processing.

進一步地,該資料處理模組220還被配置為,喚醒協同程式,執行處理函數得到返回資料;回應於返回資料需要切片,進行資料切片;回應於獲取到閾值個切片,進行發送,掛起該協同程式,並發送該閾值個切片;回應於資料未發送完畢,迴圈進行喚醒、切片發送的步驟直至發送完畢;當返回資料不需要切片時進行直接進行資料發送;資料發送後,判斷該協同程式為掛起狀態時,關閉該連接。 Further, the data processing module 220 is also configured to wake up the coroutine and execute the processing function to obtain the returned data; respond to the return data requiring slices, perform data slicing; respond to obtain the threshold number of slices, send, and suspend the Coroutine and send the threshold number of slices; in response to the fact that the data has not been sent, the steps of waking up and sending slices are looped until the sending is completed; when the returned data does not require slicing, the data is sent directly; after the data is sent, the collaboration is judged When the program is suspended, close the connection.

上述模組所執行的步驟詳細細節已在上述的方法實施例中進行了描述,在此不再進行贅述。 The details of the steps performed by the above module have been described in the above method embodiments and will not be described again here.

應當注意,儘管在上文詳細描述中提及了用於動作執行的設備的若干模組或者單元,但是這種劃分並非強制性的。實際上,根據本發明的實施方式,上文描述的兩個或更多模組或者單元的特徵和功能可以在一個模組或者單元中具體化。反之,上文描述的一個模組或者單元的特徵和功能可以進一步劃分為由多個模組或者單元來具體化。 It should be noted that although several modules or units of equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided into being embodied by multiple modules or units.

此外,儘管在圖式中以特定順序描述了本發明中方法的各個步驟,但是,這並非要求或者暗示必須按照該特定順序來執行這些步驟,或是必須執行全部所示的步驟才能實現期望的結果。附加的或備選的,可以省略某些步驟,將多個步驟合併為一個步驟執行,以及/或者將一個步驟分解為多個步驟執行等。 Furthermore, although the various steps of the method of the present invention are described in a specific order in the drawings, this does not require or imply that these steps must be performed in that specific order, or that all of the illustrated steps must be performed to achieve the desired results. result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.

在本發明的示例性實施例中,還提供了一種能夠實現上述方法的電子設備。 In an exemplary embodiment of the present invention, an electronic device capable of implementing the above method is also provided.

所屬技術領域的技術人員能夠理解,本發明的各個方面可以實現為系統、方法或程式產品。因此,本發明的各個方面可以具體實現為以下 形式,即:完全的硬體實施方式、完全的軟體實施方式(包含固件、微代碼等),或硬體和軟體方面結合的實施方式,這裡可以統稱為“電路”、“模組”或“系統”。 Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be embodied as follows: Form, that is: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, which may be collectively referred to as "circuit", "module" or " system".

下面參照第7圖來描述根據本發明的這種實施方式的電子設備1100。第7圖顯示的電子設備1100僅僅是一個示例,不應對本發明實施例的功能和使用範圍帶來任何限制。 The electronic device 1100 according to this embodiment of the present invention is described below with reference to FIG. 7 . The electronic device 1100 shown in Figure 7 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present invention.

如第7圖所示,電子設備1100以通用計算設備的形式表現。電子設備1100的元件可以包含但不限於:上述至少一個處理單元1110、上述至少一個存儲單元1120、連接不同系統元件(包含存儲單元1120和處理單元1110)的匯流排1130以及顯示單元1140。 As shown in Figure 7, electronic device 1100 is embodied in the form of a general computing device. The components of the electronic device 1100 may include, but are not limited to: the above-mentioned at least one processing unit 1110, the above-mentioned at least one storage unit 1120, a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110), and the display unit 1140.

其中,該存儲單元存儲有程式碼,該程式碼可以被該處理單元1110執行,使得該處理單元1110執行本說明書上述“示例性方法”部分中描述的根據本發明各種示例性實施方式的步驟。例如,該處理單元1110可以執行如第1圖中所示的S110接收Web請求,為該Web請求建立連接;S120遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理;S130返回處理結果資料。 Wherein, the storage unit stores program code, and the program code can be executed by the processing unit 1110, so that the processing unit 1110 performs the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section of this specification. For example, the processing unit 1110 can perform S110 as shown in Figure 1 to receive a Web request and establish a connection for the Web request; S120 remotely calls a LUA script and selects a processing function corresponding to the Web request for processing; S130 returns to processing. Results data.

該存儲單元1120可以包含易失性存儲單元形式的可讀介質,例如隨機存取存儲單元(RAM)11201和/或快取記憶體存儲單元11202,還可以進一步包含唯讀存儲單元(ROM)11203。 The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 11201 and/or a cache storage unit 11202, and may further include a read-only storage unit (ROM) 11203 .

該存儲單元1120還可以包含具有一組(至少一個)程式模組11205的程式/實用工具11204,這樣的程式模組11205包含但不限於:作業系統、一個或者多個應用程式、其它程式模組以及程式資料,這些示例中的每一個或某種組合中可能包含網路環境的實現。 The storage unit 1120 may also include a program/utility 11204 having a set (at least one) of program modules 11205. Such program modules 11205 include but are not limited to: an operating system, one or more application programs, and other program modules. As well as program material, each or some combination of these examples may contain an implementation of a network environment.

該匯流排1130可以為表示幾類匯流排結構中的一種或多種, 包含存儲單元匯流排或者存儲單元控制器、週邊匯流排、圖形加速埠、處理單元或者使用多種匯流排結構中的任意匯流排結構的局域匯流排。 The bus 1130 may represent one or more of several types of bus structures, Contains a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus architectures.

電子設備1100也可以與一個或多個外部設備1200(例如鍵盤、指向設備、藍牙設備等)通信,還可與一個或者多個使得使用者能與該電子設備1100交互的設備通信,和/或與使得該電子設備1100能與一個或多個其它計算設備進行通信的任何設備(例如路由器、數據機等等)通信。這種通信可以通過一輸入/輸出(I/O)介面1150進行。並且,電子設備1100還可以通過一網路介面卡1160與一個或者多個網路(例如局域網(LAN),廣域網路(WAN)和/或公共網路,例如網際網路)通信。如圖所示,該網路介面卡1160通過該匯流排1130與該電子設備1100的其它模組通信。應當明白,儘管圖中未示出,可以結合該電子設備1100使用其它硬體和/或軟體模組,包含但不限於:微代碼、裝置驅動程式、冗餘處理單元、外部磁片驅動陣列、RAID系統、磁帶驅動器以及資料備份存儲系統等。 The electronic device 1100 may also communicate with one or more external devices 1200 (such as a keyboard, pointing device, Bluetooth device, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and/or Communicate with any device (eg, router, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. This communication may occur through an input/output (I/O) interface 1150. Moreover, the electronic device 1100 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and/or a public network, such as the Internet) through a network interface card 1160. As shown in the figure, the network interface card 1160 communicates with other modules of the electronic device 1100 through the bus 1130 . It should be understood that, although not shown in the figure, other hardware and/or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives and data backup storage systems, etc.

通過以上的實施方式的描述,本領域的技術人員易於理解,這裡描述的示例實施方式可以通過軟體實現,也可以通過軟體結合必要的硬體的方式來實現。因此,根據本發明實施方式的技術方案可以以軟體產品的形式體現出來,該軟體產品可以存儲在一個非易失性存儲介質(可以是CD-ROM,U盤,移動硬碟等)中或網路上,包含若干指令以使得一台計算設備(可以是個人電腦、伺服器、終端裝置、或者網路設備等)執行根據本發明實施方式的方法。 Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described here can be implemented by software, or can be implemented by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the Internet. On the way, several instructions are included to cause a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present invention.

在本發明的示例性實施例中,還提供了一種電腦可讀存儲介質,其上存儲有能夠實現本說明書上述方法的程式產品。在一些可能的實施方式中,本發明的各個方面還可以實現為一種程式產品的形式,其包含程式碼,當該程式產品在終端設備上運行時,該程式碼用於使該終端設備執行本 說明書上述“示例性方法”部分中描述的根據本發明各種示例性實施方式的步驟。 In an exemplary embodiment of the present invention, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method in this specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which contains program code. When the program product is run on a terminal device, the program code is used to cause the terminal device to execute the program. The steps according to various exemplary embodiments of the present invention are described in the "Exemplary Methods" section of the specification above.

根據本發明的實施方式的用於實現上述方法的程式產品,其可以採用可擕式緊湊盤唯讀記憶體(CD-ROM)並包含程式碼,並可以在終端設備,例如個人電腦上運行。然而,本發明的程式產品不限於此,在本檔中,可讀存儲介質可以是任何包含或存儲程式的有形介質,該程式可以被指令執行系統、裝置或者器件使用或者與其結合使用。 The program product for implementing the above method according to an embodiment of the present invention can use a portable compact disk read-only memory (CD-ROM) and contain program codes, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.

該程式產品可以採用一個或多個可讀介質的任意組合。可讀介質可以是可讀信號介質或者可讀存儲介質。可讀存儲介質例如可以為但不限於電、磁、光、電磁、紅外線、或半導體的系統、裝置或器件,或者任意以上的組合。可讀存儲介質的更具體的例子(非窮舉的列表)包含:具有一個或多個導線的電連接、可擕式盤、硬碟、隨機存取記憶體(RAM)、唯讀記憶體(ROM)、可擦式可程式設計唯讀記憶體(EPROM或快閃記憶體)、光纖、可擕式緊湊盤唯讀記憶體(CD-ROM)、光記憶體件、磁記憶體件、或者上述的任意合適的組合。 The Program Product may take the form of one or more readable media in any combination. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard drive, random access memory (RAM), read-only memory ( ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical memory device, magnetic memory device, or Any suitable combination of the above.

電腦可讀信號介質可以包含在基帶中或者作為載波一部分傳播的資料信號,其中承載了可讀程式碼。這種傳播的資料信號可以採用多種形式,包含但不限於電磁信號、光信號或上述的任意合適的組合。可讀信號介質還可以是可讀存儲介質以外的任何可讀介質,該可讀介質可以發送、傳播或者傳輸用於由指令執行系統、裝置或者器件使用或者與其結合使用的程式。 A computer-readable signal medium may contain a data signal that carries readable program code, either in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium that can send, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device.

可讀介質上包含的程式碼可以用任何適當的介質傳輸,包含但不限於無線、有線、光纜、RF等等,或者上述的任意合適的組合。 Program code embodied on a readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

可以以一種或多種程式設計語言的任意組合來編寫用於執行 本發明操作的程式碼,該程式設計語言包含物件導向的程式設計語言一諸如Java、C++等,還包含常規的過程式程式設計語言一諸如“C”語言或類似的程式設計語言。程式碼可以完全地在使用者計算設備上執行、部分地在使用者設備上執行、作為一個獨立的套裝軟體執行、部分在使用者計算設備上部分在遠端計算設備上執行、或者完全在遠端計算設備或伺服器上執行。在涉及遠端計算設備的情形中,遠端計算設備可以通過任意種類的網路,包含局域網(LAN)或廣域網路(WAN),連接到使用者計算設備,或者,可以連接到外部計算設備(例如利用網際網路服務提供者來通過網際網路連接)。 Can be written for execution in any combination of one or more programming languages The programming code operated by the present invention includes object-oriented programming languages such as Java, C++, etc., and also includes conventional procedural programming languages such as "C" language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely remotely executed on a terminal computing device or server. In the case involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device ( For example, using an Internet service provider to connect via the Internet).

此外,上述圖式僅是根據本發明示例性實施例的方法所包含的處理的示意性說明,而不是限制目的。易於理解,上述圖式所示的處理並不表明或限制這些處理的時間順序。另外,也易於理解,這些處理可以是例如在多個模組中同步或非同步執行的。 In addition, the above drawings are only schematic illustrations of processes included in the methods according to the exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes illustrated in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also easy to understand that these processes may be executed synchronously or asynchronously in multiple modules, for example.

本領域技術人員在考慮說明書及實踐這裡發明的發明後,將容易想到本發明的其他實施例。本申請旨在涵蓋本發明的任何變型、用途或者適應性變化,這些變型、用途或者適應性變化遵循本發明的一般性原理並包含本發明未發明的本技術領域中的公知常識或慣用技術手段。說明書和實施例僅被視為示例性的,本發明的真正範圍和精神由請求項指出。 Other embodiments of the invention will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary technical means in the technical field to which the invention is not invented. . It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the invention being indicated by the claims.

S110:步驟 S110: Steps

S120:步驟 S120: Steps

S130:步驟 S130: Steps

Claims (9)

一種Web請求處理方法,應用於可配置Wi-Fi參數的Wi-Fi晶片,該方法包含:接收Web請求,為該Web請求建立連接;遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理;返回處理結果資料;所述選擇與該Web請求對應的處理函數進行處理的步驟包含:觸發receive事件;解析請求資料,獲取到LUA檔案名;載入檔獲取LUA函數;執行LUA函數;觸發sent事件,發送執行該LUA函數所獲取到的結果。 A Web request processing method, applied to a Wi-Fi chip with configurable Wi-Fi parameters. The method includes: receiving a Web request, establishing a connection for the Web request; remotely calling a LUA script, and selecting a processing function corresponding to the Web request Perform processing; return processing result data; the steps of selecting a processing function corresponding to the Web request for processing include: triggering a receive event; parsing the request data to obtain the LUA file name; loading the file to obtain the LUA function; and executing the LUA function; Trigger the sent event and send the results obtained by executing the LUA function. 如請求項1之Web請求處理方法,其中,該載入檔獲取LUA函數的步驟包含:採用dofile方式載入檔獲取該LUA函數。 Take the Web request processing method of request item 1, wherein the step of obtaining the LUA function from the load file includes: using dofile mode to load the file to obtain the LUA function. 如請求項1之Web請求處理方法,其中,該選擇與該Web請求對應的處理函數進行處理的步驟包含:創建與該Web請求對應的協同程式;為該協同程式指定處理函數;以及利用該處理函數進行處理。 Such as requesting the Web request processing method of item 1, wherein the step of selecting a processing function corresponding to the Web request for processing includes: creating a coroutine corresponding to the Web request; specifying a processing function for the coroutine; and utilizing the processing function to process. 如請求項3之Web請求處理方法,其中,該利用該處理函數進行處理的步驟包含:S1231:喚醒協同程式,執行處理函數得到返回資料;S1232:回應於返回資料需要切片,而進行資料切片;S1233:回應於獲取到閾值個切片,掛起該協同程式,並發送該閾值個切片;S1234:回應於資料未發送完畢,迴圈執行步驟S1231~S1234。 For example, the Web request processing method of request item 3, wherein the steps of using the processing function include: S1231: wake up the coroutine, execute the processing function to obtain the returned data; S1232: respond to the need to slice the returned data, and perform data slicing; S1233: In response to obtaining the threshold number of slices, suspend the coroutine and send the threshold number of slices; S1234: In response to the fact that the data has not been sent, the loop executes steps S1231~S1234. 如請求項3之Web請求處理方法,其中,該利用該處理函數進行處理的步驟還包含:回應於返回資料不需要切片,直接進行資料發送。 For example, the Web request processing method of request item 3, wherein the step of using the processing function also includes: in response to the returned data, there is no need to slice the data, and the data is sent directly. 如請求項4或5之Web請求處理方法,其中,該利用該處理函數進行處理的步驟還包含:資料發送後,判斷該協同程式為掛起狀態時,關閉該連接。 For example, the Web request processing method of request item 4 or 5, wherein the step of using the processing function also includes: after the data is sent, when the coroutine is judged to be in a suspended state, the connection is closed. 一種Web請求處理裝置,應用於可配置Wi-Fi參數的Wi-Fi晶片,該裝置包含:一連接建立模組,被配置為基於接收到的Web請求,為該Web請求建立連接;一資料處理模組,被配置為遠端調用LUA腳本,選擇與該Web請求對應的處理函數進行處理;一發送模組,被配置為返回處理結果資料;該資料處理模組被配置為實現如請求項1至6中任一項之Web請求處理方法。 A Web request processing device, applied to a Wi-Fi chip with configurable Wi-Fi parameters, the device includes: a connection establishment module configured to establish a connection for the Web request based on a received Web request; a data processing The module is configured to remotely call the LUA script and select the processing function corresponding to the Web request for processing; the sending module is configured to return the processing result data; the data processing module is configured to implement request item 1 Web request processing method in any one of 6 to 6. 一種電子設備,包含:一個或多個處理器;一存儲裝置,用於存儲一個或多個程式,當該一個或多個程式被該一個或多個處理器執行,使得該一個或多個處理器實現如請求項1至6中任一項之Web請求處理方法。 An electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, so that the one or more processes The server implements the Web request processing method in any one of request items 1 to 6. 一種內儲程式之電腦可讀取記錄媒體,其上存儲有電腦程式,該程式被處理器執行時實現如請求項1至6中任一項之Web請求處理方法。 A computer-readable recording medium with a stored program on which a computer program is stored. When the program is executed by a processor, the Web request processing method of any one of claims 1 to 6 is implemented.
TW110110397A 2020-04-09 2021-03-23 Web request processing method, device, electronic device, and computer-readable recording medium with stored program TWI815098B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/083875 WO2021203343A1 (en) 2020-04-09 2020-04-09 Web request processing method and apparatus
WOPCT/CN2020/083875 2020-04-09

Publications (2)

Publication Number Publication Date
TW202139767A TW202139767A (en) 2021-10-16
TWI815098B true TWI815098B (en) 2023-09-11

Family

ID=73334984

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110110397A TWI815098B (en) 2020-04-09 2021-03-23 Web request processing method, device, electronic device, and computer-readable recording medium with stored program

Country Status (3)

Country Link
CN (1) CN111937366B (en)
TW (1) TWI815098B (en)
WO (1) WO2021203343A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461296B (en) * 2021-12-29 2024-01-02 天翼云科技有限公司 Openresty-based service platform development and access method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516337A (en) * 2015-12-28 2016-04-20 南京大学金陵学院 Web site docking analysis method based on dynamic loading mechanism
WO2018140487A1 (en) * 2017-01-27 2018-08-02 Mz Ip Holdings, Llc System and method for encapsulating computer communications
CN110545269A (en) * 2019-08-22 2019-12-06 西安四叶草信息技术有限公司 Access control method, device and storage medium
CN110545298A (en) * 2018-05-28 2019-12-06 上海驿卓通信科技有限公司 Exhibition hall multi-information acquisition system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488143A (en) * 2008-01-16 2009-07-22 重庆安软信息科技有限公司 Novel web application and local application interaction mode
EP2558923A4 (en) * 2010-04-12 2014-11-19 Google Inc Extension framework for input method editor
CN103036891A (en) * 2012-12-19 2013-04-10 北京时代凌宇科技有限公司 Method and device based on wireless fidelity (Wi-Fi) for accessing to Internet of Things
US9898384B2 (en) * 2016-03-18 2018-02-20 International Business Machines Corporation Automated problem determination for cooperating web services using debugging technology
CN108717285A (en) * 2018-04-14 2018-10-30 张著岳 The programmable logic controller (PLC) programmed by built-in web
CN110392375B (en) * 2018-04-18 2022-02-22 腾讯科技(深圳)有限公司 WiFi network channel modification method, terminal, server and storage medium
CN110875858B (en) * 2018-08-31 2023-06-27 北京京东尚科信息技术有限公司 Application test data grabbing method, system, equipment and storage medium
CN109814915B (en) * 2018-12-29 2022-07-22 天津字节跳动科技有限公司 Parameter configuration method, device, medium and electronic equipment based on lua

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516337A (en) * 2015-12-28 2016-04-20 南京大学金陵学院 Web site docking analysis method based on dynamic loading mechanism
WO2018140487A1 (en) * 2017-01-27 2018-08-02 Mz Ip Holdings, Llc System and method for encapsulating computer communications
CN110545298A (en) * 2018-05-28 2019-12-06 上海驿卓通信科技有限公司 Exhibition hall multi-information acquisition system
CN110545269A (en) * 2019-08-22 2019-12-06 西安四叶草信息技术有限公司 Access control method, device and storage medium

Also Published As

Publication number Publication date
TW202139767A (en) 2021-10-16
CN111937366B (en) 2023-08-01
CN111937366A (en) 2020-11-13
WO2021203343A1 (en) 2021-10-14

Similar Documents

Publication Publication Date Title
US11223704B2 (en) Event service for local client applications through local server
CN112257135B (en) Model loading method and device based on multithreading, storage medium and terminal
US11829787B2 (en) Multi-process model for cross-platform applications
US8260741B2 (en) System and method for utilizing a modular operating system (OS) resident agent allowing an out-of-band server management
EP3402160B1 (en) Service processing method and apparatus
KR102137097B1 (en) Processing Method for periodic event and Electronic device supporting the same
TW201833768A (en) Resource loading method and device
US10318359B2 (en) Techniques to remotely access object events
CN108418874B (en) Cross-wide-area-network data back-leading method and device, computer equipment and storage medium
CN109327490A (en) A kind of method and apparatus for disposing cloud service component
JP2009157648A (en) Communication terminal, communication method, and communication program
CN107515791B (en) Method for event service of local client application by local server
CN115640149A (en) RDMA event management method, device and storage medium
TWI815098B (en) Web request processing method, device, electronic device, and computer-readable recording medium with stored program
CN111078316B (en) Layout file loading method and device, storage medium and electronic equipment
EP3584700A1 (en) Fingerprint recognition method and related product
WO2017166093A1 (en) Front-end system
US7464377B2 (en) Application parallel processing system and application parallel processing method
US20110191405A1 (en) Automatic Client-Server Code Generator
CN113382014B (en) Negotiation processing method, device, terminal equipment and storage medium
CN115373865A (en) Concurrent thread management method, device, electronic equipment and storage medium
KR100494827B1 (en) Distributed object model based radio server with hardware-independent communication interface and communication control method using the same
Wang et al. Design and implementation of remote control system between Android platform
WO2017166094A1 (en) Server front-end method
WO2017166095A1 (en) Server front-end method