CN111937366B - Web request processing method and device - Google Patents

Web request processing method and device Download PDF

Info

Publication number
CN111937366B
CN111937366B CN202080000785.6A CN202080000785A CN111937366B CN 111937366 B CN111937366 B CN 111937366B CN 202080000785 A CN202080000785 A CN 202080000785A CN 111937366 B CN111937366 B CN 111937366B
Authority
CN
China
Prior art keywords
processing
data
web request
function
lua
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.)
Active
Application number
CN202080000785.6A
Other languages
Chinese (zh)
Other versions
CN111937366A (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.)
Beijing Micro Digital Technology Co ltd
Original Assignee
Beijing Micro Digital 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 Beijing Micro Digital Technology Co ltd filed Critical Beijing Micro Digital Technology Co ltd
Publication of CN111937366A publication Critical patent/CN111937366A/en
Application granted granted Critical
Publication of CN111937366B publication Critical patent/CN111937366B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The invention relates to the technical field of computers, and particularly provides a Web request processing method applied to a Wi-Fi chip capable of configuring Wi-Fi parameters, which comprises the following steps: receiving a Web request, and establishing connection for the Web request; remotely calling a LUA script, and selecting a processing function corresponding to the Web request for processing; and returning processing result data. Apparatuses, devices, and media are correspondingly provided. The Web request processing method can realize the function of the Web server based on the Wi-Fi chip, and builds a Web server architecture.

Description

