WO2019019249A1 - 执行网络请求的方法、装置、设备及计算机可读存储介质 - Google Patents

执行网络请求的方法、装置、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2019019249A1
WO2019019249A1 PCT/CN2017/099547 CN2017099547W WO2019019249A1 WO 2019019249 A1 WO2019019249 A1 WO 2019019249A1 CN 2017099547 W CN2017099547 W CN 2017099547W WO 2019019249 A1 WO2019019249 A1 WO 2019019249A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
instance
network request
network
executed
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.)
Ceased
Application number
PCT/CN2017/099547
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2019019249A1 publication Critical patent/WO2019019249A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Definitions

  • the present invention relates to the field of electronic device technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for performing a network request.
  • the embodiment of the invention provides a method, a device, a device and a computer readable storage medium for executing a network request, which can save time for the user to wait for the network to request data loading, and improve the user experience.
  • an embodiment of the present invention provides a method for performing a network request, where the method includes:
  • the network request is a preset type of network request, controlling the application to send the network request to the management center;
  • the management center controls the application to display a status after the network request is successfully executed and execute the network request.
  • an embodiment of the present invention provides an apparatus for performing a network request, where the apparatus includes:
  • a determining unit configured to determine, if the application is to send a network request, whether the network request is a preset type of network request
  • control sending unit configured to: if the network request is a preset type of network request, control the application to send the network request to the management center;
  • the management center is configured to control the application to display a status after the network request is successfully executed and execute the network request.
  • an embodiment of the present invention provides a device for performing a network request, where the device includes: a memory and a processor; the memory stores executable program data; and the processor is configured to run the storage in the memory.
  • the program data is to perform the method of the first aspect above.
  • an embodiment of the present invention provides a computer readable storage medium, where the one or more program data is stored, and the one or more program data may be processed by one or more processes.
  • the apparatus is executed to implement the method described in the first aspect above.
  • the management center of the application when the application is started, the management center of the application is created. If it is detected that the application is to send a network request, it is determined whether it is a preset type of network request, and if so, the management center control application displays that the network request is successfully executed. The subsequent state and execution of the network request saves the time for the user to wait for the network to request data loading, thereby improving the user experience.
  • FIG. 1 is a schematic flowchart of a method for executing a network request according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a sub-method of a method for executing a network request according to an embodiment of the present invention
  • FIG. 3 is a schematic flow chart of another sub-method of a method for executing a network request according to an embodiment of the present invention
  • FIG. 4 is a schematic block diagram of an apparatus for executing a network request according to an embodiment of the present invention.
  • FIG. 5 is a schematic block diagram of a management center according to an embodiment of the present invention.
  • FIG. 6 is a schematic block diagram of a management center according to another embodiment of the present invention.
  • FIG. 7 is a schematic block diagram of a management center according to another embodiment of the present invention.
  • FIG. 8 is a schematic block diagram of an apparatus for performing a network request according to an embodiment of the present invention.
  • the device described in the embodiments of the present invention includes, but is not limited to, a portable device such as a mobile phone, a laptop computer or a tablet computer that can execute an application. It should also be understood that in some embodiments, the device is not a portable communication device, but also includes a desktop computer, television, etc., that can execute an application. The device can install and execute various applications.
  • FIG. 1 is a schematic flowchart diagram of a method for executing a network request according to an embodiment of the present invention.
  • the method includes S101 ⁇ S104.
  • S101 If the application is started, create a management center that can execute an application network request. Among them, the management center is created in the local background of the application, and the management center is part of the application. Creating a management center includes opening up storage space, configuring and saving some parameters, and more.
  • the Management Center is created each time the application is launched. Each time the application is closed, the management center is destroyed to ensure that the management center is not destroyed and consumes device resources if the application is not started. In the management center, you can configure and save related parameters for executing network requests, such as preset number, preset time, preset number, and so on.
  • the network request includes many parameters, such as the interface to be sent, the amount of data to be sent, the protocol used, the destination address, the type of network request data, and some other parameters, such as the priority of the network request. Determining whether the network request is a preset type of network request according to a parameter of the network request, wherein the preset type of network request refers to non-real-time or low-time requirements, and does not need to be quickly associated with other devices such as a server. There are further interactive network requests.
  • the network request can send a circle of friends, a circle of friends sent by WeChat friends, a message of a friend circle, a message of a favorite message or a WeChat open, and a modified WeChat profile.
  • the control application sends the network request to the management center.
  • the control application sends the network request to the management center to save the network request in the management center and obtain a unique identifier assigned by the management center for the network request. If the network request is not a preset type of network request, a network request is sent to the server.
  • the management center control application displays a status after the network request is successfully executed and executes the network request. For example, if the network request requests the friend circle message sent by the WeChat friend, the management center control application displays the status of the like success, and executes the network request that the friend circle liked for the WeChat friend. It can be understood that the network request is not actually executed, and the state after the network request is successfully executed is displayed first; then the management center executes the network request. In this way, if the network condition is not good, the user does not have to wait for the network request to be successfully executed, and the user can obtain more time to perform other operations in the next step, thereby improving the user experience.
  • the management center of the application when the application is started, the management center of the application is created, and if it is detected that the application is to send a network request, it is determined whether it is a preset type of network request, and if so, the management center control application displays that the network request is successfully executed.
  • the state and execution of the network request saves the time for the user to wait for the network to request data loading, which improves the user experience.
  • S104 includes S201-S207 to further define how the management center controls the application to display the state after the network request is successfully executed and execute the network request.
  • the related parameters of the network request including the preset time, the preset number of times, and the suspension waiting time, can be configured and saved in the management center.
  • the preset time can be understood as the time when the request instance is executed once.
  • One request instance can be executed once to send the network request only once, and can also send the network request multiple times; the preset number can be understood as the number of times the network request is automatically executed.
  • S201 Create a request instance of the network request to control an application to display a status after the network request is successfully executed.
  • the priority of the request instance is included in the request instance of the network request, and the preset time corresponding to the request instance, the preset number of times corresponding to the request instance, the suspension waiting time corresponding to the request instance, and the like. .
  • different preset times, preset times, and pause waiting times can be set for request instances of different priorities. If the amount of data corresponding to the request instance is large, such as uploading multiple images, the preset time and the preset number of times corresponding to the request instance are larger.
  • the relevant parameters in the request instance are taken as the priority, for example, the priority in the request instance is obtained.
  • the relevant parameters of the network request configured by the management center shall prevail.
  • the priority of the request instance can be determined according to the function of the application. If there are 5 different requests in the same webpage, according to the function of the application, if the application mainly displays images, the request instance requesting the display image has a higher priority than the request instance corresponding to the request data. level.
  • the same preset time, the preset number of times, the suspension waiting time, and the like may be set for the request instances of different priorities. In other embodiments, the preset time, the preset number of times, and the like corresponding to the request instance may be the same or different for different applications.
  • the control application displays the status after the network request is successfully executed. For the WeChat application, if the network request is a friend circle sent by the WeChat friend, if the request instance of the network request is successfully created, the callback function of the request instance creation success will cause the front end of the application to display that the network request is successfully executed. The state of the point, that is, the state of success.
  • S202 Determine whether the number of network requests being executed reaches a preset number.
  • the management center can perform multiple network requests at the same time to determine whether the number of network requests being executed reaches a preset number. If the preset number is reached, S203 is performed; if the preset number is not reached, S204 is performed. If no network request is currently being performed, the number of network requests being executed is zero.
  • the management center can execute multiple network requests at the same time, maximizing the utilization of network resources and improving the efficiency of executing network requests.
  • S203 Put the request instance into a corresponding waiting queue according to the priority of the request instance, and wait for execution.
  • the request instance is divided into different priorities, and the request instances in the corresponding waiting queues with higher priority are preferentially executed to improve the user experience.
  • S202 is executed to determine whether the request instance can be executed. For example, in the process of waiting, if the request instance is successfully executed, the number of network requests being executed does not reach the preset number, and the request instance in the waiting queue can be taken out. Perform a network request.
  • S205 Determine whether the network request is successfully executed. If the network request is successfully executed, S206 is performed; otherwise, S207 is performed.
  • the number of times the network request is executed according to the request instance is not specifically limited, such as three times.
  • the management center when the management center performs the network request, if the number of network requests being executed by the management center reaches a preset number, the request instance is placed in the corresponding waiting queue according to the priority of the request instance, and the execution is performed. The number is set, the network request is executed according to the request instance; the network request is successfully executed, and if the execution is successful, the request instance is deleted, and if the execution is not successful, the network request is executed according to the request instance again.
  • the foregoing embodiment may perform a network request according to the priority of the request instance, so as to preferentially process more important network requests and improve the user experience; and, multiple network requests are simultaneously executed, and the network resources are utilized to the maximum, and the efficiency of executing the network request is improved.
  • the network request is automatically re-executed according to the request instance, and the network request is automatically executed multiple times, which ensures that the network request can be successfully executed without the user clicking to re-execute, thereby improving the user experience.
  • FIG. 3 is a flow chart of method steps after the management center performs the network request multiple times according to the request instance, wherein the multiple times do not exceed the preset number of times, and are associated with the number of execution network requests of the embodiment of FIG. 2 .
  • the multiple times of the embodiment are referred to twice; if the number of times the embodiment of FIG. 2 executes the network request is three times, then the multiple times of the embodiment refers to three times.
  • the number of times the network request is executed by the embodiment of FIG. 2 is two times, and the multiple times of the location are referred to twice.
  • the preset number of times is five times.
  • the step after the management center performs the network request according to the request instance multiple times is still unsuccessful, and includes S301-S310.
  • S301 If the network request is not successfully executed, determine whether the number of times the network request is executed according to the request instance reaches a preset number of times. If the preset number of times is not reached, S302 is performed; if the preset number of times is reached, S307 is performed.
  • S302 Put the request instance into a corresponding suspension queue according to the priority of the request instance. Put the request instance into the corresponding deferred queue, and continue to execute the network request according to the request instance after the interval is suspended, thereby increasing the probability of successful execution of the network request.
  • S303 Determine whether the waiting time is reached. If the waiting time is reached, S304 is executed; if the waiting time is not reached, it is determined whether the waiting time is reached.
  • the request instance is taken out from the suspension queue and the network request is executed according to the request instance.
  • S305 Determine whether the network request is successfully executed. If the network request is successfully executed, S306 is performed; if the execution is not successful, S301 is performed.
  • S307. Destroy the request instance and obtain the reason why the network request is not successfully executed. If the number of times the network request is executed according to the request instance reaches a preset number, and the request instance is destroyed and the reason why the network request is not successfully executed is obtained, it is preferable to return the reason why the last execution of the network request failed.
  • the reasons include the interface not found, the page not found, the network interruption, and so on.
  • the control application displays the state before the network request is successfully executed. If it is not necessary to re-create a request instance that is identical to the request instance, the application is controlled according to the unique identifier to display the state before the network request was successfully executed, that is, the state after the successful execution of the network request is revoked.
  • S310 Create a request instance of the network request. If you need to re-create a request instance that is identical to the request instance, create a request instance for the network request to request more requests from the network to increase the probability of successful network request execution. After the creation is completed, the process returns to S202, that is, the step of determining whether the number of network requests can be simultaneously executed reaches a preset number.
  • the foregoing embodiment determines whether the number of times the network request is executed according to the request instance reaches a preset number. If the preset number of times is not reached, the network request is suspended, and the interval is suspended after the waiting time continues. The network request is executed to increase the probability that the network request is successfully executed. If the preset number of times is reached, the execution fails within the preset number of times, and the reason why the network request is not successfully executed is obtained. According to the reason, it is determined whether it is necessary to re-create a request instance that is identical to the request instance. If re-creation is required, a request instance of the network request is created to request more request opportunities for the network, thereby increasing the probability of success of the network request execution; There is no need to recreate, undoing the state after the successful execution of the network request.
  • FIG. 4 is a schematic block diagram of an apparatus for performing a network request according to an embodiment of the present invention.
  • the device 40 includes a creating unit 401, a determining unit 402, a control transmitting unit 403, and a management center 404.
  • the creating unit 401 is configured to create a management center that can execute an application network request if the application is started.
  • the management center is created in the local background of the application, and the management center is part of the application.
  • Creating a management center includes opening up storage space, configuring and saving some parameters, and more.
  • the Management Center is created each time the application is launched. Each time the application is closed, the management center is destroyed to ensure that the management center is not destroyed and consumes device resources if the application is not started.
  • you can configure and save related parameters for executing network requests such as preset number, preset time, preset number, and so on.
  • the determining unit 402 is configured to determine, if the application is to send a network request, whether the network request is a preset type of network request.
  • the network request includes many parameters, such as the interface to be sent, the amount of data sent, the protocol used, the destination address, etc., and some other parameters, such as the priority of the network request. Determining whether the network request is a preset type of network request according to a parameter of the network request, wherein the preset type of network request refers to non-real-time or low-time requirements, and does not need to be quickly associated with other devices such as a server. There are further interactive network requests.
  • the network request can send a circle of friends, a circle of friends sent by WeChat friends, a message of a friend circle, a message of a favorite message or a WeChat open, and a modified WeChat profile.
  • the control sending unit 403 is configured to: if the network request is a preset type of network request, the control application sends the network request to the management center. The control application sends the network request to the management center to save the network request in the management center and obtain a unique identifier assigned by the management center for the network request.
  • the management center 404 is used to control the application to display the status after the network request is successfully executed and execute the network request. For example, if the network request requests the friend circle message sent by the WeChat friend, the management center control application displays the status of the like success, and executes the network request that the friend circle liked for the WeChat friend. It can be understood that the network request is not actually executed, and the state after the network request is successfully executed is displayed first; then the management center executes the network request. In this way, if the network condition is not good, the user does not have to wait for the network request to be successfully executed, and the user can obtain more time to perform other operations in the next step, thereby improving the user experience.
  • the management center of the application when the application is started, the management center of the application is created, and if it is detected that the application is to send a network request, it is determined whether it is a preset type of network request, and if so, the management center control application displays that the network request is successfully executed.
  • the state and execution of the network request saves the time for the user to wait for the network to request data loading, which improves the user experience.
  • the management center 50 includes a request instance creation unit 501, a control determination unit 502, a waiting unit 503, a request execution unit 504, a deletion unit 505, and a storage unit 506.
  • the storage unit 506 is configured to save the request instance, and save the related parameters of the configured network request, and the related parameters of the network request include a preset time, a preset number of times, a suspension waiting time, and the like.
  • the preset time can be understood as the time when the request instance is executed once.
  • One request instance can be executed once to send the network request only once, and can also send the network request multiple times; the preset number can be understood as the number of times the network request is automatically executed.
  • the request instance creation unit 501 is configured to create a request instance of the network request to control the state of the application after the network request is successfully executed.
  • the priority of the request instance is included in the request instance of the network request, and the preset time corresponding to the request instance, the preset number of times corresponding to the request instance, the suspension waiting time corresponding to the request instance, and the like. .
  • different preset times, preset times, and pause waiting times can be set for request instances of different priorities. If the amount of data corresponding to the request instance is large, such as uploading multiple images, the preset time and the preset number of times corresponding to the request instance are larger.
  • the relevant parameters in the request instance are taken as the priority, for example, the priority in the request instance is obtained.
  • the relevant parameters of the network request configured by the management center shall prevail.
  • the priority of the request instance can be determined according to the function of the application. If there are 5 different requests in the same webpage, according to the function of the application, if the application mainly displays images, the request instance requesting the display image has a higher priority than the request instance corresponding to the request data. level.
  • the same preset time, the preset number of times, the suspension waiting time, and the like may be set for the request instances of different priorities. In other embodiments, the preset time, the preset number of times, and the like corresponding to the request instance may be the same or different for different applications.
  • the control application displays the status after the network request is successfully executed. For the WeChat application, if the network request is a friend circle sent by the WeChat friend, if the request instance of the network request is successfully created, the callback function will cause the front end of the application to display the state after the network request is successfully executed, that is, the point. Praise the state of success.
  • the control judging unit 502 is configured to judge whether the number of network requests being executed reaches a preset number.
  • the management center can simultaneously execute multiple network requests to determine whether the number of network requests being executed reaches a preset number. If no network request is currently being performed, the number of network requests being executed is zero.
  • the management center can execute multiple network requests at the same time, maximizing the utilization of network resources and improving the efficiency of executing network requests.
  • the waiting unit 503 is configured to: if the number of network requests being executed reaches a preset number, put the request instance into a corresponding waiting queue according to the priority of the request instance, and wait for execution.
  • the request instance is divided into different priorities, and the request instances in the corresponding waiting queues with higher priority are preferentially executed to improve the user experience.
  • the control judgment unit is triggered to determine whether the request instance can be executed. For example, in the process of waiting, if the request instance is successfully executed, the number of network requests being executed does not reach the preset number, and the request in the waiting queue can be taken out. An instance to execute a network request.
  • the request execution unit 504 is configured to execute a network request according to the request instance if the number of network requests being executed does not reach a preset number. In addition, if in the process of waiting, if the request instance is successfully executed, the number of simultaneous network requests that the management center can execute at the same time does not reach the preset number, and the request instance in the waiting queue can be taken out to execute the network request.
  • the control determining unit 502 is further configured to determine whether the network request is successfully executed.
  • the deleting unit 505 is configured to delete the request instance if the network request is successfully executed.
  • the request execution unit 504 is further configured to perform a network request according to the request instance again if the network request execution fails. If the request instance is not successfully executed, the network request is executed again according to the request instance. Then, the judging unit is triggered to judge whether the network request is successfully executed.
  • the management center when the management center performs the network request, if the number of network requests being executed by the management center reaches a preset number, the request instance is placed in the corresponding waiting queue according to the priority of the request instance, and the execution is performed. The number is set, the network request is executed according to the request instance; the network request is successfully executed, and if the execution is successful, the request instance is deleted, and if the execution is not successful, the network request is executed according to the request instance again.
  • the foregoing embodiment may perform a network request according to the priority of the request instance, so as to preferentially process more important network requests and improve the user experience; and, multiple network requests are simultaneously executed, and the network resources are utilized to the maximum, and the efficiency of executing the network request is improved.
  • the network request is automatically re-executed according to the request instance, and is automatically executed multiple times, which ensures that the network request can be successfully executed without the user clicking to re-execute, thereby improving the user experience.
  • FIG. 6 is a schematic block diagram of a management center according to another embodiment of the present invention.
  • the management center 60 includes a request instance creation unit 601, a control determination unit 602, a waiting unit 603, a request execution unit 604, a deletion unit 605, a storage unit 606, and a suspension unit 607.
  • the main difference between the management center 60 and the management center 50 in the embodiment of FIG. 5 is that the suspension unit 607 is added.
  • the request instance creation unit 601, the control determination unit 602, the waiting unit 603, the request execution unit 604, the deletion unit 605, and the storage unit 606 refer to the description of the embodiment of FIG. 5, and details are not described herein again.
  • the difference between this embodiment and the embodiment of Figure 5 is that:
  • the control determining unit 602 is further configured to determine whether the number of times the network request is executed according to the request instance reaches a preset number of times if the network request is not successfully executed multiple times. Wherein, the number of times does not exceed a preset number of times, and is associated with the number of times the network request is executed in the embodiment of FIG. 2. If the number of times the network request is executed in the embodiment of FIG. 2 is two times, then the multiple times of the embodiment are referred to twice; if the number of times the embodiment of FIG. 2 executes the network request is three times, then the multiple times of the embodiment refers to three times. Preferably, the number of times the network request is executed by the embodiment of FIG. 2 is two times, and the multiple times of the location are referred to twice.
  • the suspending unit 607 is configured to: when the number of times the network request is executed according to the request instance does not reach the preset number of times, the request instance is placed in the corresponding suspension queue according to the priority of the request instance. Put the request instance into the corresponding deferred queue, and continue to execute the network request according to the request instance after the interval is suspended, thereby increasing the probability of successful execution of the network request.
  • the control judging unit 602 is further configured to determine whether the suspension waiting time is reached.
  • the suspension unit 607 is further configured to: if the suspension waiting time is reached, take the request instance from the suspension queue and execute the network request according to the request instance. Then, the judging unit is triggered to judge whether the network request is successfully executed.
  • the deleting unit 605 is further configured to delete the request instance if the network request is successfully executed. If the network request is not successfully executed, the determining unit is triggered to determine whether the number of times the network request is executed reaches a preset number of times.
  • FIG. 7 is a schematic block diagram of a management center according to another embodiment of the present invention.
  • the management center 70 includes a request instance creation unit 701, a control determination unit 702, a waiting unit 703, a request execution unit 704, a deletion unit 705, a storage unit 706, a suspension unit 707, a destruction unit 708, and a restoration unit 709.
  • the main difference between the management center 70 and the management center 60 in the embodiment of FIG. 6 is that the destruction unit 708 and the restoration unit 709 are added.
  • the request instance creation unit 701, the control determination unit 702, the waiting unit 703, the request execution unit 704, the deletion unit 705, the storage unit 706, and the suspension unit 707 are referred to the description of the embodiment of FIG. 6, and details are not described herein again.
  • the difference between this embodiment and the embodiment of Fig. 6 is that:
  • the destroying unit 708 is configured to: if the number of times the network request is executed according to the request instance reaches a preset number of times, destroy the request instance, and obtain a reason why the network request is not successfully executed. It is preferable to return the reason why the last execution of the network request failed.
  • the reasons include the interface not found, the page not found, the network interruption, and so on.
  • the control determining unit 702 is further configured to determine, according to the reason, whether a request instance that is identical to the request instance needs to be re-created. If the reason is that the interface is not found, the page is not found, etc., there is no need to recreate a request instance that is identical to the request instance. If the cause is a network outage, etc., then you need to recreate a request instance that is identical to the request instance.
  • the restore unit 709 is configured to control the application to display the state before the network request was successfully executed without re-creating a request instance that is identical to the request instance.
  • the application is controlled according to the unique identifier to display the state before the execution of the network request is successful, that is, to undo the state after the successful execution of the network request.
  • the request instance creation unit 701 is further configured to create a request instance of the network request if it is necessary to re-create a request instance that is identical to the request instance. Create a request instance for the network request again to request more requests from the network, increasing the chances of successful network request execution. After the creation is completed, the control determination unit is triggered to determine whether the number of network requests being executed reaches a preset number.
  • the above apparatus for executing a network request can be implemented in the form of a computer program that can be run on a device as shown in FIG.
  • FIG. 8 is a schematic block diagram of an apparatus for performing a network request according to an embodiment of the present invention.
  • the device 80 includes one or more input devices 801; one or more output devices 802, one or more memories 803, and one or more processors 804.
  • the input device 801, the output device 802, the memory 803, and the processor 804 are connected by a bus 805. among them:
  • the input device 801 is configured to provide a request for the user to send a network request, and provide a request instance for the user to re-send the network request.
  • the input device 801 of the embodiment of the present invention may include a keyboard, a mouse, a photoelectric input device, a sound input device, a touch input device, and the like.
  • the output device 802 is configured to display a status after the execution of the network request is successful, a reason why the network request is not successfully executed, and the like.
  • the output device 802 of the embodiment of the present invention may include a display, a display screen, a touch screen, a sound output device, and the like.
  • the memory 803 is used to store program data that implements a network request.
  • the memory 803 of the embodiment of the present invention may be a system memory, such as a non-volatile (such as a ROM, a flash memory, etc.).
  • the memory 803 of the embodiment of the present invention may also be an external memory outside the system, such as a magnetic disk, an optical disk, a magnetic tape, or the like.
  • the processor 804 is configured to run program data stored in the memory 803 to perform the following steps:
  • the application If the application is started, creating a management center that can execute the application network request; if detecting that the application is to send a network request, determining whether the network request is a preset type of network request; if the network request is a preset a type of network request that controls the application to send the network request to the management center; the management center controls the application to display a status after the network request is successfully executed and execute the network request.
  • the processor 804 also performs the following steps:
  • the processor 804 also performs the following steps:
  • the processor 804 also performs the following steps:
  • the control application displays the state before the network request was successfully executed; if it is to be re-created, the request instance is created and the number of network requests that are determined to be executing is returned to a preset number step.
  • the processor 804 also performs the following steps:
  • the request instance is put into a waiting queue according to the priority of the request instance to wait for execution; if the network request is executed according to the request instance, the number of times is not executed. If the number of times the network request is executed according to the request instance does not reach the preset number of times, the request instance is put into the corresponding one according to the priority of the request instance. Deferred queue.
  • the present invention also provides a computer readable storage medium storing one or more program data, the one or more program data being executable by one or more processors, Implement the following steps:
  • the application If the application is started, creating a management center that can execute the application network request; if detecting that the application is to send a network request, determining whether the network request is a preset type of network request; if the network request is a preset a type of network request that controls the application to send the network request to the management center; the management center controls the application to display a status after the network request is successfully executed and execute the network request.
  • the program data may be executed by the processor to implement the following steps:
  • the program data may be executed by the processor to implement the following steps:
  • the program data may be executed by the processor to implement the following steps:
  • the control application displays the state before the network request was successfully executed; if it is to be re-created, the request instance is created, and the number of network requests that determine whether the network request is being executed reaches a preset number A step of.
  • the program data may be executed by the processor to implement the following steps:
  • the request instance is put into a waiting queue according to the priority of the request instance to wait for execution; if the network request is executed according to the request instance, the number of times is not executed. If the number of times the network request is executed according to the request instance does not reach the preset number of times, the request instance is put into the corresponding one according to the priority of the request instance. Deferred queue.
  • the disclosed apparatus, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface or unit, or may be an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • Including several instructions to make a device may be a personal computer, server, mobile device or network device, etc.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, and a read only memory. (ROM, Read-Only Memory), disk or optical disc, etc.
  • ROM Read-Only Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例提供一种执行网络请求的方法、装置、设备及计算机可读存储介质。所述方法包括:若应用程序启动,创建可执行所述应用程序网络请求的管理中心;若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。本发明实施例若检测到应用程序将要发送的网络请求为预设类型的网络请求,管理中心控制应用程序显示网络请求被成功执行后的状态并执行网络请求,节约了用户等待网络请求数据加载的时间,提高了用户的体验。

