CN112069437A - 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
CN112069437A
CN112069437A CN202010815102.4A CN202010815102A CN112069437A CN 112069437 A CN112069437 A CN 112069437A CN 202010815102 A CN202010815102 A CN 202010815102A CN 112069437 A CN112069437 A CN 112069437A
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.)
Granted
Application number
CN202010815102.4A
Other languages
Chinese (zh)
Other versions
CN112069437B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a method and a device for processing a webpage request, an electronic device and a storage medium, 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 to 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 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 function units. The method and the device avoid that each webpage function unit directly sends at least one HTTP request to the server, reduce the influence on webpage loading performance and save network resources of the terminal. Moreover, the API set is sent to the server, so that the server is prevented from packaging a uniform API, and the occupation amount of server resources is reduced.

Description

Webpage request processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and an apparatus for processing a web page request, an electronic device, and a storage medium.
Background
With the continuous development of internet services, the functions of the web page functional units are gradually improved, the web page functional units are decoupled, the web page functional units focus on internal service logic, and web page data required by the web page functional units are mainly obtained from a server through a hypertext 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 package a uniform Application Programming Interface (API) for different web page functional units, and occupies server resources or even wastes server resources.
Disclosure of Invention
The disclosure provides a method and a device for processing a webpage request, electronic equipment and a storage medium, which are used for at least solving the problems that the loading performance of a webpage is affected, network resources of a webpage end are consumed, and server resources are occupied and even wasted in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a method for processing a web page request is provided, which is applied to a terminal, and the method includes: correspondingly acquiring a plurality of webpage request information from a plurality of webpage functional units in the initialized webpage on the terminal, and storing the acquired webpage request information to 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 function units.
Optionally, the extracting at least one group of web page request information sets from the queue includes: at least one group of webpage request information sets are respectively extracted from the beginning of storing the first webpage request information to the queue by taking a preset period as a time interval, wherein each group of webpage request information sets comprises a plurality of webpage request information stored to the queue in each period.
Optionally, the correspondingly encapsulating, as an application program interface set, a plurality of application program interfaces associated with each group of the web page request information sets, includes: according to the request type of each webpage request information in each group of webpage request information sets, a plurality of application program interfaces related to each webpage request information in each group of webpage request information sets are obtained through matching; 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 messages include uniform resource locators, request methods, query parameters, and variable parameters.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for processing a web page request, which is 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 the terminal according to a plurality of webpage request information of a plurality of webpage functional units; 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 plurality of application program interfaces and the plurality of webpage request information, so that the terminal can transmit the plurality of pieces of webpage data to the corresponding plurality of webpage function units.
According to a third aspect of the embodiments of the present disclosure, there is provided a device for processing a web page request, which is applied to a terminal, the device including: the storage module is configured to correspondingly acquire a plurality of pieces of webpage request information from a plurality of webpage function units in the initialized webpage on the terminal and store the acquired webpage request information into a preset queue; the extraction module is configured to extract at least one group of webpage request information sets from the queue, and each group of webpage request information sets comprises a plurality of webpage request information; the packaging module is configured to correspondingly package a plurality of application program interfaces associated with each group of the webpage request information sets into an 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 function units.
Optionally, the extracting module is configured to extract at least one group of the web page request information sets respectively at a time interval of a preset period from the time when the first web page request information is stored in the queue, where each group of the web page request information sets includes a plurality of pieces of the web page request information stored in the queue in each period.
Optionally, the encapsulation module includes: an interface matching module configured to match a plurality of application program interfaces associated with each of the web page request information in each of the web page request information sets according to a request type of each of the web page request information in each of the web page request information sets; and the interface packaging module is configured to correspondingly package the plurality of application program interfaces into one application program interface set of each group of the webpage request information sets.
Optionally, the plurality of web page request messages include uniform resource locators, request methods, query parameters, and variable parameters.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus for processing a web page request, which is applied to a server, the apparatus including: the terminal comprises a receiving module, a sending module and a receiving module, wherein the receiving module is configured to receive an application program interface set from the terminal, and the application program interface set is obtained by packaging a plurality of application program interfaces related to a plurality of webpage request information of a plurality of webpage function units by the terminal; the analysis module is configured to analyze the application program interfaces and the 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 plurality of application program interfaces and the plurality of pieces of webpage request information, so that the terminal can transmit the plurality of pieces of webpage data to the corresponding plurality of webpage functional units.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of the first or second aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the method according to 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.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the embodiment of the disclosure, a queue is created in advance on a terminal, and a plurality of pieces of web page request information acquired from a plurality of web page function units are stored in the queue. At least one group of webpage request information sets is extracted from the queue, and each group of webpage request information sets can contain a plurality of webpage request information. And packaging a plurality of APIs (application programming interfaces) associated with each group of webpage request information sets into an API set aiming at each extracted networking webpage request information set, and transmitting the API sets to a server, wherein the server can return a plurality of pieces of webpage data according to the API sets. And correspondingly transmitting the returned plurality of pieces of webpage data to the plurality of webpage function units at the terminal.
On one hand, in the embodiment of the disclosure, compared with the existing processing scheme of the web page request, each web page function unit sends at least one HTTP request to the server after initialization, it is avoided that each web page function unit directly sends at least one HTTP request to the server, the influence on the web page loading performance is reduced, and the network resources of the terminal are saved. 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, packages a corresponding API set for each webpage request set, and sends the API sets to the server. In addition, the server in the existing processing scheme of the webpage request can package a uniform API for the webpage function unit which does not send the HTTP request, and the embodiment of the disclosure purposefully packages the API set aiming at the webpage request information set, so that the server is prevented from packaging useless APIs, and the server resource is 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 present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a method for processing a web page request in accordance with an exemplary embodiment.
FIG. 2 is a flowchart illustrating the packaging steps of a collection of application program interfaces in accordance with an exemplary embodiment.
FIG. 3 is a flow diagram illustrating another method of processing a web page request in accordance with an exemplary embodiment.
FIG. 4 is a block diagram illustrating a web page request processing device in accordance with an exemplary embodiment.
FIG. 5 is a block diagram illustrating another apparatus for processing a web page request in accordance with an illustrative embodiment.
FIG. 6 is a block diagram illustrating an electronic device for processing web page requests in accordance with an exemplary embodiment.
FIG. 7 is a block diagram illustrating an electronic device for processing a web page request in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in 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 above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended 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 method for processing the webpage request can comprise the following steps.
In step S11, a plurality of pieces of web page request information are correspondingly acquired from a plurality of web page function units in the web page initialized on the terminal, and the acquired web page request information are stored in a preset queue.
In the embodiment of the disclosure, after the web page on the terminal is initialized, the multiple web page functional 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 at least needs to send out a web page request message to obtain the required web page data. For example, if each of the 6 web page functional units sends out 2 web page request messages, there are 12 web page request messages to be sent to the server. Embodiments of the present disclosure pre-create a queue on the terminal, which may be used to store web page request information. After one piece of web page request information is acquired, the acquired web page request information can be immediately stored in a queue. Therefore, the arrangement order of the web page request information stored in the queue can be determined according to the time sequence of acquiring the web page request information.
At step S12, at least one set of web page request information is extracted from the queue.
In the embodiment of the disclosure, after a period of time, a plurality of pieces of web page request information are stored in the queue, and the plurality of pieces of web page request information may be extracted from the queue. Specifically, a plurality of pieces of web page request information may be extracted in the form of each set of web page request information. That is, each set of web page request information may contain a plurality of web page request information.
In step S13, the multiple application program interfaces associated with each set of web page request information sets are correspondingly packaged as one application program interface set.
In the embodiment of the present disclosure, each piece of web page request information may be associated with one application program interface, that is, one application program interface is called to obtain web page data requested to be obtained by the web page request information. Because each set of web page request information includes a plurality of web page request information, each set of web page request information may be associated with a plurality of application program interfaces.
The embodiment of the disclosure packages a plurality of application program interfaces associated with each group of webpage request information sets into one application program interface set. For example, if 3 sets of web page request information are extracted, the encapsulation results in 3 sets of application program interfaces. In fact, the 3-group web page request information set contains 10 web page request information, and 10 web page request information are associated with 10 application program interfaces.
In step S14, the set of application program interfaces is transmitted to the server, and the server receives the pieces of web page data returned by the set of application program interfaces and transmits the pieces of web page data to the corresponding plurality of web page functional units.
In embodiments of the present disclosure, rather than transmitting individual application program interfaces to the server, the packaged set of application program interfaces is transmitted to the server. The server can analyze the received application program interface set to obtain each independent application program interface, further 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 plurality of pieces of webpage data to the corresponding plurality of webpage function units on the terminal.
In the embodiment of the disclosure, a queue is created in advance on a terminal, and a plurality of pieces of web page request information acquired from a plurality of web page function units are stored in the queue. At least one group of webpage request information sets is extracted from the queue, and each group of webpage request information sets can contain a plurality of webpage request information. And packaging a plurality of APIs (application programming interfaces) associated with each group of webpage request information sets into an API set aiming at each extracted networking webpage request information set, and transmitting the API sets to a server, wherein the server can return a plurality of pieces of webpage data according to the API sets. And correspondingly transmitting the returned plurality of pieces of webpage data to the plurality of webpage function units at the terminal.
On one hand, in the embodiment of the disclosure, compared with the existing processing scheme of the web page request, each web page function unit sends at least one HTTP request to the server after initialization, it is avoided that each web page function unit directly sends at least one HTTP request to the server, the influence on the web page loading performance is reduced, and the network resources of the terminal are saved. 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, packages a corresponding API set for each webpage request set, and sends the API sets to the server. In addition, the server in the existing processing scheme of the webpage request can package a uniform API for the webpage function unit which does not send the HTTP request, and the embodiment of the disclosure purposefully packages the API set aiming at the webpage request information set, so that the server is prevented from packaging useless APIs, and the server resource is saved.
In an exemplary embodiment of the present disclosure, the web page request information may include, but is not limited to: uniform Resource Locator (URL), request method (method), query parameter (qury), variable parameter (params), and so on.
In an exemplary embodiment of the present disclosure, in the step S12, when at least one group of web page request information sets is extracted from the queue, one or more groups of web page request information sets may be extracted at intervals of a preset period, starting from storing the first web page request information to the queue. 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 storage of the first webpage request information h01 in the queue, the webpage request information h02 and h03 are also stored in the queue within a 50 millisecond time period, and the extracted first group of webpage request information set comprises the webpage request information h01, h02 and h 03. For another example, the web page request information h04, h05 and h06 are sequentially stored in the queue between the second 50 milliseconds after the first 50 milliseconds, and the extracted second group of web page request information sets includes the web page request information h04, h05 and h 06.
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 the web page request information in each set of web page request information sets are obtained by matching according to the request types of the web page request information in each set of web page request information sets.
Since each web page request message has a respective request type, moreover, different request types may have a correspondence with the application program interface. Therefore, when a plurality of application program interfaces associated with each group of web page request information sets are correspondingly packaged into one application program interface set, the application program interfaces associated with each web page request information in each group of web page request information sets 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 obtained by matching are api01, api02, and api03 in sequence.
In step S22, a plurality of application program interfaces are correspondingly packaged as one application program interface set for each set of web page request information.
Embodiments of the present disclosure may employ a collection interface to encapsulate multiple application interfaces into a collection of application interfaces. For example, the application program interfaces api01, api02, and api03 associated with the first set of web page request information sets are encapsulated as application layer program interface set a 01. The application program interfaces api04, api05, and api06 associated with the second set of web page request information sets are encapsulated as application layer program interface set a 02.
In an exemplary embodiment of the present disclosure, in the step S14, in the case that the web page request information issued by the web page function unit is an HTTP request, the set of application program interfaces may be transmitted to the server in a post manner. After receiving a plurality of pieces of webpage data returned by the server, it can be determined to which webpage function unit each piece of webpage data is correspondingly transmitted. Therefore, the correspondence between the web page function unit and the web page request information needs to be recorded in advance, and accordingly, the correspondence between the web page function unit and the application program interface needs to be recorded. Moreover, when the server returns a plurality of pieces of webpage data, the server can also return the corresponding relation between the plurality of pieces of webpage 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 relationship between the plurality of web page data and the plurality of application program interfaces and the corresponding relationship 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 the web page request may be applied to a server as shown in fig. 3. The method for processing the webpage request can comprise the following steps.
In step S31, a set of application program interfaces from a terminal is received.
In an embodiment of the present disclosure, the application program interface set may be obtained by encapsulating, by the terminal, a plurality of application program interfaces associated with a plurality of pieces of web page request information sent by a plurality of web page functional units in a web page running on the terminal. For the description of the application program interface set, reference may be made to the related descriptions in the above embodiments, and details are not repeated here.
In an exemplary embodiment of the present disclosure, a method (collection function) for encapsulating an application program interface set is provided on a terminal, and each web page functional 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 to the queue, start timing when the first HTTP request is received, appoint 50 milliseconds to be a period, encapsulate APIs associated with the HTTP requests pushed to the queue in the period into a uniform API (CollectiPI), and transmit the CollectiPI to the server in a post mode. After the web page on the terminal is initialized, the web page function unit can synchronously call the method, and the APIs associated with all the HTTP requests can be completely packaged in one period or a plurality of periods.
In step S32, a plurality of application program interfaces and a plurality of pieces of web page request information are parsed from the set of application program interfaces.
Js operating environment may be deployed on the server, and the server receives and parses the application program interface set to obtain a plurality of application program interfaces and a plurality of web page request information (such as URL, method, qury, params, and the like).
In step S33, the plurality of pieces of web page data are returned to the terminal in batch according to the plurality of application program interfaces and the plurality of pieces 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 functional units.
In the embodiment of the disclosure, the server may perform request processing on each piece of web page request information through the request module, and batch return a plurality of pieces of web page data to the terminal. After receiving the returned multiple pieces of webpage data, the terminal may transmit each piece of webpage data to the corresponding webpage function unit based on the Collect function.
Based on the above-described description about the embodiments 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 obtains a plurality of webpage request information from the plurality of webpage functional units correspondingly. Each web page functional unit may correspond to at least one web page request information. The terminal stores the acquired webpage request information into the queue, extracts one or more groups of webpage request information sets from the queue, packages APIs (application program interfaces) associated with each group of webpage request information sets into API sets and transmits the API sets 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 returns a plurality of pieces of webpage data to the terminal in batches according to the API interfaces and the webpage request information. And the terminal transmits the received multiple pieces of webpage data to the corresponding webpage function units.
FIG. 4 is a block diagram illustrating a web page request processing device in accordance with an exemplary embodiment. The device can be applied to a terminal, and specifically can comprise the following modules.
The storage module 41 is configured to correspondingly acquire a plurality of pieces of web page request information from a plurality of web page functional units in a web page initialized on the terminal, and store the acquired web page request information into a preset queue;
an extracting module 42 configured to extract at least one group of web page request information sets from the queue, each group of web page request information sets including a plurality of web page request information;
a packaging module 43 configured to correspondingly package a plurality of application program interfaces associated with each set of the web page request information sets into an application program interface set;
a transmission module 44 configured to transmit the application program interface set to a server, receive a plurality of pieces of web page data returned by the server according to the application program interface set, and transmit the plurality of pieces of web page data to a corresponding plurality of web page functional units.
In an exemplary embodiment of the disclosure, the extracting module 42 is configured to extract at least one group of the web page request information sets respectively at a time interval of a preset period from the time when the first web page request information is stored in the queue, where each group of the web page request information sets includes a plurality of web page request information stored in the queue in each period.
In an exemplary embodiment of the present disclosure, the encapsulation module 43 includes:
an interface matching module configured to match a plurality of application program interfaces associated with each of the web page request information in each of the web page request information sets according to a request type of each of the web page request information in each of the web page request information sets;
and the interface packaging module is configured to correspondingly package the plurality of application program interfaces into one application program interface set of each group of the webpage request information sets.
In an exemplary embodiment of the disclosure, the plurality of web page request messages include uniform resource locators, request methods, query parameters, and variable parameters.
FIG. 5 is a block diagram illustrating another apparatus for processing a web page request in accordance with an illustrative embodiment. The apparatus may be applied to a server, and may specifically include 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 packaging a plurality of application program interfaces associated with a plurality of web page request information of a plurality of web page function units by the terminal;
a parsing module 52 configured to parse the application program interfaces and the web page request information from the application program interface set;
and a returning module 53, configured to return a plurality of pieces of web page data to the terminal in batch 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 functional units.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 6 is a block diagram illustrating an electronic device for processing web page requests in accordance with an exemplary 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, 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 interface to input/output (I/O) 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 a portion 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 can 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 non-volatile 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 disks.
Power supply component 606 provides power to the various components of electronic device 600. The power components 606 may 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 that provides an output interface between the electronic device 600 and a user. 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 an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 600 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
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 signal may further be 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 keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the electronic device 600. For example, the sensor component 614 may detect an open/closed state of the electronic device 600, the relative positioning of components, such as a display and keypad of the electronic device 600, the sensor component 614 may also detect a change in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, orientation or acceleration/deceleration of the electronic device 600, and a change in the temperature of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without 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 gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the electronic device 600 and other devices in a wired or wireless manner. The electronic device 600 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the electronic device 600 to perform the above-described method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which comprises 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 a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
FIG. 7 is a block diagram illustrating an electronic device for processing a web page request in accordance with 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 applications, that are 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 methods of the web page requests described above.
The electronic device 700 may also include a power component 726 that is configured to perform power management of the electronic device 700, a wired or wireless network interface 750 that is 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 variations, 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 will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for processing a web page request is applied to a terminal, and the method comprises the following steps:
correspondingly acquiring a plurality of webpage request information from a plurality of webpage functional units in the initialized webpage on the terminal, and storing the acquired webpage request information to 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 function units.
2. The method of claim 1, wherein extracting at least one set of web page request information from the queue comprises:
at least one group of webpage request information sets are respectively extracted from the beginning of storing the first webpage request information to the queue by taking a preset period as a time interval, wherein each group of webpage request information sets comprises a plurality of webpage request information stored to the queue in each period.
3. The method according to claim 1, wherein said correspondingly encapsulating a plurality of application program interfaces associated with each group of said sets of web page request information into a set of application program interfaces comprises:
according to the request type of each webpage request information in each group of webpage request information sets, a plurality of application program interfaces related to each webpage request information in each group of webpage request information sets are obtained through matching;
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, and variable parameters.
5. A method for processing a web page request is applied to a server, and the method comprises the following steps:
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 the terminal according to a plurality of webpage request information of a plurality of webpage functional units;
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 plurality of application program interfaces and the plurality of webpage request information, so that the terminal can transmit the plurality of pieces of webpage data to the corresponding plurality of webpage function units.
6. An apparatus for processing a web page request, applied to a terminal, the apparatus comprising:
the storage module is configured to correspondingly acquire a plurality of pieces of webpage request information from a plurality of webpage function units in the initialized webpage on the terminal and store the acquired webpage request information into a preset queue;
the extraction module is configured to extract at least one group of webpage request information sets from the queue, and each group of webpage request information sets comprises a plurality of webpage request information;
the packaging module is configured to correspondingly package a plurality of application program interfaces associated with each group of the webpage request information sets into an 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 function units.
7. The apparatus according to claim 6, wherein the extracting module is configured to extract at least one group of the sets of web page request information respectively at intervals of a preset period from the time when a first piece of the web page request information is stored in the queue, and each group of the sets of web page request information includes a plurality of pieces of the web page request information stored in the queue in each period.
8. An apparatus for processing a web page request, applied to a server, the apparatus comprising:
the terminal comprises a receiving module, a sending module and a receiving module, wherein the receiving module is configured to receive an application program interface set from the terminal, and the application program interface set is obtained by packaging a plurality of application program interfaces related to a plurality of webpage request information of a plurality of webpage function units by the terminal;
the analysis module is configured to analyze the application program interfaces and the 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 plurality of application program interfaces and the plurality of pieces of webpage request information, so that the terminal can transmit the plurality of pieces of webpage data to the corresponding plurality of webpage functional units.
9. 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.
10. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-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 true CN112069437A (en) 2020-12-11
CN112069437B 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)

