[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115037801A - Priority adjustment method, electronic device, and storage medium - Google Patents

Priority adjustment method, electronic device, and storage medium Download PDF

Info

Publication number
CN115037801A
CN115037801A CN202210247930.1A CN202210247930A CN115037801A CN 115037801 A CN115037801 A CN 115037801A CN 202210247930 A CN202210247930 A CN 202210247930A CN 115037801 A CN115037801 A CN 115037801A
Authority
CN
China
Prior art keywords
network request
processing priority
current
page
priority
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
CN202210247930.1A
Other languages
Chinese (zh)
Other versions
CN115037801B (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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210247930.1A priority Critical patent/CN115037801B/en
Publication of CN115037801A publication Critical patent/CN115037801A/en
Application granted granted Critical
Publication of CN115037801B publication Critical patent/CN115037801B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The embodiment of the disclosure discloses a priority adjustment method, an electronic device and a storage medium, wherein the method comprises the following steps: after detecting a current page entering an application client, acquiring a plurality of network requests to be processed currently; adjusting a processing priority of the network request based on whether a page to which the network request is directed is the current page; processing the plurality of network requests based on the processing priority. The technical scheme can improve the processing efficiency of a plurality of concurrent network requests, and can improve the processing performance of the processing equipment, thereby improving the experience of a user in using the application client.

Description

Priority adjustment method, electronic device, and storage medium
Technical Field
The present disclosure relates to the field of computer network technologies, and in particular, to a priority adjustment method, an electronic device, and a storage medium.
Background
With the development of intelligent terminals and the popularization of network environments, a user can access a network through an application client installed on the terminal, and in the access process, a plurality of network requests for opening applications can be received at the same time, which is also called network request concurrency; however, the terminal has a limited processing capability for simultaneously processing a plurality of network requests, which easily causes the terminal processing performance to be degraded.
In order to solve the problem that the processing performance of the terminal is reduced due to the concurrence of network requests, the priority levels of different network requests are preset in the prior art, and the terminal can access the network based on the priority levels of the network requests after the concurrence of the network requests occurs. The existing priority setting mode is static and cannot be dynamically adjusted. For example, the intra-page core network request in the application client is usually defined as the highest priority, and this easily causes that the priorities of multiple network requests concurrent while the client is running are also the highest priorities, and the problem of high concurrency of network requests still cannot be completely solved.
Therefore, how to effectively solve the technical problem that the concurrent requests of multiple networks cause the processing performance of the terminal to be degraded is one of the main technical problems that needs to be solved by those skilled in the art at present.
Disclosure of Invention
The embodiment of the disclosure provides a priority adjustment method, an electronic device and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a priority adjustment method, where the method includes:
after detecting a current page entering an application client, acquiring a plurality of current network requests to be processed;
adjusting a processing priority of the network request based on whether a page to which the network request is directed is the current page;
processing the plurality of network requests based on the processing priority.
Further, after detecting a current page entering the application client, acquiring a plurality of network requests to be processed currently, including:
after detecting a current page entering an application client, acquiring a current network request triggered by entering the current page and a historical network request which is not processed and completed before entering the current page.
Further, adjusting the processing priority of the network request based on whether the page to which the network request is directed is the current page comprises:
increasing the processing priority of the current network request and decreasing the processing priority of the historical network request.
Further, increasing the processing priority of the current network request and decreasing the processing priority of the historical network request includes:
weighting the processing priority of the current network request to improve the processing priority of the current network request;
and performing priority reduction processing on the historical network requests so as to reduce the processing priority of the historical network requests.
Further, after detecting a request for entering a current page, acquiring a current network request triggered by entering the current page and a historical network request which is not sent completely, the method includes:
setting the initial processing priority of the current network request, so that the initial processing priority of a preset core network request in the current network request is higher than the initial processing priority of a non-preset core network request in the current network request.
Further, the method further comprises:
after a request for opening the application client to enter a home page is detected, acquiring a network request triggered by entering the home page;
setting the initial processing priority of the network request, so that the initial processing priority of a preset core network request in the network request is higher than the initial processing priority of a non-preset core network request.
Further, adjusting the processing priority of the network request based on whether the page to which the network request is directed is the current page comprises:
adjusting a processing priority of the network request for the current page to be higher than processing priorities of other network requests.
Further, adjusting the processing priority of the network request for the current page to be higher than the processing priority of other network requests includes:
and adjusting the priority of a preset core network request in the network requests aiming at the current page to be higher than the processing priority of other network requests.
In a second aspect, an embodiment of the present disclosure provides a priority adjustment apparatus, including:
the first acquisition module is configured to acquire a plurality of network requests to be processed currently after detecting a current page entering an application client;
an adjustment module configured to adjust a processing priority of the network request based on whether a page to which the network request is directed is the current page;
a processing module configured to process the plurality of network requests based on the processing priority.
The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the apparatus includes a memory configured to store one or more computer instructions that enable the apparatus to perform the corresponding method, and a processor configured to execute the computer instructions stored in the memory. The apparatus may also include a communication interface for the apparatus to communicate with other devices or a communication network.
In a third aspect, the disclosed embodiments provide an electronic device, comprising a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the method of any one of the above aspects.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium for storing computer instructions for use by any one of the above apparatuses, the computer instructions, when executed by a processor, being configured to implement the method of any one of the above aspects.
In a fifth aspect, the disclosed embodiments provide a computer program product comprising computer instructions for implementing the method of any one of the above aspects when executed by a processor.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, in order to solve the problem that the processing performance of the device is reduced after a plurality of network requests are concurrent, in the running process of the application client, events such as entering a page or page switching are detected in real time, after the current page is detected to be entered, a plurality of network requests to be processed are obtained, the processing priorities of the plurality of network requests are adjusted based on whether the page to which the plurality of network requests are directed is the current page, and after the adjustment is completed, the plurality of network requests are processed based on the adjusted processing priorities. By the method, the processing efficiency of the multiple concurrent network requests can be improved, the processing performance of the processing equipment can be improved, and the experience of the user using the application client can be improved.
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
Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments when taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 illustrates a flow diagram of a method of priority adjustment according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating an application flow in an electronic map scenario according to an embodiment of the present disclosure;
fig. 3 is a block diagram illustrating a structure of a priority adjustment apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device suitable for implementing a priority adjustment method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the present disclosure, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, actions, components, parts, or combinations thereof, and do not preclude the possibility that one or more other features, numbers, steps, actions, components, parts, or combinations thereof are present or added.
It should be further noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
The details of the embodiments of the present disclosure are described in detail below with reference to specific embodiments.
Fig. 1 shows a flowchart of a priority adjustment method according to an embodiment of the present disclosure. As shown in fig. 1, the priority adjustment method includes the steps of:
in step S101, after detecting that a current page enters an application client, acquiring a plurality of network requests to be processed currently;
in step S102, adjusting the processing priority of the network request based on whether the page to which the network request is directed is the current page;
in step S103, the plurality of network requests are processed based on the processing priority.
In this embodiment, the application client may be any application client installed on the device, the application client may include multiple pages, the application client may directly enter the home page of the application client after being opened, the next-level page, that is, a non-home page, may be entered by clicking a page element on the home page, and the next-level page may be entered by clicking a page element from the next-level page, and so on. It is understood that the non-home page of the application client can also be directly accessed through the website link.
In the embodiment of the disclosure, the priority adjustment method may be executed on a device on which the application client is installed, and the priority adjustment method may detect the opening of the application client and the page switching event in real time during the execution process. And executing a dynamic priority adjustment method of the network request after detecting that the application client enters a certain page. For convenience of description, the incoming page may be referred to as a current page. The current page may be a home page of the application client or a non-home page.
The dynamic priority adjustment process may be triggered by an event of a first page or page switch into the application client. After detecting a current page entering the application client, a plurality of network requests currently needing to be processed can be obtained. It will be appreciated that if there is one network request currently needing to be processed, no priority adjustment may be made.
In some embodiments, the plurality of network requests currently needing to be processed may be newly received network requests after entering the current page, or may be network requests that have been generated but not processed in the previous page.
In some embodiments, the plurality of network requests may be pre-set with an initial processing priority.
In some embodiments, the processing priority of the network request may be adjusted based on whether the page to which the network request is directed is the current page.
In some embodiments, it may be appropriate to increase the priority of network requests for the current page, while decreasing the priority of network requests for other pages. By the method, the network request of the current page can be quickly processed, the current page browsing requirement of the user can be quickly responded, the network requests of other pages can be processed later, the problem that the content of the current page cannot be quickly and completely displayed is not easy to occur, and the use experience of the user on the application client side can be finally improved.
After the processing priority is adjusted, the plurality of network requests may be processed based on the processing priority, that is, the network requests with high priority are processed first, and the network requests with low priority are processed later.
In the embodiment of the disclosure, in order to solve the problem that the processing performance of the device is reduced after multiple network requests are concurrent, in the running process of the application client, events such as entering a page or page switching are detected in real time, after the current page is detected to enter, multiple network requests to be processed are obtained, the processing priorities of the multiple network requests are adjusted based on whether the page to which the multiple network requests are directed is the current page, and after the adjustment is completed, the multiple network requests are processed based on the adjusted processing priorities. By the method, the processing efficiency of the multiple concurrent network requests can be improved, the processing performance of the processing equipment can be improved, and the experience of the user using the application client can be improved.
In an optional implementation manner of this embodiment, step S101, that is, after detecting that the current page enters the application client, the step of obtaining a plurality of network requests to be currently processed further includes the following steps:
after a current page entering an application client is detected, a current network request triggered by entering the current page and a historical network request which is not processed and completed before entering the current page are obtained.
In this optional implementation manner, if the number of the concurrently generated network requests is too large, or the user page switching speed is high, so that some unprocessed and completed historical network requests still exist when entering the next page, after detecting that the current page enters the application client, the current network request triggered by entering the current page and the unprocessed and completed historical network requests before entering the current page may be obtained.
In an optional implementation manner of this embodiment, step S102, namely, the step of adjusting the processing priority of the network request based on whether the page to which the network request is directed is the current page, further includes the following steps:
increasing the processing priority of the current network request, and decreasing the processing priority of the historical network request.
In this embodiment, when the priority is adjusted, the priority of the historical network request may be decreased, and the priority of the current network request may be increased, so that the device may preferentially process the network request of the current page.
In some embodiments, the initial processing priority of the current network request may be preset, and the initial processing priority of the historical network request may be an adjusted priority on the previous page or a preset initial processing priority. After entering the current page, the device may perform an increase on the basis of the initial processing priority of the current network request and an increase on the basis of the initial processing priority of the historical network request, and process the current network request and the historical network request with the adjusted processing priorities.
In some embodiments, after the adjustment, the processing priority of the current network request may be higher than the processing priority of the historical network request, or may be lower than the processing priority of the historical network request.
In an optional implementation manner of this embodiment, the step of increasing the processing priority of the current network request and decreasing the processing priority of the historical network request further includes the following steps:
weighting the processing priority of the current network request to improve the processing priority of the current network request;
and performing priority reduction processing on the historical network requests so as to reduce the processing priority of the historical network requests.
In this alternative implementation, after entering the current page, an initial processing priority of the current network request may be set, where the initial processing priority may be a default value or a processing priority set in another manner. And the initial processing priority of the historical network requests may be the processing priority adjusted on the last page. Therefore, after entering the current page, the weighting processing can be carried out on the basis of the initial processing priority of the current network request, so that the priority of the current network request is improved, and the weight reduction processing is carried out on the basis of the initial processing priority of the historical network request, so that the priority of the historical network request is reduced.
In some embodiments, different weights may be given to the preset core network request and the non-preset core network request, for example, when the current network request belongs to the preset core network request, a higher weight may be given so that the processing priority of the current network request is greatly improved, and when the current network request does not belong to the preset core network request, a lower weight may be given so that the processing priority of the current network request is improved by a smaller extent; similarly, when the historical network request belongs to the preset core network request, a lower weight can be given, so that the processing priority of the historical network request is reduced to a smaller extent, and when the historical network request does not belong to the preset core network request, a higher weight can be given, so that the processing priority of the historical network request is reduced to a larger extent.
It should be noted that, after the weighting and weighting-down processing, there may be a case that the processing priority of the historical network request is still higher than that of the current network request, for example, the processing priority of the preset core network request in the historical network request may be higher than that of the non-preset core network request in the current network request.
In an optional implementation manner of this embodiment, after the step of acquiring the current network request triggered by entering the current page and the historical network requests that are not sent completely after the step of detecting the request to enter the current page, the method further includes the following steps:
setting the initial processing priority of the current network request, so that the initial processing priority of a preset core network request in the current network request is higher than the initial processing priority of a non-preset core network request in the current network request.
In this alternative implementation, after entering the current page, an initial processing priority may also be set for the current network request of the current page, where the initial processing priority may be a default value or a value set in another manner. When the current network request is the default core network request, the initial processing priority may be higher than that of the non-default core network request for the current page.
It should be noted that the default priorities of the preset core network requests for different pages may be the same or different. For example, the default priority of the pre-set core network request for the first page may be higher than the pre-set core network request for the other pages.
In an optional implementation manner of this embodiment, the method further includes the following steps:
after a request for opening the application client to enter a home page is detected, acquiring a network request triggered by entering the home page;
setting the initial processing priority of the network request, so that the initial processing priority of a preset core network request in the network request is higher than the initial processing priority of a non-preset core network request.
In this optional implementation manner, the initial processing priority of the network request may be preset, and after the page switching occurs, the processing priority of the network request may be dynamically adjusted.
In some embodiments, after detecting that the home page of the application client is entered, a network request triggered by entering the home page may be acquired, and an initial processing priority of the network request may be set, where the initial processing priority may be a default value or a processing priority set in another manner. When the initial processing priority is set, the initial processing priority of the preset core network request corresponding to the home page may be set to be higher than the initial processing priority of the non-preset core network request, so that the preset core network request is processed before the non-preset core network request.
In an optional implementation manner of this embodiment, step S102, namely, the step of adjusting the processing priority of the network request based on whether the page to which the network request is directed is the current page, further includes the following steps:
adjusting a processing priority of the network request for the current page to be higher than processing priorities of other network requests.
In this alternative implementation, the processing priority of the network request for the current page may also be directly adjusted to be higher than the processing priority of other network requests. The other network requests may be network requests for other pages, rather than network requests for the current page.
In some embodiments, when the processing priority of the network request of the current page is increased, the priority may be adjusted based on whether the network request is a preset core network request, that is, the processing priority of the preset core network request of the current page may be adjusted to be higher than the processing priority of the non-preset core network request of the current page.
In an optional implementation manner of this embodiment, the step of adjusting the processing priority of the network request for the current page to be higher than the processing priorities of other network requests further includes the following steps:
and adjusting the priority of a preset core network request in the network requests aiming at the current page to be higher than the processing priority of other network requests.
In this alternative implementation, it is also important to consider that the preset core network requests of other pages are also important, so when the processing priority is adjusted, the processing priority of the preset core network request of the current page may be only adjusted to be higher than that of the other network requests, and the processing priority of the non-preset core network request of the current page is not necessarily adjusted to be higher than that of the other network requests, that is, the processing priority of the non-preset core network request of the current page may be increased, but is not necessarily increased higher than that of the other network requests. Other network requests herein include network requests for non-current pages.
Fig. 2 shows a schematic application flow diagram in an electronic map scenario according to an embodiment of the present disclosure. As shown in fig. 2, a user double-clicks a map application installed on a mobile phone into a home page, and the map application triggers several tens of network requests, such as a location request, a map data request, a return route request, a go to company route request, and the like, in response to an event that the home page is opened. These network requests may be given initial processing priority, higher priority for core network requests and lower priority for non-core network requests as a default setting after entering the home page. The mapping application schedules processing of these network requests based on the assigned priorities.
If a quick switch to a nearby page is used before the network requests are not processed, the incoming event to the nearby page triggers new network requests, such as a grand user guide request, an operational activity request, a POI list request, etc. At this time, the application end can dynamically adjust the priority for the new network requests and the network requests which are not processed and completed before, and can increase the priority of the new network requests and reduce the priority of the original network requests which are not processed and completed. After the adjustment is completed, all network requests are processed based on the adjusted priorities.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 3 illustrates a priority adjustment apparatus according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both. The priority adjustment device includes:
a first obtaining module 301, configured to obtain, after detecting a current page entering an application client, a plurality of network requests to be currently processed;
an adjustment module 302 configured to adjust a processing priority of the network request based on whether a page to which the network request is directed is the current page;
a processing module 303 configured to process the plurality of network requests based on the processing priority.
In this embodiment, the application client may be any one application client installed on the device, the application client may include a plurality of pages, the home page of the application client may be directly entered after the application client is opened, the next-level page, that is, the non-home page, may be entered by clicking a page element on the home page, and the next-level page may be entered by clicking a page element from the next-level page, and so on. It is understood that the non-home page of the application client can also be directly accessed through the website link.
In the embodiment of the disclosure, the priority adjustment method may be executed on a device on which the application client is installed, and the priority adjustment method may detect the opening of the application client and the page switching event in real time during the execution process. And executing a dynamic priority adjustment method of the network request after detecting that the application client enters a certain page. For convenience of description, the incoming page may be referred to as a current page. The current page may be a home page of the application client or a non-home page.
The dynamic priority adjustment process may be triggered by an event of a first page or page switch into the application client. After detecting the current page entering the application client, a plurality of network requests which need to be processed currently can be obtained. It will be appreciated that if there is one network request currently needing to be processed, no priority adjustment may be made.
In some embodiments, the plurality of network requests currently needing to be processed may be newly received network requests after entering the current page, or may be network requests that have been generated but not processed in the previous page.
In some embodiments, the plurality of network requests may be pre-set with an initial processing priority.
In some embodiments, the processing priority of the network request may be adjusted based on whether the page to which the network request is directed is the current page.
In some embodiments, it may be appropriate to increase the priority of network requests for the current page, while decreasing the priority of network requests for other pages. By the method, the network request of the current page can be quickly processed, the current page browsing requirement of the user can be quickly responded, the network requests of other pages can be processed later, the problem that the content of the current page cannot be quickly and completely displayed is not easy to occur, and the use experience of the user on the application client side can be finally improved.
After the processing priority is adjusted, the plurality of network requests can be processed based on the processing priority, that is, the network requests with high priority are processed first, and the network requests with low priority are processed later.
In the embodiment of the disclosure, in order to solve the problem that the processing performance of the device is reduced after a plurality of network requests are concurrent, in the running process of the application client, events such as entering a page or page switching are detected in real time, after the current page is detected to be entered, a plurality of network requests to be processed are obtained, the processing priorities of the plurality of network requests are adjusted based on whether the page to which the plurality of network requests are directed is the current page, and after the adjustment is completed, the plurality of network requests are processed based on the adjusted processing priorities. By the method, the processing efficiency of the multiple concurrent network requests can be improved, the processing performance of the processing equipment can be improved, and the experience of the user using the application client can be improved.
In an optional implementation manner of this embodiment, the first obtaining module includes:
the first obtaining sub-module is configured to obtain a current network request triggered by entering a current page and a historical network request which is not processed and completed before entering the current page after detecting that the current page enters an application client.
In this optional implementation, if the number of concurrently generated network requests is too large, or the user page switching speed is high, so that there are some historical network requests that are not processed and completed when entering the next page, after detecting that the current page enters the application client, the current network request triggered by entering the current page and the historical network requests that are not processed and completed before entering the current page may be obtained.
In an optional implementation manner of this embodiment, the adjusting module includes:
an increase submodule configured to increase a processing priority of the current network request and decrease a processing priority of the historical network request.
In this embodiment, when the priority is adjusted, the priority of the historical network request may be decreased, and the priority of the current network request may be increased, so that the device may preferentially process the network request of the current page.
In some embodiments, the initial processing priority of the current network request may be preset, and the initial processing priority of the historical network request may be an adjusted priority on the previous page or a preset initial processing priority. After entering the current page, the device may perform an increase on the basis of the initial processing priority of the current network request and an increase on the basis of the initial processing priority of the historical network request, and process the current network request and the historical network request with the adjusted processing priorities.
In some embodiments, after the adjustment, the processing priority of the current network request may be higher than the processing priority of the historical network request, or may be lower than the processing priority of the historical network request.
In an optional implementation manner of this embodiment, the increasing submodule includes:
the weighting submodule is configured to weight the processing priority of the current network request so as to improve the processing priority of the current network request;
a de-weighting module configured to de-weight the processing priority of the historical network requests to reduce the processing priority of the historical network requests.
In this alternative implementation, after entering the current page, an initial processing priority of the current network request may be set, where the initial processing priority may be a default value or a processing priority set in another manner. And the initial processing priority of the historical network requests may be the processing priority adjusted on the last page. Therefore, after entering the current page, the weighting processing can be carried out on the basis of the initial processing priority of the current network request, so that the priority of the current network request is improved, and the weight reduction processing is carried out on the basis of the initial processing priority of the historical network request, so that the priority of the historical network request is reduced.
In some embodiments, different weights may be given to the preset core network request and the non-preset core network request, for example, when the current network request belongs to the preset core network request, a higher weight may be given to increase the processing priority of the current network request by a relatively large margin, and when the current network request does not belong to the preset core network request, a lower weight may be given to increase the processing priority of the current network request by a relatively small margin; similarly, when the historical network request belongs to the preset core network request, a lower weight may be given to reduce the processing priority of the historical network request to a smaller extent, and when the historical network request does not belong to the preset core network request, a higher weight may be given to reduce the processing priority of the historical network request to a larger extent.
It should be noted that, after the weighting and weighting-down processes, there may be a case that the processing priority of the historical network request is still higher than that of the current network request, for example, the processing priority of the preset core network request in the historical network request may be higher than that of the non-preset core network request in the current network request.
In an optional implementation manner of this embodiment, after the first obtaining module, the apparatus further includes:
a first setting module configured to set an initial processing priority of the current network request such that an initial processing priority of a preset core network request in the current network request is higher than an initial processing priority of a non-preset core network request in the current network request.
In this optional implementation, after entering the current page, an initial processing priority may also be set for the current network request of the current page, where the initial processing priority may be a default value or a value set in another manner. When the current network request is the default core network request, the initial processing priority may be higher than that of the non-default core network request for the current page.
It should be noted that the default priorities of the preset core network requests for different pages may be the same or different. For example, the default priority of the pre-set core network requests for the first page may be higher than the pre-set core network requests for the other pages.
The device further comprises:
the second acquisition module is configured to acquire a network request triggered by entering a home page after detecting a request for opening the application client to enter the home page;
a second setting module configured to set an initial processing priority of the network request such that an initial processing priority of a preset core network request in the network request is higher than an initial processing priority of a non-preset core network request.
In this optional implementation, the initial processing priority of the network request may be preset, and after the page switching occurs, the processing priority of the network request may be dynamically adjusted.
In some embodiments, after detecting that a home page enters an application client, a network request triggered by entering the home page may be obtained, and an initial processing priority of the network request may be set, where the initial processing priority may be a default value or a processing priority set in another manner. When the initial processing priority is set, the initial processing priority of the preset core network request corresponding to the home page may be set to be higher than the initial processing priority of the non-preset core network request, so that the preset core network request is processed before the non-preset core network request.
In an optional implementation manner of this embodiment, the adjusting module includes:
a first adjusting sub-module configured to adjust a processing priority of the network request for the current page to be higher than processing priorities of other network requests.
In this alternative implementation, the processing priority of the network request for the current page may also be directly adjusted to be higher than the processing priority of other network requests. The other network requests may be network requests for other pages, rather than network requests for the current page.
In some embodiments, when the processing priority of the network request of the current page is increased, the priority may be adjusted based on whether the network request is a preset core network request, that is, the processing priority of the preset core network request of the current page may be adjusted to be higher than the processing priority of the non-preset core network request of the current page.
In an optional implementation manner of this embodiment, the first adjusting sub-module includes:
a second adjusting sub-module configured to adjust a priority of a preset core network request among the network requests for the current page to be higher than a processing priority of other network requests.
In this alternative implementation, it is also important to consider that the preset core network requests of other pages are also important, so when the processing priority is adjusted, the processing priority of the preset core network request of the current page may be only adjusted to be higher than that of the other network requests, and the processing priority of the non-preset core network request of the current page is not necessarily adjusted to be higher than that of the other network requests, that is, the processing priority of the non-preset core network request of the current page may be increased, but is not necessarily increased higher than that of the other network requests. Other network requests herein include network requests for non-current pages.
Fig. 4 is a schematic structural diagram of an electronic device suitable for implementing a priority adjustment method according to an embodiment of the present disclosure.
As shown in fig. 4, electronic device 400 includes a processing unit 401, which may be implemented as a CPU, GPU, FPGA, NPU, or other processing unit. The processing unit 401 may execute various processes in the embodiment of any one of the above-described methods of the present disclosure according to a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing unit 401, the ROM402, and the RAM403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, according to embodiments of the present disclosure, any of the methods described above with reference to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods of embodiments of the present disclosure. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409 and/or installed from the removable medium 411.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software or hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus in the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A priority adjustment method, comprising:
after detecting a current page entering an application client, acquiring a plurality of current network requests to be processed;
adjusting a processing priority of the network request based on whether a page to which the network request is directed is the current page;
processing the plurality of network requests based on the processing priority.
2. The method of claim 1, wherein obtaining a plurality of network requests currently pending after detecting a current page entering an application client comprises:
after detecting a current page entering an application client, acquiring a current network request triggered by entering the current page and a historical network request which is not processed and completed before entering the current page.
3. The method of claim 2, wherein adjusting the processing priority of the network request based on whether the page to which the network request is directed is the current page comprises:
increasing the processing priority of the current network request and decreasing the processing priority of the historical network request.
4. The method of claim 3, wherein increasing the processing priority of the current network request and decreasing the processing priority of the historical network requests comprises:
weighting the processing priority of the current network request to improve the processing priority of the current network request;
and performing priority reduction processing on the historical network requests so as to reduce the processing priority of the historical network requests.
5. The method according to any one of claims 2-4, wherein after detecting a request to enter a current page, obtaining a current network request triggered by entering the current page and a historical network request that has not been sent, the method comprises:
setting the initial processing priority of the current network request, so that the initial processing priority of a preset core network request in the current network request is higher than the initial processing priority of a non-preset core network request in the current network request.
6. The method of any of claims 1-4, wherein the method further comprises:
after a request for opening the application client to enter a home page is detected, acquiring a network request triggered by entering the home page;
setting the initial processing priority of the network request, so that the initial processing priority of a preset core network request in the network request is higher than the initial processing priority of a non-preset core network request.
7. The method of any of claims 1-4, wherein adjusting the processing priority of the network request based on whether the page to which the network request is directed is the current page comprises:
adjusting a processing priority of the network request for the current page to be higher than processing priorities of other network requests.
8. The method of claim 7, wherein adjusting the processing priority of the network request for the current page to be higher than the processing priority of other network requests comprises:
and adjusting the priority of a preset core network request in the network requests aiming at the current page to be higher than the processing priority of other network requests.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the method of any of claims 1-8.
10. A computer readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the method of any one of claims 1-8.
CN202210247930.1A 2022-03-14 2022-03-14 Priority adjustment method, electronic device and storage medium Active CN115037801B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210247930.1A CN115037801B (en) 2022-03-14 2022-03-14 Priority adjustment method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210247930.1A CN115037801B (en) 2022-03-14 2022-03-14 Priority adjustment method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN115037801A true CN115037801A (en) 2022-09-09
CN115037801B CN115037801B (en) 2024-07-12

Family

ID=83119304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210247930.1A Active CN115037801B (en) 2022-03-14 2022-03-14 Priority adjustment method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115037801B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7325045B1 (en) * 2003-08-05 2008-01-29 A9.Com, Inc. Error processing methods for providing responsive content to a user when a page load error occurs
WO2012094937A1 (en) * 2011-01-14 2012-07-19 广州市动景计算机科技有限公司 Webpage pre-reading method, transfer server and webpage pre-reading system
CN108073580A (en) * 2016-11-08 2018-05-25 北京国双科技有限公司 A kind of processing method and processing device based on page concurrent request
US10013500B1 (en) * 2013-12-09 2018-07-03 Amazon Technologies, Inc. Behavior based optimization for content presentation
CN109167761A (en) * 2018-08-14 2019-01-08 河南恒茂创远科技股份有限公司 A kind of method and device for requesting to automatically process
CN109582899A (en) * 2018-10-26 2019-04-05 平安科技(深圳)有限公司 Page loading method, device, computer equipment and storage medium
WO2020020272A1 (en) * 2018-07-27 2020-01-30 北京京东尚科信息技术有限公司 Page control method and apparatus, and computer-readable storage medium
US20200403929A1 (en) * 2018-12-31 2020-12-24 Facebook, Inc. Systems and methods for digital media delivery prioritization
CN112231604A (en) * 2020-06-12 2021-01-15 北京沃东天骏信息技术有限公司 Page display method and device, electronic equipment and storage medium
CN113656108A (en) * 2021-08-25 2021-11-16 北京知道创宇信息技术股份有限公司 Method and device for loading webpage, electronic equipment and computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7325045B1 (en) * 2003-08-05 2008-01-29 A9.Com, Inc. Error processing methods for providing responsive content to a user when a page load error occurs
WO2012094937A1 (en) * 2011-01-14 2012-07-19 广州市动景计算机科技有限公司 Webpage pre-reading method, transfer server and webpage pre-reading system
US10013500B1 (en) * 2013-12-09 2018-07-03 Amazon Technologies, Inc. Behavior based optimization for content presentation
CN108073580A (en) * 2016-11-08 2018-05-25 北京国双科技有限公司 A kind of processing method and processing device based on page concurrent request
WO2020020272A1 (en) * 2018-07-27 2020-01-30 北京京东尚科信息技术有限公司 Page control method and apparatus, and computer-readable storage medium
CN109167761A (en) * 2018-08-14 2019-01-08 河南恒茂创远科技股份有限公司 A kind of method and device for requesting to automatically process
CN109582899A (en) * 2018-10-26 2019-04-05 平安科技(深圳)有限公司 Page loading method, device, computer equipment and storage medium
US20200403929A1 (en) * 2018-12-31 2020-12-24 Facebook, Inc. Systems and methods for digital media delivery prioritization
CN112231604A (en) * 2020-06-12 2021-01-15 北京沃东天骏信息技术有限公司 Page display method and device, electronic equipment and storage medium
CN113656108A (en) * 2021-08-25 2021-11-16 北京知道创宇信息技术股份有限公司 Method and device for loading webpage, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN115037801B (en) 2024-07-12

Similar Documents

Publication Publication Date Title
CN109684358B (en) Data query method and device
US10489476B2 (en) Methods and devices for preloading webpages
CN113411400B (en) Information calling method and device, electronic equipment and readable storage medium
US20150188981A1 (en) Page processing method, apparatus, and system
CN112966200A (en) Service degradation method and rendering server
CN111966887A (en) Dynamic caching method and device, electronic equipment and storage medium
CN113934958A (en) Page loading method and device, electronic equipment and computer readable medium
CN111010453A (en) Service request processing method, system, electronic device and computer readable medium
CN108400884B (en) Method, system and device for improving stability of website service
CN115037801B (en) Priority adjustment method, electronic device and storage medium
CN113778581A (en) Page loading method, electronic equipment and storage medium
CN113014674A (en) Method and device for drawing service dependency graph
US11134116B2 (en) System and method for dynamically loading a webpage
US10616318B1 (en) Load balancer employing slow start, weighted round robin target selection
CN114374657B (en) Data processing method and device
CN116541167A (en) System flow control method, device, electronic equipment and computer readable medium
CN112784139B (en) Query method, device, electronic equipment and computer readable medium
CN112379978B (en) Back-end service calling method, device, equipment and storage medium
CN117040799A (en) Page interception rule generation and page access control method and device and electronic equipment
US11853797B2 (en) Method, device, and computer program product for deploying visual resource
CN109542601B (en) Policy compiling method and device, electronic equipment and computer storage medium
CN114500484A (en) Page rendering method and device, electronic equipment and readable medium
CN113204426A (en) Task processing method of resource pool and related equipment
CN116700999B (en) Data processing method, device, computer equipment and storage medium
CN111368193B (en) Information pre-acquisition method, device, storage medium and equipment

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