CN112069437B - Webpage request processing method and device, electronic equipment and storage medium - Google Patents

Webpage request processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112069437B
CN112069437B CN202010815102.4A CN202010815102A CN112069437B CN 112069437 B CN112069437 B CN 112069437B CN 202010815102 A CN202010815102 A CN 202010815102A CN 112069437 B CN112069437 B CN 112069437B
Authority
CN
China
Prior art keywords
webpage
request information
application program
web page
terminal
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
CN202010815102.4A
Other languages
Chinese (zh)
Other versions
CN112069437A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010815102.4A priority Critical patent/CN112069437B/en
Publication of CN112069437A publication Critical patent/CN112069437A/en
Application granted granted Critical
Publication of CN112069437B publication Critical patent/CN112069437B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Abstract

The disclosure relates to a method, a device, an electronic device and a storage medium for processing a webpage request, wherein the method comprises the following steps: correspondingly acquiring a plurality of webpage request information from a plurality of webpage functional units and storing the webpage request information into a queue; extracting at least one group of webpage request information sets from the queue; correspondingly packaging a plurality of application program interfaces associated with each group of webpage request information sets into an application program interface set; and transmitting the application program interface set to the server, receiving a plurality of pieces of webpage data returned by the server according to the application program interface set, and transmitting the plurality of pieces of webpage data to a plurality of corresponding webpage functional units. The method and the device avoid that each webpage functional unit directly sends at least one HTTP request to the server, reduce the influence of webpage loading performance and save network resources of the terminal. And the API set is sent to the server, so that the server is prevented from packaging uniform APIs, and the occupation amount of server resources is reduced.

Description