Description

执行网络请求的方法、装置、设备及计算机可读存储介质
本申请要求于2017年7月24日提交中国专利局、申请号为201710607890.6、发明名称为“一种执行网络请求的方法、终端及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及电子设备技术领域,尤其涉及一种执行网络请求的方法、装置、设备及计算机可读存储介质。
背景技术
随着移动互联网的发展,移动端应用程序得到广泛的应用,但体验上良莠不齐。如当应用程序执行一个网络请求并加载网络请求的数据时,会弹出加载的图案,该加载的图像会妨碍用户进一步的操作。如果网络情况不理想,此时因为加载图像的显示,用户不能触摸点击应用程序的页面上的按钮,用户需要等待很长的时间才能加载所有网络请求的数据,才能进行下一步的操作。显然在该种情况下,用户的体验非常不好。
发明内容
本发明实施例提供了一种执行网络请求的方法、装置、设备及计算机可读存储介质,可节约用户等待网络请求数据加载的时间,提高用户的体验。
第一方面,本发明实施例提供了一种执行网络请求的方法,该方法包括:
若应用程序启动,创建可执行所述应用程序网络请求的管理中心;
若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;
若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;
所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。
第二方面,本发明实施例提供了一种执行网络请求的装置,该装置包括:
创建单元,用于若应用程序启动,创建可执行所述应用程序网络请求的管理中心;
判断单元,用于若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;
控制发送单元,用于若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;
所述管理中心,用于控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。
第三方面,本发明实施例提供了一种执行网络请求的设备,该设备包括:存储器和处理器;所述存储器存储有可执行的程序数据;所述处理器用于运行所述存储器中存储的所述程序数据,以执行上述第一方面的方法。
第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序数据,所述一个或者一个以上程序数据可被一个或者一个以上的处理器执行,以实现上述第一方面所述的方法。
本发明实施例当应用程序启动时,创建应用程序的管理中心,若检测到应用程序将要发送网络请求,判断是否为预设类型的网络请求,若是,管理中心控制应用程序显示网络请求被成功执行后的状态并执行网络请求,节约了用户等待网络请求数据加载的时间,提高了用户的体验。
附图说明
为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种执行网络请求的方法的示意流程图;
图2是本发明实施例提供的一种执行网络请求的方法的子方法示意流程图;
图3是本发明实施例提供的一种执行网络请求的方法的另一子方法示意流程图;
图4是本发明实施例提供的一种执行网络请求的装置的示意性框图;
图5是本发明实施例提供的管理中心的示意性框图;
图6是本发明另一实施例提供的管理中心的示意性框图;
图7是本发明另一实施例提供的管理中心的示意性框图;
图8是本发明实施例提供的一种执行网络请求的设备的示意性框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和 “包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在本发明说明书和所附权利要求书中使用的术语“和/ 或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
具体实现中,本发明实施例中描述的设备包括但不限于可以执行应用程序的诸如移动电话、膝上型计算机或平板计算机之类的便携式设备。还应当理解的是,在某些实施例中,所述设备并非便携式通信设备,还包括可以执行应用程序的台式计算机、电视等。所述设备可以安装并执行各种应用程序。
图1为本发明实施例提供的一种执行网络请求的方法的流程示意图。该方法包括S101~S104。
S101,若应用程序启动,创建可执行应用程序网络请求的管理中心。其中,管理中心是在应用程序的本地后台创建的,管理中心为应用程序的一部分。创建管理中心包括,开辟存储空间,配置并保存一些参数等。每次应用程序启动,就创建该管理中心。每次应用程序关闭,就销毁该管理中心,以确保在应用程序没有启动的情况下,该管理中心没有销毁而占用设备资源。在管理中心可以配置并保存执行网络请求的相关参数,如预设数量、预设时间、预设次数等。
S102,若检测到应用程序将要发送网络请求,判断该网络请求是否为预设类型的网络请求。其中,网络请求包括很多参数,如发送的接口、发送的数据量、使用的协议、目的地址、网络请求数据的类型等,还有一些其他的参数,如网络请求的优先级等。根据网络请求的参数判断该网络请求是否为预设类型的网络请求,其中,预设类型的网络请求是指非实时性的或者对实时性要求不高,并且不需要很快与其他设备如服务器有进一步交互的网络请求。如对于微信应用程序,网络请求可以为发送一条朋友圈、为微信好友发送的朋友圈消息点赞、评论朋友圈的消息、收藏消息或者微信打开的页面、修改微信个人资料等。
S103,若该网络请求为预设类型的网络请求,控制应用程序将该网络请求发送至管理中心。控制应用程序将该网络请求发送至管理中心以在管理中心保存该网络请求,并获取管理中心为该网络请求分配的唯一标识符。若该网络请求不为预设类型的网络请求,将网络请求发送至服务器。
S104,管理中心控制应用程序显示该网络请求被成功执行后的状态并执行该网络请求。如微信应用程序,若网络请求为微信好友发送的朋友圈消息点赞,管理中心控制应用程序显示点赞成功的状态,并执行为微信好友发送的朋友圈点赞的网络请求。可以理解为,该网络请求并没有被真正执行,先显示该网络请求被成功执行后的状态;接着管理中心去执行该网络请求。如此,用户在网络情况不是很好的情况下,不必等待该网络请求真正被成功执行,用户可以获得更多的时间进行下一步其他的操作,提高了用户的体验。
上述实施例当应用程序启动时,创建应用程序的管理中心,若检测到应用程序将要发送网络请求,判断是否为预设类型的网络请求,若是,管理中心控制应用程序显示网络请求被成功执行后的状态并执行网络请求,节约了用户等待网络请求数据加载的时间,提高了用户的体验。
具体地,如图2所示,S104包括S201-S207,以进一步限定管理中心如何控制应用程序显示该网络请求被成功执行后的状态并执行该网络请求。其中,在管理中心中可以配置并保存网络请求的相关参数,包括预设时间、预设次数、暂缓等待时间等。其中,预设时间可理解为一个请求实例执行一次的时间,一个请求实例执行一次可只发送一次网络请求,也可发送多次的网络请求;预设次数可理解为自动执行网络请求的次数。
S201,创建该网络请求的请求实例以控制应用程序显示该网络请求被成功执行后的状态。在一些实施例中,在该网络请求的请求实例中包括该请求实例的优先级,以及该请求实例对应的预设时间、该请求实例对应的预设次数、该请求实例对应的暂缓等待时间等。对于同一个应用程序,对于不同优先级的请求实例可以设置不同的预设时间、预设次数、暂缓等待时间。如若请求实例对应的数据量大,比如上传多张图片等,那么请求实例对应的预设时间、预设次数等值就会大一些。在实际执行中,若该网络请求的请求实例中有预设时间、预设次数、暂缓等待时间等相关参数,那么以该请求实例中的相关参数为准,如获取该请求实例中的优先级、该请求实例对应的预设时间、预设次数、暂缓等待时间等。若该网络请求的请求实例中没有相关参数,那么以管理中心配置的网络请求的相关参数为准。其中,请求实例的优先级可根据应用程序的功能来确定。如在同一个网页中有5个不同的请求,根据应用程序的功能,如该应用程序主要是展示图像的,那么请求展示图像的请求实例对应的优先级高于请求数据的请求实例对应的优先级。在其他实施例中,对于同一个应用程序,对于不同优先级的请求实例也可以设置相同的预设时间、预设次数、暂缓等待时间等。在其他实施例中,对于不同的应用程序,请求实例对应的预设时间、预设次数等也可以相同,也可以不同。若该网络请求的请求实例创建成功,控制应用程序显示该网络请求被成功执行后的状态。如对于微信应用程序,若网络请求为微信好友发送的朋友圈点赞,若该网络请求的请求实例创建成功,那么请求实例创建成功的回调函数会让应用程序的前端显示该网络请求被成功执行后的状态,即点赞成功的状态。
S202,判断正在执行的网络请求的数量是否达到预设数量。管理中心能同时执行多个网络请求,判断正在执行的网络请求的数量是否达到预设数量,若达到预设数量,执行S203;若没有达到预设数量,执行S204。若当前没有执行网络请求,那么正在执行的网络请求的数量为零。管理中心能同时执行多个网络请求,能最大限度的利用网络资源,提高执行网络请求的效率。
S203,根据该请求实例的优先级将该请求实例放入对应的等待队列里等待执行。将请求实例分为不同的优先级,优先执行优先级高的对应的等待队列里的请求实例,以提高用户的体验。接着执行S202,以判断是否可以执行该请求实例,如在等待的过程中,若有请求实例成功执行,正在执行的网络请求的数量未达到预设数量,即可取出等待队列里面的请求实例来执行网络请求。
S204,根据该请求实例执行网络请求。
S205,判断网络请求是否执行成功。若网络请求执行成功,执行S206;否则,执行S207。
S206,删除该请求实例。
S207,再次根据该请求实例执行网络请求。若网络请求未执行成功,接着再次根据该请求实例执行网络请求。再判断网络请求是否执行成功。
在其他实施例中,根据请求实例执行网络请求的次数不做具体限定,如三次等。
上述实施例在管理中心执行网络请求时,若管理中心正在执行的网络请求的数量达到预设数量,根据请求实例的优先级将该请求实例放入对应的等待队列里等待执行,若未达到预设数量,根据该请求实例执行网络请求;判断网络请求是否执行成功,若执行成功,删除该请求实例,若未执行成功,再次根据该请求实例执行网络请求。上述实施例可以根据请求实例的优先级来执行网络请求,以优先处理更为重要的网络请求,提升用户体验;而且,多个网络请求同时执行,最大限度利用网络资源,提高执行网络请求的效率;此外,若网络请求未执行成功,自动重新根据请求实例执行网络请求,自动多次执行网络请求,既保证网络请求能够执行成功又无需用户点击重新执行,提升用户体验。
图3为管理中心多次根据请求实例执行网络请求仍未成功后的方法步骤流程图,其中,该处的多次不超过预设次数,且与图2实施例的执行网络请求的次数相关联。若图2实施例执行网络请求的次数为两次,那么该处的多次即指两次;若图2实施例执行网络请求的次数为三次,那么该处的多次即指三次。优选地,图2实施例执行网络请求的次数为两次,该处的多次指两次。优选地,预设次数为五次。如图3所示,管理中心多次根据该请求实例执行网络请求仍未成功后的步骤包括S301-S310。
S301,若未成功执行网络请求,判断根据该请求实例执行网络请求的次数是否达到预设次数。若未达到预设次数,执行S302;若达到预设次数,执行S307。
S302,根据将该请求实例的优先级将该请求实例放入对应的暂缓队列。将请求实例放入对应的暂缓队列,以间隔暂缓等待时间后继续根据请求实例执行网络请求,提高执行网络请求成功的几率。
S303,判断是否达到暂缓等待时间。若达到暂缓等待时间,执行S304;若未达到暂缓等待时间,继续判断是否达到暂缓等待时间。
S304,从暂缓队列中取出该请求实例并根据该请求实例执行网络请求。
S305,判断网络请求是否执行成功。若网络请求执行成功,执行S306;若未执行成功,执行S301。
S306,删除该请求实例。
S307,销毁该请求实例,并获取网络请求未执行成功的原因。若根据请求实例执行网络请求的次数达到预设次数,销毁该请求实例并获取网络请求未成功执行的原因,优选为返回最后一次执行网络请求失败的原因。其中,原因包括找不到接口、找不到页面、网络中断等。
S308,根据该原因判断是否需重新创建一个与该请求实例完全相同的请求实例。若需重新创建,执行S310;若无需重新创建,执行S309。如若网络请求未成功执行的原因为找不到接口、找不到页面等,那么无需重新创建一个与该请求实例完全相同的请求实例。若该原因为网络中断等,那么需重新创建一个与该请求实例完全相同的请求实例。
S309,控制应用程序显示该网络请求被成功执行之前的状态。若无需重新创建一个与该请求实例完全相同的请求实例,根据唯一标识符控制应用程序显示该网络请求被成功执行之前的状态,即撤销显示执行该网络请求成功后的状态。
S310,创建网络请求的请求实例。若需重新创建一个与该请求实例完全相同的请求实例,则创建网络请求的请求实例,以给该网络请求更多的请求次数,提高网络请求执行成功的几率。创建完成后,返回执行S202,即判断能同时执行网络请求的数量是否达到预设数量的步骤。
上述实施例在多次未成功执行网络请求后,判断根据请求实例执行网络请求的次数是否达到预设次数,若未达到预设次数,暂缓执行该网络请求,间隔暂缓等待时间之后继续根据请求实例执行网络请求,以提高网络请求执行成功的几率;若达到预设次数,即在预设次数内都执行失败,获取该网络请求未成功执行的原因。根据原因判断否需重新创建一个与该请求实例完全相同的请求实例,若需重新创建,创建网络请求的请求实例,以给该网络请求更多的请求机会,提高网络请求执行成功的几率;若无需重新创建,撤销显示的执行该网络请求成功后的状态。
图4为本发明实施例提供的一种执行网络请求的装置的示意性框图。该装置40包括创建单元401、判断单元402、控制发送单元403、管理中心404。
创建单元401用于若应用程序启动,创建可执行应用程序网络请求的管理中心。其中,管理中心是在应用程序的本地后台创建的,管理中心为应用程序的一部分。创建管理中心包括,开辟存储空间,配置并保存一些参数等。每次应用程序启动,就创建该管理中心。每次应用程序关闭,就销毁该管理中心,以确保在应用程序没有启动的情况下,该管理中心没有销毁而占用设备资源。在管理中心可以配置并保存执行网络请求的相关参数,如预设数量、预设时间、预设次数等。
判断单元402用于若检测到应用程序将要发送网络请求,判断该网络请求是否为预设类型的网络请求。其中,网络请求包括很多参数,如发送的接口、发送的数据量、使用的协议、目的地址等,还有一些其他的参数,如网络请求的优先级等。根据网络请求的参数判断该网络请求是否为预设类型的网络请求,其中,预设类型的网络请求是指非实时性的或者对实时性要求不高,并且不需要很快与其他设备如服务器有进一步交互的网络请求。如对于微信应用程序,网络请求可以为发送一条朋友圈、为微信好友发送的朋友圈消息点赞、评论朋友圈的消息、收藏消息或者微信打开的页面、修改微信个人资料等。
控制发送单元403用于若该网络请求为预设类型的网络请求,控制应用程序将该网络请求发送至管理中心。控制应用程序将该网络请求发送至管理中心以在管理中心保存该网络请求,并获取管理中心为该网络请求分配的唯一标识符。
管理中心404用于控制应用程序显示该网络请求被成功执行后的状态并执行该网络请求。如微信应用程序,若网络请求为微信好友发送的朋友圈消息点赞,管理中心控制应用程序显示点赞成功的状态,并执行为微信好友发送的朋友圈点赞的网络请求。可以理解为,该网络请求并没有被真正执行,先显示该网络请求被成功执行后的状态;接着管理中心去执行该网络请求。如此,用户在网络情况不是很好的情况下,不必等待该网络请求真正被成功执行,用户可以获得更多的时间进行下一步其他的操作,提高了用户的体验。
上述实施例当应用程序启动时,创建应用程序的管理中心,若检测到应用程序将要发送网络请求,判断是否为预设类型的网络请求,若是,管理中心控制应用程序显示网络请求被成功执行后的状态并执行网络请求,节约了用户等待网络请求数据加载的时间,提高了用户的体验。
图5为管理中心的示意性框图,该管理中心限定了如何控制应用程序显示该网络请求被成功执行后的状态并执行该网络请求。如图5所示,管理中心50包括请求实例创建单元501、控制判断单元502、等待单元503、请求执行单元504、删除单元505、存储单元506。其中,存储单元506用于保存请求实例、以及保存配置的网络请求的相关参数等,网络请求的相关参数包括预设时间、预设次数、暂缓等待时间等。其中,预设时间可理解为一个请求实例执行一次的时间,一个请求实例执行一次可只发送一次网络请求,也可发送多次的网络请求;预设次数可理解为自动执行网络请求的次数。
请求实例创建单元501用于创建该网络请求的请求实例以控制应用程序显示该网络请求被成功执行后的状态。在一些实施例中,在该网络请求的请求实例中包括该请求实例的优先级,以及该请求实例对应的预设时间、该请求实例对应的预设次数、该请求实例对应的暂缓等待时间等。对于同一个应用程序,对于不同优先级的请求实例可以设置不同的预设时间、预设次数、暂缓等待时间。如若请求实例对应的数据量大,比如上传多张图片等,那么请求实例对应的预设时间、预设次数等值就会大一些。在实际执行中,若该网络请求的请求实例中有预设时间、预设次数、暂缓等待时间等相关参数,那么以该请求实例中的相关参数为准,如获取该请求实例中的优先级、该请求实例对应的预设时间、预设次数、暂缓等待时间等。若该网络请求的请求实例中没有相关参数,那么以管理中心配置的网络请求的相关参数为准。其中,请求实例的优先级可根据应用程序的功能来确定。如在同一个网页中有5个不同的请求,根据应用程序的功能,如该应用程序主要是展示图像的,那么请求展示图像的请求实例对应的优先级高于请求数据的请求实例对应的优先级。在其他实施例中,对于同一个应用程序,对于不同优先级的请求实例也可以设置相同的预设时间、预设次数、暂缓等待时间等。在其他实施例中,对于不同的应用程序,请求实例对应的预设时间、预设次数等也可以相同,也可以不同。若该网络请求的请求实例创建成功,控制应用程序显示该网络请求被成功执行后的状态。如对于微信应用程序,若网络请求为微信好友发送的朋友圈点赞,若该网络请求的请求实例创建成功,那么回调函数会让应用程序的前端显示该网络请求被成功执行后的状态,即点赞成功的状态。
控制判断单元502用于判断正在执行的网络请求的数量是否达到预设数量。管理中心能同时执行多个网络请求,判断正在执行的网络请求的数量是否达到预设数量。若当前没有执行网络请求,那么正在执行的网络请求的数量为零。管理中心能同时执行多个网络请求,能最大限度的利用网络资源,提高执行网络请求的效率。
等待单元503用于若正在执行的网络请求的数量达到预设数量,根据该请求实例的优先级将该请求实例放入对应的等待队列里等待执行。将请求实例分为不同的优先级,优先执行优先级高的对应的等待队列里的请求实例,以提高用户的体验。接着触发控制判断单元,以判断是否可以执行该请求实例,如在等待的过程中,若有请求实例成功执行,正在执行的网络请求的数量未达到预设数量,即可取出等待队列里面的请求实例来执行网络请求。
请求执行单元504用于若正在执行的网络请求的数量没有达到预设数量,根据该请求实例执行网络请求。另外,若在等待的过程中,若有请求实例成功执行,管理中心能同时执行网络请求的数量没有达到预设数量,即可取出等待队列里面的请求实例来执行网络请求。
控制判断单元502还用于判断网络请求是否执行成功。
删除单元505用于若网络请求执行成功,删除该请求实例。
请求执行单元504还用于若网络请求执行失败,再次根据该请求实例执行网络请求。若该请求实例未执行成功,再次根据该请求实例执行网络请求。接着触发判断单元,以判断网络请求是否执行成功。
上述实施例在管理中心执行网络请求时,若管理中心正在执行的网络请求的数量达到预设数量,根据请求实例的优先级将该请求实例放入对应的等待队列里等待执行,若未达到预设数量,根据该请求实例执行网络请求;判断网络请求是否执行成功,若执行成功,删除该请求实例,若未执行成功,再次根据该请求实例执行网络请求。上述实施例可以根据请求实例的优先级来执行网络请求,以优先处理更为重要的网络请求,提升用户体验;而且,多个网络请求同时执行,最大限度利用网络资源,提高执行网络请求的效率;此外,若网络请求未执行成功,自动重新根据请求实例执行网络请求,自动多次执行,既保证网络请求能够执行成功又无需用户点击重新执行,提升用户体验。
图6为本发明另一实施例提供的管理中心的示意性框图。该管理中心60包括请求实例创建单元601、控制判断单元602、等待单元603、请求执行单元604、删除单元605、存储单元606、暂缓单元607。该管理中心60与图5实施例中的管理中心50的主要区别在于:增加了暂缓单元607。其中,请求实例创建单元601、控制判断单元602、等待单元603、请求执行单元604、删除单元605、存储单元606请参看图5实施例的描述,在此不再赘述。该实施例与图5实施例的区别在于:
控制判断单元602还用于若多次未成功执行网络请求,判断根据该请求实例执行网络请求的次数是否达到预设次数。其中,该处的多次不超过预设次数,且与图2实施例的执行网络请求的次数相关联。若图2实施例执行网络请求的次数为两次,那么该处的多次即指两次;若图2实施例执行网络请求的次数为三次,那么该处的多次即指三次。优选地,图2实施例执行网络请求的次数为两次,该处的多次指两次。
暂缓单元607用于若根据请求实例执行网络请求的次数未达到预设次数,根据该请求实例的优先级将该请求实例放入对应的暂缓队列。将请求实例放入对应的暂缓队列,以间隔暂缓等待时间后继续根据请求实例执行网络请求,提高执行网络请求成功的几率。
控制判断单元602还用于判断是否达到暂缓等待时间。
暂缓单元607还用于若达到暂缓等待时间,从暂缓队列中取出该请求实例并根据该请求实例执行网络请求。接着触发判断单元,以判断网络请求是否执行成功。
删除单元605还用于若网络请求执行成功,删除该请求实例。若网络请求未执行成功,接着触发判断单元,以判断网络请求执行的次数是否达到预设次数。
图7为本发明另一实施例提供的管理中心的示意性框图。该管理中心70包括请求实例创建单元701、控制判断单元702、等待单元703、请求执行单元704、删除单元705、存储单元706、暂缓单元707、销毁单元708、还原单元709。该管理中心70与图6实施例中的管理中心60的主要区别在于:增加了销毁单元708、还原单元709。其中,请求实例创建单元701、控制判断单元702、等待单元703、请求执行单元704、删除单元705、存储单元706、暂缓单元707请参看图6实施例的描述,在此不再赘述。该实施例与图6实施例的区别在于:
销毁单元708用于若根据请求实例执行网络请求的次数达到预设次数,销毁该请求实例,并获取网络请求未成功执行的原因。优选为返回最后一次执行网络请求失败的原因。其中,原因包括找不到接口、找不到页面、网络中断等。
控制判断单元702还用于根据该原因判断是否需重新创建一个与该请求实例完全相同的请求实例。如若该原因为找不到接口、找不到页面等,那么无需重新创建一个与该请求实例完全相同的请求实例。若该原因为网络中断等,那么需重新创建一个与该请求实例完全相同的请求实例。
还原单元709用于若无需重新创建一个与该请求实例完全相同的请求实例,控制应用程序显示该网络请求被成功执行之前的状态。根据唯一标识符控制应用程序显示执行该网络请求成功之前的状态,即撤销显示执行该网络请求成功后的状态。
请求实例创建单元701还用于若需重新创建一个与该请求实例完全相同的请求实例,创建网络请求的请求实例。再次创建网络请求的请求实例,以给该网络请求更多的请求次数,提高网络请求执行成功的几率。创建完成后,接着触发控制判断单元,以判断正在执行的网络请求的数量是否达到预设数量。
上述执行网络请求的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图8所示的设备上运行。
图8为本发明实施例提供的一种执行网络请求的设备的示意性框图。该设备80包括包括一个或多个输入装置801;一个或多个输出装置802,一个或多个存储器803和一个或多个处理器804。上述输入装置801、输出装置802、存储器803和处理器804通过总线805连接。其中:
输入装置801用于提供用户发送网络请求、提供用户再次发送创建网络请求的请求实例的请求。具体实现中,本发明实施例的输入装置801可包括键盘、鼠标、光电输入装置、声音输入装置、触摸式输入装置等。
输出装置802用于显示执行网络请求成功后的状态、网络请求未成功执行的原因等。具体实现中,本发明实施例的输出装置802可包括显示器、显示屏、触摸屏、声音输出装置等。
存储器803用于存储实现执行网络请求的程序数据。其中,包括网络请求、请求实例、请求实例的优先级、预设时间、预设数量、预设次数、暂缓等待时间、暂缓队列、等待队列、同时执行网络请求的个数等,以及可调用并运行的程序。具体实现中,本发明实施例的存储器803可以是系统存储器,比如非易失性的(诸如ROM,闪存等)。具体实现中,本发明实施例的存储器803还可以是系统之外的外部存储器,比如,磁盘、光盘、磁带等。
处理器804用于运行存储器803中存储的程序数据,以执行如下步骤:
若应用程序启动,创建可执行所述应用程序网络请求的管理中心;若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。
处理器804还执行如下步骤:
创建所述网络请求的请求实例以控制应用程序显示所述网络请求被成功执行后的状态;判断正在执行的网络请求的数量是否达到预设数量;若未达到预设数量,根据所述请求实例执行网络请求;判断网络请求是否执行成功;若网络请求执行成功,删除所述请求实例;若网络请求在预设时间内未执行成功,再次根据所述请求实例执行网络请求。
处理器804还执行如下步骤:
判断根据所述请求实例执行网络请求的次数是否达到预设次数;若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列;判断是否达到暂缓等待时间;若达到暂缓等待时间,从所述暂缓队列中取出所述请求实例并根据所述请求实例执行网络请求。
处理器804还执行如下步骤:
若根据所述请求实例执行网络请求的次数达到预设次数,销毁所述请求实例,并获取网络请求未成功执行的原因;根据所述原因判断是否需重新创建一个与所述请求实例完全相同的请求实例;若无需重新创建,控制应用程序显示所述网络请求被成功执行之前的状态;若需重新创建,则创建请求实例且返回所述判断正在执行的网络请求的数量是否达到预设数量的步骤。
处理器804,还执行如下步骤:
若所述管理中心正在执行的网络请求的数量超过预设数量,根据所述请求实例的优先级将所述请求实例放入等待队列里等待执行;若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列,包括:若根据所述请求实例执行网络请求的次数未达到预设次数,根据所述请求实例的优先级将所述请求实例放入对应的暂缓队列。
本发明还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上的程序数据,所述一个或者一个以上的程序数据可被一个或者一个以上的处理器执行,以实现以下步骤:
若应用程序启动,创建可执行所述应用程序网络请求的管理中心;若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。
在其中一个实施例中,该程序数据被处理器执行时还可以实现以下步骤:
创建所述网络请求的请求实例以控制应用程序显示所述网络请求被成功执行后的状态;判断正在执行的网络请求的数量是否达到预设数量;若未达到预设数量,根据所述请求实例执行网络请求;判断网络请求是否执行成功;若网络请求执行成功,删除所述请求实例;若网络请求在预设时间内未执行成功,再次根据所述请求实例执行网络请求。
在其中一个实施例中,该程序数据被处理器执行时还可以实现以下步骤:
判断根据所述请求实例执行网络请求的次数是否达到预设次数;若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列;判断是否达到暂缓等待时间;若达到暂缓等待时间,从所述暂缓队列中取出所述请求实例并根据所述请求实例执行网络请求。
在其中一个实施例中,该程序数据被处理器执行时还可以实现以下步骤:
若根据所述请求实例执行网络请求的次数达到预设次数,销毁所述请求实例,并获取网络请求未成功执行的原因;根据所述原因判断是否需重新创建一个与所述请求实例完全相同的请求实例;若无需重新创建,控制应用程序显示所述网络请求被成功执行之前的状态;若需重新创建,则创建请求实例,且返回所述判断正在执行的网络请求的数量是否达到预设数量的步骤。
在其中一个实施例中,该程序数据被处理器执行时还可以实现以下步骤:
若所述管理中心正在执行的网络请求的数量超过预设数量,根据所述请求实例的优先级将所述请求实例放入等待队列里等待执行;若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列,包括:若根据所述请求实例执行网络请求的次数未达到预设次数,根据所述请求实例的优先级将所述请求实例放入对应的暂缓队列。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置、设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台设备 ( 可以是个人计算机,服务器,移动设备或者网络设备等 ) 执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括 :U 盘、移动硬盘、只读存储器 (ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种执行网络请求的方法,其特征在于,所述方法包括:
    若应用程序启动,创建可执行所述应用程序网络请求的管理中心;
    若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;
    若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;
    所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。
  2. 如权利要求1所述的方法,其特征在于,所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求,包括:
    创建所述网络请求的请求实例以控制应用程序显示所述网络请求被成功执行后的状态;
    判断正在执行的网络请求的数量是否达到预设数量;
    若未达到预设数量,根据所述请求实例执行网络请求;
    判断网络请求是否执行成功;
    若网络请求执行成功,删除所述请求实例;
    若网络请求在预设时间内未执行成功,再次根据所述请求实例执行网络请求。
  3. 如权利要求2所述的方法,其特征在于,所述方法还包括:
    若网络请求未执行成功,判断根据所述请求实例执行网络请求的次数是否达到预设次数;
    若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列;
    判断是否达到暂缓等待时间;
    若达到暂缓等待时间,从所述暂缓队列中取出所述请求实例并根据所述请求实例执行网络请求。
  4. 如权利要求3所述的方法,其特征在于,所述方法还包括:
    若根据所述请求实例执行网络请求的次数达到预设次数,销毁所述请求实例,并获取网络请求未执行成功的原因;
    根据所述原因判断是否需重新创建一个与所述请求实例完全相同的请求实例;
    若无需重新创建,控制所述应用程序显示所述网络请求被成功执行之前的状态;
    若需要重新创建,则创建请求实例;且返回所述判断正在执行的网络请求的数量是否达到预设数量的步骤。
  5. 如权利要求3所述的方法,其特征在于,所述请求实例包括优先级,所述方法还包括:
    若所述管理中心正在执行的网络请求的数量超过预设数量,根据所述请求实例的优先级将所述请求实例放入等待队列里等待执行;
    若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列,包括:若根据所述请求实例执行网络请求的次数未达到预设次数,根据所述请求实例的优先级将所述请求实例放入对应的暂缓队列。
  6. 一种执行网络请求的装置,其特征在于,所述装置包括:
    创建单元,用于若应用程序启动,创建可执行所述应用程序网络请求的管理中心;
    判断单元,用于若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;
    控制发送单元,用于若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;
    所述管理中心,用于控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。
  7. 如权利要求6所述的装置,其特征在于,所述管理中心包括请求实例创建单元、控制判断单元、请求执行单元、删除单元、存储单元;其中,
    所述请求实例创建单元用于创建所述网络请求的请求实例以控制应用程序显示所述网络请求被成功执行后的状态;
    所述控制判断单元用于判断正在执行的网络请求的数量是否达到预设数量;
    所述请求执行单元用于若正在执行的网络请求的数量未达到预设数量,根据所述请求实例执行网络请求;
    所述控制判断单元还用于判断网络请求是否执行成功;
    所述删除单元用于若网络请求执行成功,删除所述请求实例;
    所述请求执行单元用于若网络请求在预设时间内未执行成功,再次根据所述请求实例执行网络请求;
    所述存储单元,用于存储请求实例以及网络请求的相关参数,其中,所述相关参数包括预设数量。
  8. 如权利要求7所述的装置,其特征在于,所述管理中心还包括暂缓单元,所述相关参数还包括预设次数、暂缓等待时间:
    所述控制判断单元还用于判断根据所述请求实例执行网络请求的次数是否达到预设次数;
    所述暂缓单元用于若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列;
    所述控制判断单元还用于判断是否达到暂缓等待时间;
    所述暂缓单元还用于若达到暂缓等待时间,从所述暂缓队列中取出所述请求实例并根据所述请求实例执行网络请求。
  9. 如权利要求8所述的装置,其特征在于,所述管理中心还包括:销毁单元、还原单元;其中,
    所述销毁单元用于若根据所述请求实例执行网络请求的次数达到预设次数,销毁所述请求实例,并获取网络请求未执行成功的原因;
    所述控制判断单元还用于根据所述原因判断是否需重新创建一个与所述请求实例完全相同的请求实例;
    还原单元用于若无需重新创建一个与所述请求实例完全相同的请求实例,控制所述应用程序显示所述网络请求被成功执行之前的状态;
    所述请求实例创建单元还用于若需要重新创建一个与所述请求实例完全相同的请求实例,则创建请求实例;接着触发控制判断单元以判断正在执行的网络请求的数量是否达到预设数量。
  10. 如权利要求8所述的装置,其特征在于,所述请求实例包括优先级,所述管理中心还包括:等待单元;其中,
    所述等待单元用于若所述管理中心正在执行的网络请求的数量超过预设数量,根据所述请求实例的优先级将所述请求实例放入等待队列里等待执行;
    所述请求执行单元还用于若根据所述请求实例执行网络请求的次数未达到预设次数,根据所述请求实例的优先级将所述请求实例放入对应的暂缓队列。
  11. 一种执行网络请求的设备,其特征在于,所述设备包括:存储器和处理器;所述存储器存储有实现执行网络请求的程序数据;所述处理器用于运行所述存储器中存储的所述程序数据,以执行如下步骤:
    若应用程序启动,创建可执行所述应用程序网络请求的管理中心;
    若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;
    若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;
    所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。
  12. 如权利要求11所述的设备,其特征在于,所述处理器还执行如下步骤:
    创建所述网络请求的请求实例以控制应用程序显示所述网络请求被成功执行后的状态;
    判断正在执行的网络请求的数量是否达到预设数量;
    若未达到预设数量,根据所述请求实例执行网络请求;
    判断网络请求是否执行成功;
    若网络请求执行成功,删除所述请求实例;
    若网络请求在预设时间内未执行成功,再次根据所述请求实例执行网络请求。
  13. 如权利要求12所述的设备,其特征在于,所述处理器还执行如下步骤:
    若网络请求未执行成功,判断根据所述请求实例执行网络请求的次数是否达到预设次数;
    若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列;
    判断是否达到暂缓等待时间;
    若达到暂缓等待时间,从所述暂缓队列中取出所述请求实例并根据所述请求实例执行网络请求。
  14. 如权利要求13所述的设备,其特征在于,所述处理器还执行如下步骤:
    若根据所述请求实例执行网络请求的次数达到预设次数,销毁所述请求实例,并获取网络请求未执行成功的原因;
    根据所述原因判断是否需重新创建一个与所述请求实例完全相同的请求实例;
    若无需重新创建,控制所述应用程序显示所述网络请求被成功执行之前的状态;
    若需要重新创建,则创建请求实例;且返回所述判断正在执行的网络请求的数量是否达到预设数量的步骤。
  15. 如权利要求13所述的设备,其特征在于,所述请求实例包括优先级,所述处理器还执行如下步骤:
    若所述管理中心正在执行的网络请求的数量超过预设数量,根据所述请求实例的优先级将所述请求实例放入等待队列里等待执行;
    若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列,包括:若根据所述请求实例执行网络请求的次数未达到预设次数,根据所述请求实例的优先级将所述请求实例放入对应的暂缓队列。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者一个以上程序数据,所述一个或者一个以上程序数据可被一个或者一个以上的处理器执行,以实现如下步骤:
    若应用程序启动,创建可执行所述应用程序网络请求的管理中心;
    若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;
    若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;
    所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述步骤还包括:
    创建所述网络请求的请求实例以控制应用程序显示所述网络请求被成功执行后的状态;
    判断正在执行的网络请求的数量是否达到预设数量;
    若未达到预设数量,根据所述请求实例执行网络请求;
    判断网络请求是否执行成功;
    若网络请求执行成功,删除所述请求实例;
    若网络请求在预设时间内未执行成功,再次根据所述请求实例执行网络请求。
  18. 如权利要求17所述的计算机可读存储介质,其特征在于,所述步骤还包括:
    若网络请求未执行成功,判断根据所述请求实例执行网络请求的次数是否达到预设次数;
    若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列;
    判断是否达到暂缓等待时间;
    若达到暂缓等待时间,从所述暂缓队列中取出所述请求实例并根据所述请求实例执行网络请求。
  19. 如权利要求18所述的计算机可读存储介质,其特征在于,所述步骤还包括:
    若根据所述请求实例执行网络请求的次数达到预设次数,销毁所述请求实例,并获取网络请求未执行成功的原因;
    根据所述原因判断是否需重新创建一个与所述请求实例完全相同的请求实例;
    若无需重新创建,控制所述应用程序显示所述网络请求被成功执行之前的状态;
    若需要重新创建,则创建请求实例;且返回所述判断正在执行的网络请求的数量是否达到预设数量的步骤。
  20. 如权利要求18所述的计算机可读存储介质,其特征在于,所述请求实例包括优先级,所述步骤还包括:
    若所述管理中心正在执行的网络请求的数量超过预设数量,根据所述请求实例的优先级将所述请求实例放入等待队列里等待执行;
    若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列,包括:若根据所述请求实例执行网络请求的次数未达到预设次数,根据所述请求实例的优先级将所述请求实例放入对应的暂缓队列。
PCT/CN2017/099547 2017-07-24 2017-08-30 执行网络请求的方法、装置、设备及计算机可读存储介质 Ceased WO2019019249A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710607890.6A CN107682389B (zh) 2017-07-24 2017-07-24 一种执行网络请求的方法、终端及计算机可读存储介质
CN201710607890.6 2017-07-24

Publications (1)

Publication Number Publication Date
WO2019019249A1 true WO2019019249A1 (zh) 2019-01-31

Family

ID=61133081

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099547 Ceased WO2019019249A1 (zh) 2017-07-24 2017-08-30 执行网络请求的方法、装置、设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN107682389B (zh)
WO (1) WO2019019249A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158871A (zh) * 2019-12-05 2020-05-15 智七网络科技(上海)有限公司 数据包并发请求处理方法、装置、电子设备及存储介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629056B (zh) * 2020-05-27 2023-04-07 浙江百世技术有限公司 一种网络请求处理方法及应用
CN112231604B (zh) * 2020-06-12 2024-12-31 北京沃东天骏信息技术有限公司 一种页面显示方法、装置、电子设备和存储介质
CN112269710A (zh) * 2020-09-18 2021-01-26 天地互联科技(广州)有限公司 机载监控系统和其监控方法
CN113918301B (zh) * 2021-10-20 2025-09-19 北京达佳互联信息技术有限公司 请求处理方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508716A (zh) * 2011-09-29 2012-06-20 用友软件股份有限公司 任务控制装置和任务控制方法
CN104166590A (zh) * 2013-05-20 2014-11-26 阿里巴巴集团控股有限公司 一种实现任务调度的方法及系统
CN105490956A (zh) * 2015-12-07 2016-04-13 方正移动传媒技术(北京)有限公司 一种网络请求处理方法及装置
CN106790453A (zh) * 2016-12-07 2017-05-31 竞技世界(北京)网络技术有限公司 一种操作请求的执行方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4240330B2 (ja) * 2006-10-24 2009-03-18 ソニー株式会社 データベース作成方法、データベース作成プログラム、データベース作成装置及び映像コンテンツ記録装置
CN101621458A (zh) * 2008-06-30 2010-01-06 国际商业机器公司 异步处理网络请求的方法和系统
CN102750291A (zh) * 2011-04-21 2012-10-24 中国移动通信集团安徽有限公司 用户定制分析装置、通讯终端及其访问互联网方法和系统
CN103491162B (zh) * 2013-09-18 2017-03-01 广州华多网络科技有限公司 基于移动互联网的信息分享方法及系统
CN105099989B (zh) * 2014-04-24 2019-11-22 阿里巴巴集团控股有限公司 用于处理业务请求及获取业务处理结果的方法、装置和系统
CN106775901A (zh) * 2017-01-22 2017-05-31 上海卓悠网络科技有限公司 一种数据预加载方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508716A (zh) * 2011-09-29 2012-06-20 用友软件股份有限公司 任务控制装置和任务控制方法
CN104166590A (zh) * 2013-05-20 2014-11-26 阿里巴巴集团控股有限公司 一种实现任务调度的方法及系统
CN105490956A (zh) * 2015-12-07 2016-04-13 方正移动传媒技术(北京)有限公司 一种网络请求处理方法及装置
CN106790453A (zh) * 2016-12-07 2017-05-31 竞技世界(北京)网络技术有限公司 一种操作请求的执行方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158871A (zh) * 2019-12-05 2020-05-15 智七网络科技(上海)有限公司 数据包并发请求处理方法、装置、电子设备及存储介质
CN111158871B (zh) * 2019-12-05 2024-02-23 智七网络科技(上海)有限公司 数据包并发请求处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN107682389B (zh) 2020-02-14
CN107682389A (zh) 2018-02-09

Similar Documents

Publication Publication Date Title
WO2019019249A1 (zh) 执行网络请求的方法、装置、设备及计算机可读存储介质
WO2016165556A1 (zh) 一种视频流的数据处理方法、装置和系统
WO2019128174A1 (zh) 音频播放方法、智能电视及计算机可读存储介质
WO2016000560A1 (en) File transmission method, file transmission apparatus, and file transmission system
WO2015109865A1 (zh) 空调运行模式自定义控制方法及系统
WO2018233370A1 (zh) 镜像同步方法、系统、设备及计算机可读存储介质
WO2019051902A1 (zh) 终端控制方法、空调器及计算机可读存储介质
WO2018014567A1 (zh) 一种提高虚拟机性能的方法、终端、设备及计算机可读存储介质
WO2018076811A1 (zh) 数据分享方法、装置、存储介质及电子设备
WO2014026526A1 (zh) 自然人信息设置方法及电子设备
WO2018120430A1 (zh) 一种页面构建方法、终端、计算机可读存储介质及页面构建设备
WO2018113187A1 (zh) 一种显示控制方法及显示装置
WO2018126888A1 (zh) 电视功能的快捷启动设置方法及装置
WO2016058258A1 (zh) 终端远程控制方法和系统
WO2014000635A1 (zh) 阅读器提供服务的方法、阅读器、终端及计算机存储介质
WO2019052164A1 (zh) 一种视频回访方法、装置、设备及存储介质
WO2017201943A1 (zh) 显示屏驱动方法及装置
WO2017152526A1 (zh) 外部设备自动挂载和通知的控制方法及系统
WO2017190451A1 (zh) 图片推送方法和装置
WO2017036208A1 (zh) 显示界面中的信息提取方法及系统
WO2018006581A1 (zh) 智能电视的播放方法及装置
WO2014086174A1 (zh) 影像获取方法、电子装置、电子设备及储存介质
WO2019085301A1 (zh) 座机未接来电的反馈方法、装置、设备及可读存储介质
WO2019210574A1 (zh) 消息处理方法、装置、设备及可读存储介质
WO2019062102A1 (zh) 磁盘阵列的挂载方法、Android设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17919482

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17919482

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 05.08.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17919482

Country of ref document: EP

Kind code of ref document: A1