Web request processing method and device
Technical Field
The present invention relates to the field of computer technology, and in particular, to a Web (network) request processing method, a Web request processing apparatus, an electronic device, and a computer storage medium.
Background
The Wi-Fi chip in the prior art is often used as a Wi-Fi adapter, for example, an ESP8266 chip developed by Lexin company, provides a set of highly integrated Wi-Fi chip solution, and has the characteristics of low power consumption, compact design, high stability and the like. The Wi-Fi adapter can be used for various microcontroller-based designs only through an SPI (serial peripheral interface)/SDIO (secure digital input output) interface or a UART (universal asynchronous receiver transmitter) interface. Detailed functional description can be seen on its official website
https://www.espressif.com/zh-hans/products/hardware/esp8266ex/overview。
Because of the relatively low price of ESP8266, it has been applied to a variety of Internet of things systems. However, due to its nature as a Wi-Fi chip, the performance is limited, and the software currently provided is limited to functions in Wi-Fi configuration, but cannot provide more abundant functions. If a richer Web service is to be provided, hardware configuration needs to be promoted to run the Web server, which results in a significant increase in the cost of the entire system.
While implementing server functionality based on Wi-Fi chips such as ESP8266, several problems are faced: firstly, the chip does not provide direct server software or related necessary functions, and the function is not complete; secondly, due to the limitation of hardware of the Wi-Fi chip, when the server function is realized, the processed data access amount is insufficient in memory.
Disclosure of Invention
The invention provides a technology for constructing a Web server function by utilizing a Wi-Fi chip, in order to solve the problem that the Wi-Fi chip with configurable parameters is limited in the prior art, and particularly provides a Web request processing method which is applied to the Wi-Fi chip with the configurable Wi-Fi parameters, wherein the method comprises the following steps:
receiving a Web request, and establishing connection for the Web request;
remotely calling a LUA script, and selecting a processing function corresponding to the Web request for processing;
and returning processing result data.
Further, the step of remotely calling the LUA script and selecting the processing function corresponding to the Web request for processing includes:
triggering a receive event;
analyzing the request data to obtain the LUA file name;
loading a file to obtain a LUA function;
executing the LUA function;
and triggering a send event and sending a result obtained by executing the LUA function.
Further, the step of loading the file to obtain the LUA function includes:
and loading the file in a dofile mode to obtain the LUA function.
Further, the step of selecting a processing function corresponding to the Web request for processing includes:
creating a collaborative program corresponding to the Web request;
assigning a processing function to the collaborative program; and
and processing by using the processing function.
Further, the step of processing with the processing function includes:
s121: waking up the collaborative program, and executing the processing function to obtain return data;
s1221: slicing the data in response to the returned data requiring slicing;
s1222: in response to acquiring a threshold number of slices, suspending the collaborative process and transmitting the threshold number of slices;
s1223: steps S121 to S1222 are executed in a loop in response to the data not being transmitted.
Further, the step of processing with the processing function further includes:
and responding to the returned data without slicing, and directly transmitting the data.
Further, the step of processing with the processing function further includes: and after the data is sent, closing the connection when the collaborative program is judged to be in a suspended state.
In a second aspect, an embodiment of the present invention provides a Web request processing apparatus, which is applied to a Wi-Fi chip capable of configuring Wi-Fi parameters, and the apparatus includes:
a connection establishment module configured to establish a connection for a received Web request based on the Web request;
the data processing module is configured to remotely call the LUA script and select a processing function corresponding to the Web request to process;
and the sending module is configured to return the processing result data.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods described above.
In a fourth aspect, an embodiment of the present invention provides a computer readable medium having stored thereon a computer program, wherein the program is executed by a processor to implement the method described above.
The method, the device, the equipment and the medium in the embodiment of the invention realize the construction of the Web server by utilizing the Wi-Fi chip with the configurable parameters of limited storage and processing resources, and realize richer functions on the Wi-Fi chip.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and should not be construed as limiting the invention in any way, in which:
FIG. 1 is a flow chart of a Web request processing method according to some embodiments of the invention;
fig. 2 is a flow chart of a Wi-Fi chip configuration process in some embodiments of the invention;
FIG. 3 is a flow chart illustrating a method for processing a request using a collaborative process according to some embodiments of the present invention;
FIG. 4 is a schematic flow chart diagram illustrating data processing on a Web request according to some embodiments of the invention;
FIG. 5 is a flow diagram of a remote invocation of a LUA script in accordance with some embodiments of the invention;
FIG. 6 is a schematic diagram of a Web request processing apparatus according to some embodiments of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to some embodiments of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those described herein, and therefore the scope of the present invention is not limited to the specific embodiments disclosed below.
As shown in fig. 1, an embodiment of the present invention provides a Web request processing method applied to a Wi-Fi chip capable of configuring Wi-Fi parameters, where the method includes:
s110, receiving a Web request, and establishing connection for the Web request; the Wi-Fi chip in the embodiment of the invention, such as an ESP8266 chip, is divided into two operation modes, namely a configuration mode and a working mode, and the two modes are switched by a switch. The device is first used to enter a configuration mode by placing the switch in an on state. The execution logic of the configuration mode is to initialize the WI-FI module of the device, set it to AP mode, and then turn on the WEB service, which can process the HTTP request. The client accesses the WI-FI network of the device and accesses the Web service through the browser. The Web server monitors and processes the http request, and returns the processed result to the client. The configuration mode supports configuration of Wi-Fi information and cloud server information. After the configuration is completed, the switch is set to be closed, and the equipment can be restarted to enter the working mode. In the working mode, the device is firstly connected with Wi-Fi, then the device is calibrated, then the cloud server is connected, and the device starts to transmit data after the work is completed. The workflow is shown in fig. 2.
S120, remotely calling the LUA script, and selecting a processing function corresponding to the Web request for processing; and analyzing according to the Web request to acquire a corresponding processing function, and performing data processing, such as data query, data calculation, data packaging and the like, to form a processing result.
S130, returning processing result data; after the processing result is obtained, data packaging and sending are carried out according to the adopted data protocol, for example, the data is sent in an http protocol mode.
In the embodiment of the invention, a Wi-Fi chip is adopted to build a server function, and because the Wi-Fi chip can be limited by a Web service framework which is not mature, in order to meet the requirement of providing Web services, a set of Web service framework is realized based on a LUA base library. The LUA is a lightweight and compact scripting language, and the Wi-Fi chip can bear the functions of the scripting language to run, and the server function is realized by remotely calling the LUA script.
The key technology of the Web server comprises the steps of creating a TCP server, capturing http (hypertext transfer protocol) requests, establishing a connection, analyzing and processing request data, returning a result to a client in an http form, and closing the connection. The method and the device mainly realize analysis and processing of the http request data. The implementation can be characterized by the following according to the selection:
1) And supporting various request modes, including get, post, put and the like, and analyzing according to different Web request modes.
2) Supporting http access authentication;
3) Remotely calling the LUA script in an http mode;
4) Support multiple request encodings;
5) A scenario in which a single request returns a large amount of data can be handled correctly.
In the embodiment of the invention, the LUA script is called remotely, and the step of selecting the processing function corresponding to the Web request for processing comprises the following steps:
triggering a receive event, analyzing request data, acquiring a LUA file name, loading a file to acquire a LUA function, executing the LUA function, triggering a send event, and sending a result acquired by executing the LUA function.
In the embodiment of the present invention, the step of loading the file to obtain the LUA function includes:
loading files in a dofile mode to obtain the LUA function
In order to realize the scene of processing larger data volume in the Wi-Fi chip with limited performance, the method for processing the Web request in the implementation of the invention adopts a collaborative program to process, thereby reducing the requirement on the performance of equipment and simultaneously avoiding data transmission errors. Specifically, the step of selecting a processing function corresponding to the Web request for processing includes: creating a collaborative program corresponding to the Web request; assigning a processing function to the collaborative program; and processing with the processing function. Further, as shown in fig. 3, the step of processing with the processing function includes:
s1231, waking up the collaborative program, and executing the processing function to obtain return data;
s1232, performing data slicing in response to the returned data needing slicing;
s1233, in response to acquiring a threshold number of slices, suspending the collaborative process and transmitting the threshold number of slices;
s1234, in response to the data not being sent, steps S1231 through S1233 are performed in a loop.
In the embodiment of the invention, the returned data is obtained by executing the processing function through the collaborative program, when the data volume is large, the data is correspondingly sliced, then transmitted, and when the data is transmitted, the collaborative program is suspended, the requirement on the performance of the chip is reduced, and the data is transmitted circularly until the data is transmitted. The above-mentioned collaborative process and data transmission may be performed in a parallel manner, for example, when data is transmitted, the collaborative process is suspended, and after the data transmission of the slice is completed, the collaborative process is awakened to continue to be executed, the return data is acquired, then the slice is adaptively selected, and then the collaborative process is suspended and the data is transmitted. The adoption of the collaborative program ensures that a plurality of processing requests can be executed, and avoids the situation that other requests are not processed because a single request acquires more data. In order to reduce the requirement on the chip performance, in the embodiment of the invention, 1 slice can be acquired and then transmitted.
In the embodiment of the invention, when the acquired data volume of the returned data is smaller, or no other collaborative program needs to run, the returned data can be directly sent. Specifically, the step of processing by the processing function further includes:
s1235, responding to the returned data without slicing, and directly transmitting the data.
As shown in fig. 4, in the embodiment of the present invention, the problem of insufficient memory of the device is solved by using the collaborative program, so as to ensure the support of access scenarios with larger data volume, the user sends a Web request, establishes a connection for the request, parses the request data, selects a corresponding processing function to process the request, returns the processing result data, and closes the connection. The data processing process adopts a collaborative program, creates the collaborative program for each request and designates a processing function, and the processing flow is as follows: firstly, waking up a collaborative program, and executing a processing function to obtain return data; then, slicing the returned data in sequence, transmitting each time a slice is acquired, suspending the collaborative program before transmitting, waking up after transmitting, and continuing slicing operation until the data is transmitted; and finally closing the connection to complete a request process. The collaborative program ensures that return data of the same request can be continuously and correctly sent.
Further, the step of processing with the processing function further includes: s1236, after data transmission, when the collaborative program is judged to be in a suspended state, the connection is closed. And (5) timely emptying the occupation of resources.
As shown in FIG. 5, the embodiment of the invention can realize remote call of the LUA script in an http mode, trigger a callback function of a receiver after a request arrives, analyze request data by the function to obtain a LUA file name, load a file in a dofile mode to obtain a processing function defined by the script, and transmit the requested parameters to the function to finish data processing work. This approach requires LUA scripts to follow the format definition as: return function (connection, req, args).
The embodiment of the invention provides a Wi-Fi chip based on configurable parameters, and provides a processing method for Web requests. The method can process the scene of a larger data request based on limited memory resources and can also realize remote call of the LUA script.
As shown in fig. 6, the embodiment of the present invention further provides a Web request processing apparatus 200, which is applied to a Wi-Fi chip capable of configuring Wi-Fi parameters, where the apparatus 200 includes:
a connection establishment module 210 configured to establish a connection for a received Web request based on the Web request;
a data processing module 220 configured to remotely invoke the LUA script, and select a processing function corresponding to the Web request to process;
the sending module 230 is configured to return the processing result data.
Further, the data processing module 220 is configured to:
triggering a receive event, analyzing request data, acquiring a LUA file name, loading a file to acquire a LUA function, executing the LUA function, triggering a send event, and sending a result acquired by executing the LUA function.
Further, the data processing module 220 loads a file in a dofile manner to obtain the LUA function. Further, the data processing module 220 is further configured to create a collaborative program corresponding to the Web request; assigning a processing function to the collaborative program; and processing by using the processing function.
Further, the data processing module 202 is further configured to wake up the collaborative program, execute the processing function to obtain the returned data; responding to the returned data to be sliced, and slicing the data; in response to acquiring a threshold number of slices, transmitting, suspending the collaborative program, and transmitting the threshold number of slices; responding to the fact that the data is not sent completely, and circularly carrying out the steps of waking up and slicing sending until the sending is completed; when the returned data does not need to be sliced, the data is directly transmitted; and after the data is sent, closing the connection when the collaborative program is judged to be in a suspended state.
Details of the steps performed by the above modules are described in the above method embodiments, and are not described herein.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods of the present invention are depicted in the accompanying drawings in a particular order, this is not required to either imply that the steps must be performed in that particular order, or that all of the illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, 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 appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1100 according to this embodiment of the invention is described below with reference to fig. 7. The electronic device 1100 shown in fig. 7 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 7, the electronic device 1100 is embodied in the form of a general purpose computing device. Components of electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one memory unit 1120, a bus 1130 connecting the different system components, including the memory unit 1120 and the processing unit 1110.
Wherein the storage unit stores program code that is executable by the processing unit 1110 such that the processing unit 1110 performs steps according to various exemplary embodiments of the present invention described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 1110 may perform S110 shown in fig. 1 to receive a Web request, and establish a connection for the Web request; s120, remotely calling the LUA script, and selecting a processing function corresponding to the Web request for processing; s130 returns the processing result data.
The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a Random Access Memory (RAM) 11201 and/or a cache memory 11202, and may further include a Read Only Memory (ROM) 11203.
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 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 1130 may be a local bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a bus using any of a variety of bus architectures.
The electronic device 1100 may also communicate with one or more external devices 1200 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1100, and/or any devices (e.g., routers, modems, etc.) that enable the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1150. Also, electronic device 1100 can 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 network adapter 1160. As shown, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 1100, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present invention.
In an exemplary embodiment of the present invention, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, 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), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming 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, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