Webpage request processing method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of internet, and in particular relates to a webpage request processing method, device, electronic equipment and storage medium.
Background
With the continuous development of internet services, the functions of the web page function units are gradually improved, and the web page function units are decoupled from each other, so that each web page function unit pays attention to internal service logic, and web page data required by the web page function unit is mainly obtained from a server through a hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) request.
In the related art, each web page function unit needs to send at least one HTTP request to the server, which affects the loading performance of the web page and consumes the network resources of the terminal. The server needs to encapsulate uniform application program interfaces (Application Programming Interface, API) for different web page function units, occupying server resources and even wasting server resources.
Disclosure of Invention
The disclosure provides a method, a device, an electronic device and a storage medium for processing a webpage request, so as to at least solve the problems that in the related art, the loading performance of the webpage is affected, the network resources of a webpage end are consumed, and the server resources are occupied or even wasted. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a method for processing a web page request, applied to a terminal, the method including: a plurality of webpage request information is correspondingly acquired from a plurality of webpage functional units in the webpage initialized on the terminal, and the acquired webpage request information is stored in a preset queue; extracting at least one group of webpage request information sets from the queue, wherein each group of webpage request information sets comprises a plurality of webpage request information; correspondingly packaging a plurality of application program interfaces associated with each group of webpage request information sets into an application program interface set; and transmitting the application program interface set to a server, receiving a plurality of pieces of webpage data returned by the server according to the application program interface set, and transmitting the plurality of pieces of webpage data to a plurality of corresponding webpage functional units.
Optionally, the extracting at least one set of web page request information from the queue includes: and respectively extracting at least one group of webpage request information sets with a preset period as a time interval from the storage of the first webpage request information to the queue, wherein each group of webpage request information sets comprises a plurality of webpage request information stored in the queue in each period.
Optionally, the packaging the plurality of application program interfaces associated with each set of the web page request information into one application program interface set correspondingly includes: matching to obtain a plurality of application program interfaces associated with the webpage request information in each group of webpage request information sets according to the request type of the webpage request information in each group of webpage request information sets; and correspondingly packaging a plurality of application program interfaces into one application program interface set of each group of webpage request information sets.
Optionally, the plurality of web page request information includes a uniform resource locator, a request method, a query parameter and a variable parameter.
According to a second aspect of an embodiment of the present disclosure, there is provided a method for processing a web page request, applied to a server, the method including: receiving an application program interface set from a terminal, wherein the application program interface set is obtained by packaging a plurality of application program interfaces associated with a plurality of webpage request information of a plurality of webpage functional units by the terminal; analyzing the application program interface set to obtain a plurality of application program interfaces and a plurality of webpage request information; and returning a plurality of pieces of webpage data to the terminal in batches according to the application program interfaces and the webpage request information so that the terminal can transmit the webpage data to the corresponding webpage functional units.
According to a third aspect of embodiments of the present disclosure, there is provided a processing apparatus for web page request, applied to a terminal, the apparatus including: the storage module is configured to correspondingly acquire a plurality of webpage request information from a plurality of webpage functional units in the webpage initialized on the terminal, and store the acquired plurality of webpage request information into a preset queue; an extraction module configured to extract at least one set of web page request information sets from the queue, each set of web page request information sets containing a plurality of web page request information; the packaging module is configured to correspondingly package a plurality of application program interfaces associated with each group of webpage request information sets into one application program interface set; the transmission module is configured to transmit the application program interface set to a server, receive a plurality of pieces of webpage data returned by the server according to the application program interface set, and transmit the plurality of pieces of webpage data to a plurality of corresponding webpage functional units.
Optionally, the extracting module is configured to extract at least one set of web page request information respectively at preset periods as time intervals from storing the first web page request information into the queue, and each set of web page request information includes a plurality of web page request information stored into the queue in each period.
Optionally, the packaging module includes: the interface matching module is configured to obtain a plurality of application program interfaces associated with the webpage request information in each group of webpage request information sets in a matching mode according to the request type of the webpage request information in each group of webpage request information sets; an interface packaging module configured to package a plurality of the application program interfaces into one of the application program interface sets of each group of the web page request information sets, respectively.
Optionally, the plurality of web page request information includes a uniform resource locator, a request method, a query parameter and a variable parameter.
According to a fourth aspect of embodiments of the present disclosure, there is provided a processing apparatus for web page request, applied to a server, the apparatus including: the receiving module is configured to receive an application program interface set from a terminal, wherein the application program interface set is obtained by packaging a plurality of application program interfaces associated with a plurality of webpage request information of a plurality of webpage functional units by the terminal; the analysis module is configured to analyze and obtain a plurality of application program interfaces and a plurality of webpage request information from the application program interface set; and the return module is configured to return a plurality of pieces of webpage data to the terminal in batches according to the application program interfaces and the webpage request information so that the terminal can transmit the webpage data to the corresponding webpage functional units.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method according to the first or second aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method of the first or second aspect.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product comprising readable program code executable by a processor of an electronic device to perform the method of the first or second aspect described above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in an embodiment of the present disclosure, a queue is created in advance on a terminal, and a plurality of web page request information acquired from a plurality of web page function units is stored in the queue. At least one set of web page request information is extracted from the queue, and each set of web page request information may contain a plurality of web page request information. And packaging a plurality of APIs associated with each set of webpage request information set into an API set aiming at each set of extracted webpage request information set, transmitting the API set to a server, and returning a plurality of pieces of webpage data by the server according to the API set. And correspondingly transmitting the returned pieces of webpage data to the webpage functional units at the terminal.
On the one hand, compared with the existing processing scheme of the webpage request, each webpage functional unit can send at least one HTTP request to the server after initialization, the embodiment of the invention avoids each webpage functional unit from directly sending at least one HTTP request to the server, reduces the influence of webpage loading performance and saves network resources of the terminal. On the other hand, the terminal creates a queue in advance, stores a plurality of webpage request information into the queue, extracts one or more groups of webpage request information sets from the queue, encapsulates a corresponding API set for each webpage request set, and sends the API set to the server. In addition, the server in the existing webpage request processing scheme can package unified APIs for the webpage functional units which do not send HTTP requests, and the embodiment of the disclosure purposefully packages the API sets aiming at the webpage request information sets, so that useless APIs are prevented from being packaged by the server, and server resources are saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a flowchart illustrating a method of processing a web page request, according to an example embodiment.
FIG. 2 is a flowchart illustrating the steps of packaging an application program interface collection, according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating another method of processing a web page request, according to an example embodiment.
FIG. 4 is a block diagram illustrating a processing device for web page requests, according to an example embodiment.
FIG. 5 is a block diagram illustrating another web page request processing apparatus according to an example embodiment.
FIG. 6 is a block diagram of an electronic device for processing web page requests, according to an example embodiment.
FIG. 7 is a block diagram of an electronic device for processing web page requests, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart illustrating a method for processing a web page request according to an exemplary embodiment, and the method for processing a web page request may be applied to a terminal as shown in fig. 1. The terminal can be operated with a webpage, and a plurality of webpage functional units exist in the webpage. The processing method of the web page request may include the following steps.
In step S11, a plurality of web page request information is correspondingly acquired from a plurality of web page function units in the initialized web page on the terminal, and the acquired plurality of web page request information is stored in a preset queue.
In the embodiment of the present disclosure, after initializing a web page on a terminal, a plurality of web page function units in the web page need to acquire respective web page data, and then perform processing such as web page rendering by using the acquired web page data. Generally, a web page function unit sends out at least one web page request message to obtain the required web page data. For example, each of the 6 web page function units issues 2 web page request messages, and a total of 12 web page request messages need to be sent to the server. Embodiments of the present disclosure pre-create a queue on the terminal that can be used to store web page request information. After acquiring one web page request information, the acquired web page request information may be stored in a queue immediately. Thus, the order in which the web page request information is arranged stored in the queue may be determined according to the time order in which the web page request information is acquired.
In step S12, at least one set of web page request information is extracted from the queue.
In an embodiment of the present disclosure, after a period of time has elapsed, a plurality of web page request information is stored in the queue, and the plurality of web page request information may be extracted from the queue. Specifically, a plurality of web page request information can be extracted in the form of each group of web page request information sets. That is, each set of web page request information may contain a plurality of web page request information.
In step S13, a plurality of application program interfaces associated with each set of web page request information sets are packaged as one application program interface set, respectively.
In an embodiment of the present disclosure, each web page request message may be associated with an application program interface, that is, call an application program interface to obtain the web page data requested to obtain by the web page request message. Since each set of web page request information contains a plurality of web page request information, each set of web page request information can be associated with a plurality of application program interfaces.
Embodiments of the present disclosure package multiple application program interfaces associated with each set of web page request information into one set of application program interfaces. For example, if 3 sets of web page request information are extracted, the encapsulation results in 3 application program interface sets. In practice, the 3 sets of web page request information include 10 web page request information, and the 10 web page request information is associated with 10 application program interfaces.
In step S14, the application program interface set is transmitted to the server, and the server receives the pieces of web page data returned by the application program interface set, and transmits the pieces of web page data to the corresponding plurality of web page function units.
In an embodiment of the present disclosure, the packaged set of application program interfaces is transmitted to a server, rather than transmitting individual application program interfaces to the server. The server can analyze the received application program interface set to obtain each independent application program interface, call each independent application program interface to obtain a plurality of pieces of webpage data, and return the plurality of pieces of webpage data to the terminal. And transmitting the webpage data to a plurality of corresponding webpage functional units on the terminal.
In an embodiment of the present disclosure, a queue is created in advance on a terminal, and a plurality of web page request information acquired from a plurality of web page function units is stored in the queue. At least one set of web page request information is extracted from the queue, and each set of web page request information may contain a plurality of web page request information. And packaging a plurality of APIs associated with each set of webpage request information set into an API set aiming at each set of extracted webpage request information set, transmitting the API set to a server, and returning a plurality of pieces of webpage data by the server according to the API set. And correspondingly transmitting the returned pieces of webpage data to the webpage functional units at the terminal.
On the one hand, compared with the existing processing scheme of the webpage request, each webpage functional unit can send at least one HTTP request to the server after initialization, the embodiment of the invention avoids each webpage functional unit from directly sending at least one HTTP request to the server, reduces the influence of webpage loading performance and saves network resources of the terminal. On the other hand, the terminal creates a queue in advance, stores a plurality of webpage request information into the queue, extracts one or more groups of webpage request information sets from the queue, encapsulates a corresponding API set for each webpage request set, and sends the API set to the server. In addition, the server in the existing webpage request processing scheme can package unified APIs for the webpage functional units which do not send HTTP requests, and the embodiment of the disclosure purposefully packages the API sets aiming at the webpage request information sets, so that useless APIs are prevented from being packaged by the server, and server resources are saved.
In an exemplary embodiment of the present disclosure, the above web page request information may include, but is not limited to: uniform resource locators (Uniform Resource Locator, URL), request method (method), query parameters (qury), variable parameters (params), etc.
In an exemplary embodiment of the present disclosure, when at least one set of web page request information is extracted from the queue in the above step S12, one or more sets of web page request information may be respectively extracted at predetermined intervals of a period starting from storing the first web page request information in the queue. Wherein each set of web page request information may include a plurality of web page request information stored to the queue in each period. For example, the preset period is 50 milliseconds. Starting from the first web page request information h01 stored in the queue, the web page request information h02, h03 is also stored in the queue within a 50 millisecond period, and the extracted first set of web page request information includes the web page request information h01, h02 and h03. For another example, between the second 50 ms after the first 50 ms, the web page request information h04, h05, and h06 are sequentially stored in the queue, and the extracted second group of web page request information sets contains the web page request information h04, h05, and h06.
In an exemplary embodiment of the present disclosure, as shown in fig. 2, the above step S13 may include the following steps.
In step S21, a plurality of application program interfaces associated with each web page request information in each set of web page request information are obtained by matching the request types of each web page request information in each set of web page request information.
Since each web page request information has a respective request type, and different request types may have a correspondence with the application program interface. Therefore, when the plurality of application program interfaces associated with each set of web page request information are packaged as one application program interface set, the application program interfaces associated with each web page request information in each set of web page request information need to be determined first. In practical application, the associated application program interface can be obtained according to the request type matching of the webpage request information. For example, if the request type of the web page request information h01 is l01, the request type of the web page request information h02 is l02, and the request type of the web page request information h03 is l03, the application program interfaces associated with the request types h01, h02 and h03 are obtained by matching, and are api01, api02 and api03 in sequence.
In step S22, the plurality of application program interfaces are packaged correspondingly into one application program interface set of each group of web page request information sets.
Embodiments of the present disclosure may employ a collect interface to package multiple application program interfaces into an application program interface collection. For example, the application program interfaces api01, api02, and api03 associated with the first set of web page request information are packaged as an application layer program interface set a01. The application program interfaces api04, api05 and api06 associated with the second set of web page request information are packaged as an application layer program interface set a02.
In an exemplary embodiment of the present disclosure, in the above step S14, in the case where the web page request information sent by the web page function unit is an HTTP request, the application program interface set may be transmitted to the server in a post manner. After receiving the pieces of web page data returned by the server, it can be determined to which web page function unit each piece of web page data is correspondingly transmitted. Therefore, the corresponding relationship between the web page function unit and the web page request information needs to be recorded in advance, and accordingly, the corresponding relationship between the web page function unit and the application program interface needs to be recorded. When the server returns the plurality of web page data, the server may also return the correspondence between the plurality of web page data and the plurality of application program interfaces. Finally, the terminal can determine which web page data should be transmitted to which web page function unit according to the corresponding relation between the web page data and the application program interfaces and the corresponding relation between the web page function unit and the application program interfaces.
Fig. 3 is a flowchart illustrating another processing method of a web page request according to an exemplary embodiment, and the processing method of a web page request may be applied to a server as shown in fig. 3. The processing method of the web page request may include the following steps.
In step S31, a set of application program interfaces from the terminal is received.
In an embodiment of the present disclosure, the application program interface set may be encapsulated by a plurality of application program interfaces associated with a plurality of web page request information sent by a plurality of web page function units in a web page running on the terminal. The description of the application program interface set may refer to the related description in the above embodiment, and will not be repeated here.
In an exemplary embodiment of the present disclosure, a method (collection function) for packaging an application program interface set is provided on a terminal, and each web page function unit in a web page on the terminal may call the method to send an HTTP request and obtain web page data. The method can maintain a queue, push each received HTTP request into the queue, start timing when receiving the first HTTP request, agree 50 ms as a period, encapsulate APIs associated with HTTP requests pushed into the queue in a period into uniform API (CollectAPI), and transmit the CollectAPIs to a server in a post mode. After the webpage on the terminal is initialized, the webpage functional unit can synchronously call the method, and APIs associated with all HTTP requests can be packaged in one period or a plurality of periods.
In step S32, a plurality of application program interfaces and a plurality of web page request information are parsed from the application program interface set.
In an embodiment of the present disclosure, a node. Js operating environment may be deployed on a server, where the server receives and parses a set of application interfaces to obtain multiple application interfaces and multiple web page request information (e.g., URL, method, qury, params, etc.).
In step S33, a plurality of pieces of web page data are returned to the terminal in batches according to the plurality of application program interfaces and the plurality of web page request information, so that the terminal transmits the plurality of pieces of web page data to the corresponding plurality of web page function units.
In the embodiment of the disclosure, the server may perform request processing on each web page request information through the request module, and return a plurality of web page data to the terminal in batches. After receiving the returned pieces of webpage data, the terminal can transmit each piece of webpage data to the corresponding webpage functional unit based on the collection function.
Based on the above description about the embodiment of the processing method of the web page request, a processing method of the HTTP request is described below. The HTTP request processing method relates to a terminal and a server. The terminal acquires a plurality of webpage request information from the webpage functional units correspondingly. Each web page function may correspond to at least one web page request message. The terminal stores the acquired webpage request information into a queue, extracts one or more groups of webpage request information sets from the queue, packages APIs associated with each group of webpage request information sets into an API set, and transmits the API set to the server. After receiving the API set, the server analyzes the API set to obtain a plurality of API interfaces and a plurality of webpage request information, and then returns a plurality of pieces of webpage data to the terminal in batches according to the plurality of API interfaces and the plurality of webpage request information. And the terminal transmits the received plurality of pieces of webpage data to the corresponding webpage functional units.
FIG. 4 is a block diagram illustrating a processing device for web page requests, according to an example embodiment. The device can be applied to a terminal, and the device can specifically comprise the following modules.
The storage module 41 is configured to correspondingly acquire a plurality of webpage request information from a plurality of webpage functional units in the webpage initialized on the terminal, and store the acquired plurality of webpage request information into a preset queue;
an extraction module 42 configured to extract at least one set of web page request information from the queue, each set of web page request information containing a plurality of web page request information;
a packaging module 43 configured to package a plurality of application program interfaces associated with each set of the web page request information sets into one application program interface set, respectively;
the transmission module 44 is configured to transmit the set of application program interfaces to a server, and receive a plurality of pieces of web page data returned by the server according to the set of application program interfaces, and transmit the plurality of pieces of web page data to a plurality of corresponding web page function units.
In an exemplary embodiment of the present disclosure, the extracting module 42 is configured to extract at least one set of the web page request information respectively at preset periods as time intervals from storing the first web page request information into the queue, where each set of the web page request information includes a plurality of web page request information stored into the queue in each period.
In an exemplary embodiment of the present disclosure, the encapsulation module 43 includes:
the interface matching module is configured to obtain a plurality of application program interfaces associated with the webpage request information in each group of webpage request information sets in a matching mode according to the request type of the webpage request information in each group of webpage request information sets;
an interface packaging module configured to package a plurality of the application program interfaces into one of the application program interface sets of each group of the web page request information sets, respectively.
In an exemplary embodiment of the present disclosure, a plurality of the web page request information includes a uniform resource locator, a request method, a query parameter, and a variable parameter.
FIG. 5 is a block diagram illustrating another web page request processing apparatus according to an example embodiment. The device can be applied to a server, and specifically can comprise at least one of the following modules.
A receiving module 51, configured to receive an application program interface set from a terminal, where the application program interface set is obtained by encapsulating a plurality of application program interfaces associated with the terminal according to a plurality of web page request information of a plurality of web page function units;
a parsing module 52 configured to parse the set of application program interfaces to obtain a plurality of application program interfaces and a plurality of web page request information;
and the return module 53 is configured to return a plurality of pieces of webpage data to the terminal in batches according to the plurality of application program interfaces and the plurality of webpage request information, so that the terminal transmits the plurality of pieces of webpage data to a plurality of corresponding webpage functional units.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
FIG. 6 is a block diagram of an electronic device for processing web page requests, according to an example embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, an electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the electronic device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phonebook data, messages, images, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 606 provides power to the various components of the electronic device 600. The power supply components 606 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 600.
The multimedia component 608 includes a screen between the electronic device 600 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. When the electronic device 600 is in an operational mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 614 includes one or more sensors for providing status assessment of various aspects of the electronic device 600. For example, the sensor assembly 614 may detect an on/off state of the electronic device 600, a relative positioning of the components, such as a display and keypad of the electronic device 600, the sensor assembly 614 may also detect a change in position of the electronic device 600 or a component of the electronic device 600, the presence or absence of a user's contact with the electronic device 600, an orientation or acceleration/deceleration of the electronic device 600, and a change in temperature of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communication between the electronic device 600 and other devices, either wired or wireless. The electronic device 600 may access a wireless network based on a communication standard, such as WiFi, an operator network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof. In one exemplary embodiment, the communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a storage medium is also provided, such as a memory 604 including instructions executable by the processor 620 of the electronic device 600 to perform the above-described method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, comprising readable program code executable by the processor 620 of the electronic device 600 to perform the above-described method. Alternatively, the program code may be stored in a storage medium of the electronic device 600, which may be a non-transitory computer readable storage medium, such as ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
FIG. 7 is a block diagram of an electronic device for processing web page requests, according to an example embodiment. For example, the electronic device 700 may be provided as a server. Referring to fig. 7, electronic device 700 includes a processing component 722 that further includes one or more processors and memory resources represented by memory 732 for storing instructions, such as application programs, executable by processing component 722. The application programs stored in memory 732 may include one or more modules that each correspond to a set of instructions. Further, the processing component 722 is configured to execute instructions to perform the processing method of web page requests described above.
The electronic device 700 may also include a power supply component 726 configured to perform power management of the electronic device 700, a wired or wireless network interface 750 configured to connect the electronic device 700 to a network, and an input output (I/O) interface 758. The electronic device 700 may operate based on an operating system stored in memory 732, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A method for processing a web page request, which is applied to a terminal, the method comprising:
a plurality of webpage request information is correspondingly acquired from a plurality of webpage functional units in the webpage initialized on the terminal, and the acquired webpage request information is stored in a preset queue;
extracting at least one group of webpage request information sets from the queue, wherein each group of webpage request information sets comprises a plurality of webpage request information;
correspondingly packaging a plurality of application program interfaces associated with each group of webpage request information sets into an application program interface set;
and transmitting the application program interface set to a server, receiving a plurality of pieces of webpage data returned by the server according to the application program interface set, and transmitting the plurality of pieces of webpage data to a plurality of corresponding webpage functional units.
2. The method of claim 1, wherein extracting at least one set of web page request information from the queue comprises:
and respectively extracting at least one group of webpage request information sets with a preset period as a time interval from the storage of the first webpage request information to the queue, wherein each group of webpage request information sets comprises a plurality of webpage request information stored in the queue in each period.
3. The method of claim 1, wherein the packaging the plurality of application program interfaces associated with each set of web page request information into one set of application program interfaces, respectively, comprises:
matching to obtain a plurality of application program interfaces associated with the webpage request information in each group of webpage request information sets according to the request type of the webpage request information in each group of webpage request information sets;
and correspondingly packaging a plurality of application program interfaces into one application program interface set of each group of webpage request information sets.
4. The method of claim 1, wherein the plurality of web page request messages comprise uniform resource locators, request methods, query parameters, variable parameters.
5. A method for processing a web page request, the method being applied to a server, the method comprising:
receiving an application program interface set from a terminal, wherein the application program interface set is obtained by packaging a plurality of application program interfaces associated with a plurality of webpage request information of a plurality of webpage functional units by the terminal;
analyzing the application program interface set to obtain a plurality of application program interfaces and a plurality of webpage request information;
and returning a plurality of pieces of webpage data to the terminal in batches according to the application program interfaces and the webpage request information so that the terminal can transmit the webpage data to the corresponding webpage functional units.
6. A processing apparatus for web page requests, applied to a terminal, the apparatus comprising:
the storage module is configured to correspondingly acquire a plurality of webpage request information from a plurality of webpage functional units in the webpage initialized on the terminal, and store the acquired plurality of webpage request information into a preset queue;
an extraction module configured to extract at least one set of web page request information sets from the queue, each set of web page request information sets containing a plurality of web page request information;
the packaging module is configured to correspondingly package a plurality of application program interfaces associated with each group of webpage request information sets into one application program interface set;
the transmission module is configured to transmit the application program interface set to a server, receive a plurality of pieces of webpage data returned by the server according to the application program interface set, and transmit the plurality of pieces of webpage data to a plurality of corresponding webpage functional units.
7. The apparatus of claim 6, wherein the extracting module is configured to extract at least one set of the web page request information at predetermined periodic intervals from storing a first of the web page request information in the queue, each set of the web page request information including a plurality of the web page request information stored in the queue in each of the periods.
8. The apparatus of claim 6, wherein the encapsulation module comprises:
the interface matching module is configured to obtain a plurality of application program interfaces associated with the webpage request information in each group of webpage request information sets in a matching mode according to the request type of the webpage request information in each group of webpage request information sets;
an interface packaging module configured to package a plurality of the application program interfaces into one of the application program interface sets of each group of the web page request information sets, respectively.
9. The apparatus of claim 6, wherein a plurality of the web page request information comprises a uniform resource locator, a request method, a query parameter, a variable parameter.
10. A web page request processing apparatus, applied to a server, the apparatus comprising:
the receiving module is configured to receive an application program interface set from a terminal, wherein the application program interface set is obtained by packaging a plurality of application program interfaces associated with a plurality of webpage request information of a plurality of webpage functional units by the terminal;
the analysis module is configured to analyze and obtain a plurality of application program interfaces and a plurality of webpage request information from the application program interface set;
and the return module is configured to return a plurality of pieces of webpage data to the terminal in batches according to the application program interfaces and the webpage request information so that the terminal can transmit the webpage data to the corresponding webpage functional units.
11. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 5.
12. A storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 5.
CN202010815102.4A 2020-08-13 2020-08-13 Webpage request processing method and device, electronic equipment and storage medium Active CN112069437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010815102.4A CN112069437B (en) 2020-08-13 2020-08-13 Webpage request processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010815102.4A CN112069437B (en) 2020-08-13 2020-08-13 Webpage request processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112069437A CN112069437A (en) 2020-12-11
CN112069437B true CN112069437B (en) 2024-02-06

