CN109561457B - Method, device and system for optimizing client network - Google Patents

Method, device and system for optimizing client network Download PDF

Info

Publication number
CN109561457B
CN109561457B CN201811569832.XA CN201811569832A CN109561457B CN 109561457 B CN109561457 B CN 109561457B CN 201811569832 A CN201811569832 A CN 201811569832A CN 109561457 B CN109561457 B CN 109561457B
Authority
CN
China
Prior art keywords
network
client
user
data
network request
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.)
Active
Application number
CN201811569832.XA
Other languages
Chinese (zh)
Other versions
CN109561457A (en
Inventor
申义亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Tongchuang Jialian Technology Co ltd
Original Assignee
Hainan Xinruan Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hainan Xinruan Software Co ltd filed Critical Hainan Xinruan Software Co ltd
Priority to CN201811569832.XA priority Critical patent/CN109561457B/en
Publication of CN109561457A publication Critical patent/CN109561457A/en
Application granted granted Critical
Publication of CN109561457B publication Critical patent/CN109561457B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a method, a device and a system for optimizing a client network, wherein a client acquires a user type and a network state, and determines a network request address according to the user type and the network state; sending a network request to a server according to the network request address; the server provides different data interfaces according to the network request; and returning data to the client according to the data interface. According to the technical scheme, different domain names can be provided according to the types of the users to access the server, different data interfaces are requested according to different equipment network states of the users, the conditions of time consumption and flow consumption of network requests are reduced, and the client can quickly acquire required data.

Description

Method, device and system for optimizing client network
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for optimizing a client network.
Background
The fire currency cloud client comprises functions of announcement, expanding, market quotation, trading, order form, user correlation and the like. The functions are implemented in the client side by interacting with the server side, that is, each function requires the server side to provide a corresponding data interface. The client and the server interact with each other, that is, data needs to be transmitted and received through the network.
However, since the coin cloud servers are all foreign regions, the domestic user needs to send a request to the foreign server by using the coin cloud client, and then the foreign server is mapped to the corresponding designated server through configuration. The network request mode has a large amount of time-consuming situations, and the data interface of the server cannot be requested for a long time. Meanwhile, the interface display of the client is drawn by a program, if the data size displayed on the page is large, the client can also cause the problem of blocking when drawing, the first page of the fire currency cloud client displays a 7-day trend graph of the digital asset index, the number of data returned by the interface data each time is nearly 1 ten thousand, and the situation of refreshing the trend graph in real time can also cause the first page to block. In addition, the market condition module of the fire currency cloud client needs to establish long connection with the server through a WebSocket protocol, flow consumption can be caused by frequent requests for data interfaces such as a currency type list and a transaction pair list, and meanwhile, the radio frequency module can be always in an active state due to frequent requests for the server, so that power consumption is increased.
Therefore, how to optimize the network of the coin cloud client becomes a problem to be solved by those skilled in the art.
Disclosure of Invention
The application provides a method, a device and a system for optimizing a client network, which are used for optimizing the problems existing in a fire currency cloud client network.
In one aspect, the present application provides a method for client network optimization, where the method includes:
acquiring user types and network states, wherein the user types comprise domestic users and foreign users, and the network states comprise WiFi states and data traffic states;
determining a network request address according to the user type and the network state;
sending a network request to a server according to the network request address;
providing different data interfaces according to the network request;
and returning data to the client according to the data interface.
With reference to the first aspect, the step of obtaining the user type includes:
acquiring a device time zone and/or an SIM card provider code of a device where a client is located;
and judging the user type according to the equipment time zone and/or the SIM card provider code.
With reference to the first aspect, the step of determining a network request address according to the user type and the network status includes:
judging the type of the user;
if the user is a domestic user, directly using a private line domain name provided by a network provider as a network request domain name;
if the user is a foreign user, using the original domain name of the client as the network request domain name;
determining a corresponding address according to the network request domain name;
and splicing the quality parameters behind the address according to the network state to obtain a network request address.
With reference to the first aspect, the step of providing different data interfaces according to network requests includes:
acquiring quality parameters according to the network request address;
determining the network state of the client sending the request according to the quality parameters;
and providing different data interfaces according to the network state.
With reference to the first aspect, after returning data to the client according to the data interface, the method further includes:
caching the returned data;
setting the effective time of the cache;
and directly extracting the data in the cache according to the network request within the effective time.
In combination with the first aspect, the method further comprises: and setting different network request frequencies according to the network state.
With reference to the first aspect, the data interface transmits data using a protocol buffer format.
In combination with the first aspect, the method further comprises:
monitoring whether equipment where a client is located is in a dormant state;
if the equipment is in a dormant state, stopping sending a network request to a server;
if the device is not in a dormant state, a network request is sent to a server.
In a second aspect, the present application provides an apparatus for client network optimization, including:
the information acquisition unit is used for acquiring user types and network states, wherein the user types comprise domestic users and foreign users, and the network states comprise WiFi states and data traffic states;
a request address determining unit, configured to determine a network request address according to the user type and the network state;
a request sending unit, configured to send a network request to a server according to the network request address;
the interface distribution unit is used for providing different data interfaces according to the network request;
and the data sending unit is used for returning data to the client according to the data interface.
In a third aspect, the present application provides a system for client network optimization, including:
the system comprises a client and a server which is in communication connection with the client;
the client is used for acquiring user types and network states, wherein the user types comprise domestic users and foreign users, and the network states comprise WiFi states and data traffic states; determining a network request address according to the user type and the network state; sending a network request to a server according to the network request address;
the server is used for providing different data interfaces according to the network request; and returning data to the client according to the data interface.
According to the technical scheme, the method, the device and the system for optimizing the client network are provided, the client acquires the user type and the network state, and the network request address is determined according to the user type and the network state; sending a network request to a server according to the network request address; the server provides different data interfaces according to the network request; and returning data to the client according to the data interface. According to the technical scheme, different domain names can be provided according to the types of the users to access the server, different data interfaces are requested according to different equipment network states of the users, the time consumption and flow consumption of network requests are reduced, and the client can rapidly acquire required data.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiment will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive laboriousness.
Fig. 1 is a flowchart of a first embodiment of a method for client network optimization according to the present application;
FIG. 2 is a flow chart of a second embodiment of a method for client network optimization provided herein;
FIG. 3 is a flowchart of a third embodiment of a method for client network optimization provided herein;
FIG. 4 is a flowchart of a fourth embodiment of a method for client network optimization as provided herein;
fig. 5 is a flowchart of a fifth embodiment of a method for client network optimization provided in the present application;
fig. 6 is a flowchart of a sixth embodiment of a method for client network optimization provided in the present application;
fig. 7 is a block diagram of a client network optimization apparatus provided in the present application;
fig. 8 is a schematic diagram of a client network optimization system provided in the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
Referring to fig. 1, the present application provides a first embodiment of a method of client network optimization, comprising:
step 101, obtaining a user type and a network state, wherein the user type comprises a domestic user and a foreign user, and the network state comprises a WiFi state and a data traffic state. The user types are different, which means that the areas where the users use the clients are different, and may be abroad or domestic, and different users have different network addresses and network domain names due to the limitation of regional networks, so that the operation of accessing the same server by using the same client is not practical, for example, if the server supporting the client is mostly in a japanese area, the domestic users need to send the request to the foreign server first when using the client, and then the foreign server maps the request to the corresponding designated server for processing through configuration. Therefore, for different types of users, the technical scheme of the application adopts different domain names to access the server so as to solve the problem of time consumption.
In addition, the network status of the user is also an important issue affecting the user to use the client, and if the user is in a data traffic status, when the client frequently requests a data interface required in the client, the client consumes a particularly large amount of data traffic. Therefore, the method and the device also provide a solution for the problem of flow consumption, and perform different operations by judging the network state of the user, so as to reduce the flow consumption.
And step 102, determining a network request address according to the user type and the network state. The user types are divided into domestic users and foreign users, whether the user is a domestic user is judged by obtaining the equipment time zone and the SIM card provider code of user equipment, different request domain names are used according to the user types, and addresses corresponding to the domain names are modified according to the network states, so that the addresses contain network state information, and the control of the use flow is facilitated.
And 103, sending a network request to a server according to the network request address. The network request address is used for representing the address of the client, the server can find the client according to the address and return required data to the client, and the network request comprises the network request address of the client and information of the data to be requested.
And 104, providing different data interfaces according to the network request. Since the network status of the user may affect the traffic used, the data returned by the server may have different formats depending on the network status in order to control the traffic usage. For example, for a request in a WiFi state of a client, a data format returned by a server is different from a data format returned by a server in a non-WiFi state of the client, and specifically, to ensure that the data formats are different, the server needs to provide different interfaces to transmit different data, so as to reduce traffic consumption of the client.
And 105, returning data to the client according to the data interface.
According to the scheme, the method for optimizing the client network can provide different domain names to access the server according to the types of the users, and request different data interfaces according to different equipment network states of the users, so that the time consumption and flow consumption of network requests are reduced, and the client can quickly acquire required data.
Referring to fig. 2, the present application provides a second embodiment of a method for client network optimization, which is different from the first embodiment in that the step of obtaining a user type includes:
step 201, obtaining the device time zone and/or the SIM card provider code of the device where the client is located. The time zones commonly used in China are listed As ia/Chongqing, Asia/Harbin, Asia/Shanghai, Asia/Urumqi, Asia/Kashgar, Asia/Hong _ Kong, Asia/Macau, Asia/Taipei. Get the time zone through timezone. getdefault () method in Android device usually, judge whether the time zone is in the common time zone list, if in the common time zone list, the device is in china, use this device to be used for domestic users.
The SIM card provider codes comprise 46000 China Mobile, 46002 China Mobile, 4600 China Unicom and 46003 telecom. Generally, a telephonymanager.getsimoperator () method can be used in an Android device to obtain a SIM card provider code, and then whether the SIM card provider code is in 46000, 46002, 46001, and 46003 is judged, and if so, it can also be stated that a device user using the SIM card is a domestic user.
Step 202, determining the user type according to the device time zone and/or the SIM card provider code. Any one of the above-mentioned methods in step 201 may be used to determine the user type alone, or the two methods may be used in combination to determine, so that the determination result is more accurate.
The method for optimizing the client network provided in the second embodiment of the present application may further determine the user type by determining the device time zone and the provider of the SIM card, so as to facilitate network optimization for different users by adopting different means, and reduce the time consumption of network requests.
Referring to fig. 3, the present application provides a third embodiment of a method for client network optimization, which is different from the second embodiment in that the step of determining a network request address according to the user type and the network status includes:
step 301, judging the user type. Specifically, the method for determining the user type may be either one of the two methods in the second embodiment or a combination of the two methods.
Step 302, if the user is a domestic user, the private line domain name provided by the network provider is directly used as the network request domain name. The private line domain name is ClouExchangePrivatedDomain, and a cloudExchange field is added in a header of a request to distinguish different cloud client requests.
Step 303, if the user is a foreign user, the original domain name of the client is used as the domain name of the network request, i.e. the default domain name of cloudshangedefaultdomain is used.
Step 304, determining a corresponding address according to the network request domain name; the domain name is a character identifier for identifying and locating a computer hierarchical structure on the internet, and corresponds to an internet protocol address of the computer. The address schemes in the network are divided into two sets: an IP address system and a domain name address system. The two sets of address systems are in one-to-one correspondence relationship. Because the IP address is a digital mark and is difficult to memorize and write when in use, a symbolic address scheme is developed on the basis of the IP address to replace a digital IP address. Each of the symbolized addresses corresponds to a particular IP address, so that resources on the network are much easier to access. This character-type address, which corresponds to a numeric IP address on the network, is called a domain name. The address in this application is an IP address.
And 305, splicing the quality parameters behind the address according to the network state to obtain a network request address. The quality parameter is represented by a quality parameter, the quality parameter has two choices of normal and thumbnail, and the server returns the corresponding data resource according to the quality parameter choice.
According to the method for optimizing the client network provided by the third embodiment of the application, the request address of the user is modified according to different network states of the user, so that the server can acquire information of the network state of the user from the address and send back different data to the client according to different network states, and the client can save data traffic in a non-WiFi state.
Referring to fig. 4, the present application provides a fourth embodiment of a method for client network optimization, which is different from the third embodiment in that the step of providing different data interfaces according to network requests comprises:
step 401, obtaining quality parameters according to the network request address. The method in the fourth embodiment of the present application is specifically executed by a server, and after receiving a network request sent by a client, the server further obtains a quality parameter from an address of the client, and determines a network state of a user according to the quality parameter.
Step 402, determining the network state of the client sending the request according to the quality parameter. According to the above, the quality parameters include both normal and thumbnai, in the technical solution of the present application, normal may represent a network state with a better signal, thumbnai may represent a network state with a poorer signal, or normal may represent that a user can receive data or resources with a better quality, and thumbnai may represent that a user can receive data or resources with a lower quality. Further, the WiFi status of the user can be represented by normal quality parameters, and the data traffic status of the user can be represented by thumbnai.
Step 403, providing different data interfaces according to the network state. For example, a client user requests a picture resource, but the user uses data traffic, and at this time, the server provides a data interface to send a thumbnail back to the client, so as to reduce the use of data volume; if the user uses WiFi, the server provides a different interface to send the original image of the requested picture back to the client.
Therefore, the method for optimizing the client network provided in the fourth embodiment of the present application can provide different data interfaces to return data resources to the client according to different network states of the user client, so that the client can save data traffic in a non-WiFi state.
Referring to fig. 5, the present application provides a fifth embodiment of a method for client network optimization, where the fifth embodiment is different from the first embodiment in that after returning data to a client according to a data interface, the method further includes:
step 501, caching the returned data. According to the technical scheme, a network caching technology is added through an OKHttp framework to cache data returned by a server, and the specific implementation is that network caching is set under a cache directory of a client through a cache () method provided by an OkhttpClient.
Step 502, setting the effective time of the cache. The purpose of the pledge of the cache data in the application is to reduce the situation that the content of the same data is repeatedly sent to the server for a period of time, so that the traffic is consumed. The effective time refers to the storage time of the data in the cache, the time is set differently according to the difference of the request content and the request frequency of the client, if the request frequency of a user for a certain content is very high, the effective time of the cache can be set longer, and in the effective time, only the data of the content is taken out from the cache and returned to the client, so that the frequency of the request sent from the client to the server can be reduced, and if the user is in a data flow state, the data flow can be saved for the user.
Step 503, in the valid time, directly extracting the data in the cache according to the network request. When the effective time of the cache is over, the latest returned data of the server can be cached again, and then the data is continuously extracted from the cache in the next effective time.
The technical scheme of the fifth embodiment of the application provides a method for establishing a cache for data returned by a server, so that a client can directly acquire the data from the cache within an effective time, repeated data sending requests to the server is avoided, and the consumption of flow is reduced.
In addition, frequent network requests sent by the client to the server may result in the rf module in the device being active all the time, thereby increasing the power consumption of the device. Therefore, the caching method provided by the application can further reduce the power consumption of the equipment.
Further, on the basis of the foregoing embodiments, the method for client network optimization further includes: and setting different network request frequencies according to the network state. As can be seen from the above, if the client frequently sends requests to the server, a large amount of traffic is consumed. If the frequency of the client sending the request is increased in the WiFi state and the frequency of the client sending the request is decreased in the non-WiFi state, the user can save the data traffic in the data traffic state. The JobScheduler is an API (Application Programming Interface) newly introduced into the Android L version, and is used to schedule work, and conditions for scheduling work include network change, charging plug-in and-out, periodic execution, and the like. The Android device may set a frequency of frequently requesting a network interface in the client through a setRequiredNetworkType () method of the jobinfo.
Further, on the basis of the above embodiments, the data interface transmits data by using a protocol buffer format. Early transmission of data used XML and later JSON was used instead of XML, largely for readability and reduced data size. XML is an extensible markup language that provides a format for describing structured data, simplifies data exchange and presentation in a network, separates code, data, and presentation, and serves as a standard format for data exchange, and is therefore often referred to as an intelligent data document. JSON is a lightweight data exchange format. The data is stored and represented by adopting a text format completely independent of a programming language, so that the data is easy to read and write by people, is also easy to analyze and generate by a machine, and effectively improves the network transmission efficiency. However, if the data transmitted each time is large, the amount of data in the format using JSON is also large, and therefore the format using protocol buffer is adopted in the present application, which is much smaller than the amount of data in JSON as a whole. In terms of decoding performance, protocol buffer is remarkably improved compared with JSON. The decoding time of the protocol buffer hardly increases too much with the increase of the data length, while the JSON requires more and more time for decoding with the increase of the data length.
Referring to fig. 6, the present application provides a sixth embodiment of a method for client network optimization, which is different from the above embodiments in that the method further includes:
step 601, monitoring whether the device where the client is located is in a dormant state. Specifically, the determination of the awake or sleep state of the device can be achieved by broadcastdetect provided by the Android system to the broadcast receiver, and the purpose of monitoring the state of the device can be achieved by adding Android.
Step 602, if the device is in a dormant state, stopping sending the network request to the server. The sleep state indicates that the device is not in the wake-up state, and at this time, no user needs to acquire data information from the client, so that the client needs to stop sending a request to the server, and data traffic of the user is prevented from being consumed when the device is not used by people. When the device wakes up again, the network request can be sent again according to the operation of the user or the request of the client.
Step 603, if the device is not in the sleep state, sending a network request to a server.
The method for optimizing the client network provided by the sixth embodiment of the present application can further control the sending of the network request through the running state of the background monitoring device, so as to achieve the purpose of saving traffic.
According to the technical scheme, the client side obtains the user type and the network state, and determines the network request address according to the user type and the network state; sending a network request to a server according to the network request address; the server provides different data interfaces according to the network request; and returning data to the client according to the data interface. According to the technical scheme, different domain names can be provided according to the types of the users to access the server, different data interfaces are requested according to different equipment network states of the users, the time consumption and flow consumption of network requests are reduced, and the client can rapidly acquire required data.
Referring to fig. 7, the present application further provides an apparatus for client network optimization, including:
an information obtaining unit 71, configured to obtain a user type and a network state, where the user type includes a domestic user and a foreign user, and the network state includes a WiFi state and a data traffic state;
a request address determining unit 72, configured to determine a network request address according to the user type and the network state;
a request sending unit 73, configured to send a network request to a server according to the network request address;
an interface allocating unit 74, configured to provide different data interfaces according to the network request;
and a data sending unit 75, configured to return data to the client according to the data interface.
Further, the information obtaining unit 71 is further configured to:
acquiring a device time zone and/or an SIM card provider code of a device where a client is located;
and judging the user type according to the equipment time zone and/or the SIM card provider code.
Further, the request address determining unit 72 is further configured to:
judging the type of the user;
if the user is a domestic user, directly using a private line domain name provided by a network provider as a network request domain name;
if the user is a foreign user, using the original domain name of the client as a network request domain name;
determining a corresponding address according to the network request domain name;
and splicing the quality parameters behind the address according to the network state to obtain a network request address.
Further, the interface allocating unit 74 is further configured to:
acquiring quality parameters according to the network request address;
determining the network state of the client sending the request according to the quality parameters;
and providing different data interfaces according to the network state.
Further, the apparatus further comprises: a buffer unit for buffering, in the buffer unit,
caching the returned data;
setting the effective time of the cache;
and in the effective time, directly extracting the data in the cache according to the network request.
Further, the apparatus further comprises: and the request frequency setting unit is used for setting different network request frequencies according to the network state.
Further, the data transmission unit 75 transmits data using a protocol buffer format.
Further, the apparatus further comprises: a monitoring unit for monitoring the operation of the mobile terminal,
monitoring whether equipment where a client is located is in a dormant state;
if the equipment is in a dormant state, stopping sending a network request to a server;
if the device is not in a dormant state, a network request is sent to a server.
Referring to fig. 8, the present application further provides a system for client network optimization, including: a client 81 and a server 82 that is communicatively connected to the client 81;
the client 81 is configured to obtain a user type and a network state, where the user type includes a domestic user and a foreign user, and the network state includes a WiFi state and a data traffic state; determining a network request address according to the user type and the network state; sending a network request to the server 82 according to the network request address;
the server 82 is used for providing different data interfaces according to the network request; and returning data to the client 81 according to the data interface.
According to the technical scheme, the client network optimization method, the client network optimization device and the client network optimization system are provided, the client acquires the user type and the network state, and the network request address is determined according to the user type and the network state; sending a network request to a server according to the network request address; the server provides different data interfaces according to the network request; and returning data to the client according to the data interface. According to the technical scheme, different domain names can be provided according to the types of the users to access the server, different data interfaces are requested according to different equipment network states of the users, the time consumption and flow consumption of network requests are reduced, and the client can rapidly acquire required data.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (8)

1. A method for client network optimization, the method comprising:
acquiring user types and network states, wherein the user types comprise domestic users and foreign users, and the network states comprise WiFi states and data traffic states;
determining a network request address according to the user type and the network state;
sending a network request to a server according to the network request address;
providing different data interfaces according to the network request;
returning data to the client according to the data interface;
the step of determining the network request address according to the user type and the network state comprises the following steps:
judging the type of the user;
if the user is a domestic user, directly using a private line domain name provided by a network provider as a network request domain name;
if the user is a foreign user, using the original domain name of the client as the network request domain name;
determining a corresponding address according to the network request domain name;
according to the network state, splicing quality parameters behind the address to obtain a network request address;
the step of providing different data interfaces according to the network request comprises:
acquiring quality parameters according to the network request address; the quality parameters include: normal representing the WiFi state and thumbnail representing the data traffic state;
determining the network state of the client sending the request according to the quality parameters;
and providing different data interfaces according to the network state.
2. The method of claim 1, wherein the step of obtaining the user type comprises:
acquiring a device time zone and/or an SIM card provider code of a device where a client is located;
and judging the user type according to the equipment time zone and/or the SIM card provider code.
3. The method of claim 1, after returning data to the client according to the data interface, further comprising:
caching the returned data;
setting the effective time of the cache;
and in the effective time, directly extracting the data in the cache according to the network request.
4. The method of claim 1, further comprising: and setting different network request frequencies according to the network state.
5. The method of claim 1, wherein the data interface transmits data using a protocol buffer format.
6. The method according to any one of claims 1-5, further comprising:
monitoring whether equipment where a client is located is in a dormant state;
if the equipment is in a dormant state, stopping sending a network request to a server;
if the device is not in a dormant state, a network request is sent to a server.
7. An apparatus for client network optimization, the apparatus comprising:
the information acquisition unit is used for acquiring user types and network states, wherein the user types comprise domestic users and foreign users, and the network states comprise WiFi states and data traffic states;
a request address determining unit, configured to determine a network request address according to the user type and the network state;
a request sending unit, configured to send a network request to a server according to the network request address;
the interface distribution unit is used for providing different data interfaces according to the network request;
the data sending unit is used for returning data to the client according to the data interface;
the request address determining unit is also used for judging the user type; if the user is a domestic user, directly using a private line domain name provided by a network provider as a network request domain name; if the user is a foreign user, using the original domain name of the client as a network request domain name; determining a corresponding address according to the network request domain name; according to the network state, splicing quality parameters behind the address to obtain a network request address;
the interface allocation unit is further configured to obtain a quality parameter according to the network request address; the quality parameters include: normal representing the WiFi state and thumbnail representing the data traffic state; determining the network state of the client sending the request according to the quality parameters; and providing different data interfaces according to the network state.
8. A system for client network optimization, the system comprising: the system comprises a client and a server which is in communication connection with the client;
the client is used for acquiring user types and network states, wherein the user types comprise domestic users and foreign users, and the network states comprise WiFi states and data traffic states; determining a network request address according to the user type and the network state; sending a network request to a server according to the network request address;
the server is used for providing different data interfaces according to the network request; returning data to the client according to the data interface;
the client is also used for judging the user type; if the user is a domestic user, directly using a private line domain name provided by a network provider as a network request domain name; if the user is a foreign user, using the original domain name of the client as the network request domain name; determining a corresponding address according to the network request domain name; according to the network state, splicing quality parameters behind the address to obtain a network request address;
the server is also used for acquiring quality parameters according to the network request address; the quality parameters include: normal representing the WiFi state and thumbnail representing the data traffic state; determining the network state of the client sending the request according to the quality parameters; and providing different data interfaces according to the network state.
CN201811569832.XA 2018-12-21 2018-12-21 Method, device and system for optimizing client network Active CN109561457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811569832.XA CN109561457B (en) 2018-12-21 2018-12-21 Method, device and system for optimizing client network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811569832.XA CN109561457B (en) 2018-12-21 2018-12-21 Method, device and system for optimizing client network

Publications (2)

Publication Number Publication Date
CN109561457A CN109561457A (en) 2019-04-02
CN109561457B true CN109561457B (en) 2022-07-19

Family

ID=65870766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811569832.XA Active CN109561457B (en) 2018-12-21 2018-12-21 Method, device and system for optimizing client network

Country Status (1)

Country Link
CN (1) CN109561457B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231604A (en) * 2020-06-12 2021-01-15 北京沃东天骏信息技术有限公司 Page display method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546774A (en) * 2011-12-27 2012-07-04 厦门市美亚柏科信息股份有限公司 CDN (content distribution network) routing method for secondary redirection and system
CN104065665A (en) * 2014-07-02 2014-09-24 深圳深讯和科技有限公司 Streaming media data processing method and streaming media data processing system
CN104468769A (en) * 2014-12-03 2015-03-25 北京奇虎科技有限公司 Method, device and system for acquiring network data content and client side
CN104580019A (en) * 2014-12-26 2015-04-29 小米科技有限责任公司 Network service supplying method and device
CN104935655A (en) * 2015-06-15 2015-09-23 北京奇虎科技有限公司 Data presentation method and device
CN107483294A (en) * 2017-09-15 2017-12-15 北京奇艺世纪科技有限公司 Monitor the method and device of network request

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4132788B2 (en) * 2001-11-15 2008-08-13 三菱電機株式会社 Data communication device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546774A (en) * 2011-12-27 2012-07-04 厦门市美亚柏科信息股份有限公司 CDN (content distribution network) routing method for secondary redirection and system
CN104065665A (en) * 2014-07-02 2014-09-24 深圳深讯和科技有限公司 Streaming media data processing method and streaming media data processing system
CN104468769A (en) * 2014-12-03 2015-03-25 北京奇虎科技有限公司 Method, device and system for acquiring network data content and client side
CN104580019A (en) * 2014-12-26 2015-04-29 小米科技有限责任公司 Network service supplying method and device
CN104935655A (en) * 2015-06-15 2015-09-23 北京奇虎科技有限公司 Data presentation method and device
CN107483294A (en) * 2017-09-15 2017-12-15 北京奇艺世纪科技有限公司 Monitor the method and device of network request

Also Published As

Publication number Publication date
CN109561457A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
CN109684358B (en) Data query method and device
CN105095226B (en) Web page resources loading method and device
CN106487928B (en) Message pushing method and device
WO2017167050A1 (en) Configuration information generation and transmission method, and resource loading method, apparatus and system
US20110007679A1 (en) Mobile device and power saving method thereof
EP3519918B1 (en) Managing content based on battery usage in displaying the content on devices
CN103379165A (en) Method, terminal, server and system for displaying microblog topics
US20220191279A1 (en) IoT Device Data Management Method, Apparatus, and System
CN102882974A (en) Method for saving website access resource by website identification version number
US10404774B2 (en) Mobile device and method for controlling transmission to web server in mobile device
CN105808277A (en) Card type desktop realization method, device and system
CN114979024A (en) Computing power network transaction method and device, computer readable medium and electronic equipment
US11711285B2 (en) Method, apparatus, electronic device and readable storage medium for adjusting instance number
CN103024013A (en) Differentiation transmission method, differentiation transmission system and differentiation transmission device
CN109561457B (en) Method, device and system for optimizing client network
CN112491951B (en) Request processing method, server and storage medium in peer-to-peer network
CN109167830B (en) Method and device for acquiring monitoring data
CN115757998A (en) Dynamic rendering method and device for power grid data
CN108055660B (en) Method for transmitting data in network channel and Internet of things terminal
CN115119081A (en) Data reading method and device, front-end equipment and storage medium
WO2017024976A1 (en) Display method and apparatus for real-time information
CN112732548B (en) Interface testing method and device
CN106357764A (en) Data synchronization method and sever of mobile terminal
CN110662200B (en) Data reporting method and device
CN115221443B (en) Information transmission method, device, system, electronic equipment 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230419

Address after: No. 681, 6th Floor, Building 1, No. 158 West Fourth Ring North Road, Haidian District, Beijing, 100142

Patentee after: Beijing Gengjin Technology Co.,Ltd.

Address before: 571924 building 8830, Walker Park, Hainan Ecological Software Park, Haikou old town high tech industry demonstration zone, Hainan Province

Patentee before: HAINAN XINRUAN SOFTWARE Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240122

Address after: No. 1303, 13th Floor, Building 1, No. 166 Tianfu Second Street, Chengdu High tech Zone, China (Sichuan) Pilot Free Trade Zone, Chengdu, Sichuan, 610095

Patentee after: Chengdu Tongchuang Jialian Technology Co.,Ltd.

Country or region after: China

Address before: No. 681, 6th Floor, Building 1, No. 158 West Fourth Ring North Road, Haidian District, Beijing, 100142

Patentee before: Beijing Gengjin Technology Co.,Ltd.

Country or region before: China