CN118488089A - Network connection optimization method, device, equipment and storage medium - Google Patents

Network connection optimization method, device, equipment and storage medium Download PDF

Info

Publication number
CN118488089A
CN118488089A CN202410940706.XA CN202410940706A CN118488089A CN 118488089 A CN118488089 A CN 118488089A CN 202410940706 A CN202410940706 A CN 202410940706A CN 118488089 A CN118488089 A CN 118488089A
Authority
CN
China
Prior art keywords
network
connection
service request
user
service
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.)
Granted
Application number
CN202410940706.XA
Other languages
Chinese (zh)
Other versions
CN118488089B (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.)
Bank Of Ningbo Co ltd
Original Assignee
Bank Of Ningbo 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 Bank Of Ningbo Co ltd filed Critical Bank Of Ningbo Co ltd
Priority to CN202410940706.XA priority Critical patent/CN118488089B/en
Publication of CN118488089A publication Critical patent/CN118488089A/en
Application granted granted Critical
Publication of CN118488089B publication Critical patent/CN118488089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present disclosure provides a network connection optimization method, apparatus, device, and storage medium, including: selecting an optimal network address node, and establishing a network link between the server and the client based on the optimal network address node; establishing a network connection pool based on the network link, acquiring a service request generated by the client, selecting a service network link corresponding to the service request based on the network connection pool, acquiring historical response time of the service request, monitoring network signals of a user, setting timeout time of a request link corresponding to the service request, and judging whether the service request is overtime or not based on the timeout time; and storing the connection data corresponding to the service request locally, performing network diagnosis based on the connection data and the historical network problems, generating a network diagnosis result, generating a corresponding diagnosis strategy based on the network diagnosis result, and correcting the network connection based on the diagnosis strategy.

Description