Family

ID=73662715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010815102.4A Active CN112069437B (en) 2020-08-13 2020-08-13 Webpage request processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112069437B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115065677A (en) * 2022-07-22 2022-09-16 北京达佳互联信息技术有限公司 Media resource acquisition method, device, electronic equipment, storage medium and product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786516A (en) * 2016-03-01 2016-07-20 腾讯科技(北京)有限公司 Resource claiming method, device and system
CN110007950A (en) * 2019-04-10 2019-07-12 优信拍(北京)信息科技有限公司 A kind of management method of application programming interfaces, device and server
CN110162979A (en) * 2019-05-27 2019-08-23 北京百度网讯科技有限公司 A kind of safety detecting method, device, electronic equipment and the storage medium of Web API
CN110765386A (en) * 2019-10-28 2020-02-07 北京字节跳动网络技术有限公司 Webpage image monitoring method and device, electronic equipment and readable storage medium
CN111414562A (en) * 2020-02-26 2020-07-14 平安普惠企业管理有限公司 Application program page API interface preposition method and device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786516A (en) * 2016-03-01 2016-07-20 腾讯科技(北京)有限公司 Resource claiming method, device and system
CN110007950A (en) * 2019-04-10 2019-07-12 优信拍(北京)信息科技有限公司 A kind of management method of application programming interfaces, device and server
CN110162979A (en) * 2019-05-27 2019-08-23 北京百度网讯科技有限公司 A kind of safety detecting method, device, electronic equipment and the storage medium of Web API
CN110765386A (en) * 2019-10-28 2020-02-07 北京字节跳动网络技术有限公司 Webpage image monitoring method and device, electronic equipment and readable storage medium
CN111414562A (en) * 2020-02-26 2020-07-14 平安普惠企业管理有限公司 Application program page API interface preposition method and device and storage medium