Claims (9)

1. A Web request processing method, applied to a Wi-Fi chip capable of configuring Wi-Fi parameters, the method comprising:
receiving a Web request, and establishing connection for the Web request;
remotely calling a LUA script, and selecting a processing function corresponding to the Web request for processing;
returning processing result data; wherein, the liquid crystal display device comprises a liquid crystal display device,
the step of selecting a processing function corresponding to the Web request for processing comprises the following steps:
creating a collaborative program corresponding to the Web request;
assigning a processing function to the collaborative program; and
and processing by using the processing function.
2. The method of claim 1, wherein the step of remotely invoking the LUA script and selecting a processing function corresponding to the Web request for processing comprises:
triggering a receive event;
analyzing the request data to obtain the LUA file name;
loading a file to obtain a LUA function;
executing the LUA function;
and triggering a send event and sending a result obtained by executing the LUA function.
3. The method of claim 2, wherein the step of loading the file to obtain the LUA function comprises:
and loading the file in a dofile mode to obtain the LUA function.
4. The method of claim 1, wherein the step of processing with the processing function comprises:
s1231, waking up the collaborative program, and executing the processing function to obtain return data;
s1232, performing data slicing in response to the returned data needing slicing;
s1233, suspending the collaborative program and transmitting a threshold number of slices in response to acquiring the threshold number of slices;
s1234, in response to the data not being transmitted, steps S1231-S1234 are circularly executed.
5. The method of claim 1, wherein the step of processing with the processing function further comprises:
and responding to the returned data without slicing, and directly transmitting the data.
6. The method of claim 4 or 5, wherein the step of processing with the processing function further comprises: and after the data is sent, closing the connection when the collaborative program is judged to be in a suspended state.
7. A Web request processing apparatus, applied to a Wi-Fi chip capable of configuring Wi-Fi parameters, the apparatus comprising:
a connection establishment module configured to establish a connection for a received Web request based on the Web request;
the data processing module is configured to remotely call the LUA script and select a processing function corresponding to the Web request to process;
the sending module is configured to return processing result data; wherein, the liquid crystal display device comprises a liquid crystal display device,
the step of selecting a processing function corresponding to the Web request for processing comprises the following steps:
creating a collaborative program corresponding to the Web request;
assigning a processing function to the collaborative program; and
and processing by using the processing function.
8. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
9. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202080000785.6A 2020-04-09 2020-04-09 Web request processing method and device Active CN111937366B (en)

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN111937366A CN111937366A (en) 2020-11-13
CN111937366B true CN111937366B (en) 2023-08-01