Network connection optimization method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of network connection, and in particular, to a network connection optimization method, device, apparatus, and storage medium.
Background
The method is widely applied to application programs in offline entity industries such as retail, public service and the like, and has high requirements on transaction efficiency and stability. When a user uses a plurality of terminals such as small programs, the network environment of part of stores is poor, and the following problems can occur: the Domain name resolution is unstable, the resolution depends on operators, more than 150ms is often required, and security risks exist, if the problem of hijacking of a Domain name system (Domain NAME SYSTEM, DNS) is excessive, the page is tampered, and the application program is unavailable in batches when the merchants scan codes due to the faults of the operators; the weak network experience is poor, the characteristics of small bandwidth, high packet loss rate and the like of the weak network environment can obviously increase the page loading time and interface request time consumption, the payment failure rate of users is improved, and an optimization means is not available; network analysis and monitoring are imperfect, and currently, network environments cannot be actively analyzed and optimization suggestions cannot be provided for clients.
Disclosure of Invention
The present disclosure provides a network connection optimization method, apparatus, device, and storage medium, so as to at least solve the above technical problems in the prior art.
According to a first aspect of the present disclosure, there is provided a network connection optimization method, including: acquiring network node data of a server based on a first service interface, selecting an optimal network address node based on the network node data, and establishing a network link between the server and a client based on the optimal network address node;
Establishing a network connection pool based on the network link, acquiring a service request generated by the client, selecting a service network link corresponding to the service request based on the network connection pool, and transmitting the service request based on the service network link;
acquiring the historical response time of the service request, monitoring a network signal of a user, setting the overtime time of a request link corresponding to the service request based on the size of the service request, the historical response time and the network signal of the user, and judging whether the service request overtime based on the overtime time;
And storing connection data corresponding to the service request locally, performing network diagnosis based on the connection data and historical network problems, generating a network diagnosis result, or uploading the connection data to the server to generate the network diagnosis result, generating a corresponding diagnosis strategy based on the network diagnosis result, and correcting the network connection based on the diagnosis strategy.
In an embodiment, selecting an optimal network address node based on the network node data includes:
the network node data comprises a network node list of a server and corresponding network node connection records, wherein the network node connection records comprise a connection success record, a connection failure record and a connection time-consuming record;
The priority of the network node corresponding to the successful connection and short connection time in the network node connection record is increased, and the priority of the network node corresponding to the connection failure in the network node connection record is reduced;
and carrying out priority ranking on the network nodes in the network node list based on the network node connection record to obtain a ranking result, and selecting the optimal network node in the network node list based on the ranking result.
In an embodiment, the method further comprises:
Acquiring a first connection speed when the service network link uses a first transmission protocol and a second connection speed when the service network link uses a second transmission protocol;
comparing the first connection speed with the second connection speed, and selecting a transmission protocol corresponding to the fastest connection speed for sending the service request;
And monitoring the quality of the network links in the network connection pool in real time, and reconnecting the network links with poor quality or disconnected network links.
In an embodiment, determining whether the service request is timeout based on the timeout time includes:
The request link includes: interface acquisition, network connection, first packet response and data transmission, and correspondingly, the timeout time of the request link comprises: the interface obtains overtime, network connection overtime, first packet overtime and data transmission overtime;
The interface acquisition timeout time is used for monitoring whether the network node data based on the first service interface acquisition server is overtime or not;
the network connection timeout time is used for monitoring whether a network connection path between the server and the client is established based on the optimal network address node and is overtime;
The first packet timeout time is used for monitoring whether the time taken for returning to the first data packet after the service request is sent based on the service network link is timeout or not;
the data transmission timeout time is used for monitoring whether the time for acquiring the returned data of the service request by the client is timeout or not;
Generating error reporting information after the service request is overtime, generating a connection retry instruction and a weak network prompt based on the error reporting information, and reconnecting the request link corresponding to the overtime or performing cache degradation in response to the retry instruction.
In an embodiment, the method further comprises:
Caching resources required to be loaded by the service request based on a client local, a browser and a content distribution network, acquiring a patch file of the service request in real time, and updating the resources based on the patch file and the cache;
Acquiring network signals, network quality and network delay of a user in real time, judging the user with poor network signals and/or low network quality and/or high network delay as a first user, and shielding a high-flow module in return data sent to the first user;
Compressing data transmitted in the network connection based on a first compression algorithm, and transmitting and receiving the compressed data in the network connection;
And acquiring a display information service request corresponding to the display information interface, combining the display information service requests to generate a public service request, and transmitting the public service request based on the service network link.
In an embodiment, the method further comprises:
Monitoring the network condition of the user in real time, generating a network abnormal feedback instruction when the network condition of the user is poor, responding to the network abnormal feedback instruction, generating a connection waiting effect on an interactive interface of the user, and transmitting a network abnormal popup frame or a network overtime feedback page to the user based on the interactive interface;
and when the interactive interface is loaded, calling a skeleton screen plug-in, and generating a placeholder image based on the skeleton screen plug-in when the interactive interface is loaded.
According to a second aspect of the present disclosure, there is provided a network connection optimizing apparatus including:
The node selection unit is used for acquiring network node data of the server based on the first service interface, selecting an optimal network address node based on the network node data, and establishing a network link between the server and the client based on the optimal network address node;
The connection management unit is used for establishing a network connection pool based on the network links, acquiring a service request generated by the client, selecting a service network link corresponding to the service request based on the network connection pool, and sending the service request based on the service network link;
The request management unit is used for acquiring the historical response time of the service request and monitoring the network signal of the user, setting the overtime time of the request link corresponding to the service request based on the size of the service request, the historical response time and the network signal of the user, and judging whether the service request overtime based on the overtime time;
And the network diagnosis unit is used for storing the connection data corresponding to the service request locally, carrying out network diagnosis based on the connection data and the historical network problems, generating a network diagnosis result, or uploading the connection data to the server to generate the network diagnosis result, generating a corresponding diagnosis strategy based on the network diagnosis result, and correcting the network connection based on the diagnosis strategy.
In an embodiment, the apparatus further comprises:
The traffic weakening unit is used for caching resources required to be loaded by the service request based on the local client, the browser and the content distribution network, acquiring patch files of the service request in real time, and updating the resources based on the patch files and the cache; acquiring network signals, network quality and network delay of a user in real time, judging the user with poor network signals and/or low network quality and/or high network delay as a first user, and shielding a high-flow module in return data sent to the first user; compressing data transmitted in the network connection based on a first compression algorithm, and transmitting and receiving the compressed data in the network connection; acquiring a display information service request corresponding to a display information interface, combining the display information service requests to generate a public service request, and transmitting the public service request based on the service network link;
the interaction lifting unit is used for monitoring the network condition of the user in real time, generating a network abnormal feedback instruction when the network condition of the user is poor, responding to the network abnormal feedback instruction, generating a connection waiting effect on an interaction interface of the user, and sending a network abnormal popup frame or a network overtime feedback page to the user based on the interaction interface; and when the interactive interface is loaded, calling a skeleton screen plug-in, and generating a placeholder image based on the skeleton screen plug-in when the interactive interface is loaded.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods described in the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the present disclosure.
The network connection optimization method, the network connection optimization device, the network connection optimization equipment and the storage medium comprise the steps of acquiring a network node by utilizing a first service interface, optimizing the network node, pre-establishing a network connection pool, performing protocol optimization to select optimal network connection, and simultaneously respectively setting and monitoring corresponding timeout time for each link to optimize the network connection. In addition, a user diagnosis strategy is provided through network diagnosis, the network problem is repaired, the method of reducing the resource loading times, compressing transmission data, combining service requests and shielding high-flow modules is adopted for users under the condition of weak network, the flow consumption is reduced, and the interactive experience of the users is optimized. The method provides better use experience of the weak network and the good network for users.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings, in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Fig. 1 shows a schematic implementation flow diagram of a network connection optimization method according to an embodiment of the disclosure;
fig. 2 shows a second implementation flow diagram of a network connection optimization method according to an embodiment of the disclosure;
FIG. 3 illustrates a schematic diagram of an optimization apparatus for network connection according to an embodiment of the present disclosure;
Fig. 4 shows a schematic diagram of a composition structure of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order to make the objects, features and advantages of the present disclosure more comprehensible, the technical solutions in the embodiments of the present disclosure will be clearly described in conjunction with the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
Fig. 1 shows a schematic implementation flow diagram of a network connection optimization method according to an embodiment of the present disclosure, as shown in fig. 1, the network connection optimization method according to an embodiment of the present disclosure includes the following steps:
Step 101, acquiring network node data of a server based on a first service interface, selecting an optimal network address node based on the network node data, and establishing a network link between the server and a client based on the optimal network address node.
In the embodiment of the disclosure, the network node data comprises a network node list of a server and corresponding network node connection records, wherein the network node connection records comprise a connection success record, a connection failure record and a connection time-consuming record; the priority of the network node corresponding to the successful connection and short connection time in the network node connection record is increased, and the priority of the network node corresponding to the connection failure in the network node connection record is reduced; and carrying out priority ranking on the network nodes in the network node list based on the network node connection record to obtain a ranking result, and selecting the optimal network node in the network node list based on the ranking result. The first server interface is multi-terminal application domain name resolution service (Hypertext Transfer Protocol Domain NAME SYSTEM, HTTPDNS), the network node data is internet protocol (Internet Protocol, IP) data of the server, and the corresponding IP data comprises an IP list and an IP connection record.
Step 102, a network connection pool is established based on the network links, a service request generated by the client is acquired, a service network link corresponding to the service request is selected based on the network connection pool, and the service request is sent based on the service network link.
In the embodiment of the disclosure, when an application is started or wakes up, a network connection pool is pre-established, and meanwhile, protocol racing is performed, specifically: acquiring a first connection speed when the service network link uses a first transmission protocol and a second connection speed when the service network link uses a second transmission protocol; and comparing the first connection speed with the second connection speed, and selecting a transmission protocol corresponding to the fastest connection speed for sending the service request. The first transmission protocol is Internet protocol version 4 (Internet Protocol version, IPV 4), the second transmission protocol is Internet protocol version 6 (Internet Protocol version, IPV 6), and the fastest protocol use is selected for the user after racing.
In the embodiment of the present disclosure, after the network connection pool is established, maintenance needs to be performed on the network connection pool, including: and monitoring the quality of the network links in the network connection pool in real time, and reconnecting the network links with poor quality or disconnected network links.
Step 103, acquiring the historical response time of the service request, monitoring the network signal of the user, setting the overtime time of the request link corresponding to the service request based on the size of the service request, the historical response time and the network signal of the user, and judging whether the service request overtime based on the overtime time.
In the embodiment of the present disclosure, timeout control is set independently at each node, specifically: the request link includes: interface acquisition, network connection, first packet response and data transmission, and correspondingly, the timeout time of the request link comprises: the interface obtains overtime, network connection overtime, first packet overtime and data transmission overtime; the interface acquisition timeout time is used for monitoring whether the network node data based on the first service interface acquisition server is overtime or not; the network connection timeout time is used for monitoring whether a network connection path between the server and the client is established based on the optimal network address node and is overtime; the first packet timeout time is used for monitoring whether the time taken for returning to the first data packet after the service request is sent based on the service network link is timeout or not; and the data transmission timeout time is used for monitoring whether the time for acquiring the returned data of the service request by the client is timeout or not.
In the embodiment of the disclosure, error reporting information is generated after a service request is overtime, a connection retry instruction and a weak network prompt are generated based on the error reporting information, and a request link corresponding to the overtime is reconnected or cache degradation is performed in response to the retry instruction.
And 104, storing connection data corresponding to the service request locally, performing network diagnosis based on the connection data and historical network problems, generating a network diagnosis result, or uploading the connection data to the server to generate the network diagnosis result, generating a corresponding diagnosis strategy based on the network diagnosis result, and correcting the network connection based on the diagnosis strategy.
In the embodiment of the disclosure, historical network problems are collected, a case base is established, network diagnosis is performed by comparing connection data stored locally with the case base, and network commands such as a system software tool development kit (Software Development Kit, SDK) or an internet package searcher (PACKET INTERNET Groper, PING), a Domain name system (Domain NAME SYSTEM, DNS) and the like are used for detecting, so that a diagnosis result is generated. Wherein the connection data includes: operators, signals, network speeds, etc. And giving advice of self-service treatment to the user according to the diagnosis result.
In the embodiment of the disclosure, the connection data may also be uploaded to the server, a network diagnosis result is manually generated according to the connection data, a corresponding diagnosis policy is generated, and the network connection is corrected based on the diagnosis policy.
In the embodiment of the disclosure, in order to reduce traffic consumption in the case of poor network conditions, optimization may be performed by four aspects including resource loading, data compression, request merging and differential transmission, which specifically includes: caching resources required to be loaded by the service request based on a client local, browser and content delivery network (Content Delivery Network, CDN), acquiring a patch file of the service request in real time, and updating the resources based on the patch file and the cache; compressing data transmitted in the network connection based on a first compression algorithm, and transmitting and receiving the compressed data in the network connection; the first compression algorithm may be a file compression program (GZIP) compression algorithm, obtain a display information service request corresponding to a display information interface, combine the display information service requests to generate a public service request, and send the public service request based on the service network link; the display information interface may be a carousel graph, an active interface, etc. in an application program home page, acquire network signals, network quality and network delay of a user in real time, determine a user with poor network signals and/or low network quality and/or high network delay as a first user, and mask a high-flow module in return data sent to the first user, where the first user is a user with poor network quality, and the high-flow module includes: high-flow consumption modules such as a carousel chart and a bulletin board of a first page.
In the embodiment of the present disclosure, to improve the interactive experience of a user, the interaction under the weak mesh condition may be modified and the rendering speed of the interactive interface may be improved, which specifically includes: monitoring the network condition of the user in real time, generating a network abnormal feedback instruction when the network condition of the user is poor, responding to the network abnormal feedback instruction, generating a connection waiting effect on an interactive interface of the user, and transmitting a network abnormal popup frame or a network overtime feedback page to the user based on the interactive interface; and when the interactive interface is loaded, calling a skeleton screen plug-in, and generating a placeholder image based on the skeleton screen plug-in when the interactive interface is loaded, so as to visually reduce the scorching emotion of a user waiting.
Fig. 2 shows a second implementation flow chart of a network connection optimization method according to an embodiment of the present disclosure, as shown in fig. 2, the network connection optimization method according to the embodiment of the present disclosure includes the following steps:
Step 201, selecting an optimal node to establish network connection.
In the disclosed embodiment, a complete request network transmission is divided into the following links: the DNS acquires an IP address, establishes network connection, sends data, first packet response and receives data, wherein the optimal node is selected to establish the network connection and is applied to a part of acquiring the IP address by the DNS, and the method specifically comprises the following steps: for a client and an application programming interface (Application Programming Interface, API), the SDK accesses a third party HTTPDNS service, obtains a set of IP lists issued, and includes, according to IP usage records in the IP lists: and (3) recording connection success, connection failure and connection time consumption, sequencing, establishing a high-power and good-performance strategy, and eliminating continuously failed nodes, preferably, generating an optimal initial IP through an end-side horse race algorithm, caching the strategy according to the granularity of a user network, and loading the corresponding strategy in time during network switching. And the client acquires the optimal IP direct access service server for the IP dynamic jigging. By accessing HTTPDNS services, the domain name IP is directly acquired through HTTP requests, so that the risk of hijacking can be avoided.
In the disclosed embodiment, the client enters HTTPDNS the server connection authority HTTPDNS server based on hypertext transfer protocol (Hypertext Transfer Protocol, HTTP) or enters the traditional Local domain name (Local DNS) connection authority HTTPDNS server based on user datagram protocol (User Datagram Protocol, UDP). The UDP protocol is used as a spam and is used for ensuring continuity of the service.
Step 202, a network connection pool is established, and a service request is sent based on the network connection pool.
In the embodiment of the disclosure, a network connection pool is established, and a service request is sent based on the network connection pool to be set at a network connection establishment part, specifically: and establishing a network connection pool based on network links, establishing connection in advance through the pre-established network connection pool when an application is started and wakes up based on an android network framework (OKHTTP), simultaneously performing protocol racing, selecting the fastest protocol from the IPV6 and the IPV4 for a user, for example, comparing the connection speed of the IPV4 protocol with the connection speed of the IPV6 for 150ms, and selecting the IPV6 protocol. And acquiring a service request of the client, and sending the service request based on the connection pool and the selected protocol.
In the embodiment of the disclosure, daily maintenance is performed on the network connection pool by using a heartbeat keep-alive mechanism, the quality of network links in the network connection pool is detected regularly, and the existence of an abnormality, for example: poor quality or disconnected network links, and reconnection recovery is performed.
Step 203, network timeout management.
In the embodiment of the present disclosure, after the service request is sent, timeout management may be performed on the request process, specifically: setting independent timeout control on each requesting node, and rapidly sensing a timeout reason, wherein the timeout node comprises: DNS timeout, establishment timeout, first packet timeout and request timeout, respectively setting different timeout time for each node of each interface request according to business complexity, whether failed retry and historical timeout time, dynamically adjusting interface request timeout time according to real-time network condition and interface response time, avoiding unnecessary failure caused by too short request time, and supporting timeout processing such as automatic retry, weak network prompt, cache degradation and the like. In addition, when the network is unobstructed, the network request conforming to the rule is cached, and when the network is weak, the network request is returned by using the cache, so that the user experience can be optimized.
Step 204, a network self-service diagnostic tool is invoked.
In the embodiment of the disclosure, in order to locate various network problems, a network self-service diagnostic tool is used, specifically: exhaustive disassembly is performed on historical network problems to establish a network problem case base, and meanwhile, local network information of a client is collected, including: and detecting by using network commands such as a system SDK, PING, DNS and the like by an operator, signals, network speed and the like, acquiring detection results and giving corresponding self-service processing suggestions. Specifically, collecting user abnormal network phenomena includes: normal network access but white screen, failure in loading of checkout code, slow network speed of wireless network, etc.; the possible problems of abnormal network phenomena are exhausted, including: abnormal router, poor signal/no traffic, hijacked DNS, forbidden IP of the operator, mistakenly closing the network by the user, etc.; according to the abnormal network phenomenon and the exhausted problems, calling the diagnosis method in the diagnosis tool comprises the following steps: terminal network configuration analysis, signal strength detection, rate detection, network card detection, HTTPDNS comparison and Local DNS result detection, corresponding node connectivity detection and time delay detection; and executing the corresponding diagnostic command, including: speed measurement, bandwidth, DNS and the like, and determining repair suggestions required by a user according to the execution result of the diagnosis command, wherein the method comprises the following steps: switching networks, adjusting router configuration, modifying DNS nodes, etc.
In the embodiment of the disclosure, the local network information data of the client can also be uploaded to the server, and the existing network problems are further detected by a manual detection method, so that a targeted repair strategy is given.
Step 205, weak network traffic management.
In the embodiment of the present disclosure, in order to reduce traffic consumption under the weak network, adjustments may be made from four aspects, including: resource loading, data compression, request merging and content differentiated transmission. The method comprises the following steps: the local, browser and CDN multi-level cache are introduced into the client, so that the number of resource downloading times is reduced, incremental updating is implemented, only the patch files which are changed are needed to be loaded after single production, and the reduction of the number of resource loading times is realized; the size of the message and the picture is reduced by the GZIP compression algorithm, and the data transmission quantity is reduced by data compression; combining small programs or application of a plurality of small requests into a larger request, and reducing the number of requests, wherein the small requests can be interfaces for acquiring display information, such as a carousel chart, consultation, activities and the like, and the actual interfaces and return data of the small requests are called once through adding a public interface, and the back end is acquired by asynchronous multithreading, so that the reduction of the number of network connection is realized; and identifying users with poor network signals, quality and time delay, shielding high-flow consumption modules such as a carousel graph, a bulletin board and the like, and completing differentiated transmission.
Step 206, improving user interaction experience.
In the embodiment of the present disclosure, to improve user interaction experience, by optimizing interaction under a weak network and adding a restorability setting, and improving an application page rendering speed, the implementation is specifically: reconstructing pages of terminals such as an applet and a point of sale (POS), introducing a resource loading progress bar, a loading request effect and a weak network prompt to timely feed back network abnormality to a user, and allowing the user to retry or select other operations in a white screen or overtime scene so as to improve interactivity and restorability under the weak network; and integrating a skeleton screen in a front-end construction flow to automatically generate a plug-in, using the skeleton screen to replace a white screen, and generating a placeholder image of less than 1kb, so as to realize lazy loading effect from a fuzzy placeholder to a complete picture, and visually reducing scorching emotion when a user waits.
Fig. 3 is a schematic diagram of an optimizing apparatus for network connection according to an embodiment of the disclosure, and as shown in fig. 3, the optimizing apparatus for network connection in the embodiment of the disclosure includes:
The node selection unit 301 is configured to obtain network node data of a server based on a first service interface, select an optimal network address node based on the network node data, and establish a network link between the server and a client based on the optimal network address node.
The node selection unit 301 is further configured to send, to the server, a network node connection record, where the network node connection record includes a connection success record, a connection failure record, and a connection time-consuming record; the priority of the network node corresponding to the successful connection and short connection time in the network node connection record is increased, and the priority of the network node corresponding to the connection failure in the network node connection record is reduced; and carrying out priority ranking on the network nodes in the network node list based on the network node connection record to obtain a ranking result, and selecting the optimal network node in the network node list based on the ranking result.
The connection management unit 302 is configured to establish a network connection pool based on the network link, obtain a service request generated by the client, select a service network link corresponding to the service request based on the network connection pool, and send the service request based on the service network link.
The connection management unit 302 is further configured to obtain a first connection speed when the service network link uses a first transmission protocol and a second connection speed when the service network link uses a second transmission protocol; comparing the first connection speed with the second connection speed, and selecting a transmission protocol corresponding to the fastest connection speed for sending the service request; and monitoring the quality of the network links in the network connection pool in real time, and reconnecting the network links with poor quality or disconnected network links.
The request management unit 303 is configured to obtain a historical response time of the service request, monitor a network signal of a user, set a timeout time of a request link corresponding to the service request based on a size of the service request, the historical response time, and the network signal of the user, and determine whether the service request is overtime based on the timeout time.
The request management unit 303 is further configured to, the request link includes: interface acquisition, network connection, first packet response and data transmission, and correspondingly, the timeout time of the request link comprises: the interface obtains overtime, network connection overtime, first packet overtime and data transmission overtime; the interface acquisition timeout time is used for monitoring whether the network node data based on the first service interface acquisition server is overtime or not; the network connection timeout time is used for monitoring whether a network connection path between the server and the client is established based on the optimal network address node and is overtime; the first packet timeout time is used for monitoring whether the time taken for returning to the first data packet after the service request is sent based on the service network link is timeout or not; the data transmission timeout time is used for monitoring whether the time for acquiring the returned data of the service request by the client is timeout or not; generating error reporting information after the service request is overtime, generating a connection retry instruction and a weak network prompt based on the error reporting information, and reconnecting the request link corresponding to the overtime or performing cache degradation in response to the retry instruction.
And the network diagnosis unit 304 is configured to store connection data corresponding to the service request locally, perform network diagnosis based on the connection data and historical network problems, generate a network diagnosis result, or upload the connection data to the server to generate the network diagnosis result, generate a corresponding diagnosis policy based on the network diagnosis result, and correct the network connection based on the diagnosis policy.
The traffic weakening unit 305 is configured to cache a resource to be loaded by the service request based on a local client, a browser and a content distribution network, acquire a patch file of the service request in real time, and update the resource based on the patch file and the cache; acquiring network signals, network quality and network delay of a user in real time, judging the user with poor network signals and/or low network quality and/or high network delay as a first user, and shielding a high-flow module in return data sent to the first user; compressing data transmitted in the network connection based on a first compression algorithm, and transmitting and receiving the compressed data in the network connection; and acquiring a display information service request corresponding to the display information interface, combining the display information service requests to generate a public service request, and transmitting the public service request based on the service network link.
The interaction lifting unit 306 is configured to monitor the network condition of the user in real time, generate a network anomaly feedback instruction when the network condition of the user is poor, generate a connection waiting effect on an interaction interface of the user in response to the network anomaly feedback instruction, and send a network anomaly frame or a network timeout feedback page to the user based on the interaction interface; and when the interactive interface is loaded, calling a skeleton screen plug-in, and generating a placeholder image based on the skeleton screen plug-in when the interactive interface is loaded.
In an exemplary embodiment, the node selection unit 301, the connection management unit 302, the request management unit 303, the network diagnosis unit 304, the traffic reduction unit 305, the interactive lifting unit 306, and the like may be implemented by one or more central processing units (CPU, central Processing Unit), graphic processors (GPU, graphics Processing Unit), application Specific Integrated Circuits (ASIC), DSPs, programmable logic devices (PLD, programmable Logic Device), complex Programmable logic devices (CPLD, complex Programmable Logic Device), field-Programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers (MCU, micro Controller Unit), microprocessors (Microprocessor), or other electronic components.
The specific manner in which the various modules and units perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
Fig. 4 shows a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 4, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as a network connection optimization method. For example, in some embodiments, a network connection optimization method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 800 via ROM 802 and/or communication unit 809. When the computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of a network connection optimization method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform a network connection optimization method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it is intended to cover the scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A method for optimizing network connections, the method comprising:
acquiring network node data of a server based on a first service interface, selecting an optimal network address node based on the network node data, and establishing a network link between the server and a client based on the optimal network address node;
Establishing a network connection pool based on the network link, acquiring a service request generated by the client, selecting a service network link corresponding to the service request based on the network connection pool, and transmitting the service request based on the service network link;
acquiring the historical response time of the service request, monitoring a network signal of a user, setting the overtime time of a request link corresponding to the service request based on the size of the service request, the historical response time and the network signal of the user, and judging whether the service request overtime based on the overtime time;
And storing connection data corresponding to the service request locally, performing network diagnosis based on the connection data and historical network problems, generating a network diagnosis result, or uploading the connection data to the server to generate the network diagnosis result, generating a corresponding diagnosis strategy based on the network diagnosis result, and correcting the network connection based on the diagnosis strategy.
2. The method according to claim 1, wherein the selecting an optimal network address node based on the network node data comprises:
the network node data comprises a network node list of a server and corresponding network node connection records, wherein the network node connection records comprise a connection success record, a connection failure record and a connection time-consuming record;
The priority of the network node corresponding to the successful connection and short connection time in the network node connection record is increased, and the priority of the network node corresponding to the connection failure in the network node connection record is reduced;
and carrying out priority ranking on the network nodes in the network node list based on the network node connection record to obtain a ranking result, and selecting an optimal network node in the network node list based on the ranking result.
3. The method according to claim 1, wherein the method further comprises:
Acquiring a first connection speed when the service network link uses a first transmission protocol and a second connection speed when the service network link uses a second transmission protocol;
comparing the first connection speed with the second connection speed, and selecting a transmission protocol corresponding to the fastest connection speed for sending the service request;
And monitoring the quality of the network links in the network connection pool in real time, and reconnecting the network links with poor quality or disconnected network links.
4. The method of claim 2, wherein said determining whether the service request has timed out based on the timeout time comprises:
The request link includes: interface acquisition, network connection, first packet response and data transmission, and correspondingly, the timeout time of the request link comprises: the interface obtains overtime, network connection overtime, first packet overtime and data transmission overtime;
the interface acquisition timeout time is used for monitoring whether the network node data based on the first service interface acquisition server is overtime or not;
the network connection timeout time is used for monitoring whether a network connection path between the server and the client is established based on the optimal network address node and is overtime;
The first packet timeout time is used for monitoring whether the time taken for returning to the first data packet after the service request is sent based on the service network link is timeout or not;
the data transmission timeout time is used for monitoring whether the time for acquiring the returned data of the service request by the client is timeout or not;
Generating error reporting information after the service request is overtime, generating a connection retry instruction and a weak network prompt based on the error reporting information, and reconnecting the request link corresponding to the overtime or performing cache degradation in response to the retry instruction.
5. The method according to claim 1, wherein the method further comprises:
Caching resources required to be loaded by the service request based on a client local, a browser and a content distribution network, acquiring a patch file of the service request in real time, and updating the resources based on the patch file and the cache;
Acquiring network signals, network quality and network delay of a user in real time, judging the user with poor network signals and/or low network quality and/or high network delay as a first user, and shielding a high-flow module in return data sent to the first user;
Compressing data transmitted in the network connection based on a first compression algorithm, and transmitting and receiving the compressed data in the network connection;
And acquiring a display information service request corresponding to the display information interface, combining the display information service requests to generate a public service request, and transmitting the public service request based on the service network link.
6. The method according to claim 1, wherein the method further comprises:
Monitoring the network condition of the user in real time, generating a network abnormal feedback instruction when the network condition of the user is poor, responding to the network abnormal feedback instruction, generating a connection waiting effect on an interactive interface of the user, and transmitting a network abnormal popup frame or a network overtime feedback page to the user based on the interactive interface;
and when the interactive interface is loaded, calling a skeleton screen plug-in, and generating a placeholder image based on the skeleton screen plug-in when the interactive interface is loaded.
7. A network connection optimization apparatus, the apparatus comprising:
The node selection unit is used for acquiring the network node data of the server based on the first service interface, selecting an optimal network address node based on the network node data, and establishing a network link between the server and the client based on the optimal network address node;
The connection management unit is used for establishing a network connection pool based on the network links, acquiring a service request generated by the client, selecting a service network link corresponding to the service request based on the network connection pool, and sending the service request based on the service network link;
The request management unit is used for acquiring the historical response time of the service request and monitoring the network signal of the user, setting the overtime time of the request link corresponding to the service request based on the size of the service request, the historical response time and the network signal of the user, and judging whether the service request overtime based on the overtime time;
And the network diagnosis unit is used for storing the connection data corresponding to the service request locally, carrying out network diagnosis based on the connection data and the historical network problems, generating a network diagnosis result, or uploading the connection data to the server to generate the network diagnosis result, generating a corresponding diagnosis strategy based on the network diagnosis result, and correcting the network connection based on the diagnosis strategy.
8. The apparatus of claim 7, wherein the apparatus further comprises:
The traffic weakening unit is used for caching resources required to be loaded by the service request based on the local client, the browser and the content distribution network, acquiring patch files of the service request in real time, and updating the resources based on the patch files and the cache; acquiring network signals, network quality and network delay of a user in real time, judging the user with poor network signals and/or low network quality and/or high network delay as a first user, and shielding a high-flow module in return data sent to the first user; compressing data transmitted in the network connection based on a first compression algorithm, and transmitting and receiving the compressed data in the network connection; acquiring a display information service request corresponding to a display information interface, combining the display information service requests to generate a public service request, and transmitting the public service request based on the service network link;
the interaction lifting unit is used for monitoring the network condition of the user in real time, generating a network abnormal feedback instruction when the network condition of the user is poor, responding to the network abnormal feedback instruction, generating a connection waiting effect on an interaction interface of the user, and sending a network abnormal popup frame or a network overtime feedback page to the user based on the interaction interface; and when the interactive interface is loaded, calling a skeleton screen plug-in, and generating a placeholder image based on the skeleton screen plug-in when the interactive interface is loaded.
9. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-6.
CN202410940706.XA 2024-07-15 2024-07-15 Network connection optimization method, device, equipment and storage medium Active CN118488089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410940706.XA CN118488089B (en) 2024-07-15 2024-07-15 Network connection optimization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410940706.XA CN118488089B (en) 2024-07-15 2024-07-15 Network connection optimization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118488089A true CN118488089A (en) 2024-08-13
CN118488089B CN118488089B (en) 2024-10-08