Cited By (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

Cited By (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

Also Published As

Publication number Publication date
CN112069437B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
CN109474538B (en) Data transmission method and device, terminal equipment and storage medium
CN109152094B (en) Wireless network connection method for terminal
CN108063804B (en) Communication method and device
CN107220059B (en) Application interface display method and device
CN111031002B (en) Broadcast discovery method, broadcast discovery device, and storage medium
CN106851695B (en) Method, device and system for testing network speed
CN110619097A (en) Two-dimensional code generation method and device, electronic equipment and storage medium
CN112231727A (en) Data processing method and device, electronic equipment, server and storage medium
CN109451799B (en) Time domain information indication method of public control resource set of residual key system information
CN112069437B (en) Webpage request processing method and device, electronic equipment and storage medium
CN111695064B (en) Buried point loading method and device
CN109218375B (en) Application interaction method and device
CN110933773B (en) Link monitoring method and device
CN112328330A (en) iOS component calling method, device, middleware, electronic equipment and 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
CN107911807B (en) Bluetooth data transmission method and device
CN106354532B (en) Application account information processing method and device
CN112769677B (en) Data synchronization method, apparatus, electronic device, storage medium, and program product
CN109086143B (en) Application interaction method and device
CN112035246A (en) Method, device and system for acquiring virtual resources, electronic equipment and storage medium
CN115706966A (en) Method and device for connecting network and readable storage medium
CN112449409B (en) Power control method of mobile terminal and power control device of mobile terminal
CN111343268B (en) Method and device for downloading multimedia resources, server and electronic equipment
CN111143184B (en) Data processing method, device and system

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