WO2019019249A1 - Method, apparatus and device for executing network request, and computer-readable storage medium - Google Patents
Method, apparatus and device for executing network request, and computer-readable storage medium Download PDFInfo
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling 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、发明名称为“一种执行网络请求的方法、终端及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on July 24, 2017, the Chinese Patent Application No. 201710607890.6, entitled "A Method for Performing a Network Request, a Terminal, and a Computer-Readable Storage Medium", all of which are The content is incorporated herein by reference.
技术领域Technical field
本发明涉及电子设备技术领域,尤其涉及一种执行网络请求的方法、装置、设备及计算机可读存储介质。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.
背景技术Background technique
随着移动互联网的发展,移动端应用程序得到广泛的应用,但体验上良莠不齐。如当应用程序执行一个网络请求并加载网络请求的数据时,会弹出加载的图案,该加载的图像会妨碍用户进一步的操作。如果网络情况不理想,此时因为加载图像的显示,用户不能触摸点击应用程序的页面上的按钮,用户需要等待很长的时间才能加载所有网络请求的数据,才能进行下一步的操作。显然在该种情况下,用户的体验非常不好。With the development of the mobile Internet, mobile applications have been widely used, but the experience is mixed. For example, when the application executes a network request and loads the data requested by the network, the loaded pattern will pop up, and the loaded image will hinder the user from further operations. If the network condition is not ideal, at this time, because the display of the loaded image, the user cannot touch the button on the page of the application, the user needs to wait for a long time to load all the data requested by the network, in order to proceed to the next step. Obviously in this case, the user experience is very bad.
发明内容Summary of the invention
本发明实施例提供了一种执行网络请求的方法、装置、设备及计算机可读存储介质,可节约用户等待网络请求数据加载的时间,提高用户的体验。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.
第一方面,本发明实施例提供了一种执行网络请求的方法,该方法包括:In a first aspect, an embodiment of the present invention provides a method for performing a network request, where the method includes:
若应用程序启动,创建可执行所述应用程序网络请求的管理中心;If the application launches, create a management center that can execute the application network request;
若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;If it is detected that the application is to send a network request, determine whether the network request is a preset type of network request;
若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;If 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.
第二方面,本发明实施例提供了一种执行网络请求的装置,该装置包括:In a second aspect, an embodiment of the present invention provides an apparatus for performing a network request, where the apparatus includes:
创建单元,用于若应用程序启动,创建可执行所述应用程序网络请求的管理中心;Creating a unit for creating a management center that can execute the application network request if the application is started;
判断单元,用于若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;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;
控制发送单元,用于若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;a 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.
第三方面,本发明实施例提供了一种执行网络请求的设备,该设备包括:存储器和处理器;所述存储器存储有可执行的程序数据;所述处理器用于运行所述存储器中存储的所述程序数据,以执行上述第一方面的方法。In a third aspect, 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.
第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序数据,所述一个或者一个以上程序数据可被一个或者一个以上的处理器执行,以实现上述第一方面所述的方法。In a fourth aspect, 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.
本发明实施例当应用程序启动时,创建应用程序的管理中心,若检测到应用程序将要发送网络请求,判断是否为预设类型的网络请求,若是,管理中心控制应用程序显示网络请求被成功执行后的状态并执行网络请求,节约了用户等待网络请求数据加载的时间,提高了用户的体验。In the embodiment of the present invention, 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.
附图说明DRAWINGS
为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are some embodiments of the present invention. For the ordinary technicians, other drawings can be obtained based on these drawings without any creative work.
图1是本发明实施例提供的一种执行网络请求的方法的示意流程图;FIG. 1 is a schematic flowchart of a method for executing a network request according to an embodiment of the present invention;
图2是本发明实施例提供的一种执行网络请求的方法的子方法示意流程图;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;
图3是本发明实施例提供的一种执行网络请求的方法的另一子方法示意流程图;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;
图4是本发明实施例提供的一种执行网络请求的装置的示意性框图;4 is a schematic block diagram of an apparatus for executing a network request according to an embodiment of the present invention;
图5是本发明实施例提供的管理中心的示意性框图;FIG. 5 is a schematic block diagram of a management center according to an embodiment of the present invention; FIG.
图6是本发明另一实施例提供的管理中心的示意性框图;6 is a schematic block diagram of a management center according to another embodiment of the present invention;
图7是本发明另一实施例提供的管理中心的示意性框图;FIG. 7 is a schematic block diagram of a management center according to another embodiment of the present invention; FIG.
图8是本发明实施例提供的一种执行网络请求的设备的示意性框图。FIG. 8 is a schematic block diagram of an apparatus for performing a network request according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和 “包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It will be understood that the terms "comprise" and "the" when used in the specification and the appended claims "Comprising" indicates the existence of the described features, integers, steps, operations, elements and/or components, but does not exclude the presence of one or more other features, integers, steps, operations, elements, components and/or combinations thereof Add to.
还应当理解,在本发明说明书和所附权利要求书中使用的术语“和/ 或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be understood that the term "and / is used in the description of the invention and the appended claims. Or "" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
具体实现中,本发明实施例中描述的设备包括但不限于可以执行应用程序的诸如移动电话、膝上型计算机或平板计算机之类的便携式设备。还应当理解的是,在某些实施例中,所述设备并非便携式通信设备,还包括可以执行应用程序的台式计算机、电视等。所述设备可以安装并执行各种应用程序。In a specific implementation, 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.
图1为本发明实施例提供的一种执行网络请求的方法的流程示意图。该方法包括S101~S104。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,若应用程序启动,创建可执行应用程序网络请求的管理中心。其中,管理中心是在应用程序的本地后台创建的,管理中心为应用程序的一部分。创建管理中心包括,开辟存储空间,配置并保存一些参数等。每次应用程序启动,就创建该管理中心。每次应用程序关闭,就销毁该管理中心,以确保在应用程序没有启动的情况下,该管理中心没有销毁而占用设备资源。在管理中心可以配置并保存执行网络请求的相关参数,如预设数量、预设时间、预设次数等。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.
S102,若检测到应用程序将要发送网络请求,判断该网络请求是否为预设类型的网络请求。其中,网络请求包括很多参数,如发送的接口、发送的数据量、使用的协议、目的地址、网络请求数据的类型等,还有一些其他的参数,如网络请求的优先级等。根据网络请求的参数判断该网络请求是否为预设类型的网络请求,其中,预设类型的网络请求是指非实时性的或者对实时性要求不高,并且不需要很快与其他设备如服务器有进一步交互的网络请求。如对于微信应用程序,网络请求可以为发送一条朋友圈、为微信好友发送的朋友圈消息点赞、评论朋友圈的消息、收藏消息或者微信打开的页面、修改微信个人资料等。S102. If it is detected that the application is to send a network request, determine 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 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. For the WeChat application, 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.
S103,若该网络请求为预设类型的网络请求,控制应用程序将该网络请求发送至管理中心。控制应用程序将该网络请求发送至管理中心以在管理中心保存该网络请求,并获取管理中心为该网络请求分配的唯一标识符。若该网络请求不为预设类型的网络请求,将网络请求发送至服务器。S103. 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. If the network request is not a preset type of network request, a network request is sent to the server.
S104,管理中心控制应用程序显示该网络请求被成功执行后的状态并执行该网络请求。如微信应用程序,若网络请求为微信好友发送的朋友圈消息点赞,管理中心控制应用程序显示点赞成功的状态,并执行为微信好友发送的朋友圈点赞的网络请求。可以理解为,该网络请求并没有被真正执行,先显示该网络请求被成功执行后的状态;接着管理中心去执行该网络请求。如此,用户在网络情况不是很好的情况下,不必等待该网络请求真正被成功执行,用户可以获得更多的时间进行下一步其他的操作,提高了用户的体验。S104. 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.
上述实施例当应用程序启动时,创建应用程序的管理中心,若检测到应用程序将要发送网络请求,判断是否为预设类型的网络请求,若是,管理中心控制应用程序显示网络请求被成功执行后的状态并执行网络请求,节约了用户等待网络请求数据加载的时间,提高了用户的体验。In the foregoing embodiment, 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.
具体地,如图2所示,S104包括S201-S207,以进一步限定管理中心如何控制应用程序显示该网络请求被成功执行后的状态并执行该网络请求。其中,在管理中心中可以配置并保存网络请求的相关参数,包括预设时间、预设次数、暂缓等待时间等。其中,预设时间可理解为一个请求实例执行一次的时间,一个请求实例执行一次可只发送一次网络请求,也可发送多次的网络请求;预设次数可理解为自动执行网络请求的次数。Specifically, as shown in FIG. 2, 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,创建该网络请求的请求实例以控制应用程序显示该网络请求被成功执行后的状态。在一些实施例中,在该网络请求的请求实例中包括该请求实例的优先级,以及该请求实例对应的预设时间、该请求实例对应的预设次数、该请求实例对应的暂缓等待时间等。对于同一个应用程序,对于不同优先级的请求实例可以设置不同的预设时间、预设次数、暂缓等待时间。如若请求实例对应的数据量大,比如上传多张图片等,那么请求实例对应的预设时间、预设次数等值就会大一些。在实际执行中,若该网络请求的请求实例中有预设时间、预设次数、暂缓等待时间等相关参数,那么以该请求实例中的相关参数为准,如获取该请求实例中的优先级、该请求实例对应的预设时间、预设次数、暂缓等待时间等。若该网络请求的请求实例中没有相关参数,那么以管理中心配置的网络请求的相关参数为准。其中,请求实例的优先级可根据应用程序的功能来确定。如在同一个网页中有5个不同的请求,根据应用程序的功能,如该应用程序主要是展示图像的,那么请求展示图像的请求实例对应的优先级高于请求数据的请求实例对应的优先级。在其他实施例中,对于同一个应用程序,对于不同优先级的请求实例也可以设置相同的预设时间、预设次数、暂缓等待时间等。在其他实施例中,对于不同的应用程序,请求实例对应的预设时间、预设次数等也可以相同,也可以不同。若该网络请求的请求实例创建成功,控制应用程序显示该网络请求被成功执行后的状态。如对于微信应用程序,若网络请求为微信好友发送的朋友圈点赞,若该网络请求的请求实例创建成功,那么请求实例创建成功的回调函数会让应用程序的前端显示该网络请求被成功执行后的状态,即点赞成功的状态。S201. Create a request instance of the network request to control an application to display a status after the network request is successfully executed. In some embodiments, 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. . For the same application, 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. In the actual execution, if there are related parameters such as a preset time, a preset number of times, and a suspension waiting time in the request instance of the network request, the relevant parameters in the request instance are taken as the priority, for example, the priority in the request instance is obtained. The preset time, the preset number of times, and the waiting time for the request instance. If there is no relevant parameter in the request instance of the network request, 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. In other embodiments, for the same application, 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. If the request instance of the network request is successfully created, 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,判断正在执行的网络请求的数量是否达到预设数量。管理中心能同时执行多个网络请求,判断正在执行的网络请求的数量是否达到预设数量,若达到预设数量,执行S203;若没有达到预设数量,执行S204。若当前没有执行网络请求,那么正在执行的网络请求的数量为零。管理中心能同时执行多个网络请求,能最大限度的利用网络资源,提高执行网络请求的效率。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,根据该请求实例的优先级将该请求实例放入对应的等待队列里等待执行。将请求实例分为不同的优先级,优先执行优先级高的对应的等待队列里的请求实例,以提高用户的体验。接着执行S202,以判断是否可以执行该请求实例,如在等待的过程中,若有请求实例成功执行,正在执行的网络请求的数量未达到预设数量,即可取出等待队列里面的请求实例来执行网络请求。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. Then, 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.
S204,根据该请求实例执行网络请求。S204. Perform a network request according to the request instance.
S205,判断网络请求是否执行成功。若网络请求执行成功,执行S206;否则,执行S207。S205. Determine whether the network request is successfully executed. If the network request is successfully executed, S206 is performed; otherwise, S207 is performed.
S206,删除该请求实例。S206. Delete the request instance.
S207,再次根据该请求实例执行网络请求。若网络请求未执行成功,接着再次根据该请求实例执行网络请求。再判断网络请求是否执行成功。S207. Perform a network request again according to the request instance. If the network request is not successfully executed, then the network request is executed again according to the request instance. Then judge whether the network request is executed successfully.
在其他实施例中,根据请求实例执行网络请求的次数不做具体限定,如三次等。In other embodiments, the number of times the network request is executed according to the request instance is not specifically limited, such as three times.
上述实施例在管理中心执行网络请求时,若管理中心正在执行的网络请求的数量达到预设数量,根据请求实例的优先级将该请求实例放入对应的等待队列里等待执行,若未达到预设数量,根据该请求实例执行网络请求;判断网络请求是否执行成功,若执行成功,删除该请求实例,若未执行成功,再次根据该请求实例执行网络请求。上述实施例可以根据请求实例的优先级来执行网络请求,以优先处理更为重要的网络请求,提升用户体验;而且,多个网络请求同时执行,最大限度利用网络资源,提高执行网络请求的效率;此外,若网络请求未执行成功,自动重新根据请求实例执行网络请求,自动多次执行网络请求,既保证网络请求能够执行成功又无需用户点击重新执行,提升用户体验。In the above embodiment, 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. In addition, if the network request is not successfully executed, 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.
图3为管理中心多次根据请求实例执行网络请求仍未成功后的方法步骤流程图,其中,该处的多次不超过预设次数,且与图2实施例的执行网络请求的次数相关联。若图2实施例执行网络请求的次数为两次,那么该处的多次即指两次;若图2实施例执行网络请求的次数为三次,那么该处的多次即指三次。优选地,图2实施例执行网络请求的次数为两次,该处的多次指两次。优选地,预设次数为五次。如图3所示,管理中心多次根据该请求实例执行网络请求仍未成功后的步骤包括S301-S310。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 . 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. Preferably, the preset number of times is five times. As shown in FIG. 3, 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,若未成功执行网络请求,判断根据该请求实例执行网络请求的次数是否达到预设次数。若未达到预设次数,执行S302;若达到预设次数,执行S307。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,根据将该请求实例的优先级将该请求实例放入对应的暂缓队列。将请求实例放入对应的暂缓队列,以间隔暂缓等待时间后继续根据请求实例执行网络请求,提高执行网络请求成功的几率。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,判断是否达到暂缓等待时间。若达到暂缓等待时间,执行S304;若未达到暂缓等待时间,继续判断是否达到暂缓等待时间。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.
S304,从暂缓队列中取出该请求实例并根据该请求实例执行网络请求。S304. The request instance is taken out from the suspension queue and the network request is executed according to the request instance.
S305,判断网络请求是否执行成功。若网络请求执行成功,执行S306;若未执行成功,执行S301。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.
S306,删除该请求实例。S306. Delete the request instance.
S307,销毁该请求实例,并获取网络请求未执行成功的原因。若根据请求实例执行网络请求的次数达到预设次数,销毁该请求实例并获取网络请求未成功执行的原因,优选为返回最后一次执行网络请求失败的原因。其中,原因包括找不到接口、找不到页面、网络中断等。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. Among them, the reasons include the interface not found, the page not found, the network interruption, and so on.
S308,根据该原因判断是否需重新创建一个与该请求实例完全相同的请求实例。若需重新创建,执行S310;若无需重新创建,执行S309。如若网络请求未成功执行的原因为找不到接口、找不到页面等,那么无需重新创建一个与该请求实例完全相同的请求实例。若该原因为网络中断等,那么需重新创建一个与该请求实例完全相同的请求实例。S308. Determine, according to the reason, whether a request instance that is identical to the request instance needs to be re-created. If it needs to be re-created, execute S310; if it is not necessary to re-create, execute S309. If the reason for the network request not being successfully executed is that the interface cannot be found, the page cannot be 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.
S309,控制应用程序显示该网络请求被成功执行之前的状态。若无需重新创建一个与该请求实例完全相同的请求实例,根据唯一标识符控制应用程序显示该网络请求被成功执行之前的状态,即撤销显示执行该网络请求成功后的状态。S309. 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,创建网络请求的请求实例。若需重新创建一个与该请求实例完全相同的请求实例,则创建网络请求的请求实例,以给该网络请求更多的请求次数,提高网络请求执行成功的几率。创建完成后,返回执行S202,即判断能同时执行网络请求的数量是否达到预设数量的步骤。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.
上述实施例在多次未成功执行网络请求后,判断根据请求实例执行网络请求的次数是否达到预设次数,若未达到预设次数,暂缓执行该网络请求,间隔暂缓等待时间之后继续根据请求实例执行网络请求,以提高网络请求执行成功的几率;若达到预设次数,即在预设次数内都执行失败,获取该网络请求未成功执行的原因。根据原因判断否需重新创建一个与该请求实例完全相同的请求实例,若需重新创建,创建网络请求的请求实例,以给该网络请求更多的请求机会,提高网络请求执行成功的几率;若无需重新创建,撤销显示的执行该网络请求成功后的状态。After the network request is not successfully executed, 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.
图4为本发明实施例提供的一种执行网络请求的装置的示意性框图。该装置40包括创建单元401、判断单元402、控制发送单元403、管理中心404。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.
创建单元401用于若应用程序启动,创建可执行应用程序网络请求的管理中心。其中,管理中心是在应用程序的本地后台创建的,管理中心为应用程序的一部分。创建管理中心包括,开辟存储空间,配置并保存一些参数等。每次应用程序启动,就创建该管理中心。每次应用程序关闭,就销毁该管理中心,以确保在应用程序没有启动的情况下,该管理中心没有销毁而占用设备资源。在管理中心可以配置并保存执行网络请求的相关参数,如预设数量、预设时间、预设次数等。The creating unit 401 is configured to create a management center that can execute an application network request if the application is started. 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.
判断单元402用于若检测到应用程序将要发送网络请求,判断该网络请求是否为预设类型的网络请求。其中,网络请求包括很多参数,如发送的接口、发送的数据量、使用的协议、目的地址等,还有一些其他的参数,如网络请求的优先级等。根据网络请求的参数判断该网络请求是否为预设类型的网络请求,其中,预设类型的网络请求是指非实时性的或者对实时性要求不高,并且不需要很快与其他设备如服务器有进一步交互的网络请求。如对于微信应用程序,网络请求可以为发送一条朋友圈、为微信好友发送的朋友圈消息点赞、评论朋友圈的消息、收藏消息或者微信打开的页面、修改微信个人资料等。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. For the WeChat application, 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.
控制发送单元403用于若该网络请求为预设类型的网络请求,控制应用程序将该网络请求发送至管理中心。控制应用程序将该网络请求发送至管理中心以在管理中心保存该网络请求,并获取管理中心为该网络请求分配的唯一标识符。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.
管理中心404用于控制应用程序显示该网络请求被成功执行后的状态并执行该网络请求。如微信应用程序,若网络请求为微信好友发送的朋友圈消息点赞,管理中心控制应用程序显示点赞成功的状态,并执行为微信好友发送的朋友圈点赞的网络请求。可以理解为,该网络请求并没有被真正执行,先显示该网络请求被成功执行后的状态;接着管理中心去执行该网络请求。如此,用户在网络情况不是很好的情况下,不必等待该网络请求真正被成功执行,用户可以获得更多的时间进行下一步其他的操作,提高了用户的体验。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.
上述实施例当应用程序启动时,创建应用程序的管理中心,若检测到应用程序将要发送网络请求,判断是否为预设类型的网络请求,若是,管理中心控制应用程序显示网络请求被成功执行后的状态并执行网络请求,节约了用户等待网络请求数据加载的时间,提高了用户的体验。In the foregoing embodiment, 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.
图5为管理中心的示意性框图,该管理中心限定了如何控制应用程序显示该网络请求被成功执行后的状态并执行该网络请求。如图5所示,管理中心50包括请求实例创建单元501、控制判断单元502、等待单元503、请求执行单元504、删除单元505、存储单元506。其中,存储单元506用于保存请求实例、以及保存配置的网络请求的相关参数等,网络请求的相关参数包括预设时间、预设次数、暂缓等待时间等。其中,预设时间可理解为一个请求实例执行一次的时间,一个请求实例执行一次可只发送一次网络请求,也可发送多次的网络请求;预设次数可理解为自动执行网络请求的次数。5 is a schematic block diagram of a management center that defines how to control an application to display a status after the network request is successfully executed and execute the network request. As shown in FIG. 5, 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.
请求实例创建单元501用于创建该网络请求的请求实例以控制应用程序显示该网络请求被成功执行后的状态。在一些实施例中,在该网络请求的请求实例中包括该请求实例的优先级,以及该请求实例对应的预设时间、该请求实例对应的预设次数、该请求实例对应的暂缓等待时间等。对于同一个应用程序,对于不同优先级的请求实例可以设置不同的预设时间、预设次数、暂缓等待时间。如若请求实例对应的数据量大,比如上传多张图片等,那么请求实例对应的预设时间、预设次数等值就会大一些。在实际执行中,若该网络请求的请求实例中有预设时间、预设次数、暂缓等待时间等相关参数,那么以该请求实例中的相关参数为准,如获取该请求实例中的优先级、该请求实例对应的预设时间、预设次数、暂缓等待时间等。若该网络请求的请求实例中没有相关参数,那么以管理中心配置的网络请求的相关参数为准。其中,请求实例的优先级可根据应用程序的功能来确定。如在同一个网页中有5个不同的请求,根据应用程序的功能,如该应用程序主要是展示图像的,那么请求展示图像的请求实例对应的优先级高于请求数据的请求实例对应的优先级。在其他实施例中,对于同一个应用程序,对于不同优先级的请求实例也可以设置相同的预设时间、预设次数、暂缓等待时间等。在其他实施例中,对于不同的应用程序,请求实例对应的预设时间、预设次数等也可以相同,也可以不同。若该网络请求的请求实例创建成功,控制应用程序显示该网络请求被成功执行后的状态。如对于微信应用程序,若网络请求为微信好友发送的朋友圈点赞,若该网络请求的请求实例创建成功,那么回调函数会让应用程序的前端显示该网络请求被成功执行后的状态,即点赞成功的状态。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. In some embodiments, 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. . For the same application, 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. In the actual execution, if there are related parameters such as a preset time, a preset number of times, and a suspension waiting time in the request instance of the network request, the relevant parameters in the request instance are taken as the priority, for example, the priority in the request instance is obtained. The preset time, the preset number of times, and the waiting time for the request instance. If there is no relevant parameter in the request instance of the network request, 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. In other embodiments, for the same application, 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. If the request instance of the network request is successfully created, 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.
控制判断单元502用于判断正在执行的网络请求的数量是否达到预设数量。管理中心能同时执行多个网络请求,判断正在执行的网络请求的数量是否达到预设数量。若当前没有执行网络请求,那么正在执行的网络请求的数量为零。管理中心能同时执行多个网络请求,能最大限度的利用网络资源,提高执行网络请求的效率。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.
等待单元503用于若正在执行的网络请求的数量达到预设数量,根据该请求实例的优先级将该请求实例放入对应的等待队列里等待执行。将请求实例分为不同的优先级,优先执行优先级高的对应的等待队列里的请求实例,以提高用户的体验。接着触发控制判断单元,以判断是否可以执行该请求实例,如在等待的过程中,若有请求实例成功执行,正在执行的网络请求的数量未达到预设数量,即可取出等待队列里面的请求实例来执行网络请求。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. Then, 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.
请求执行单元504用于若正在执行的网络请求的数量没有达到预设数量,根据该请求实例执行网络请求。另外,若在等待的过程中,若有请求实例成功执行,管理中心能同时执行网络请求的数量没有达到预设数量,即可取出等待队列里面的请求实例来执行网络请求。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.
控制判断单元502还用于判断网络请求是否执行成功。The control determining unit 502 is further configured to determine whether the network request is successfully executed.
删除单元505用于若网络请求执行成功,删除该请求实例。The deleting unit 505 is configured to delete the request instance if the network request is successfully executed.
请求执行单元504还用于若网络请求执行失败,再次根据该请求实例执行网络请求。若该请求实例未执行成功,再次根据该请求实例执行网络请求。接着触发判断单元,以判断网络请求是否执行成功。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.
上述实施例在管理中心执行网络请求时,若管理中心正在执行的网络请求的数量达到预设数量,根据请求实例的优先级将该请求实例放入对应的等待队列里等待执行,若未达到预设数量,根据该请求实例执行网络请求;判断网络请求是否执行成功,若执行成功,删除该请求实例,若未执行成功,再次根据该请求实例执行网络请求。上述实施例可以根据请求实例的优先级来执行网络请求,以优先处理更为重要的网络请求,提升用户体验;而且,多个网络请求同时执行,最大限度利用网络资源,提高执行网络请求的效率;此外,若网络请求未执行成功,自动重新根据请求实例执行网络请求,自动多次执行,既保证网络请求能够执行成功又无需用户点击重新执行,提升用户体验。In the above embodiment, 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. In addition, if the network request is not successfully executed, 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.
图6为本发明另一实施例提供的管理中心的示意性框图。该管理中心60包括请求实例创建单元601、控制判断单元602、等待单元603、请求执行单元604、删除单元605、存储单元606、暂缓单元607。该管理中心60与图5实施例中的管理中心50的主要区别在于:增加了暂缓单元607。其中,请求实例创建单元601、控制判断单元602、等待单元603、请求执行单元604、删除单元605、存储单元606请参看图5实施例的描述,在此不再赘述。该实施例与图5实施例的区别在于: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:
控制判断单元602还用于若多次未成功执行网络请求,判断根据该请求实例执行网络请求的次数是否达到预设次数。其中,该处的多次不超过预设次数,且与图2实施例的执行网络请求的次数相关联。若图2实施例执行网络请求的次数为两次,那么该处的多次即指两次;若图2实施例执行网络请求的次数为三次,那么该处的多次即指三次。优选地,图2实施例执行网络请求的次数为两次,该处的多次指两次。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.
暂缓单元607用于若根据请求实例执行网络请求的次数未达到预设次数,根据该请求实例的优先级将该请求实例放入对应的暂缓队列。将请求实例放入对应的暂缓队列,以间隔暂缓等待时间后继续根据请求实例执行网络请求,提高执行网络请求成功的几率。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.
控制判断单元602还用于判断是否达到暂缓等待时间。The control judging unit 602 is further configured to determine whether the suspension waiting time is reached.
暂缓单元607还用于若达到暂缓等待时间,从暂缓队列中取出该请求实例并根据该请求实例执行网络请求。接着触发判断单元,以判断网络请求是否执行成功。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.
删除单元605还用于若网络请求执行成功,删除该请求实例。若网络请求未执行成功,接着触发判断单元,以判断网络请求执行的次数是否达到预设次数。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.
图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实施例的区别在于: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:
销毁单元708用于若根据请求实例执行网络请求的次数达到预设次数,销毁该请求实例,并获取网络请求未成功执行的原因。优选为返回最后一次执行网络请求失败的原因。其中,原因包括找不到接口、找不到页面、网络中断等。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. Among them, the reasons include the interface not found, the page not found, the network interruption, and so on.
控制判断单元702还用于根据该原因判断是否需重新创建一个与该请求实例完全相同的请求实例。如若该原因为找不到接口、找不到页面等,那么无需重新创建一个与该请求实例完全相同的请求实例。若该原因为网络中断等,那么需重新创建一个与该请求实例完全相同的请求实例。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.
还原单元709用于若无需重新创建一个与该请求实例完全相同的请求实例,控制应用程序显示该网络请求被成功执行之前的状态。根据唯一标识符控制应用程序显示执行该网络请求成功之前的状态,即撤销显示执行该网络请求成功后的状态。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.
请求实例创建单元701还用于若需重新创建一个与该请求实例完全相同的请求实例,创建网络请求的请求实例。再次创建网络请求的请求实例,以给该网络请求更多的请求次数,提高网络请求执行成功的几率。创建完成后,接着触发控制判断单元,以判断正在执行的网络请求的数量是否达到预设数量。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.
上述执行网络请求的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图8所示的设备上运行。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.
图8为本发明实施例提供的一种执行网络请求的设备的示意性框图。该设备80包括包括一个或多个输入装置801;一个或多个输出装置802,一个或多个存储器803和一个或多个处理器804。上述输入装置801、输出装置802、存储器803和处理器804通过总线805连接。其中: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:
输入装置801用于提供用户发送网络请求、提供用户再次发送创建网络请求的请求实例的请求。具体实现中,本发明实施例的输入装置801可包括键盘、鼠标、光电输入装置、声音输入装置、触摸式输入装置等。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. In a specific implementation, 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.
输出装置802用于显示执行网络请求成功后的状态、网络请求未成功执行的原因等。具体实现中,本发明实施例的输出装置802可包括显示器、显示屏、触摸屏、声音输出装置等。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. In a specific implementation, 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.
存储器803用于存储实现执行网络请求的程序数据。其中,包括网络请求、请求实例、请求实例的优先级、预设时间、预设数量、预设次数、暂缓等待时间、暂缓队列、等待队列、同时执行网络请求的个数等,以及可调用并运行的程序。具体实现中,本发明实施例的存储器803可以是系统存储器,比如非易失性的(诸如ROM,闪存等)。具体实现中,本发明实施例的存储器803还可以是系统之外的外部存储器,比如,磁盘、光盘、磁带等。The memory 803 is used to store program data that implements a network request. The network request, the request instance, the priority of the request instance, the preset time, the preset number, the preset number of times, the suspension waiting time, the suspension queue, the waiting queue, the number of simultaneous execution of the network request, etc., and the callable The program that runs. In a specific implementation, 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.). In a specific implementation, 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.
处理器804用于运行存储器803中存储的程序数据,以执行如下步骤:The processor 804 is configured to run program data stored in the memory 803 to perform the following steps:
若应用程序启动,创建可执行所述应用程序网络请求的管理中心;若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。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.
处理器804还执行如下步骤:The processor 804 also performs the following steps:
创建所述网络请求的请求实例以控制应用程序显示所述网络请求被成功执行后的状态;判断正在执行的网络请求的数量是否达到预设数量;若未达到预设数量,根据所述请求实例执行网络请求;判断网络请求是否执行成功;若网络请求执行成功,删除所述请求实例;若网络请求在预设时间内未执行成功,再次根据所述请求实例执行网络请求。Creating a request instance of the network request to control an application to display a status after the network request is successfully executed; determining whether the number of network requests being executed reaches a preset number; if the preset quantity is not reached, according to the request instance Executing a network request; determining whether the network request is successfully executed; if the network request is successful, deleting the request instance; if the network request is not successfully executed within a preset time, performing a network request according to the request instance again.
处理器804还执行如下步骤:The processor 804 also performs the following steps:
判断根据所述请求实例执行网络请求的次数是否达到预设次数;若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列;判断是否达到暂缓等待时间;若达到暂缓等待时间,从所述暂缓队列中取出所述请求实例并根据所述请求实例执行网络请求。Determining whether the number of times the network request is executed according to the request instance reaches a preset number of times; 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 suspension queue; determining whether the waiting time is reached If the hold wait time is reached, the request instance is fetched from the hold queue and a network request is performed according to the request instance.
处理器804还执行如下步骤:The processor 804 also performs the following steps:
若根据所述请求实例执行网络请求的次数达到预设次数,销毁所述请求实例,并获取网络请求未成功执行的原因;根据所述原因判断是否需重新创建一个与所述请求实例完全相同的请求实例;若无需重新创建,控制应用程序显示所述网络请求被成功执行之前的状态;若需重新创建,则创建请求实例且返回所述判断正在执行的网络请求的数量是否达到预设数量的步骤。If the number of times the network request is executed according to the request instance reaches a preset number of times, destroying the request instance, and obtaining a reason why the network request is not successfully executed; determining, according to the reason, whether to re-create a request that is identical to the request instance. Requesting an instance; if there is no need to re-create, 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.
处理器804,还执行如下步骤:The processor 804 also performs the following steps:
若所述管理中心正在执行的网络请求的数量超过预设数量,根据所述请求实例的优先级将所述请求实例放入等待队列里等待执行;若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列,包括:若根据所述请求实例执行网络请求的次数未达到预设次数,根据所述请求实例的优先级将所述请求实例放入对应的暂缓队列。If the number of network requests being executed by the management center exceeds a preset number, 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:
若应用程序启动,创建可执行所述应用程序网络请求的管理中心;若检测到应用程序将要发送网络请求,判断所述网络请求是否为预设类型的网络请求;若所述网络请求为预设类型的网络请求,控制所述应用程序将所述网络请求发送至所述管理中心;所述管理中心控制所述应用程序显示所述网络请求被成功执行后的状态并执行所述网络请求。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.
在其中一个实施例中,该程序数据被处理器执行时还可以实现以下步骤:In one of the embodiments, the program data may be executed by the processor to implement the following steps:
创建所述网络请求的请求实例以控制应用程序显示所述网络请求被成功执行后的状态;判断正在执行的网络请求的数量是否达到预设数量;若未达到预设数量,根据所述请求实例执行网络请求;判断网络请求是否执行成功;若网络请求执行成功,删除所述请求实例;若网络请求在预设时间内未执行成功,再次根据所述请求实例执行网络请求。Creating a request instance of the network request to control an application to display a status after the network request is successfully executed; determining whether the number of network requests being executed reaches a preset number; if the preset quantity is not reached, according to the request instance Executing a network request; determining whether the network request is successfully executed; if the network request is successful, deleting the request instance; if the network request is not successfully executed within a preset time, performing a network request according to the request instance again.
在其中一个实施例中,该程序数据被处理器执行时还可以实现以下步骤:In one of the embodiments, the program data may be executed by the processor to implement the following steps:
判断根据所述请求实例执行网络请求的次数是否达到预设次数;若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列;判断是否达到暂缓等待时间;若达到暂缓等待时间,从所述暂缓队列中取出所述请求实例并根据所述请求实例执行网络请求。Determining whether the number of times the network request is executed according to the request instance reaches a preset number of times; 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 suspension queue; determining whether the waiting time is reached If the hold wait time is reached, the request instance is fetched from the hold queue and a network request is performed according to the request instance.
在其中一个实施例中,该程序数据被处理器执行时还可以实现以下步骤:In one of the embodiments, the program data may be executed by the processor to implement the following steps:
若根据所述请求实例执行网络请求的次数达到预设次数,销毁所述请求实例,并获取网络请求未成功执行的原因;根据所述原因判断是否需重新创建一个与所述请求实例完全相同的请求实例;若无需重新创建,控制应用程序显示所述网络请求被成功执行之前的状态;若需重新创建,则创建请求实例,且返回所述判断正在执行的网络请求的数量是否达到预设数量的步骤。If the number of times the network request is executed according to the request instance reaches a preset number of times, destroying the request instance, and obtaining a reason why the network request is not successfully executed; determining, according to the reason, whether to re-create a request that is identical to the request instance. Requesting an instance; if it is not necessary to re-create, 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.
在其中一个实施例中,该程序数据被处理器执行时还可以实现以下步骤:In one of the embodiments, the program data may be executed by the processor to implement the following steps:
若所述管理中心正在执行的网络请求的数量超过预设数量,根据所述请求实例的优先级将所述请求实例放入等待队列里等待执行;若根据所述请求实例执行网络请求的次数未达到预设次数,将所述请求实例放入暂缓队列,包括:若根据所述请求实例执行网络请求的次数未达到预设次数,根据所述请求实例的优先级将所述请求实例放入对应的暂缓队列。If the number of network requests being executed by the management center exceeds a preset number, 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.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置、设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the device, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, for clarity of hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, 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. In addition, 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.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, 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.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台设备 ( 可以是个人计算机,服务器,移动设备或者网络设备等 ) 执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括 :U 盘、移动硬盘、只读存储器 (ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。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. Based on such understanding, 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.) Performing all or part of the steps of the method described in various embodiments of the present invention. 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. Various media that can store program code.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any equivalent person can be easily conceived within the technical scope of the present invention by any person skilled in the art. Modifications or substitutions are intended to be included within the scope of the invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims (20)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710607890.6A CN107682389B (en) | 2017-07-24 | 2017-07-24 | Method, terminal and computer readable storage medium for executing network request |
| CN201710607890.6 | 2017-07-24 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019019249A1 true WO2019019249A1 (en) | 2019-01-31 |
Family
ID=61133081
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/099547 Ceased WO2019019249A1 (en) | 2017-07-24 | 2017-08-30 | Method, apparatus and device for executing network request, and computer-readable storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107682389B (en) |
| WO (1) | WO2019019249A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111158871A (en) * | 2019-12-05 | 2020-05-15 | 智七网络科技(上海)有限公司 | Data packet concurrency request processing method and device, electronic equipment and storage medium |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111629056B (en) * | 2020-05-27 | 2023-04-07 | 浙江百世技术有限公司 | Network request processing method and application |
| CN112231604B (en) * | 2020-06-12 | 2024-12-31 | 北京沃东天骏信息技术有限公司 | A page display method, device, electronic device and storage medium |
| CN112269710A (en) * | 2020-09-18 | 2021-01-26 | 天地互联科技(广州)有限公司 | Airborne monitoring system and monitoring method thereof |
| CN113918301B (en) * | 2021-10-20 | 2025-09-19 | 北京达佳互联信息技术有限公司 | Request processing method, request processing device, electronic equipment and storage medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102508716A (en) * | 2011-09-29 | 2012-06-20 | 用友软件股份有限公司 | Task control device and task control method |
| CN104166590A (en) * | 2013-05-20 | 2014-11-26 | 阿里巴巴集团控股有限公司 | Task scheduling method and system |
| CN105490956A (en) * | 2015-12-07 | 2016-04-13 | 方正移动传媒技术(北京)有限公司 | Network request processing method and network request processing device |
| CN106790453A (en) * | 2016-12-07 | 2017-05-31 | 竞技世界(北京)网络技术有限公司 | A kind of execution method and device of operation requests |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4240330B2 (en) * | 2006-10-24 | 2009-03-18 | ソニー株式会社 | Database creation method, database creation program, database creation device, and video content recording device |
| CN101621458A (en) * | 2008-06-30 | 2010-01-06 | 国际商业机器公司 | Method and system for asynchronous processing network requests |
| CN102750291A (en) * | 2011-04-21 | 2012-10-24 | 中国移动通信集团安徽有限公司 | User customized analysis device, communication terminal, and method and system for internet access thereof |
| CN103491162B (en) * | 2013-09-18 | 2017-03-01 | 广州华多网络科技有限公司 | Information sharing method based on mobile Internet and system |
| CN105099989B (en) * | 2014-04-24 | 2019-11-22 | 阿里巴巴集团控股有限公司 | The methods, devices and systems of service processing result are requested and obtained for processing business |
| CN106775901A (en) * | 2017-01-22 | 2017-05-31 | 上海卓悠网络科技有限公司 | A kind of data preload method and device |
-
2017
- 2017-07-24 CN CN201710607890.6A patent/CN107682389B/en active Active
- 2017-08-30 WO PCT/CN2017/099547 patent/WO2019019249A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102508716A (en) * | 2011-09-29 | 2012-06-20 | 用友软件股份有限公司 | Task control device and task control method |
| CN104166590A (en) * | 2013-05-20 | 2014-11-26 | 阿里巴巴集团控股有限公司 | Task scheduling method and system |
| CN105490956A (en) * | 2015-12-07 | 2016-04-13 | 方正移动传媒技术(北京)有限公司 | Network request processing method and network request processing device |
| CN106790453A (en) * | 2016-12-07 | 2017-05-31 | 竞技世界(北京)网络技术有限公司 | A kind of execution method and device of operation requests |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111158871A (en) * | 2019-12-05 | 2020-05-15 | 智七网络科技(上海)有限公司 | Data packet concurrency request processing method and device, electronic equipment and storage medium |
| CN111158871B (en) * | 2019-12-05 | 2024-02-23 | 智七网络科技(上海)有限公司 | Data packet concurrent request processing method and device, electronic equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107682389B (en) | 2020-02-14 |
| CN107682389A (en) | 2018-02-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019019249A1 (en) | Method, apparatus and device for executing network request, and computer-readable storage medium | |
| WO2016165556A1 (en) | Data processing method, device and system for video stream | |
| WO2019128174A1 (en) | Method for playing audio, smart television and computer-readable storage medium | |
| WO2016000560A1 (en) | File transmission method, file transmission apparatus, and file transmission system | |
| WO2015109865A1 (en) | Customized control method and system for air conditioner operation mode | |
| WO2018233370A1 (en) | Mirror synchronization method, system, device and computer readable storage medium | |
| WO2019051902A1 (en) | Terminal control method, air conditioner and computer-readable storage medium | |
| WO2018076811A1 (en) | Data sharing method, device, system, storage medium and electronic device | |
| WO2018014567A1 (en) | Method for improving performance of virtual machine, and terminal, device and computer-readable storage medium | |
| WO2014026526A1 (en) | Natural person information setting method and electronic device | |
| WO2018120430A1 (en) | Page construction method, terminal, computer-readable storage medium and page construction device | |
| WO2018113187A1 (en) | Display control method and display device | |
| WO2016058258A1 (en) | Terminal remote control method and system | |
| WO2018126888A1 (en) | Method and apparatus for configuring a shortcut for a television function | |
| WO2014000635A1 (en) | Method for reader to provide service, reader, terminal and computer storage medium | |
| WO2019052164A1 (en) | Follow-up video call method, device, apparatus, and storage medium | |
| WO2017201943A1 (en) | Method and device for driving display screen | |
| WO2017152526A1 (en) | External device automatic mounting and notification control method and system | |
| WO2017190451A1 (en) | Picture pushing method and apparatus | |
| WO2017036208A1 (en) | Method and system for extracting information in display interface | |
| WO2018006581A1 (en) | Smart-television playback method and apparatus | |
| WO2014086174A1 (en) | Image acquisition method, electronic apparatus, electronic device, and storage medium | |
| WO2019062109A1 (en) | Method of mounting disk array, android device and storage medium | |
| WO2019085301A1 (en) | Missed call feedback method, apparatus and device for fixed phone, and readable storage medium | |
| WO2019062102A1 (en) | Method of mounting disk array, android device and storage medium |
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 |