Family

ID=92197561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410940706.XA Active CN118488089B (en) 2024-07-15 2024-07-15 Network connection optimization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118488089B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2912643A1 (en) * 2015-03-04 2016-09-04 Teloip Inc. System, apparatus and method for providing a virtual network edge and overlay with virtual control plane
CN111212156A (en) * 2020-01-15 2020-05-29 中国银联股份有限公司 Network connection method and device
CN113472607A (en) * 2021-06-29 2021-10-01 未鲲(上海)科技服务有限公司 Application program network environment detection method, device, equipment and storage medium
WO2021248917A1 (en) * 2020-06-08 2021-12-16 南京邮电大学 Data center network fault diagnosis and automatic configuration method based on hybrid chain
WO2022105611A1 (en) * 2021-06-29 2022-05-27 聚好看科技股份有限公司 Heartbeat timeout detection method, server, and electronic device
US11509498B1 (en) * 2020-05-26 2022-11-22 Cox Communications, Inc. Access network connectivity optimization engine
CN116708148A (en) * 2022-12-29 2023-09-05 荣耀终端有限公司 Network diagnosis method and electronic equipment
CN116744364A (en) * 2023-04-06 2023-09-12 之江实验室 DQN-based multi-edge node system joint calculation unloading and resource allocation method
CN117354893A (en) * 2023-09-25 2024-01-05 招商银行股份有限公司 Client weak network optimization method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2912643A1 (en) * 2015-03-04 2016-09-04 Teloip Inc. System, apparatus and method for providing a virtual network edge and overlay with virtual control plane
CN111212156A (en) * 2020-01-15 2020-05-29 中国银联股份有限公司 Network connection method and device
US11509498B1 (en) * 2020-05-26 2022-11-22 Cox Communications, Inc. Access network connectivity optimization engine
WO2021248917A1 (en) * 2020-06-08 2021-12-16 南京邮电大学 Data center network fault diagnosis and automatic configuration method based on hybrid chain
CN113472607A (en) * 2021-06-29 2021-10-01 未鲲(上海)科技服务有限公司 Application program network environment detection method, device, equipment and storage medium
WO2022105611A1 (en) * 2021-06-29 2022-05-27 聚好看科技股份有限公司 Heartbeat timeout detection method, server, and electronic device
CN116708148A (en) * 2022-12-29 2023-09-05 荣耀终端有限公司 Network diagnosis method and electronic equipment
CN116744364A (en) * 2023-04-06 2023-09-12 之江实验室 DQN-based multi-edge node system joint calculation unloading and resource allocation method
CN117354893A (en) * 2023-09-25 2024-01-05 招商银行股份有限公司 Client weak network optimization method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
董慧;盛凌志;李智伟;赵伟;: "智能终端客户感知监测系统的研发与应用", 电信工程技术与标准化, no. 06, 15 June 2012 (2012-06-15) *