Family

ID=73334984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080000785.6A Active CN111937366B (en) 2020-04-09 2020-04-09 Web request processing method and device

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
WO2011127640A1 (en) * 2010-04-12 2011-10-20 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
CN108717285A (en) * 2018-04-14 2018-10-30 张著岳 The programmable logic controller (PLC) programmed by built-in web
CN109814915A (en) * 2018-12-29 2019-05-28 天津字节跳动科技有限公司 Method for parameter configuration, device, medium and electronic equipment based on lua

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
CN105516337B (en) * 2015-12-28 2018-07-13 南京大学金陵学院 Web site based on dynamic load mechanism docks analytic method
US9898384B2 (en) * 2016-03-18 2018-02-20 International Business Machines Corporation Automated problem determination for cooperating web services using debugging technology
WO2018140487A1 (en) * 2017-01-27 2018-08-02 Mz Ip Holdings, Llc System and method for encapsulating computer communications
CN110392375B (en) * 2018-04-18 2022-02-22 腾讯科技(深圳)有限公司 WiFi network channel modification method, terminal, server and storage medium
CN110545298A (en) * 2018-05-28 2019-12-06 上海驿卓通信科技有限公司 Exhibition hall multi-information acquisition system
CN110875858B (en) * 2018-08-31 2023-06-27 北京京东尚科信息技术有限公司 Application test data grabbing method, system, equipment and storage medium
CN110545269A (en) * 2019-08-22 2019-12-06 西安四叶草信息技术有限公司 Access control method, device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011127640A1 (en) * 2010-04-12 2011-10-20 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
CN108717285A (en) * 2018-04-14 2018-10-30 张著岳 The programmable logic controller (PLC) programmed by built-in web
CN109814915A (en) * 2018-12-29 2019-05-28 天津字节跳动科技有限公司 Method for parameter configuration, device, medium and electronic equipment based on lua

