Method and system for processing network requests

A network request and processing method technology, applied in the computer field, can solve problems such as limited optimization effects, and achieve the effects of reducing waiting time, low software development and maintenance costs, and reducing quantity

Active Publication Date: 2022-07-05
FUJIAN TQ DIGITAL
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] However, there are not many cases where the same interface requests appear when the Android application is running. The method of reducing the number of network requests by merging the same requests has limitations, and the overall optimization effect is limited.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for processing network requests
  • Method and system for processing network requests
  • Method and system for processing network requests

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0080] Please refer to figure 1 and figure 2 , the first embodiment of the present invention is:

[0081] A network request processing method, comprising the steps of:

[0082] S1. The local proxy server receives network requests initiated by all network connection libraries in the local application, and determines whether the current state reaches the preset merged state. If so, merges the currently received N network requests, and obtains and sends the merged request. Data package, among which, the network connection library includes Socket, URLConnection and OkHttp, etc. The ip provided by the local proxy server is 127.0.0.1, and the port defaults to 9000. When the port has a conflict, it will automatically increase by one until there is no conflict;

[0083] In this embodiment, step S1 is specifically:

[0084] S11. The local proxy server receives network requests initiated by all network connection libraries in the local application;

[0085] S12, the local proxy ser...

Embodiment 2

[0122] Please refer to figure 1 , the second embodiment of the present invention is:

[0123] A network request processing method, on the basis of the above-mentioned first embodiment, step S1 and step S4 further include:

[0124] The local proxy server reads all request information of each network request, including request address, request alias, request data and business data;

[0125] After step S4, it also includes steps:

[0126] The local proxy server determines whether each network request is abnormal according to all the request information of each network request, and if so, stores all the abnormal request information;

[0127] When the local application starts, the local proxy server reports all the stored abnormal request information to the network request monitoring server.

[0128] Therefore, by setting the local proxy server, all the information requested by the network can be obtained in the local proxy service, and the monitoring requirements of all network...

Embodiment 3

[0129] Please refer to image 3 and Figure 4 , the third embodiment of the present invention is:

[0130] A network request processing system 1 includes a local proxy server 2 and a remote proxy server 5. The local proxy server 2 includes a first memory 4, a first processor 3, and is stored on the first memory 4 and can be stored in the first processor 3. A first computer program running on the remote proxy server 5 includes a second memory 7, a second processor 6 and a second computer program stored on the second memory 7 and running on the second processor 6, the first processing When the processor 3 executes the first computer program, the corresponding steps in the first embodiment or the second embodiment are realized; when the second processor 6 executes the second computer program, the corresponding steps in the first embodiment or the second embodiment are realized.

[0131] like image 3 and Figure 4 As shown, the local proxy server 2 is connected with the netwo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a network request processing method and system. The local proxy server combines and sends all network requests according to the combining strategy, and the remote proxy server receives, decomposes and restores them into N network requests. According to the request content of each network request Initiate a service request to the corresponding service server, the remote proxy server will combine and send each received service data, and the local proxy server will receive, decompose, restore and sequentially distribute to the corresponding network connection library; the invention realizes multiple The combination of requests and multiple results greatly reduces the number of network requests and the waiting time, optimizes the power consumption of the device, and improves the smooth user experience; through the local proxy service, the use of the original network connection library is basically unchanged. On the premise of the method, it can meet the combined requirements of all network connection libraries, and the software development and maintenance costs are low.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method and system for processing a network request. Background technique [0002] The network connectivity library within existing mobile applications is diverse and includes the following: [0003] 1. Socket: Java SDK (Software Development Kit software development tool) provides tools for TCP / IP to connect to the server through the network; [0004] 2. URLConnection: The URLConnection class itself relies on the Socket class to implement network connections. It is generally believed that the URLConnection class provides an easier-to-use, higher-level network connection abstraction than the Socket class. The Android SDK also provides good support for HTTP (Hypertext Transfer Protocol). Starting from Android API 23, Google recommends using HttpURLConnection for network access operations; [0005] 3. OkHttp: Android is an open source project for processing network req...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): H04L67/566H04L67/5651
CPCH04L67/5651H04L67/566
Inventor 刘德建王跃杰郭玉湖陈宏
Owner FUJIAN TQ DIGITAL
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products