Also Published As

Publication number Publication date
CN118488089B (en) 2024-10-08

Similar Documents

Publication Publication Date Title
CN113556584B (en) Screenshot transmission method and device of cloud mobile phone, electronic equipment and storage medium
CN114389969B (en) Method and device for testing client, electronic equipment and storage medium
CN113726607A (en) Network detection method and device, electronic equipment and storage medium
CN108200132A (en) Resource acquiring method, device, equipment and computer readable storage medium
CN114328132A (en) Method, device, equipment and medium for monitoring state of external data source
CN106992893A (en) The management method and device of router
CN111193778A (en) Method, device, equipment and medium for WEB service load balancing
CN112688991B (en) Method for performing point cloud scanning operation, related apparatus and storage medium
CN118488089B (en) Network connection optimization method, device, equipment and storage medium
CN117040799A (en) Page interception rule generation and page access control method and device and electronic equipment
CN110166835B (en) Page display method and device and storage medium
CN116260885A (en) Cloud edge collaborative reasoning method and device
CN111338928A (en) Chrome-based browser testing method and device
CN115865734A (en) Fault detection method, data generation method, device, equipment and medium
CN111416744A (en) Method and device for monitoring and alarming on Internet line
CN111949516A (en) Page testing method and device and electronic equipment
CN110334295A (en) The method, apparatus and system of Website page modification
CN110557324A (en) unread IM message processing method and device
CN113157615B (en) Service bus communication method, electronic equipment and computer storage medium
CN110768855A (en) Method and device for testing linkmzation performance
CN115840604B (en) Data processing method, device, electronic equipment and computer readable storage medium
EP4300306A1 (en) Streaming media processing method and apparatus based on inference service and electronic device
CN117201596A (en) Edge service access method and device, electronic equipment and readable storage medium
CN118488230A (en) Webpage playing system, method and device, electronic equipment and storage medium
CN117294597A (en) Network card binding configuration method, device, equipment and 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