CN108337301A - Network request processing method, device, server and the storage medium of application program - Google Patents
Network request processing method, device, server and the storage medium of application program Download PDFInfo
- Publication number
- CN108337301A CN108337301A CN201810068352.9A CN201810068352A CN108337301A CN 108337301 A CN108337301 A CN 108337301A CN 201810068352 A CN201810068352 A CN 201810068352A CN 108337301 A CN108337301 A CN 108337301A
- Authority
- CN
- China
- Prior art keywords
- network request
- target network
- request
- server
- sending
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 11
- 238000000034 method Methods 0.000 claims abstract description 23
- 238000012545 processing Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 4
- 238000012544 monitoring process Methods 0.000 claims description 3
- 230000000306 recurrent effect Effects 0.000 abstract 1
- 230000003252 repetitive effect Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 230000007547 defect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 206010016754 Flashback Diseases 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
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
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本发明涉及互联网应用技术领域,尤其涉及一种应用程序的网络请求处理方法、装置、服务器及存储介质。The present invention relates to the technical field of Internet applications, in particular to a method, device, server and storage medium for processing network requests of application programs.
背景技术Background technique
近年来随着移动终端及应用程序(Application,App)的普及,丰富了人们的生活。其中,应用程序的广泛应用更是给人们的生活带来了便捷。In recent years, with the popularity of mobile terminals and application programs (Application, App), people's lives have been enriched. Among them, the wide application of application programs brings convenience to people's life.
应用程序在使用的过程中需要频繁地通过网络请求获取数据,而每个网络请求都需要一定的带宽资源、服务器资源等。当用户短时间内连续操作多次或代码缺陷等情况很有可能会出现短时间内多次重复的网络请求或一直循环请求的现象,从而造成资源浪费、服务器负担增大及影响应用程序的性能。In the process of using the application, it needs to obtain data frequently through network requests, and each network request requires certain bandwidth resources, server resources, etc. When the user operates multiple times in a short period of time or the code is defective, it is very likely that repeated network requests or cyclic requests will occur in a short period of time, resulting in waste of resources, increased server load, and impact on application performance. .
发明内容Contents of the invention
本发明实施例提供一种应用程序的网络请求处理方法、装置、服务器及存储介质,防止或减少了短时间内的重复网络请求,从而避免了资源浪费、服务器负担增大及影响应用程序的性能的现象出现。Embodiments of the present invention provide a method, device, server, and storage medium for processing network requests of application programs, which prevent or reduce repeated network requests in a short period of time, thereby avoiding resource waste, increased server load, and affecting application program performance phenomenon appears.
第一方面,本发明实施例提供了一种应用程序的网络请求处理方法,该方法包括:In a first aspect, an embodiment of the present invention provides a method for processing a network request of an application program, the method comprising:
若获取的目标网络请求不在重复请求白名单中,则将所述目标网络请求与防重复发送请求名单进行匹配;If the obtained target network request is not in the repeated request whitelist, then match the target network request with the anti-repeated sending request list;
若匹配成功,则在第一时间长度内只向服务器发送一次所述目标网络请求。If the matching is successful, the target network request is only sent to the server once within the first time period.
第二方面,本发明实施例还提供了一种应用程序的网络请求处理装置,该装置包括:In the second aspect, the embodiment of the present invention also provides an application program network request processing device, the device comprising:
匹配模块,用于若获取的目标网络请求不在重复请求白名单中,则将所述目标网络请求与防重复发送请求名单进行匹配;A matching module, configured to match the target network request with the anti-repeat sending request list if the obtained target network request is not in the repeated request whitelist;
发送模块,用于若匹配成功,则在第一时间长度内只向服务器发送一次所述目标网络请求。The sending module is configured to send the target network request to the server only once within the first time period if the matching is successful.
第三方面,本发明实施例还提供了一种服务器,该服务器包括:In a third aspect, the embodiment of the present invention also provides a server, the server includes:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序;storage means for storing one or more programs;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现第一方面中任意所述的应用程序的网络请求处理方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the network request processing method of any application program described in the first aspect.
第四方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现第一方面中任意所述的应用程序的网络请求处理方法。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for processing a network request of any application program described in the first aspect is implemented.
本发明实施例提供的应用程序的网络请求处理方法、装置、服务器及存储介质,通过将获取的不在重复请求白名单中的目标网络请求与防重复发送请求名单进行匹配,且在匹配成功后,只向服务器发送第一时间长度内一个该目标网络请求即在不影响正常网络请求的情况下,不管一定时间内发送的网络请求次数有多少,只向服务器发送一次目标网络请求,防止或减少了短时间内的重复网络请求,从而避免了资源浪费、服务器负担增大及影响应用程序的性能的现象出现。The application network request processing method, device, server, and storage medium provided by the embodiments of the present invention match the acquired target network requests that are not in the repeated request whitelist with the anti-repeated sending request list, and after the matching is successful, Only send one target network request to the server within the first time period, that is, without affecting the normal network request, no matter how many times the network request is sent within a certain period of time, only one target network request is sent to the server, preventing or reducing Repeated network requests in a short period of time, thereby avoiding the phenomenon of wasting resources, increasing the burden on the server and affecting the performance of the application.
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1是本发明实施例一中提供的一种应用程序的网络请求处理方法的流程图;FIG. 1 is a flowchart of a method for processing a network request of an application provided in Embodiment 1 of the present invention;
图2是本发明实施例二中提供的一种应用程序的网络请求处理方法的流程图;FIG. 2 is a flowchart of a method for processing a network request of an application program provided in Embodiment 2 of the present invention;
图3是本发明实施例三中提供的一种应用程序的网络请求处理装置的结构框图;FIG. 3 is a structural block diagram of an application program network request processing device provided in Embodiment 3 of the present invention;
图4是本发明实施例四中提供的一种服务器的结构示意图。FIG. 4 is a schematic structural diagram of a server provided in Embodiment 4 of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部内容。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only parts related to the present invention are shown in the drawings but not all content.
实施例一Embodiment one
图1为本发明实施例一提供的一种应用程序的网络请求处理方法的流程图,本实施例基于应用程序在使用的过程中,由于各种因素如代码缺陷或用户短时间内连续操作多次导致短时间内向服务器发送多次重复的网络请求的情况。该方法可以由本发明实施例提供的应用程序的网络请求处理装置/服务器/计算机可读存储介质来执行,该装置/服务器/计算机可读存储介质可采用软件和/或硬件的方式实现。参见图1,该方法具体包括:Fig. 1 is a flow chart of a method for processing a network request of an application program provided by Embodiment 1 of the present invention. This embodiment is based on the fact that during the use of the application program, due to various factors such as code defects or too many continuous operations by the user in a short period of time A situation that results in multiple repeated network requests being sent to the server within a short period of time. The method can be executed by the application program network request processing device/server/computer-readable storage medium provided by the embodiment of the present invention, and the device/server/computer-readable storage medium can be implemented by software and/or hardware. Referring to Figure 1, the method specifically includes:
S110,若获取的目标网络请求不在重复请求白名单中,则将目标网络请求与防重复发送请求名单进行匹配。S110. If the acquired target network request is not in the duplicate request whitelist, match the target network request with the anti-duplicate sending request list.
其中,目标网络请求是指用于向服务器发送请求以获得相应数据的请求,该请求中一般包含具有唯一名称标识的网址(URL,Universal Resource Locator)及网址中的参数字段名如时间、页数及ID等。Among them, the target network request refers to a request for sending a request to the server to obtain corresponding data, and the request generally includes a URL (Universal Resource Locator) with a unique name identifier and parameter field names in the URL such as time and page number and ID etc.
重复请求白名单是指用于存储系统或应用程序(Application,App)中需不断发送网络请求获取相关数据以保证系统或应用程序正常运行的对象,可以包括经常调用的系统对象,以及用户自定义的对象等,如按钮,可根据实际情况实时更新重复请求白名单。The repeated request whitelist refers to the objects in the storage system or application (Application, App) that need to continuously send network requests to obtain relevant data to ensure the normal operation of the system or application. It can include frequently called system objects, as well as user-defined Objects, such as buttons, can update the repeated request whitelist in real time according to the actual situation.
为了防止短时间内除重复请求白名单外其它对象出现多次重复向服务器发送网络请求现象,导致资源浪费、服务器负担增大及应用程序性能差如应用程序崩溃或闪退等情况,本实施例在应用程序端将短时间内出现过多次重复网络请求的对象存储于防重复请求发送名单中,并对其进行防重复请求操作。其中,防重复发送请求名单是指用于存储短时间内由于代码缺陷或用户连续操作多次会出现多次重复网络请求现象的对象。例如,用户在触发某应用程序功能时,由于代码缺陷,1s内同时发送了3个A请求;也可以是用户在使用QQ聊天时,为获得最新的聊天信息,在聊天界面1s内连续多次下拉以刷新聊天界面即多次重复向服务器发送网络请求以获取聊天数据,重复的发送会占用一定的网络资源以及会出现QQ卡死或闪退现象,此时可将下拉操作对应的对象和A存储于防重复请求白名单中。防重复请求操作可以是将短时间内多次获取的目标网络请求合并成1个发送给服务器,也可以是将多次中的一个发送给服务器。In order to prevent other objects from repeatedly sending network requests to the server in a short period of time except for repeated requests to the white list, resulting in waste of resources, increased burden on the server, and poor application performance such as application crashes or flashbacks, this embodiment On the application side, objects with multiple repeated network requests in a short period of time are stored in the anti-repeat request sending list, and anti-repeat request operations are performed on them. Among them, the anti-repeat sending request list refers to objects used to store multiple repeated network requests due to code defects or multiple consecutive user operations within a short period of time. For example, when a user triggers a certain application function, due to a code defect, 3 A requests are sent at the same time within 1 second; it may also be that when the user is using QQ to chat, in order to obtain the latest chat information, the user may send multiple requests in the chat interface within 1 second Pulling down to refresh the chat interface means repeatedly sending network requests to the server to obtain chat data. Repeated sending will occupy a certain amount of network resources and QQ will freeze or crash. At this time, the object corresponding to the pull-down operation and A Stored in the anti-duplicate request whitelist. The anti-repeat request operation may be to combine the target network requests obtained multiple times in a short period of time into one and send it to the server, or to send one of the multiple requests to the server.
示例性的,若目标网络请求在重复请求白名单中,则直接将目标网络请求发送给服务器,以获得相应数据。Exemplarily, if the target network request is in the repeated request whitelist, the target network request is directly sent to the server to obtain corresponding data.
此外,为了保证应用程序及系统的稳定,可选的,还可以包括:每隔第三时间长度,对防重复发送请求名单中包含的请求进行清空。其中,第三时间长度是用户预先自定义的,如24小时,可根据应用程序的性能及用户所持智能终端的性能等进行修正。具体的,每间隔24小时,会自动将防重复发送请求名单中包含的信息清空,重新进行记录。In addition, in order to ensure the stability of the application program and the system, optionally, it may also include: clearing the requests contained in the anti-repeat sending request list every third time period. Wherein, the third time length is pre-defined by the user, such as 24 hours, which can be modified according to the performance of the application program and the performance of the smart terminal held by the user. Specifically, every 24 hours, the information contained in the anti-repetition request list will be automatically cleared and recorded again.
S120,若匹配成功,则在第一时间长度内只向服务器发送一次目标网络请求。S120. If the matching is successful, only send the target network request to the server once within the first time period.
其中,第一时间长度是预先自定义的,可以根据实际情况灵活调整,如可以是0.5s。Wherein, the first time length is pre-defined and can be flexibly adjusted according to actual conditions, for example, it may be 0.5s.
具体的操作过程为:当应用程序获取到用户触发某功能向服务器发送目标网络请求时,先调用存储防重复请求发送名单文件,将该目标网络请求输入到防重复请求发送名单中进行匹配,若匹配成功,说明该目标网络请求先前出现过0.5s内多次重复请求现象,此时,则先将该目标网络请求存储在预先设定的数据库中,0.5s后再向服务器发送,如果0.5s内多次重复的获取到该目标网络请求,则只将其中的一个发送给服务器,优选的,可将最新获取的目标网络请求发送给服务器;也可以是将所有获取的目标网络请求合并处理成一个,发送给服务器。The specific operation process is: when the application program obtains that the user triggers a certain function to send a target network request to the server, it first calls the storage anti-repeat request sending list file, and enters the target network request into the anti-repeat request sending list for matching. If the matching is successful, it means that the target network request has repeatedly repeated requests within 0.5s. At this time, the target network request will be stored in the pre-set database first, and then sent to the server after 0.5s. If 0.5s If the target network request is obtained repeatedly within a period of time, only one of them is sent to the server. Preferably, the latest obtained target network request can be sent to the server; or all obtained target network requests can be combined and processed into One, sent to the server.
示例性的,若匹配不成功,则向服务器发送目标网络请求,并监测在第二时间长度内是否再次有目标网络请求;若是,则将目标网络请求添加到防重复发送请求名单中。Exemplarily, if the matching is unsuccessful, send the target network request to the server, and monitor whether there is another target network request within the second time period; if so, add the target network request to the anti-repeat sending request list.
其中,第二时间长度预先自定义的,可以根据实际情况灵活调整,如可以是1s。当获取的目标网络请求不在防重复请求名单中时,直接将该目标网络请求发送给服务器以响应用户的操作,同时异步开启观察器如创建一个与发送网络请求不相互阻塞的异步计数器,监测1s内计数器上累计次数的变化,若1s内,计数器上的数字大于1,则将该目标网络添加到防重复请求名单中;若计数器上的数字始终为1,则不进行任何操作。Wherein, the second time length is pre-defined and can be flexibly adjusted according to actual conditions, for example, it may be 1s. When the obtained target network request is not in the anti-duplication request list, directly send the target network request to the server to respond to the user's operation, and at the same time start the observer asynchronously. For example, create an asynchronous counter that does not block each other with sending network requests, and monitor for 1s If the number on the counter is greater than 1 within 1 second, the target network will be added to the anti-repeat request list; if the number on the counter is always 1, no operation will be performed.
当用户在触发某功能时,由于代码缺陷,1秒内同时发送了3个A请求;此时,A请求会被记录入防重复发送请求名单,用户再次触发该功能时,只会向服务器发送一个A请求。When the user triggers a function, due to a code defect, three A requests are sent within 1 second at the same time; at this time, the A request will be recorded in the anti-repeat request list, and when the user triggers the function again, it will only be sent to the server An A request.
本发明实施例提供的应用程序的网络请求处理方法,通过将获取的不在重复请求白名单中的目标网络请求与防重复发送请求名单进行匹配,且在匹配成功后,只向服务器发送第一时间长度内一个该目标网络请求即在不影响正常网络请求的情况下,不管一定时间内发送的网络请求次数有多少,只向服务器发送一次目标网络请求,防止或减少了短时间内的重复网络请求,从而避免了资源浪费、服务器负担增大及影响应用程序的性能的现象出现。The network request processing method of the application program provided by the embodiment of the present invention matches the obtained target network request not in the repeated request whitelist with the anti-repeated sending request list, and only sends the first time request to the server after the matching is successful. A target network request within the length means that without affecting normal network requests, no matter how many times the network requests are sent within a certain period of time, only one target network request is sent to the server, preventing or reducing repeated network requests in a short period of time , thus avoiding the phenomenon of wasting resources, increasing the burden on the server and affecting the performance of the application.
实施例二Embodiment two
图2为本发明实施例二提供的一种应用程序的网络请求处理方法的流程图,本实施例以上述实施例为基础,进一步对在第一时间长度内只向服务器发送一次目标网络请求进行优化。参见图2,该方法具体包括:Fig. 2 is a flow chart of a method for processing a network request of an application provided by Embodiment 2 of the present invention. This embodiment is based on the above embodiment, and further performs the process of sending a target network request to the server only once within the first time period. optimization. Referring to Figure 2, the method specifically includes:
S210,获取目标网络请求。S210. Obtain a target network request.
S220,判断获取的目标网络请求是否在重复请求白名单中。若是,则执行步骤S230;否则,则执行步骤S240。S220. Determine whether the acquired target network request is in the repeated request whitelist. If yes, execute step S230; otherwise, execute step S240.
S230,将目标网络请求发送给服务器。S230. Send the target network request to the server.
S240,将目标网络请求与防重复发送请求名单进行匹配。若匹配成功,则执行步骤S250;若匹配不成功,则执行步骤S270。S240. Match the target network request with the anti-repeat sending request list. If the matching is successful, execute step S250; if the matching is unsuccessful, execute step S270.
S250,拦截已获取的目标网络请求。S250, intercepting the obtained target network request.
当应用程序判断已获取的目标网络请求在防重复请求名单中时,先将该请求拦截下来,存储在预先设定的数据库中,第一时间长度后再将该目标网络请求发送给服务器。When the application judges that the acquired target network request is in the anti-repeat request list, it first intercepts the request, stores it in a preset database, and then sends the target network request to the server after a certain period of time.
S260,若再次获取目标网络请求,则将在第一时间长度内最后一次获取的目标网络请求发送给服务器。S260. If the target network request is acquired again, send the target network request acquired last within the first time period to the server.
若第一时间长度内,获取到与目标网络请求具有相同的URL且参数字段名相同的请求即重复请求时,则丢弃第一时间长度内最后一次之前获取到的所有目标网络请求,并将最后一次即最新的目标网络请求发送给服务器。If within the first time period, a request with the same URL and the same parameter field name as the target network request is obtained, that is, a repeated request, all target network requests obtained before the last time within the first time period are discarded, and the last One time, the most recent target network request is sent to the server.
S270,向服务器发送目标网络请求,并监测在第二时间长度内是否再次有目标网络请求。若是,则执行步骤S280;否则,执行步骤S230。S270. Send a target network request to the server, and monitor whether there is another target network request within a second time period. If yes, execute step S280; otherwise, execute step S230.
S280,将目标网络请求添加到防重复发送请求名单中。S280. Add the target network request to the anti-repeat sending request list.
步骤S280之后还可以包括,当用户再次操作应用程序从而触发该目标网络请求时,可按步骤S240及之后的步骤来进行操作。After step S280, it may also include that when the user operates the application program again to trigger the target network request, operations may be performed according to step S240 and subsequent steps.
本发明实施例提供的应用程序的网络请求处理方法,通过将获取的不在重复请求白名单中的目标网络请求与防重复发送请求名单进行匹配,且在匹配成功后,只向服务器发送第一时间长度内一个该目标网络请求即在不影响正常网络请求的情况下,不管一定时间内发送的网络请求次数有多少,只向服务器发送一次目标网络请求,防止或减少了短时间内的重复网络请求,从而避免了资源浪费、服务器负担增大及影响应用程序的性能的现象出现。The network request processing method of the application program provided by the embodiment of the present invention matches the obtained target network request not in the repeated request whitelist with the anti-repeated sending request list, and only sends the first time request to the server after the matching is successful. A target network request within the length means that without affecting normal network requests, no matter how many times the network requests are sent within a certain period of time, only one target network request is sent to the server, preventing or reducing repeated network requests in a short period of time , thus avoiding the phenomenon of wasting resources, increasing the burden on the server and affecting the performance of the application.
实施例三Embodiment three
图3为本发明实施例三提供的一种应用程序的网络请求处理装置的结构框图,该装置可执行本发明任意实施例所提供的应用程序的网络请求处理方法,具备执行方法相应的功能模块和有益效果。如图3所示,该装置可以包括:Fig. 3 is a structural block diagram of an application program network request processing device provided in Embodiment 3 of the present invention, the device can execute the application program network request processing method provided in any embodiment of the present invention, and has corresponding functional modules for executing the method and beneficial effects. As shown in Figure 3, the device may include:
匹配模块310,用于若获取的目标网络请求不在重复请求白名单中,则将目标网络请求与防重复发送请求名单进行匹配;The matching module 310 is configured to match the target network request with the anti-repeat sending request list if the obtained target network request is not in the repeated request whitelist;
发送模块320,用于若匹配成功,则在第一时间长度内只向服务器发送一次目标网络请求。The sending module 320 is configured to send the target network request to the server only once within the first time period if the matching is successful.
本发明实施例提供的应用程序的网络请求处理装置,通过将获取的不在重复请求白名单中的目标网络请求与防重复发送请求名单进行匹配,且在匹配成功后,只向服务器发送第一时间长度内一个该目标网络请求即在不影响正常网络请求的情况下,不管一定时间内发送的网络请求次数有多少,只向服务器发送一次目标网络请求,防止或减少了短时间内的重复网络请求,从而避免了资源浪费、服务器负担增大及影响应用程序的性能的现象出现。The network request processing device of the application program provided by the embodiment of the present invention matches the obtained target network request not in the repeated request whitelist with the anti-repeated sending request list, and only sends the first time request to the server after the matching is successful. A target network request within the length means that without affecting normal network requests, no matter how many times the network requests are sent within a certain period of time, only one target network request is sent to the server, preventing or reducing repeated network requests in a short period of time , thus avoiding the phenomenon of wasting resources, increasing the burden on the server and affecting the performance of the application.
示例性的,上述装置还可以包括:Exemplarily, the above-mentioned device may also include:
发送模块320还用于在将目标网络请求与防重复发送请求名单进行匹配之后,若匹配不成功,则向服务器发送目标网络请求;The sending module 320 is also used to send the target network request to the server if the matching is unsuccessful after matching the target network request with the anti-duplicate sending request list;
监测模块,用于监测在第二时间长度内是否有目标网络请求;A monitoring module, configured to monitor whether there is a target network request within the second time period;
添加模块,用于若第二时间长度内再次有目标网络请求,则将目标网络请求添加到防重复发送请求名单中。The adding module is used to add the target network request to the anti-repeat sending request list if there is another target network request within the second time period.
可选的,发送模块320具体可以用于:拦截已获取的目标网络请求;若再次获取目标网络请求,则将在第一时间长度内最后一次获取的网络请求发送给服务器。Optionally, the sending module 320 may be specifically configured to: intercept the obtained target network request; if the target network request is obtained again, send the last obtained network request within the first time period to the server.
示例性的,上述装置还可以包括:Exemplarily, the above-mentioned device may also include:
清空模块,用于每隔第三时间长度,对防重复发送请求名单中包含的请求进行清空。The clearing module is used to clear the requests contained in the anti-repeat sending request list every third time period.
实施例四Embodiment four
图4为本发明实施例四提供的一种服务器的结构示意图。图4示出了适于用来实现本发明实施方式的示例性服务器12的框图。图4显示的服务器12仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。FIG. 4 is a schematic structural diagram of a server provided by Embodiment 4 of the present invention. Figure 4 shows a block diagram of an exemplary server 12 suitable for use in implementing embodiments of the present invention. The server 12 shown in FIG. 4 is only an example, and should not limit the functions and scope of use of this embodiment of the present invention.
如图4所示,该服务器12以通用计算设备的形式表现。该服务器12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in FIG. 4, the server 12 takes the form of a general-purpose computing device. Components of the server 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting various system components (including the system memory 28 and the processing unit 16).
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures. These architectures include, by way of example, but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect ( PCI) bus.
服务器12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被服务器12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。Server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by server 12 and include both volatile and nonvolatile media, removable and non-removable media.
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)30和/或高速缓存存储器32。服务器12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图4未显示,通常称为“硬盘驱动器”)。尽管图4中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。系统存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32 . The server 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard drive"). Although not shown in FIG. 4, a disk drive for reading and writing to removable nonvolatile disks (e.g., "floppy disks") may be provided, as well as for removable nonvolatile optical disks (e.g., CD-ROM, DVD-ROM or other optical media) CD-ROM drive. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present invention.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如系统存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本发明所描述的实施例中的功能和/或方法。Program/utility 40 may be stored, for example, in system memory 28 as a set (at least one) of program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include the implementation of the network environment. Program modules 42 generally perform the functions and/or methodologies of the described embodiments of the invention.
服务器12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该设备交互的设备通信,和/或与使得该服务器12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,服务器12还可以通过网络适配器20与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与服务器12的其它模块通信。应当明白,尽管图中未示出,可以结合服务器12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。Server 12 may also be in communication with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable user interaction with the device, and/or communicate with the 12. Any device (eg, network card, modem, etc.) capable of communicating with one or more other computing devices. Such communication may occur through input/output (I/O) interface 22 . Moreover, the server 12 can also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN) and/or a public network, such as the Internet) through the network adapter 20 . As shown, network adapter 20 communicates with other modules of server 12 via bus 18 . It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with server 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and Data backup storage system, etc.
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现本发明实施例所提供的应用程序的网络请求处理方法。The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28 , for example, implementing the network request processing method of the application program provided by the embodiment of the present invention.
实施例五Embodiment five
本发明实施例五还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时可实现上述实施例中任一的应用程序的网络请求处理方法。Embodiment 5 of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for processing a network request of any application program in any of the above embodiments can be implemented.
本发明实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是但不限于:电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium in the embodiments of the present invention may use any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer-readable storage medium may be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections with one or more leads, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying computer readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络包括局域网(LAN)或广域网(WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present invention may be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. Where a remote computer is involved, the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g. via the Internet using an Internet Service Provider). .
上述实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments are for description only, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个计算装置上,或者分布在多个计算装置所组成的网络上,可选地,他们可以用计算机装置可执行的程序代码来实现,从而可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件的结合。Those of ordinary skill in the art should understand that each module or each step of the present invention described above can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed on a network formed by multiple computing devices. Optionally, they can be implemented with executable program codes of computer devices, so that they can be stored in storage devices and executed by computing devices, or they can be made into individual integrated circuit modules, or a plurality of modules in them Or the steps are fabricated into a single integrated circuit module to realize. As such, the present invention is not limited to any specific combination of hardware and software.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间的相同或相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.
以上所述仅为本发明的优选实施例,并不用于限制本发明,对于本领域技术人员而言,本发明可以有各种改动和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810068352.9A CN108337301A (en) | 2018-01-24 | 2018-01-24 | Network request processing method, device, server and the storage medium of application program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810068352.9A CN108337301A (en) | 2018-01-24 | 2018-01-24 | Network request processing method, device, server and the storage medium of application program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN108337301A true CN108337301A (en) | 2018-07-27 |
Family
ID=62926455
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810068352.9A Pending CN108337301A (en) | 2018-01-24 | 2018-01-24 | Network request processing method, device, server and the storage medium of application program |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108337301A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110633195A (en) * | 2019-09-29 | 2019-12-31 | 北京博睿宏远数据科技股份有限公司 | Performance data display method, device, electronic equipment and storage medium |
| CN110855767A (en) * | 2019-11-06 | 2020-02-28 | 北京字节跳动网络技术有限公司 | Method, device, equipment and storage medium for responding operation request |
| CN111918236A (en) * | 2020-08-10 | 2020-11-10 | 上海顺舟智能科技股份有限公司 | Internet of things security sensor network searching method, device, equipment and storage medium |
| CN112988881A (en) * | 2019-12-13 | 2021-06-18 | Oppo广东移动通信有限公司 | Data synchronization method and device and computer readable storage medium |
| CN113704592A (en) * | 2021-08-02 | 2021-11-26 | 北京达佳互联信息技术有限公司 | Network request sending method and device, electronic equipment and storage medium |
| CN115758033A (en) * | 2022-12-22 | 2023-03-07 | 鼎道智联(北京)科技有限公司 | Interface request processing method and device, electronic equipment and storage medium |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101882161A (en) * | 2010-06-23 | 2010-11-10 | 中国工商银行股份有限公司 | Application level asynchronous task scheduling system and method |
| CN102761604A (en) * | 2012-06-11 | 2012-10-31 | 深圳中兴网信科技有限公司 | Request processing system, request processing method and server |
| CN103518361A (en) * | 2011-03-11 | 2014-01-15 | 谷歌公司 | Opportunistic network updates |
| US20140040415A1 (en) * | 2012-08-06 | 2014-02-06 | Suresh Mathew | Systems and methods for caching http post requests and responses |
| CN103685326A (en) * | 2012-08-31 | 2014-03-26 | 盐城睿泰数字科技有限公司 | WEB concurrent data transmission method and WEB application system |
| CN106302090A (en) * | 2015-05-25 | 2017-01-04 | 阿里巴巴集团控股有限公司 | A kind of message treatment method, Apparatus and system |
| CN106412630A (en) * | 2016-09-23 | 2017-02-15 | Tcl集团股份有限公司 | Video list switch control method and apparatus |
| CN106465234A (en) * | 2014-06-30 | 2017-02-22 | 英特尔Ip公司 | Prevent mobile devices from repeating requests towards the mobile network |
| CN107391277A (en) * | 2017-07-17 | 2017-11-24 | 北京京东尚科信息技术有限公司 | Information processing method and device |
-
2018
- 2018-01-24 CN CN201810068352.9A patent/CN108337301A/en active Pending
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101882161A (en) * | 2010-06-23 | 2010-11-10 | 中国工商银行股份有限公司 | Application level asynchronous task scheduling system and method |
| CN103518361A (en) * | 2011-03-11 | 2014-01-15 | 谷歌公司 | Opportunistic network updates |
| CN102761604A (en) * | 2012-06-11 | 2012-10-31 | 深圳中兴网信科技有限公司 | Request processing system, request processing method and server |
| US20140040415A1 (en) * | 2012-08-06 | 2014-02-06 | Suresh Mathew | Systems and methods for caching http post requests and responses |
| CN103685326A (en) * | 2012-08-31 | 2014-03-26 | 盐城睿泰数字科技有限公司 | WEB concurrent data transmission method and WEB application system |
| CN106465234A (en) * | 2014-06-30 | 2017-02-22 | 英特尔Ip公司 | Prevent mobile devices from repeating requests towards the mobile network |
| CN106302090A (en) * | 2015-05-25 | 2017-01-04 | 阿里巴巴集团控股有限公司 | A kind of message treatment method, Apparatus and system |
| CN106412630A (en) * | 2016-09-23 | 2017-02-15 | Tcl集团股份有限公司 | Video list switch control method and apparatus |
| CN107391277A (en) * | 2017-07-17 | 2017-11-24 | 北京京东尚科信息技术有限公司 | Information processing method and device |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110633195A (en) * | 2019-09-29 | 2019-12-31 | 北京博睿宏远数据科技股份有限公司 | Performance data display method, device, electronic equipment and storage medium |
| CN110633195B (en) * | 2019-09-29 | 2023-01-03 | 北京博睿宏远数据科技股份有限公司 | Performance data display method and device, electronic equipment and storage medium |
| CN110855767A (en) * | 2019-11-06 | 2020-02-28 | 北京字节跳动网络技术有限公司 | Method, device, equipment and storage medium for responding operation request |
| CN112988881A (en) * | 2019-12-13 | 2021-06-18 | Oppo广东移动通信有限公司 | Data synchronization method and device and computer readable storage medium |
| CN111918236A (en) * | 2020-08-10 | 2020-11-10 | 上海顺舟智能科技股份有限公司 | Internet of things security sensor network searching method, device, equipment and storage medium |
| CN113704592A (en) * | 2021-08-02 | 2021-11-26 | 北京达佳互联信息技术有限公司 | Network request sending method and device, electronic equipment and storage medium |
| CN113704592B (en) * | 2021-08-02 | 2023-10-17 | 北京达佳互联信息技术有限公司 | Network request sending method and device, electronic equipment and storage medium |
| CN115758033A (en) * | 2022-12-22 | 2023-03-07 | 鼎道智联(北京)科技有限公司 | Interface request processing method and device, electronic equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108337301A (en) | Network request processing method, device, server and the storage medium of application program | |
| US10552348B2 (en) | USB device access method, apparatus and system, a terminal, and a server | |
| US10198343B2 (en) | Method for debugging a computer program | |
| WO2019205371A1 (en) | Server, message allocation method, and storage medium | |
| CN112433920B (en) | A method, device, equipment and medium for reporting buried data | |
| CN110825456A (en) | Loading time calculation method and device, computer equipment and storage medium | |
| WO2020177734A1 (en) | App triggering method, computer device, and storage medium | |
| CN110881224B (en) | Network long connection method, device, equipment and storage medium | |
| CN111324441A (en) | Operating environment switching method and device, computer equipment and storage medium | |
| CN108052407A (en) | A kind of application crash means of defence, device, equipment and storage medium | |
| CN113760242B (en) | Data processing method, device, server and medium | |
| CN113779452B (en) | Data processing method, device, equipment and storage medium | |
| EP3866031A1 (en) | Webpage loading method, intermediate server, and webpage loading system | |
| CN111371585A (en) | Configuration method and device for CDN node | |
| CN112988539B (en) | A visual server monitoring system and method | |
| CN113722116B (en) | A method, apparatus, device, and medium for transmitting debug messages. | |
| CN110727523B (en) | Service request processing method, service request processing device and readable storage medium | |
| CN116319810A (en) | Distributed system flow control method, device, equipment, medium and product | |
| CN108055594B (en) | Edge slicing implementation method and device, computer equipment and storage medium | |
| CN119356864A (en) | Data processing method, device, electronic device and storage medium | |
| CN114185682B (en) | Log output method and device, electronic equipment and storage medium | |
| CN113190237B (en) | Data processing methods, systems and devices | |
| CN115640968A (en) | Job scheduling method and device, electronic equipment and storage medium | |
| CN111988195B (en) | Response scheme determination method, device, equipment and medium for packet test | |
| CN115033410B (en) | Abnormal link tracking method, system, gateway and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180727 |
|
| RJ01 | Rejection of invention patent application after publication |