Also Published As

Publication number Publication date
WO2021203343A1 (en) 2021-10-14
CN111937366A (en) 2020-11-13
TWI815098B (en) 2023-09-11
TW202139767A (en) 2021-10-16

Similar Documents

Publication Publication Date Title
CN108628684B (en) DPDK-based message processing method and computer equipment
CN112257135B (en) Model loading method and device based on multithreading, storage medium and terminal
CN111786939B (en) Method, device and system for testing management platform of Internet of things
CN111400000A (en) Network request processing method, device, equipment and storage medium
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
KR20220151585A (en) Business data processing method, apparatus, electronic apparatus, storage media and computer program
CN112084042B (en) Message processing method and device
CN111937366B (en) Web request processing method and device
JP6088531B2 (en) Event service for local client applications through a local server
CN116561013B (en) Testing method and device based on target service framework, electronic equipment and medium
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN113779122B (en) Method and device for exporting data
CN113722115A (en) Method, device, equipment and computer readable medium for calling interface
CN112311843A (en) Data loading method and device
KR100494827B1 (en) Distributed object model based radio server with hardware-independent communication interface and communication control method using the same
CN112860447A (en) Interaction method and system between different applications
CN117155729A (en) Communication method, system, device and electronic equipment
CN114726901B (en) Container access method, device, equipment and storage medium
US8495659B1 (en) Eliminating redundancy in instance data of different versioned classes in communication between object request brokers using a common class definition
CN112104980B (en) Method and device for assisting in positioning terminal
CN113326195A (en) Test method, device, system and storage medium
CN115756462A (en) Webpage generation method and device, electronic equipment and storage medium
CN116781571A (en) Health detection method and device of load balancing equipment
US20140244764A1 (en) Methods, apparatus, and articles of manufacture to provide a protocol-enabled interface definition language
CN115373865A (en) Concurrent thread management method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210825

Address after: 1219, 11 / F, 19 Madian East Road, Haidian District, Beijing 100088

Applicant after: Beijing micro digital technology Co.,Ltd.

Address before: 100095 Beijing Haidian District Hot Spring Town Dongbutou Village District No.398

Applicant before: Jiao Xu

GR01 Patent grant
GR01 Patent grant