Also Published As

Publication number Publication date
CN112069437A (en) 2020-12-11

Similar Documents

Publication Publication Date Title
CN109152094B (en) Wireless network connection method for terminal
CN112003893B (en) Resource downloading method and device
CN108063804B (en) Communication method and device
CN107220059B (en) Application interface display method and device
CN110928543A (en) Page processing method and device and storage medium
CN111222014B (en) Request processing method, request processing device, electronic equipment and storage medium
CN115185717B (en) Interface calling method and device, electronic equipment and storage medium
CN112069437B (en) Webpage request processing method and device, electronic equipment and storage medium
CN113938451B (en) Service reminding method, device, system, electronic equipment and storage medium
CN111695064B (en) Buried point loading method and device
CN109451799B (en) Time domain information indication method of public control resource set of residual key system information
CN109218375B (en) Application interaction method and device
CN111079040B (en) Resource sniffing method, device, terminal, server and storage medium
CN110543265A (en) Page title bar generation method and device, electronic equipment and storage medium
CN110908814A (en) Message processing method and device, electronic equipment and storage medium
CN108012258B (en) Data traffic management method and device for virtual SIM card, terminal and server
CN112035246B (en) Method, device and system for acquiring virtual resources, electronic equipment and storage medium
CN111597106A (en) Point burying management method and device
CN112256659A (en) Log reporting method, receiving method, device, electronic equipment and storage medium
CN111343268B (en) Method and device for downloading multimedia resources, server and electronic equipment
CN111143184B (en) Data processing method, device and system
CN109086143B (en) Application interaction method and device
CN112449409B (en) Power control method of mobile terminal and power control device of mobile terminal
CN112394915A (en) Protocol calling method, device, system, equipment and medium for hybrid development mode
CN109947640B (en) Regression test-based core function coverage statistical method and device

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
GR01 Patent grant
GR01 Patent grant