CN116155909A - Method and system for load balancing by flow control chip - Google Patents

Method and system for load balancing by flow control chip Download PDF

Info

Publication number
CN116155909A
CN116155909A CN202310448157.XA CN202310448157A CN116155909A CN 116155909 A CN116155909 A CN 116155909A CN 202310448157 A CN202310448157 A CN 202310448157A CN 116155909 A CN116155909 A CN 116155909A
Authority
CN
China
Prior art keywords
network
server
access
station
time
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
CN202310448157.XA
Other languages
Chinese (zh)
Other versions
CN116155909B (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.)
Zhongcheng Hualong Computer Technology Co Ltd
Original Assignee
Zhongcheng Hualong Computer Technology 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 Zhongcheng Hualong Computer Technology Co Ltd filed Critical Zhongcheng Hualong Computer Technology Co Ltd
Priority to CN202310448157.XA priority Critical patent/CN116155909B/en
Publication of CN116155909A publication Critical patent/CN116155909A/en
Application granted granted Critical
Publication of CN116155909B publication Critical patent/CN116155909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a system for load balancing by a flow control chip, which relate to the technical field of chip application, wherein the method comprises the following steps: the flow control chip selects a plurality of redirection network stations based on server state information of a network server where each associated network station is located and network time delay between the flow control chip and the network server where the first network station is located; the flow control chip respectively determines a respective copy file set for each redirection network site and determines an address set of network addresses which are not subjected to access redirection; the flow control chip sends the copy file set to a network server where the corresponding redirection network site is located; and the flow control chip causes the network server where the first network station is located to set an access jump strategy based on the address set of the network address which does not carry out access redirection, so that the network server where the first network station is located carries out load balancing processing according to the network address of the visitor.

Description

Method and system for load balancing by flow control chip
Technical Field
The present invention relates to the field of chip application technologies, and in particular, to a method and system for load balancing by a flow control chip.
Background
With the continued development of network technology and the increasing content of data, more and more network sites are being used to provide services to users. Such services are for example data queries, content presentations, data stores, etc. The network station typically operates in a network server and may be, for example, a website, a data storage node, or the like.
However, as the types of data services that network stations can provide are increasing, and the amount of data involved in accessing the network stations for data exchange or file exchange is increasing. Some network stations may experience overload conditions for a period of time. In some cases, the overload may last for a longer time, and the overload may affect the response speed of the network station to provide the service, so that the user experience is deteriorated.
Disclosure of Invention
In order to solve the technical problems in the prior art, the application provides a method and a system for load balancing by a flow control chip, and when the load balancing processing of a first network station is determined to be needed, a plurality of associated network stations belonging to the same content category as the first network station are acquired; then, determining a plurality of redirection network stations based on server state information of a network server where each associated network station is located and network time delay between the network server where the first network station is located, and determining respective copy file sets for each redirection network station; and then, determining an address set of the network address which does not carry out access redirection, and sending the copy file set to a network server where the corresponding redirection network site is located, so that the first network site is prompted to set an access jump strategy, and the network server where the first network site is located carries out load balancing processing according to the network address of the visitor and the address set of the network address which does not carry out access redirection.
According to one aspect of the present invention, there is provided a method of load balancing by a flow control chip, the method comprising:
when the flow control chip of the network server where the first network station is located detects that the access state value of the first network station in the preset time length is larger than the state value threshold value, a plurality of associated network stations belonging to the same content category as the first network station are acquired;
acquiring server state information of a network server where each associated network station is located and determining network delay between the network server where each associated network station is located and the network server where the first network station is located;
the flow control chip selects a plurality of redirection network sites from a plurality of associated network sites belonging to the same content category as the first network site based on server state information of a network server where each associated network site is located and network delay between the network server where the first network site is located;
the flow control chip respectively determines a respective copy file set for each redirection network station based on access information of a network server where the first network station is located in a preset time length and server hardware information of the network server where each redirection network station is located, and determines an address set of a network address where access redirection is not performed;
The flow control chip sends the copy file set to a network server where a corresponding redirection network site is located, so that the network server where each redirection network site is located provides file access service for redirected visitors based on the copy file set; and
the flow control chip causes the network server where the first network station is located to set an access jump strategy based on the address set of the network address which does not carry out access redirection, so that the network server where the first network station is located carries out load balancing processing according to the network address of the visitor.
Preferably, the flow control chip determines the access status value of the first network station within a predetermined time period in a sliding time window manner.
Preferably, the sliding time window has a time length equal to the predetermined time length, and the predetermined time length is a period of time before the current time;
the method further includes determining a sliding time step value for the sliding time window in advance, the sliding time step value being less than a predetermined length of time.
Preferably, the method further comprises determining the state value threshold based on historical access data of the first network station.
Preferably, wherein determining the state value threshold based on historical access data of the first network station comprises:
acquiring historical access data of the first network station, the historical access data comprising a plurality of access information items, each access information item comprising: the network address of the visitor, the access start time, the access end time and the number of accessed files;
dividing the time length between the historical starting time and the historical ending time related to the historical access data into a plurality of time units which are continuously distributed in time, wherein any two time units do not have an overlapping part and the time length of each time unit is the same;
determining an attribution time unit for the access information items based on the time unit of the access ending time, so that all the access information items in the historical access data are divided into a plurality of time units, and each time unit comprises a plurality of access information items; and
the state value threshold is determined based on a plurality of access information items for each time unit.
Preferably, wherein determining the state value threshold based on the plurality of access information items for each time unit comprises:
Determining an access duration length of each of the plurality of access information items for each time unit based on a time length between an access end time and an access start time in the access information items;
calculating a time adjustment parameter for each access information item for each time cell:
Figure SMS_1
wherein ,
Figure SMS_2
the time adjustment parameter for the j-th access information item of the i-th time unit,
Figure SMS_3
the access duration length of the jth access information item for the ith time unit; />
Figure SMS_4
The number of access information items for the ith time unit,/->
Figure SMS_5
,/>
Figure SMS_6
For the number of time units>
Figure SMS_7
I and j are natural numbers;
calculating a time weighted average of the number of accessed files for the plurality of time units based on the time adjustment parameter and the number of accessed files for each access information item for each time unit;
Figure SMS_8
wherein ,
Figure SMS_9
time-weighted average of the number of files accessed for a plurality of time units, +.>
Figure SMS_10
The number of accessed files in the jth access information item for the ith time unit;
calculating the state value threshold based on a time weighted average of the number of files accessed in the plurality of time units, a maximum of the number of files accessed in the plurality of time units, and a minimum of the number of files accessed in the plurality of time units:
Figure SMS_11
wherein ,
Figure SMS_12
is a state value threshold, ++>
Figure SMS_13
For a maximum number of files accessed in a number of time units, and (2)>
Figure SMS_14
Is the minimum of the number of files accessed in a plurality of time units.
Preferably, the method further comprises the flow control chip determining an access state value of the first network station in a sliding time window manner, including:
and when the flow control chip detects that the sliding time window moves by the sliding time step value, determining an access state value of the first network station in a preset time length of the current sliding time window.
Preferably, determining the access state value of the first network station within the predetermined time length of the current sliding time window includes:
the flow control chip obtains historical access data of the first network station, wherein the historical access data comprises a plurality of access information items, and each access information item comprises: the network address of the visitor, the access start time, the access end time and the number of accessed files;
the flow control chip determines the access information items with the access start time and the access end time both in the current sliding time window as the current access information items in the plurality of access information items of the historical access data, so as to obtain a plurality of current access information items; and
The flow control chip determines an access status value for the first network station based on the plurality of current access information items.
Preferably, the flow control chip determines the access state value of the first network station based on a plurality of current access information items, and includes:
determining an access status value for the first network station based on the following formula:
Figure SMS_15
/>
wherein ,
Figure SMS_16
for the access status value of the first network station, is->
Figure SMS_17
The number of accessed files in the kth current access information item; />
Figure SMS_18
,/>
Figure SMS_19
Is the number of current access information items.
Preferably, the acquiring a plurality of associated network stations belonging to the same content category as the first network station includes:
the flow control chip causes a network server where a first network site is located to send a domain name of the first network site to a domain name server;
the domain name server determines the content category to which the first network station belongs based on the domain name of the first network station;
the domain name server selects a plurality of network stations from all network stations except the first network station in the content category to which the first network station belongs, and takes the selected plurality of network stations as a plurality of associated network stations belonging to the same content category as the first network station; and
And transmitting the attribute information of each associated network station to a network server where the first network station is located.
Preferably, any two associated network stations of the plurality of associated network stations are not on the same network server.
Preferably, the domain name server selects a plurality of network stations from all network stations except the first network station in the content category to which the first network station belongs, including:
the domain name server determines the total visited times in the preset time period of each network station in all network stations except the first network station in the content category to which the first network station belongs; and
a first predetermined number of network stations is selected that has a maximum total number of accesses.
Preferably, the domain name server selects a plurality of network stations from all network stations except the first network station in the content category to which the first network station belongs, including:
the domain name server randomly selects a first predetermined number of the plurality of network stations among all network stations except the first network station in the content category to which the first network station belongs.
Preferably, the server state information is server state data of the network server in a current statistical time section, and the server state data in the current statistical time section comprises: average processor usage, average remaining storage capacity, number of session connections, and amount of data transfer; the current statistical time section is the statistical time section closest to the current time.
Preferably, before acquiring the server state information of the network server where each associated network station is located, the method further comprises,
and counting the server state data of the network server of each associated network station according to the counting time section, and forming the server state data of the network server of each associated network station in a plurality of counting time sections into server state information.
Preferably, the flow control chip selects a plurality of redirecting network stations from a plurality of associated network stations belonging to the same content category as the first network station based on server state information of a network server where each associated network station is located and network delay between the network server where the first network station is located, and the method includes:
The flow control chip acquires server state information of a network server where each associated network station is located, and average processor utilization rate, average remaining storage capacity ratio, session connection number and data transmission quantity of the network server where each associated network station is located in a current statistical time section;
determining site performance parameters of each associated network site of a plurality of associated network sites belonging to the same content category as the first network site based on average processor usage, average remaining storage capacity ratio, session connection number and data transmission amount of the network server of each associated network site within the current statistical time period, and network delay between the network server of the first network site; and
a plurality of redirect websites is selected among a plurality of associated websites belonging to the same content category as the first website based on the website performance parameters.
Preferably, the determining the site performance parameter of each associated network site in the plurality of associated network sites belonging to the same content category as the first network site based on the average processor usage, the average remaining storage capacity ratio, the session connection number, and the data transmission amount of the network server of each associated network site in the current statistical time section, and the network delay between the network server of the first network site, includes:
Based on the average remaining storage capacity ratio, the number of session connections and the data transmission amount of the network server of each associated network station in the current statistical time section, calculating the session factor of the network server of each associated network station:
Figure SMS_20
Figure SMS_21
wherein ,
Figure SMS_22
for the session factor of the network server where the p-th associated network station is located,
Figure SMS_23
for the data transmission quantity of the network server of the p-th associated network site in the current statistical time section,/for the network server of the p-th associated network site>
Figure SMS_24
For the number of session connections of the network server where the p-th associated network station is located in the current statistical time section,/for the number of session connections of the network server where the p-th associated network station is located in the current statistical time section>
Figure SMS_25
The average remaining storage capacity ratio of the network server where the p-th associated network station is located in the current statistical time section;
Figure SMS_26
,p and />
Figure SMS_27
Is a natural number and->
Figure SMS_28
For the number of associated network stations;
calculating a delay factor of a network server of each associated network site based on a network delay between the network server of each associated network site and the network server of the first network site:
Figure SMS_29
/>
wherein ,
Figure SMS_30
for the delay factor of the network server where the p-th associated network station is located,
Figure SMS_31
for the network delay between the network server where the p-th associated network station is located and the network server where the first network station is located,/for the network delay between the p-th associated network station and the network server where the first network station is located >
Figure SMS_32
For the maximum value in the network delay between the network server where the plurality of associated network stations are located and the network server where the first network station is located, +.>
Figure SMS_33
For the minimum of network delays between the network server where the plurality of associated network stations are located and the network server where the first network station is located,
Figure SMS_34
a median of network delay between a network server where a plurality of associated network sites are located and a network server where the first network site is located;
determining a site performance parameter for each associated network site of the plurality of associated network sites belonging to the same content category as the first network site based on an average processor usage, a session factor, and a delay factor for a current statistical time segment of a network server in which each associated network site is located:
Figure SMS_35
Figure SMS_36
wherein ,
Figure SMS_37
for the site performance parameters of the p-th associated network site in the current statistical time interval, +.>
Figure SMS_38
The average processor utilization for the network server where the p-th associated network site is located in the current statistical time segment.
Preferably, wherein selecting a plurality of redirecting network sites among a plurality of associated network sites belonging to the same content category as the first network site based on the site performance parameter comprises:
Sorting a plurality of associated network stations belonging to the same content category as the first network station in descending order of station performance parameters, thereby generating a sorted list of associated network stations; and
and starting from the associated network station with the largest station performance parameter, selecting a second preset number of the plurality of associated network stations in the descending order of the station performance parameter in the ordered list of the associated network stations, and taking the selected second preset number of the plurality of associated network stations as a plurality of redirection network stations.
Preferably, the flow control chip determines, for each redirect network station, a respective copy file set based on access information of the network server where the first network station is located in a predetermined time period and server hardware information of the network server where each redirect network station is located, including:
the flow control chip obtains a plurality of access information records from access information of a network server of the first network site in a preset time length, wherein each access information record comprises: a network address of a visitor and a file information table, the file information table comprising: file identifier and number of accesses;
Determining the accessed times of each file in a network server of the first network site in a preset time length based on a plurality of access information records, sorting all files in the network server of the first network site in order to generate a file list and determining the number of files in the file list based on the accessed times in the preset time length;
the flow control chip acquires processor information and memory information of a network server where each redirection network site is located from server hardware information of the network server where each redirection network site is located;
determining a file replication ratio for each redirect website based on processor information and memory information of a network server where each redirect website is located; and
a respective set of replicated files is determined for each redirect website based on the file replication rate and the file list for each redirect website.
Preferably, the determining the file replication ratio of each redirect website based on the processor information and the memory information of the network server where each redirect website is located includes:
acquiring the number of processors and the number of cores of each processor from the processor information of the network server where each redirection network site is located, wherein the number of cores of each processor in the same network server is the same;
Acquiring total storage capacity and residual storage capacity from memory information of a network server where each redirection network site is located;
determining server performance parameters of a network server where each redirect network site is located based on the number of processors, the number of cores per processor, the total storage capacity, and the remaining storage capacity; and
the file replication ratio of each redirect website is determined based on the server performance parameters of the network server where each redirect website is located.
Preferably, determining the server performance parameter of the network server where each redirect network site is located based on the number of processors, the number of cores of each processor, the total storage capacity and the remaining storage capacity includes:
the server performance parameters for the network server where each redirect network site is located are determined based on the following formula:
Figure SMS_39
wherein ,
Figure SMS_40
for the server performance parameter of the network server where the q-th redirect network station is located,/->
Figure SMS_41
For the number of processors of the network server where the qth redirect network site is located, +.>
Figure SMS_42
For the number of cores per processor of the network server where the qth redirect network site is located,/for each processor of the network server where the qth redirect network site is located >
Figure SMS_43
Is that
Figure SMS_44
Maximum value of>
Figure SMS_45
For the remaining storage capacity of the network server where the qth redirect network site is located, +.>
Figure SMS_46
The total storage capacity of the network server where the qth redirect network site is located;
Figure SMS_47
,/>
Figure SMS_48
redirecting the number of network stations;
Figure SMS_49
,/>
Figure SMS_50
for the first adjustment factor, +.>
Figure SMS_51
Is the second adjustment coefficient.
Preferably, the determining the file replication ratio of each redirect website based on the server performance parameter of the network server where each redirect website is located includes:
the file replication ratio for each redirect website is determined based on the following formula:
Figure SMS_52
wherein ,
Figure SMS_53
file replication ratio for the qth redirect website,
Figure SMS_54
for the server performance parameter of the network server where the q-th redirect network station is located,
Figure SMS_55
is the maximum of the server performance parameters of the network server where the plurality of redirect network sites are located.
Preferably, determining a respective copy file set for each redirect website based on the file copy ratio and the file list of each redirect website, respectively, includes:
determining the number of duplicate files for each redirect website based on the file replication ratio for each redirect website and the number of files in the file list:
Figure SMS_56
wherein ,
Figure SMS_57
redirecting network for the q-thThe number of duplicate files of a site, +.>
Figure SMS_58
For the number of files in the file list, +.>
Figure SMS_59
For->
Figure SMS_60
and />
Figure SMS_61
Is rounded down;
in the file list, from the file with the largest accessed number within a predetermined time length, selecting in descending order of the accessed number
Figure SMS_62
Files, selected +.>
Figure SMS_63
The files form a duplicate set of files for the qth redirect website.
Preferably, wherein determining the set of addresses of the network addresses for which no access redirection is performed comprises:
determining a number of network addresses of the visitors based on the plurality of access information records, and a number of accesses to the first network site by the network address of each visitor;
ordering the network addresses of each visitor based on the descending order of the number of accesses to the first network site to generate a network address ordered list;
determining a ratio of network addresses in the ordered list of network addresses that are not subject to access redirection based on the access status value and the status value threshold:
Figure SMS_64
wherein ,
Figure SMS_65
for the ratio of network addresses in the ordered list of network addresses for which no access redirection is performed, +.>
Figure SMS_66
For accessing status values +.>
Figure SMS_67
Is a state value threshold;
Determining the number of network addresses in the ordered list of network addresses that are not access redirected based on the ratio of network addresses in the ordered list of network addresses that are not access redirected and the number of network addresses of the visitor:
Figure SMS_68
wherein ,
Figure SMS_69
for the number of network addresses in the ordered list of network addresses for which no access redirection is performed,
Figure SMS_70
for the number of network addresses of the visitor, +.>
Figure SMS_71
For->
Figure SMS_72
And
Figure SMS_73
is rounded down;
selecting, in the ordered list of network addresses, from the network address of the visitor having the highest number of accesses to the first network site, in descending order of the number of accesses
Figure SMS_74
The network address of the individual visitor to be selected +.>
Figure SMS_75
Individual visitorsConstitute a set of addresses of network addresses for which no access redirection is performed.
Preferably, the flow control chip sends the copy file set to a network server where a corresponding redirect network site is located, so that the network server where each redirect network site is located provides file access service for redirected visitors based on the respective copy file set, including:
the flow control chip sends the copy file set to a network server where the corresponding redirection network site is located;
The network server where the corresponding redirect network site is located stores the respective set of duplicate files in local storage so that the network server where each redirect network site is located can provide file access services to the redirected visitor based on the respective set of duplicate files in local storage.
Preferably, the flow control chip causes the network server where the first network station is located to set an access jump policy based on an address set of network addresses where access redirection is not performed, so that the network server where the first network station is located performs load balancing processing according to the network address of the visitor, including:
the flow control chip causes an access jump strategy to be set at a network server where the first network station is located, the access jump strategy enables the network server where the first network station is located to process an access request of a network address in an address set of network addresses which are not subjected to access redirection, and randomly forwards the access request of the network address outside the address set of the network addresses which are not subjected to access redirection to one of the network servers where the plurality of redirection network stations are located, so that the network server where the first network station is located carries out load balancing processing according to the network address of a visitor.
According to another aspect of the present invention, there is provided a system for load balancing by a flow control chip, the system comprising:
the acquisition device is used for acquiring a plurality of associated network stations belonging to the same content category as the first network station when the flow control chip of the network server where the first network station is located detects that the access state value of the first network station in the preset time length is greater than the state value threshold value;
a first determining device, configured to obtain server state information of a network server where each associated network station is located, and determine a network delay between the network server where each associated network station is located and the network server where the first network station is located;
selecting means for causing the flow control chip to select a plurality of redirect network sites among a plurality of associated network sites belonging to the same content category as the first network site based on server state information of a network server where each associated network site is located and network delay between the network server where the first network site is located;
second determining means for causing the flow control chip to determine, for each redirect network site, a respective copy file set based on access information of a network server in which the first network site is located within a predetermined length of time and server hardware information of the network server in which each redirect network site is located, and to determine an address set of network addresses for which access redirection is not performed;
The sending device is used for prompting the flow control chip to send the copy file set to the network server where the corresponding redirection network site is located, so that the network server where each redirection network site is located provides file access service for redirected visitors based on the respective copy file set; and
and the setting device is used for enabling the flow control chip to prompt the network server where the first network station is located to set an access jump strategy based on the address set of the network address which does not carry out access redirection, so that the network server where the first network station is located carries out load balancing processing according to the network address of the visitor.
According to still another aspect of the present invention, there is provided a system for load balancing by a flow control chip, comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the method according to any embodiment of the present invention.
According to the technical scheme of the invention, when the first network station is determined to be required to carry out load balancing processing, the copy file set is sent to the network server where the corresponding redirection network station is located, so that the first network station is caused to set an access jump strategy, and the network server where the first network station is located carries out load balancing processing according to the network address of a visitor and the address set of the network address which is not subjected to access redirection. By the aid of the technical scheme, the network station or the network server can be effectively prevented from entering an overload state, so that the response speed of the network station for providing data service for visitors can be kept at a high level, and the satisfaction degree of users is greatly improved. By the technical scheme of the invention, hardware loss or service loss caused by overload of the network server can be avoided for the network server.
Drawings
Exemplary embodiments of the present invention may be more completely understood in consideration of the following drawings:
FIG. 1 is a flow chart of a method of load balancing by a flow control chip according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a network system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a network system according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a network system according to still another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a system for load balancing by a flow control chip according to an embodiment of the present invention.
Detailed Description
The exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, however, the present invention may be embodied in many different forms and is not limited to the examples described herein, which are provided to fully and completely disclose the present invention and fully convey the scope of the invention to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting of the invention. In the drawings, like elements/components are referred to by like reference numerals.
Unless otherwise indicated, terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. In addition, it will be understood that terms defined in commonly used dictionaries should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense.
Fig. 1 is a flow chart of a method of load balancing by a flow control chip according to an embodiment of the present invention. The method 100 comprises the following steps:
step 101, when a flow control chip of a network server where the first network station is located detects that an access state value of the first network station within a predetermined time period is greater than a state value threshold, acquiring a plurality of associated network stations belonging to the same content category as the first network station.
In one embodiment, the flow control chip determines the access status value of the first network station for a predetermined length of time in a sliding time window manner. Wherein the sliding time window has a time length equal to a predetermined time length, and the predetermined time length is a period of time before the current time. For example, the current time is 2023 month 20 day 10 time 10 minutes 10 seconds, then the predetermined time length may be 2023 month 15 day 0 time 0 minutes 0 seconds (e.g., including the end point) to 2023 month 19 day 0 time 0 minutes 0 seconds (e.g., excluding the end point), i.e., the time length of 5 natural days. It should be appreciated that the predetermined length of time may be any reasonable value. For purposes of illustration, the predetermined length of time will be described in terms of a plurality of natural days.
In one embodiment, the sliding time step value of the sliding time window may be predetermined. Further, the sliding time step value is a step in which the sliding time window moves in the time lapse direction. And the sliding time step value is less than the predetermined length of time. For example, when the time length of the sliding time window is 5 natural days and the sliding time step value is 1 natural day, and when the time is 2023, 3, 20, 0 minutes, 1 second, the elapsed time length has satisfied the sliding time step value (1 natural day, that is, 2023, 3, 19, 0 minutes, 1 second to 2023, 3, 20, 0 minutes, 1 second, the time length reaches 1 natural day), then the sliding time window is shifted by the sliding time step value in the direction of the time lapse (time advance), that is, 1 natural day. Thus, the sliding time window is from 2023, 3, 15, 0 minutes, 0 seconds (e.g., inclusive) to 2023, 3, 19, 0 minutes, 0 seconds, 1 natural day, with the current sliding time window being 2023, 3, 16, 0 minutes, 0 seconds (e.g., inclusive) to 2023, 3, 20, 0 minutes, 0 seconds. Typically, the sliding time step value is less than the predetermined length of time and greater than 0, and the sliding time step value may be set to any reasonable value. The smaller the sliding time step value, the greater the accuracy of the access state value, however the greater the number of computations required. The larger the sliding time step value, the less accurate the access state value, however the fewer computations are required.
In one embodiment, determining the status value threshold based on historical access data of the first network station is further included. Wherein the historical access data for the first network station is access data for the first network station over a period of time in the past (e.g., 20 natural days, 30 natural days). The method specifically comprises the following steps: historical access data for a first network site is obtained. The historical access data includes a plurality of access information items and each access information item is used to represent one access of one visitor. Each access information item includes: the network address of the visitor (visitor to the first network site), the access start time, the access end time, and the number of files accessed (the number of files involved in or accessed by the visitor when accessing the first network site, within the length of time between the access start time and the access end time).
In one embodiment, the length of time between a historical start time and a historical end time to which the historical access data relates (e.g., the historical start time is the earliest start time of the access start times of all the access information items, the historical end time is the latest end time of the service end times of all the access information items) is divided into a plurality of time units that are distributed continuously in time. There is no overlap between any two time units and the time length of each time unit is the same. For example, the time units are every natural day. Determining the belonged time unit for the access information items based on the time unit of the access ending time, thereby dividing all the access information items in the historical access data into a plurality of time units, and enabling the plurality of access information items to be included in each time unit. For example, the access start time of the access information item is 2023, 3, 16, 23, 50 minutes, 0 seconds, the service end time of the access information item is 2023, 3, 17, 0, 15 minutes, 23 seconds, and each natural day is a time unit, and then the time unit to which the access information item belongs is 2023, 3, 17, time unit. A status value threshold for the first network station is then determined based on the plurality of access information items for each time unit.
In one embodiment, determining the state value threshold based on the plurality of access information items for each time unit includes:
the access duration length of each of the plurality of access information items for each time unit is determined based on the time length between the access end time and the access start time in the access information items. For example, if the access end time in the access information item is 2023, 3, 16, 10, 50 minutes, 0 seconds, and the access start time is 2023, 3, 16, 10, 40 minutes, 0 seconds, then the access duration of the access information item is 10 minutes (the endpoint value includes only one).
Subsequently, a time adjustment parameter for each access information item for each time unit is calculated:
Figure SMS_76
wherein ,
Figure SMS_77
the time adjustment parameter for the j-th access information item of the i-th time unit,
Figure SMS_78
the access duration length of the jth access information item for the ith time unit. />
Figure SMS_79
The number of access information items for the ith time unit,/->
Figure SMS_80
,/>
Figure SMS_81
In order to be able to measure the number of time units,
Figure SMS_82
i and j are natural numbers.
Preferably, a time weighted average of the number of accessed files for a plurality of time units is calculated based on the time adjustment parameter and the number of accessed files for each access information item for each time unit;
Figure SMS_83
wherein ,
Figure SMS_84
time-weighted average of the number of files accessed for a plurality of time units, +.>
Figure SMS_85
The number of accessed files in the j-th access information item for the i-th time unit.
Preferably, the state value threshold is calculated based on a time weighted average of the number of accessed files in the plurality of time units, a maximum of the number of accessed files in the plurality of time units, and a minimum of the number of accessed files in the plurality of time units:
Figure SMS_86
wherein ,
Figure SMS_87
is a state value threshold, ++>
Figure SMS_88
For a maximum number of files accessed in a number of time units, and (2)>
Figure SMS_89
Is the minimum of the number of files accessed in a plurality of time units.
In one embodiment, the method further comprises the flow control chip determining the access status value of the first network station for a predetermined length of time in a sliding time window manner, comprising: when the flow control chip detects (e.g., the passage of time causes) that the sliding time window has moved by the sliding time step value, an access status value for the first network station for a predetermined length of time of the current sliding time window is determined. As described above, for example, the sliding time window is from 2023, 3, 15, day 0, minute 0 seconds (e.g., including the end point) to 2023, 3, 19, day 0, minute 0 seconds, 1 natural day of movement, and the current sliding time window is 2023, 3, 16, day 0, minute 0 seconds (e.g., including the end point) to 2023, 3, month 20, day 0, minute 0 seconds.
In one embodiment, determining an access status value for a first network station for a predetermined length of time of a current sliding time window comprises: the flow control chip obtains historical access data of the first network site, the historical access data comprising a plurality of access information items, each access information item comprising: the visitor's network address, the access start time, the access end time, and the number of files accessed. Then, the flow control chip determines, as a current access information item, an access information item whose access start time and access end time are both within a current sliding time window, among a plurality of access information items of the history access data, thereby obtaining a plurality of current access information items. Finally, the flow control chip determines an access status value for the first network station based on the plurality of current access information items.
In one embodiment, the flow control chip determines an access status value for the first network station based on a plurality of current access information items, comprising: determining an access status value for the first network station based on the following formula:
Figure SMS_90
wherein ,
Figure SMS_91
for the access status value of the first network station, is->
Figure SMS_92
The number of accessed files in the kth current access information item; / >
Figure SMS_93
,/>
Figure SMS_94
Is the number of current access information items.
In one embodiment, acquiring a plurality of associated network stations belonging to the same content category as the first network station includes: the flow control chip causes the network server where the first network site is located to send the domain name of the first network site to the domain name server. Fig. 2 is a schematic diagram of a network system according to an embodiment of the present invention. As shown in fig. 2, the network system includes a plurality of network servers and domain name servers. At least one network site may be operated or supported in the network server. In some cases, each web server runs or supports only one web site. The network station may provide various types of services. Each network service has a processor, memory, flow control chip, etc. hardware devices therein, and these hardware devices may be considered as hardware layers. When the associated network site needs to be determined, the flow control chip causes the network server where the first network site is located to send the domain name of the first network site to the domain name server, so that the domain name server determines the content category to which the first network site belongs based on the domain name of the first network site. It should be appreciated that the domain name server may not only perform domain name resolution, but may also provide or maintain category information (content categories) for domain names or sites. For example, the content categories may be cloud storage sites, domain-specific service sites, and the like.
In one embodiment, the domain name server selects a plurality of network sites from all network sites except the first network site in the content category to which the first network site belongs, and uses the selected plurality of network sites as a plurality of associated network sites belonging to the same content category as the first network site; and transmitting the attribute information of each associated network station to a network server where the first network station is located. It should be appreciated that in one embodiment, any two of the plurality of associated network stations are not on the same network server.
Preferably, the domain name server selects a plurality of network stations among all network stations except the first network station in the content category to which the first network station belongs, including: the domain name server determines the total visited times in a preset time length of each network station in all network stations except the first network station in the content category to which the first network station belongs; and selecting a first predetermined number of the plurality of network stations having the highest total number of accesses. Alternatively, the domain name server selects a plurality of network stations among all network stations except the first network station in the content category to which the first network station belongs, including: the domain name server randomly selects a first predetermined number of the plurality of network stations among all network stations except the first network station in the content category to which the first network station belongs.
As shown in fig. 2, the content category to which the first network station belongs includes N site A domain name server selecting N among all network stations except the first network station ANsite A network station for selecting N ANsite Individual network stations as switchesNetwork site, where N ANsite Less than N site 。N ANsite The network sites are located at N ANsite And a personal network server.
Step 102, obtaining server state information of the network server where each associated network station is located and determining network delay between the network server where each associated network station is located and the network server where the first network station is located.
In one embodiment, the server state information is server state data of the network server within a current statistical time section, the server state data within the current statistical time section including: average processor usage, average remaining storage capacity, number of session connections, and amount of data transfer; the current statistical time section is the statistical time section closest to the current time;
in one embodiment, before acquiring the server state information of the network server where each associated network station is located, the method further includes counting server state data of the network server where each associated network station is located according to the statistical time section, and forming server state information of the server state data of the network server where each associated network station is located in a plurality of statistical time sections.
Step 103, the flow control chip selects a plurality of redirect network sites from a plurality of associated network sites belonging to the same content category as the first network site based on the server state information of the network server where each associated network site is located and the network delay between the network server where the first network site is located.
In one embodiment, the flow control chip selects a plurality of redirecting network sites among a plurality of associated network sites belonging to the same content category as the first network site based on server state information of a network server where each associated network site is located and network delay between the network server where the first network site is located, comprising: the flow control chip obtains the average processor utilization rate, the average remaining storage capacity ratio, the session connection number and the data transmission quantity of the network server of each associated network station in the current statistical time section from the server state information of the network server of each associated network station; determining site performance parameters of each associated network site of the plurality of associated network sites belonging to the same content category as the first network site based on an average processor usage, an average remaining storage capacity ratio, a number of session connections, and a data transfer amount of the network server in which each associated network site is located, and a network delay between the network server and the network server in which the first network site is located, for a current statistical time period; and selecting a plurality of redirect websites from a plurality of associated websites belonging to the same content category as the first website based on the website performance parameter. As shown in fig. 3, the associated network station 2-4 is selected as the redirecting network station.
In one embodiment, determining the site performance parameters for each of a plurality of associated network sites belonging to the same content category as the first network site based on an average processor usage, an average remaining storage capacity ratio, a number of session connections, and an amount of data transfer for a current statistical time segment for the network server at which each associated network site resides, and a network delay between the network server at which the first network site resides, comprises: based on the average remaining storage capacity ratio, the number of session connections and the data transmission amount of the network server of each associated network station in the current statistical time section, calculating the session factor of the network server of each associated network station:
Figure SMS_95
wherein ,
Figure SMS_96
for the session factor of the network server where the p-th associated network station is located,
Figure SMS_97
for the network server where the p-th associated network site is located, within the current statistical time periodData transmission amount,/->
Figure SMS_98
For the number of session connections of the network server where the p-th associated network station is located in the current statistical time section,/for the number of session connections of the network server where the p-th associated network station is located in the current statistical time section>
Figure SMS_99
The average remaining storage capacity ratio of the network server where the p-th associated network station is located in the current statistical time section; / >
Figure SMS_100
,p and />
Figure SMS_101
Is a natural number and->
Figure SMS_102
For the number of associated network stations;
in one embodiment, the delay factor for each associated network site is calculated based on the network delay between the network server at which each associated network site is located and the network server at which the first network site is located:
Figure SMS_103
wherein ,
Figure SMS_104
for the delay factor of the network server where the p-th associated network station is located,
Figure SMS_105
for the network delay between the network server of the p-th associated network site and the network server of the first network site,/for the network delay between the network server of the p-th associated network site and the network server of the first network site>
Figure SMS_106
Maximum of network delays between a network server where a plurality of associated network stations are located and a network server where a first network station is located,/>
Figure SMS_107
For the minimum value in the network delay between the network server where the plurality of associated network stations are located and the network server where the first network station is located, +.>
Figure SMS_108
Is the median of the network delay between the network server where the plurality of associated network stations are located and the network server where the first network station is located.
In one embodiment, the site performance parameters for each of a plurality of associated network sites belonging to the same content category as the first network site are determined based on an average processor usage, a session factor, and a delay factor for a current statistical time segment for a network server in which each associated network site is located:
Figure SMS_109
Figure SMS_110
/>
wherein ,
Figure SMS_111
for the site performance parameters of the p-th associated network site in the current statistical time interval, +.>
Figure SMS_112
The average processor utilization for the network server where the p-th associated network site is located in the current statistical time segment.
In one embodiment, selecting a plurality of redirecting network sites among a plurality of associated network sites belonging to the same content category as the first network site based on the site performance parameters comprises:
sorting a plurality of associated network stations belonging to the same content category as the first network station in descending order of station performance parameters, thereby generating a sorted list of associated network stations; and starting from the associated network station with the largest station performance parameter, selecting a second predetermined number of the plurality of associated network stations in descending order of the station performance parameter in the ordered list of associated network stations, and taking the selected second predetermined number of the plurality of associated network stations as a plurality of redirecting network stations.
Step 104, the flow control chip determines, for each redirect network station, a respective copy file set based on the access information of the network server in which the first network station is located within a predetermined time period and the server hardware information of the network server in which each redirect network station is located, and determines an address set of the network address where access redirection is not performed.
In one embodiment, the flow control chip determines a respective set of replicated files for each redirect network site based on access information of a network server where the first network site is located within a predetermined length of time and server hardware information of the network server where each redirect network site is located, respectively, including: the flow control chip obtains a plurality of access information records from access information of a network server of a first network site in a preset time length, wherein each access information record comprises: a visitor's network address and a file information table, the file information table comprising: file identifier and number of accesses;
in one embodiment, the number of times each file in the network server where the first network site is located is determined based on the plurality of access information records, and all files in the network server where the first network site is located are ordered based on the number of times accessed in the predetermined length of time to generate a list of files and the number of files in the list of files is determined. And counting the file information table of the network address of each visitor, thereby determining the accessed times of each file in a preset time length.
In one embodiment, the flow control chip obtains processor information and memory information of a network server where each redirect network site is located from server hardware information of the network server where each redirect network site is located; determining a file replication ratio for each redirect website based on processor information and memory information of a network server where each redirect website is located; and determining a respective set of replicated files for each redirect website based on the file replication ratio and the file list for each redirect website, respectively.
In one embodiment, determining the file replication ratio for each redirect website based on processor information and memory information of the network server where each redirect website is located includes: acquiring the number of processors and the number of cores of each processor from the processor information of the network server where each redirection network site is located, wherein the number of cores of each processor in the same network server is the same; acquiring total storage capacity and residual storage capacity from memory information of a network server where each redirection network site is located; determining server performance parameters of a network server where each redirect network site is located based on the number of processors, the number of cores per processor, the total storage capacity, and the remaining storage capacity; and determining a file replication ratio for each redirect website based on the server performance parameters of the network server where each redirect website is located.
In one embodiment, determining the server performance parameters for the network server at which each redirect network site resides based on the number of processors, the number of cores per processor, the total storage capacity, and the remaining storage capacity, comprises:
the server performance parameters for the network server where each redirect network site is located are determined based on the following formula:
Figure SMS_113
wherein ,
Figure SMS_116
for the server performance parameter of the network server where the q-th redirect network station is located,/->
Figure SMS_120
For the number of processors of the network server where the qth redirect network site is located, +.>
Figure SMS_123
For the number of cores per processor of the network server where the qth redirect network site is located,/for each processor of the network server where the qth redirect network site is located>
Figure SMS_117
Is that
Figure SMS_119
Maximum value of>
Figure SMS_122
For the remaining storage capacity of the network server where the qth redirect network site is located, +.>
Figure SMS_125
The total storage capacity of the network server where the qth redirect network site is located; />
Figure SMS_114
,/>
Figure SMS_118
Redirecting the number of network stations; />
Figure SMS_121
Figure SMS_124
For the first adjustment factor, +.>
Figure SMS_115
Is the second adjustment coefficient.
In one embodiment, determining the file replication ratio for each redirect website based on the server performance parameters of the network server where each redirect website is located includes:
The file replication ratio for each redirect website is determined based on the following formula:
Figure SMS_126
wherein ,
Figure SMS_127
file replication ratio for the qth redirect website,
Figure SMS_128
for the server performance parameter of the network server where the q-th redirect network station is located,
Figure SMS_129
is the maximum of the server performance parameters of the network server where the plurality of redirect network sites are located.
In one embodiment, wherein determining a respective set of replicated files for each redirect website based on the file replication rate and the file list for each redirect website, respectively, comprises:
determining the number of duplicate files for each redirect website based on the file replication ratio for each redirect website and the number of files in the file list:
Figure SMS_130
wherein ,
Figure SMS_131
the number of duplicate files for the q-th redirect website, +.>
Figure SMS_132
For the number of files in the file list, +.>
Figure SMS_133
For->
Figure SMS_134
and />
Figure SMS_135
Is rounded down; in the file list, from the file having the largest number of accessed times within a predetermined length of time, selecting +.>
Figure SMS_136
Files, selected +.>
Figure SMS_137
The files form a duplicate set of files for the qth redirect website.
In one embodiment, determining an address set of network addresses for which access redirection is not to be performed comprises: determining a number of network addresses of the visitors based on the plurality of access information records, and a number of accesses to the first network site by the network address of each visitor; ordering the network addresses of each visitor based on the descending order of the number of accesses to the first network site to generate a network address ordered list; based on the access status value and the status value threshold, determining a ratio of network addresses in the ordered list of network addresses for which no access redirection is performed:
Figure SMS_138
wherein ,
Figure SMS_139
for the ratio of network addresses in the ordered list of network addresses for which no access redirection is performed, +.>
Figure SMS_140
For accessing status values +.>
Figure SMS_141
Is a state value threshold.
In one embodiment, the number of network addresses in the ordered list of network addresses that are not access redirected is determined based on a ratio of network addresses in the ordered list of network addresses that are not access redirected and the number of network addresses of the visitor.
Figure SMS_142
wherein ,
Figure SMS_143
for the number of network addresses in the ordered list of network addresses for which no access redirection is performed,
Figure SMS_144
for the number of network addresses of the visitor, +.>
Figure SMS_145
For->
Figure SMS_146
And
Figure SMS_147
Is rounded down;
selecting, in the ordered list of network addresses, in descending order of access times, from the network address of the visitor having the highest access time to the first network station
Figure SMS_148
The network address of the individual visitor to be selected +.>
Figure SMS_149
The network addresses of the individual visitors constitute a set of addresses of network addresses for which no access redirection is performed.
In step 105, the flow control chip sends the copy file set to the network server where the corresponding redirect network site is located, so that the network server where each redirect network site is located provides file access services to the redirected visitor based on the respective copy file set.
In one embodiment, the flow control chip sends the replicated file sets to the network servers at which the respective redirect network sites are located, such that each redirect network site's network server provides file access services to redirected visitors based on the respective replicated file sets, comprising: the flow control chip sends the copy file set to a network server where the corresponding redirection network site is located; the network server where the corresponding redirect network site is located stores the respective set of duplicate files in local storage so that the network server where each redirect network site is located can provide file access services to the redirected visitor based on the respective set of duplicate files in local storage. As shown in fig. 4, the flow control chip sends the copy file sets of each of the redirect network stations 2, 3, and 4 to the network server where the redirect network stations 2, 3, and 4 are located, respectively.
Step 106, the flow control chip causes the network server where the first network station is located to set an access jump policy based on the address set of the network address where access redirection is not performed, so that the network server where the first network station is located performs load balancing processing according to the network address of the visitor, and specifically includes: the flow control chip causes an access jump strategy to be set at a network server where the first network station is located, the access jump strategy enables the network server where the first network station is located to process an access request of a network address in an address set of network addresses which are not subjected to access redirection, and randomly forwards the access request of the network address outside the address set of the network addresses which are not subjected to access redirection to one of the network servers where the plurality of redirection network stations are located, so that the network server where the first network station is located carries out load balancing processing according to the network address of a visitor.
Fig. 5 is a schematic diagram of a system 500 for load balancing by a flow control chip according to an embodiment of the present invention. The system 500 includes: acquisition means 501, first determination means 502, selection means 503, second determination means 504, transmission means 505, and setting means 506.
The acquiring means 501 is configured to acquire a plurality of associated network stations belonging to the same content category as the first network station when the flow control chip of the network server where the first network station is located detects that the access status value of the first network station within a predetermined time period is greater than the status value threshold.
In one embodiment, the flow control chip determines the access status value of the first network station for a predetermined length of time in a sliding time window manner. Wherein the sliding time window has a time length equal to a predetermined time length, and the predetermined time length is a period of time before the current time. For example, the current time is 2023 month 20 day 10 time 10 minutes 10 seconds, then the predetermined time length may be 2023 month 15 day 0 time 0 minutes 0 seconds (e.g., including the end point) to 2023 month 19 day 0 time 0 minutes 0 seconds (e.g., excluding the end point), i.e., the time length of 5 natural days. It should be appreciated that the predetermined length of time may be any reasonable value. For purposes of illustration, the predetermined length of time will be described in terms of a plurality of natural days.
In one embodiment, the sliding time step value of the sliding time window may be predetermined. Further, the sliding time step value is a step in which the sliding time window moves in the time lapse direction. And the sliding time step value is less than the predetermined length of time. For example, when the time length of the sliding time window is 5 natural days and the sliding time step value is 1 natural day, and when the time is 2023, 3, 20, 0 minutes, 1 second, the elapsed time length has satisfied the sliding time step value (1 natural day, that is, 2023, 3, 19, 0 minutes, 1 second to 2023, 3, 20, 0 minutes, 1 second, the time length reaches 1 natural day), then the sliding time window is shifted by the sliding time step value in the direction of the time lapse (time advance), that is, 1 natural day. Thus, the sliding time window is from 2023, 3, 15, 0 minutes, 0 seconds (e.g., inclusive) to 2023, 3, 19, 0 minutes, 0 seconds, 1 natural day, with the current sliding time window being 2023, 3, 16, 0 minutes, 0 seconds (e.g., inclusive) to 2023, 3, 20, 0 minutes, 0 seconds. Typically, the sliding time step value is less than the predetermined length of time and greater than 0, and the sliding time step value may be set to any reasonable value. The smaller the sliding time step value, the greater the accuracy of the access state value, however the greater the number of computations required. The larger the sliding time step value, the less accurate the access state value, however the fewer computations are required.
In one embodiment, determining the status value threshold based on historical access data of the first network station is further included. Wherein the historical access data for the first network station is access data for the first network station over a period of time in the past (e.g., 20 natural days, 30 natural days). The method specifically comprises the following steps: historical access data for a first network site is obtained. The historical access data includes a plurality of access information items and each access information item is used to represent one access of one visitor. Each access information item includes: the network address of the visitor (visitor to the first network site), the access start time, the access end time, and the number of files accessed (the number of files involved in or accessed by the visitor when accessing the first network site, within the length of time between the access start time and the access end time).
In one embodiment, the length of time between a historical start time and a historical end time to which the historical access data relates (e.g., the historical start time is the earliest start time of the access start times of all the access information items, the historical end time is the latest end time of the service end times of all the access information items) is divided into a plurality of time units that are distributed continuously in time. There is no overlap between any two time units and the time length of each time unit is the same. For example, the time units are every natural day. Determining the belonged time unit for the access information items based on the time unit of the access ending time, thereby dividing all the access information items in the historical access data into a plurality of time units, and enabling the plurality of access information items to be included in each time unit. For example, the access start time of the access information item is 2023, 3, 16, 23, 50 minutes, 0 seconds, the service end time of the access information item is 2023, 3, 17, 0, 15 minutes, 23 seconds, and each natural day is a time unit, and then the time unit to which the access information item belongs is 2023, 3, 17, time unit. A status value threshold for the first network station is then determined based on the plurality of access information items for each time unit.
In an embodiment the obtaining means 501 are specifically arranged for determining the access duration length of each of the plurality of access information items per time unit based on the time length between the access end time and the access start time of the access information items. For example, if the access end time in the access information item is 2023, 3, 16, 10, 50 minutes, 0 seconds, and the access start time is 2023, 3, 16, 10, 40 minutes, 0 seconds, then the access duration of the access information item is 10 minutes (the endpoint value includes only one).
Subsequently, a time adjustment parameter for each access information item for each time unit is calculated:
Figure SMS_150
wherein ,
Figure SMS_151
the time adjustment parameter for the j-th access information item of the i-th time unit,
Figure SMS_152
the access duration length of the jth access information item for the ith time unit. />
Figure SMS_153
The number of access information items for the ith time unit,/->
Figure SMS_154
,/>
Figure SMS_155
In order to be able to measure the number of time units,
Figure SMS_156
i and j are natural numbers.
Preferably, a time weighted average of the number of accessed files for a plurality of time units is calculated based on the time adjustment parameter and the number of accessed files for each access information item for each time unit;
Figure SMS_157
wherein ,
Figure SMS_158
Time-weighted average of the number of files accessed for a plurality of time units, +.>
Figure SMS_159
The number of accessed files in the j-th access information item for the i-th time unit.
Preferably, the state value threshold is calculated based on a time weighted average of the number of accessed files in the plurality of time units, a maximum of the number of accessed files in the plurality of time units, and a minimum of the number of accessed files in the plurality of time units:
Figure SMS_160
wherein ,
Figure SMS_161
is a state value threshold, ++>
Figure SMS_162
For a maximum number of files accessed in a number of time units, and (2)>
Figure SMS_163
Is the minimum of the number of files accessed in a plurality of time units.
In one embodiment, the obtaining means 501 is specifically configured to determine the access status value of the first network station within a predetermined time length of the current sliding time window when the flow control chip detects that the passage of time causes the sliding time window to move by the sliding time step value. As described above, for example, the sliding time window is from 2023, 3, 15, day 0, minute 0 seconds (e.g., including the end point) to 2023, 3, 19, day 0, minute 0 seconds, 1 natural day of movement, and the current sliding time window is 2023, 3, 16, day 0, minute 0 seconds (e.g., including the end point) to 2023, 3, month 20, day 0, minute 0 seconds.
In one embodiment, the obtaining device 501 is specifically configured to obtain, by using a flow control chip, historical access data of a first network site, where the historical access data includes a plurality of access information items, and each access information item includes: the visitor's network address, the access start time, the access end time, and the number of files accessed. Then, the flow control chip determines, as a current access information item, an access information item whose access start time and access end time are both within a current sliding time window, among a plurality of access information items of the history access data, thereby obtaining a plurality of current access information items. Finally, the flow control chip determines an access status value for the first network station based on the plurality of current access information items.
In one embodiment, the obtaining means 501 is specifically configured to determine the access status value of the first network station based on the following formula:
Figure SMS_164
wherein ,
Figure SMS_165
for the access status value of the first network station, is->
Figure SMS_166
The number of accessed files in the kth current access information item; />
Figure SMS_167
,/>
Figure SMS_168
Is the number of current access information items.
In one embodiment, the obtaining device 501 is specifically configured to cause, by the flow control chip, the network server where the first network station is located to send the domain name of the first network station to the domain name server. Fig. 2 is a schematic diagram of a network system according to an embodiment of the present invention. As shown in fig. 2, the network system includes a plurality of network servers and domain name servers. At least one network site may be operated or supported in the network server. In some cases, each web server runs or supports only one web site. The network station may provide various types of services. Each network service has a processor, memory, flow control chip, etc. hardware devices therein, and these hardware devices may be considered as hardware layers. When the associated network site needs to be determined, the flow control chip causes the network server where the first network site is located to send the domain name of the first network site to the domain name server, so that the domain name server determines the content category to which the first network site belongs based on the domain name of the first network site. It should be appreciated that the domain name server may not only perform domain name resolution, but may also provide or maintain category information (content categories) for domain names or sites. For example, the content categories may be cloud storage sites, domain-specific service sites, and the like.
In one embodiment, the domain name server selects a plurality of network sites from all network sites except the first network site in the content category to which the first network site belongs, and uses the selected plurality of network sites as a plurality of associated network sites belonging to the same content category as the first network site; and transmitting the attribute information of each associated network station to a network server where the first network station is located. It should be appreciated that in one embodiment, any two of the plurality of associated network stations are not on the same network server.
Preferably, the obtaining means 501 is specifically configured to determine, by using the domain name server, a total number of visited times in a predetermined time period for each of all network stations except the first network station in the content category to which the first network station belongs; and selecting a first predetermined number of the plurality of network stations having the highest total number of accesses. Alternatively, the domain name server selects a plurality of network stations among all network stations except the first network station in the content category to which the first network station belongs, including: the domain name server randomly selects a first predetermined number of the plurality of network stations among all network stations except the first network station in the content category to which the first network station belongs.
As shown in fig. 2, the content category to which the first network station belongs includes N site A domain name server selecting N among all network stations except the first network station ANsite A network station for selecting N ANsite A network station is used as an associated network station, wherein N ANsite Less than N site 。N ANsite The network sites are located at N ANsite And a personal network server.
The first determining device 502 is configured to obtain server status information of a network server where each associated network station is located, and determine a network delay between the network server where each associated network station is located and the network server where the first network station is located.
In one embodiment, the server state information is server state data of the network server within a current statistical time section, the server state data within the current statistical time section including: average processor usage, average remaining storage capacity, number of session connections, and amount of data transfer; the current statistical time section is the statistical time section closest to the current time;
in one embodiment, before acquiring the server state information of the network server where each associated network station is located, the method further includes counting server state data of the network server where each associated network station is located according to the statistical time section, and forming server state information of the server state data of the network server where each associated network station is located in a plurality of statistical time sections.
And selecting means 503 for causing the flow control chip to select a plurality of redirect websites among a plurality of associated websites belonging to the same content category as the first website based on the server status information of the network server where each associated website is located and the network delay between the network server where the first website is located.
In one embodiment, the selecting device 503 is specifically configured to obtain, from the server status information of the network server where each associated network station is located, an average processor usage rate, an average remaining storage capacity ratio, a session connection number, and a data transmission amount of the network server where each associated network station is located in a current statistical time section; determining site performance parameters of each associated network site of the plurality of associated network sites belonging to the same content category as the first network site based on an average processor usage, an average remaining storage capacity ratio, a number of session connections, and a data transfer amount of the network server in which each associated network site is located, and a network delay between the network server and the network server in which the first network site is located, for a current statistical time period; and selecting a plurality of redirect websites from a plurality of associated websites belonging to the same content category as the first website based on the website performance parameter. As shown in fig. 3, the associated network station 2-4 is selected as the redirecting network station.
In one embodiment, the selecting means 503 is specifically configured to calculate the session factor of the network server where each associated network station is located based on the average remaining storage capacity ratio, the number of session connections, and the data transmission amount of the network server where each associated network station is located in the current statistical time section:
Figure SMS_169
wherein ,
Figure SMS_170
for the session factor of the network server where the p-th associated network station is located,
Figure SMS_171
for the data transmission quantity of the network server of the p-th associated network site in the current statistical time section,/for the network server of the p-th associated network site>
Figure SMS_172
For the number of session connections of the network server where the p-th associated network station is located in the current statistical time section,/for the number of session connections of the network server where the p-th associated network station is located in the current statistical time section>
Figure SMS_173
The average remaining storage capacity ratio of the network server where the p-th associated network station is located in the current statistical time section; />
Figure SMS_174
,p and />
Figure SMS_175
Is a natural number and->
Figure SMS_176
For the number of associated network stations;
in one embodiment, the selecting means 503 is specifically configured to calculate the delay factor of the network server where each associated network station is located based on the network delay between the network server where each associated network station is located and the network server where the first network station is located:
Figure SMS_177
wherein ,
Figure SMS_178
for the delay factor of the network server where the p-th associated network station is located,
Figure SMS_179
For the network delay between the network server of the p-th associated network site and the network server of the first network site,/for the network delay between the network server of the p-th associated network site and the network server of the first network site>
Figure SMS_180
For the maximum value in the network delay between the network server where the plurality of associated network stations are located and the network server where the first network station is located +.>
Figure SMS_181
Network server for a plurality of associated network sites and network server for a first network siteMinimum in the network delay between, for example>
Figure SMS_182
Is the median of the network delay between the network server where the plurality of associated network stations are located and the network server where the first network station is located.
In one embodiment, the selecting means 503 is specifically configured to determine the site performance parameter of each associated network site of the plurality of associated network sites belonging to the same content category as the first network site based on the average processor usage, the session factor, and the delay factor of the network server in which each associated network site is located in the current statistical time segment:
Figure SMS_183
/>
Figure SMS_184
wherein ,
Figure SMS_185
for the site performance parameters of the p-th associated network site in the current statistical time interval, +.>
Figure SMS_186
The average processor utilization for the network server where the p-th associated network site is located in the current statistical time segment.
In one embodiment, the selecting means 503 is specifically configured to rank the plurality of associated network stations belonging to the same content category as the first network station in descending order of the station performance parameters, thereby generating a ranked list of associated network stations; and starting from the associated network station with the largest station performance parameter, selecting a second predetermined number of the plurality of associated network stations in descending order of the station performance parameter in the ordered list of associated network stations, and taking the selected second predetermined number of the plurality of associated network stations as a plurality of redirecting network stations.
Second determining means 504, configured to cause the flow control chip to determine, for each redirect network site, a respective copy file set based on the access information of the network server in which the first network site is located within a predetermined length of time and the server hardware information of the network server in which each redirect network site is located, and determine an address set of the network address for which no access redirection is performed.
In one embodiment, the second determining device 504 is specifically configured to cause the flow control chip to obtain a plurality of access information records from access information of a network server where the first network station is located within a predetermined time period, where each access information record includes: a visitor's network address and a file information table, the file information table comprising: file identifier and number of accesses;
In one embodiment, the second determining device 504 is specifically configured to determine, based on the plurality of access information records, a number of times each file in the network server where the first network site is located is accessed within a predetermined time period, and order all the files in the network server where the first network site is located based on the number of times the file is accessed within the predetermined time period, so as to generate a file list and determine the number of files in the file list. And counting the file information table of the network address of each visitor, thereby determining the accessed times of each file in a preset time length.
In one embodiment, the second determining device 504 is specifically configured to cause the flow control chip to obtain, from server hardware information of a network server where each redirect network site is located, processor information and memory information of the network server where each redirect network site is located; determining a file replication ratio for each redirect website based on processor information and memory information of a network server where each redirect website is located; and determining a respective set of replicated files for each redirect website based on the file replication ratio and the file list for each redirect website, respectively.
In one embodiment, the second determining device 504 is specifically configured to obtain, from the processor information of the network server where each redirect network site is located, the number of processors and the number of cores of each processor, where the number of cores of each processor in the same network server is the same; acquiring total storage capacity and residual storage capacity from memory information of a network server where each redirection network site is located; determining server performance parameters of a network server where each redirect network site is located based on the number of processors, the number of cores per processor, the total storage capacity, and the remaining storage capacity; and determining a file replication ratio for each redirect website based on the server performance parameters of the network server where each redirect website is located.
In one embodiment, the second determining means 504 is specifically configured to determine the server performance parameter of the network server where each redirect network site is located based on the following formula:
Figure SMS_187
wherein ,
Figure SMS_189
for the server performance parameter of the network server where the q-th redirect network station is located,/->
Figure SMS_194
For the number of processors of the network server where the qth redirect network site is located, +. >
Figure SMS_197
For the number of cores per processor of the network server where the qth redirect network site is located,/for each processor of the network server where the qth redirect network site is located>
Figure SMS_190
Is that
Figure SMS_193
Maximum value of>
Figure SMS_196
For the network where the qth redirect network site is locatedResidual storage capacity of server,/->
Figure SMS_199
The total storage capacity of the network server where the qth redirect network site is located; />
Figure SMS_188
,/>
Figure SMS_192
Redirecting the number of network stations; />
Figure SMS_195
Figure SMS_198
For the first adjustment factor, +.>
Figure SMS_191
Is the second adjustment coefficient.
In one embodiment, the second determining means 504 is specifically configured to determine a file replication ratio for each redirect website based on the following formula:
Figure SMS_200
wherein ,
Figure SMS_201
file replication ratio for the qth redirect website,
Figure SMS_202
for the server performance parameter of the network server where the q-th redirect network station is located,
Figure SMS_203
is the maximum of the server performance parameters of the network server where the plurality of redirect network sites are located.
In one embodiment, the second determining means 504 is specifically configured to determine the number of duplicate files for each redirect website based on the file replication ratio and the number of files in the file list for each redirect website:
Figure SMS_204
wherein ,
Figure SMS_205
the number of duplicate files for the q-th redirect website, +.>
Figure SMS_206
For the number of files in the file list, +. >
Figure SMS_207
For->
Figure SMS_208
and />
Figure SMS_209
Is rounded down; in the file list, from the file having the largest number of accessed times within a predetermined length of time, selecting +.>
Figure SMS_210
Files, selected +.>
Figure SMS_211
The files form a duplicate set of files for the qth redirect website.
In one embodiment, the second determining means 504 is specifically configured to determine, based on the plurality of access information records, the number of network addresses of the visitors, and the number of accesses to the first network site by each of the network addresses of the visitors; ordering the network addresses of each visitor based on the descending order of the number of accesses to the first network site to generate a network address ordered list; based on the access status value and the status value threshold, determining a ratio of network addresses in the ordered list of network addresses for which no access redirection is performed:
Figure SMS_212
wherein ,
Figure SMS_213
for the ratio of network addresses in the ordered list of network addresses for which no access redirection is performed, +.>
Figure SMS_214
For accessing status values +.>
Figure SMS_215
Is a state value threshold.
In one embodiment, the second determining means 504 is specifically configured to determine the number of network addresses in the ordered list of network addresses for which no access redirection is performed based on the ratio of network addresses in the ordered list of network addresses for which no access redirection is performed and the number of network addresses of the visitor.
Figure SMS_216
wherein ,
Figure SMS_217
for the number of network addresses in the ordered list of network addresses for which no access redirection is performed,
Figure SMS_218
for the number of network addresses of the visitor, +.>
Figure SMS_219
For->
Figure SMS_220
And
Figure SMS_221
is rounded down;
in the network address ordered list, starting from the network address of the visitor having the highest number of accesses to the first network station, the following is performedDescending order of access times, selection
Figure SMS_222
The network address of the individual visitor to be selected +.>
Figure SMS_223
The network addresses of the individual visitors constitute a set of addresses of network addresses for which no access redirection is performed.
And the sending means 505 is configured to cause the flow control chip to send the replicated file sets to the network servers where the corresponding redirect network sites are located, so that the network server where each redirect network site is located provides file access services for the redirected visitor based on the respective replicated file set.
In one embodiment, the flow control chip sends the replicated file sets to the network servers at which the respective redirect network sites are located, such that each redirect network site's network server provides file access services to redirected visitors based on the respective replicated file sets, comprising: the flow control chip sends the copy file set to a network server where the corresponding redirection network site is located; the network server where the corresponding redirect network site is located stores the respective set of duplicate files in local storage so that the network server where each redirect network site is located can provide file access services to the redirected visitor based on the respective set of duplicate files in local storage. As shown in fig. 4, the flow control chip sends the copy file sets of each of the redirect network stations 2, 3, and 4 to the network server where the redirect network stations 2, 3, and 4 are located, respectively.
The setting device is used for enabling the flow control chip to prompt the network server where the first network station is located to set an access jump strategy based on the address set of the network address which does not carry out access redirection, so that the network server where the first network station is located carries out load balancing processing according to the network address of the visitor, and specifically comprises the following steps: the flow control chip causes an access jump strategy to be set at a network server where the first network station is located, the access jump strategy enables the network server where the first network station is located to process an access request of a network address in an address set of network addresses which are not subjected to access redirection, and randomly forwards the access request of the network address outside the address set of the network addresses which are not subjected to access redirection to one of the network servers where the plurality of redirection network stations are located, so that the network server where the first network station is located carries out load balancing processing according to the network address of a visitor.
The invention has been described with reference to a few embodiments. However, as is well known to those skilled in the art, other embodiments than the above disclosed are equally possible within the scope of the invention.
Generally, all terms used are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise therein. All references to "a/an/the [ means, component, etc. ]" are to be interpreted openly as referring to at least one instance of said means, component, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated.

Claims (28)

1. A method of load balancing by a flow control chip, the method comprising:
when the flow control chip of the network server where the first network station is located detects that the access state value of the first network station in the preset time length is larger than the state value threshold value, a plurality of associated network stations belonging to the same content category as the first network station are acquired;
acquiring server state information of a network server where each associated network station is located and determining network delay between the network server where each associated network station is located and the network server where the first network station is located;
the flow control chip selects a plurality of redirection network sites from a plurality of associated network sites belonging to the same content category as the first network site based on server state information of a network server where each associated network site is located and network delay between the network server where the first network site is located;
The flow control chip respectively determines a respective copy file set for each redirection network station based on access information of a network server where the first network station is located in a preset time length and server hardware information of the network server where each redirection network station is located, and determines an address set of a network address where access redirection is not performed;
the flow control chip sends the copy file set to a network server where a corresponding redirection network site is located, so that the network server where each redirection network site is located provides file access service for redirected visitors based on the copy file set; and
the flow control chip causes the network server where the first network station is located to set an access jump strategy based on the address set of the network address which does not carry out access redirection, so that the network server where the first network station is located carries out load balancing processing according to the network address of the visitor.
2. The method of claim 1, wherein the flow control chip determines the access status value of the first network station for a predetermined length of time in a sliding time window.
3. The method of claim 2, the sliding time window having a time length equal to the predetermined time length and the predetermined time length being a period of time prior to a current time;
the method further includes determining a sliding time step value for the sliding time window in advance, the sliding time step value being less than a predetermined length of time.
4. The method of claim 1, further comprising determining the status value threshold based on historical access data of the first network station.
5. The method of claim 4, wherein determining the status value threshold based on historical access data for the first network station comprises:
acquiring historical access data of the first network station, the historical access data comprising a plurality of access information items, each access information item comprising: the network address of the visitor, the access start time, the access end time and the number of accessed files;
dividing the time length between the historical starting time and the historical ending time related to the historical access data into a plurality of time units which are continuously distributed in time, wherein any two time units do not have an overlapping part and the time length of each time unit is the same;
Determining an attribution time unit for the access information items based on the time unit of the access ending time, so that all the access information items in the historical access data are divided into a plurality of time units, and each time unit comprises a plurality of access information items; and
the state value threshold is determined based on a plurality of access information items for each time unit.
6. The method of claim 5, wherein determining the status value threshold based on the plurality of access information items for each time unit comprises:
determining an access duration length of each of the plurality of access information items for each time unit based on a time length between an access end time and an access start time in the access information items;
calculating a time adjustment parameter for each access information item for each time cell:
Figure QLYQS_1
wherein ,
Figure QLYQS_2
the jth access information for the ith time unitThe time adjustment parameter of the item is set,
Figure QLYQS_3
the access duration length of the jth access information item for the ith time unit;
Figure QLYQS_4
the number of access information items for the ith time unit,/->
Figure QLYQS_5
,/>
Figure QLYQS_6
For the number of time units>
Figure QLYQS_7
I and j are natural numbers;
calculating a time weighted average of the number of accessed files for the plurality of time units based on the time adjustment parameter and the number of accessed files for each access information item for each time unit;
Figure QLYQS_8
wherein ,
Figure QLYQS_9
time-weighted average of the number of files accessed for a plurality of time units, +.>
Figure QLYQS_10
The number of accessed files in the jth access information item for the ith time unit;
calculating the state value threshold based on a time weighted average of the number of files accessed in the plurality of time units, a maximum of the number of files accessed in the plurality of time units, and a minimum of the number of files accessed in the plurality of time units:
Figure QLYQS_11
wherein ,
Figure QLYQS_12
is a state value threshold, ++>
Figure QLYQS_13
For a maximum number of files accessed in a number of time units,
Figure QLYQS_14
is the minimum of the number of files accessed in a plurality of time units.
7. The method of claim 3, further comprising the flow control chip determining an access status value of the first network station for a predetermined length of time in a sliding time window, comprising:
and when the flow control chip detects that the sliding time window moves by the sliding time step value, determining an access state value of the first network station in a preset time length of the current sliding time window.
8. The method of claim 7, wherein determining the access status value of the first network station for a predetermined length of time of a current sliding time window comprises:
The flow control chip obtains historical access data of the first network station, wherein the historical access data comprises a plurality of access information items, and each access information item comprises: the network address of the visitor, the access start time, the access end time and the number of accessed files;
the flow control chip determines the access information items with the access start time and the access end time both in the current sliding time window as the current access information items in the plurality of access information items of the historical access data, so as to obtain a plurality of current access information items; and
the flow control chip determines an access status value for the first network station based on the plurality of current access information items.
9. The method of claim 8, wherein the flow control chip determining the access status value of the first network station based on the plurality of current access information items comprises:
determining an access status value for the first network station based on the following formula:
Figure QLYQS_15
wherein ,
Figure QLYQS_16
for the access status value of the first network station, is->
Figure QLYQS_17
The number of accessed files in the kth current access information item; />
Figure QLYQS_18
,/>
Figure QLYQS_19
Is the number of current access information items.
10. The method of claim 1, wherein acquiring a plurality of associated network stations belonging to the same content category as the first network station comprises:
The flow control chip causes a network server where a first network site is located to send a domain name of the first network site to a domain name server;
the domain name server determines the content category to which the first network station belongs based on the domain name of the first network station;
the domain name server selects a plurality of network stations from all network stations except the first network station in the content category to which the first network station belongs, and takes the selected plurality of network stations as a plurality of associated network stations belonging to the same content category as the first network station; and
and transmitting the attribute information of each associated network station to a network server where the first network station is located.
11. The method of claim 1 or 10, wherein any two of the plurality of associated network stations are not on the same network server.
12. The method of claim 10, wherein the domain name server selects a plurality of network stations among all network stations other than the first network station in a content category to which the first network station belongs, comprising:
the domain name server determines the total visited times in the preset time period of each network station in all network stations except the first network station in the content category to which the first network station belongs; and
A first predetermined number of network stations is selected that has a maximum total number of accesses.
13. The method of claim 10, wherein the domain name server selects a plurality of network stations among all network stations other than the first network station in a content category to which the first network station belongs, comprising:
the domain name server randomly selects a first predetermined number of the plurality of network stations among all network stations except the first network station in the content category to which the first network station belongs.
14. The method of claim 1, the server state information being server state data of a network server within a current statistical time section, the server state data within the current statistical time section comprising: average processor usage, average remaining storage capacity, number of session connections, and amount of data transfer; the current statistical time section is the statistical time section closest to the current time.
15. The method of claim 1, further comprising, prior to obtaining server state information for the network server at which each associated network site is located,
and counting the server state data of the network server of each associated network station according to the counting time section, and forming the server state data of the network server of each associated network station in a plurality of counting time sections into server state information.
16. The method of claim 14, wherein the flow control chip selects a plurality of redirecting network sites among a plurality of associated network sites belonging to the same content category as the first network site based on server state information of a network server where each associated network site is located and network latency between the network server where the first network site is located, comprising:
the flow control chip acquires server state information of a network server where each associated network station is located, and average processor utilization rate, average remaining storage capacity ratio, session connection number and data transmission quantity of the network server where each associated network station is located in a current statistical time section;
determining site performance parameters of each associated network site of a plurality of associated network sites belonging to the same content category as the first network site based on average processor usage, average remaining storage capacity ratio, session connection number and data transmission amount of the network server of each associated network site within the current statistical time period, and network delay between the network server of the first network site; and
A plurality of redirect websites is selected among a plurality of associated websites belonging to the same content category as the first website based on the website performance parameters.
17. The method of claim 16, wherein determining the site performance parameters for each of the plurality of associated network sites belonging to the same content category as the first network site based on the average processor usage, the average remaining storage capacity ratio, the number of session connections, and the amount of data transfer for the current statistical time segment for the network server at which each associated network site resides, and the network delay between the network server at which the first network site resides, comprises:
based on the average remaining storage capacity ratio, the number of session connections and the data transmission amount of the network server of each associated network station in the current statistical time section, calculating the session factor of the network server of each associated network station:
Figure QLYQS_20
wherein ,
Figure QLYQS_21
for the session factor of the network server where the p-th associated network station is located,
Figure QLYQS_22
for the data transmission quantity of the network server of the p-th associated network site in the current statistical time section,/for the network server of the p-th associated network site >
Figure QLYQS_23
For the number of session connections of the network server where the p-th associated network station is located in the current statistical time section,/for the number of session connections of the network server where the p-th associated network station is located in the current statistical time section>
Figure QLYQS_24
Average remaining in the current statistical time segment for the network server where the p-th associated network site is locatedA ratio of remaining storage capacity;
Figure QLYQS_25
,p and />
Figure QLYQS_26
Is a natural number and->
Figure QLYQS_27
For the number of associated network stations;
calculating a delay factor of a network server of each associated network site based on a network delay between the network server of each associated network site and the network server of the first network site:
Figure QLYQS_28
wherein ,
Figure QLYQS_29
is the delay factor of the network server where the p-th associated network site is located, +.>
Figure QLYQS_30
For the network delay between the network server where the p-th associated network station is located and the network server where the first network station is located,/for the network delay between the p-th associated network station and the network server where the first network station is located>
Figure QLYQS_31
For the maximum value in the network delay between the network server where the plurality of associated network stations are located and the network server where the first network station is located, +.>
Figure QLYQS_32
For the minimum value in the network delay between the network server where the plurality of associated network stations are located and the network server where the first network station is located,/->
Figure QLYQS_33
A median of network delay between a network server where a plurality of associated network sites are located and a network server where the first network site is located;
Determining a site performance parameter for each associated network site of the plurality of associated network sites belonging to the same content category as the first network site based on an average processor usage, a session factor, and a delay factor for a current statistical time segment of a network server in which each associated network site is located:
Figure QLYQS_34
Figure QLYQS_35
wherein ,
Figure QLYQS_36
for the station performance parameters of the p-th associated network station within the current statistical time interval,
Figure QLYQS_37
the average processor utilization for the network server where the p-th associated network site is located in the current statistical time segment.
18. The method of claim 16, wherein selecting a plurality of redirecting network sites among a plurality of associated network sites belonging to the same content category as the first network site based on the site performance parameters comprises:
sorting a plurality of associated network stations belonging to the same content category as the first network station in descending order of station performance parameters, thereby generating a sorted list of associated network stations; and
and starting from the associated network station with the largest station performance parameter, selecting a second preset number of the plurality of associated network stations in the descending order of the station performance parameter in the ordered list of the associated network stations, and taking the selected second preset number of the plurality of associated network stations as a plurality of redirection network stations.
19. The method of claim 1, wherein the flow control chip determines a respective set of replicated files for each redirect network site based on access information of a network server where the first network site is located for a predetermined length of time and server hardware information of the network server where each redirect network site is located, comprising:
the flow control chip obtains a plurality of access information records from access information of a network server of the first network site in a preset time length, wherein each access information record comprises: a network address of a visitor and a file information table, the file information table comprising: file identifier and number of accesses;
determining the accessed times of each file in a network server of the first network site in a preset time length based on a plurality of access information records, sorting all files in the network server of the first network site in order to generate a file list and determining the number of files in the file list based on the accessed times in the preset time length;
the flow control chip acquires processor information and memory information of a network server where each redirection network site is located from server hardware information of the network server where each redirection network site is located;
Determining a file replication ratio for each redirect website based on processor information and memory information of a network server where each redirect website is located; and
a respective set of replicated files is determined for each redirect website based on the file replication rate and the file list for each redirect website.
20. The method of claim 19, wherein determining a file replication ratio for each redirect website based on processor information and memory information of a network server at which each redirect website is located comprises:
acquiring the number of processors and the number of cores of each processor from the processor information of the network server where each redirection network site is located, wherein the number of cores of each processor in the same network server is the same;
acquiring total storage capacity and residual storage capacity from memory information of a network server where each redirection network site is located;
determining server performance parameters of a network server where each redirect network site is located based on the number of processors, the number of cores per processor, the total storage capacity, and the remaining storage capacity; and
The file replication ratio of each redirect website is determined based on the server performance parameters of the network server where each redirect website is located.
21. The method of claim 20, wherein determining server performance parameters for the network server at which each redirect network site resides based on the number of processors, the number of cores per processor, the total storage capacity, and the remaining storage capacity comprises:
the server performance parameters for the network server where each redirect network site is located are determined based on the following formula:
Figure QLYQS_38
wherein ,
Figure QLYQS_39
for the server performance parameter of the network server where the q-th redirect network station is located,
Figure QLYQS_40
where the network server where the network site is located is the q-th redirect network siteNumber of processors->
Figure QLYQS_41
For the number of cores per processor of the network server where the qth redirect network site is located,/for each processor of the network server where the qth redirect network site is located>
Figure QLYQS_42
Is->
Figure QLYQS_43
Maximum value of>
Figure QLYQS_44
For the remaining storage capacity of the network server where the qth redirect network site is located,
Figure QLYQS_45
the total storage capacity of the network server where the qth redirect network site is located;
Figure QLYQS_46
,/>
Figure QLYQS_47
redirecting the number of network stations; />
Figure QLYQS_48
,/>
Figure QLYQS_49
For the first adjustment factor, +.>
Figure QLYQS_50
Is the second adjustment coefficient.
22. The method of claim 21, wherein determining a file replication ratio for each redirect website based on server performance parameters of a network server where each redirect website is located comprises:
The file replication ratio for each redirect website is determined based on the following formula:
Figure QLYQS_51
wherein ,
Figure QLYQS_52
file copy ratio for the qth redirect website,/->
Figure QLYQS_53
For the server performance parameter of the network server where the q-th redirect network station is located,/->
Figure QLYQS_54
Is the maximum of the server performance parameters of the network server where the plurality of redirect network sites are located.
23. The method of claim 22, wherein determining a respective set of replicated files for each redirect website based on the file replication rate and the file list for each redirect website, respectively, comprises:
determining the number of duplicate files for each redirect website based on the file replication ratio for each redirect website and the number of files in the file list:
Figure QLYQS_55
wherein ,
Figure QLYQS_56
the number of duplicate files for the q-th redirect website, +.>
Figure QLYQS_57
For the number of files in the file list, +.>
Figure QLYQS_58
For->
Figure QLYQS_59
and />
Figure QLYQS_60
Is rounded down;
in the file list, from the file with the largest accessed number within a predetermined time length, selecting in descending order of the accessed number
Figure QLYQS_61
Files, selected +.>
Figure QLYQS_62
The files form a duplicate set of files for the qth redirect website.
24. The method of claim 19, wherein determining the set of addresses of network addresses for which access redirection is not performed comprises:
determining a number of network addresses of the visitors based on the plurality of access information records, and a number of accesses to the first network site by the network address of each visitor;
ordering the network addresses of each visitor based on the descending order of the number of accesses to the first network site to generate a network address ordered list;
determining a ratio of network addresses in the ordered list of network addresses that are not subject to access redirection based on the access status value and the status value threshold:
Figure QLYQS_63
wherein ,
Figure QLYQS_64
the ratio of network addresses in the ordered list of network addresses for which no access redirection is performed,
Figure QLYQS_65
for accessing status values +.>
Figure QLYQS_66
Is a state value threshold;
determining the number of network addresses in the ordered list of network addresses that are not access redirected based on the ratio of network addresses in the ordered list of network addresses that are not access redirected and the number of network addresses of the visitor:
Figure QLYQS_67
wherein ,
Figure QLYQS_68
for the number of network addresses in the ordered list of network addresses for which no access redirection is performed, +.>
Figure QLYQS_69
For the number of network addresses of the visitor, +. >
Figure QLYQS_70
For->
Figure QLYQS_71
And
Figure QLYQS_72
is rounded down;
selecting, in the ordered list of network addresses, from the network address of the visitor having the highest number of accesses to the first network site, in descending order of the number of accesses
Figure QLYQS_73
Network ground of individual visitorsAddress, will select +.>
Figure QLYQS_74
The network addresses of the individual visitors constitute a set of addresses of network addresses for which no access redirection is performed.
25. The method of claim 1, wherein the flow control chip sends the replicated filesets to the network servers at which the respective redirect network sites reside, such that each redirect network site's network server provides file access services to redirected visitors based on the respective replicated filesets, comprising:
the flow control chip sends the copy file set to a network server where the corresponding redirection network site is located;
the network server where the corresponding redirect network site is located stores the respective set of duplicate files in local storage so that the network server where each redirect network site is located can provide file access services to the redirected visitor based on the respective set of duplicate files in local storage.
26. The method of claim 1, wherein the flow control chip causes the network server at the first network site to set an access jump policy based on a set of addresses of network addresses for which access redirection is not performed, such that the network server at the first network site performs load balancing processing according to the network address of the visitor, comprising:
the flow control chip causes an access jump strategy to be set at a network server where the first network station is located, the access jump strategy enables the network server where the first network station is located to process an access request of a network address in an address set of network addresses which are not subjected to access redirection, and randomly forwards the access request of the network address outside the address set of the network addresses which are not subjected to access redirection to one of the network servers where the plurality of redirection network stations are located, so that the network server where the first network station is located carries out load balancing processing according to the network address of a visitor.
27. A system for load balancing by a flow control chip, the system comprising:
the acquisition device is used for acquiring a plurality of associated network stations belonging to the same content category as the first network station when the flow control chip of the network server where the first network station is located detects that the access state value of the first network station in the preset time length is greater than the state value threshold value;
A first determining device, configured to obtain server state information of a network server where each associated network station is located, and determine a network delay between the network server where each associated network station is located and the network server where the first network station is located;
selecting means for causing the flow control chip to select a plurality of redirect network sites among a plurality of associated network sites belonging to the same content category as the first network site based on server state information of a network server where each associated network site is located and network delay between the network server where the first network site is located;
second determining means for causing the flow control chip to determine, for each redirect network site, a respective copy file set based on access information of a network server in which the first network site is located within a predetermined length of time and server hardware information of the network server in which each redirect network site is located, and to determine an address set of network addresses for which access redirection is not performed;
the sending device is used for prompting the flow control chip to send the copy file set to the network server where the corresponding redirection network site is located, so that the network server where each redirection network site is located provides file access service for redirected visitors based on the respective copy file set; and
And the setting device is used for enabling the flow control chip to prompt the network server where the first network station is located to set an access jump strategy based on the address set of the network address which does not carry out access redirection, so that the network server where the first network station is located carries out load balancing processing according to the network address of the visitor.
28. A system for load balancing by a flow control chip, comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the method of any one of claims 1-26.
CN202310448157.XA 2023-04-24 2023-04-24 Method and system for load balancing by flow control chip Active CN116155909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310448157.XA CN116155909B (en) 2023-04-24 2023-04-24 Method and system for load balancing by flow control chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310448157.XA CN116155909B (en) 2023-04-24 2023-04-24 Method and system for load balancing by flow control chip

Publications (2)

Publication Number Publication Date
CN116155909A true CN116155909A (en) 2023-05-23
CN116155909B CN116155909B (en) 2023-06-27

Family

ID=86354732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310448157.XA Active CN116155909B (en) 2023-04-24 2023-04-24 Method and system for load balancing by flow control chip

Country Status (1)

Country Link
CN (1) CN116155909B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045400A (en) * 2010-12-29 2011-05-04 北京世纪互联工程技术服务有限公司 Method and system for synchronizing file content
CN103036994A (en) * 2012-12-18 2013-04-10 曙光信息产业(北京)有限公司 Cloud storage system capable of achieving load balance
CN103347068A (en) * 2013-06-26 2013-10-09 中国(南京)未来网络产业创新中心 Method for accelerating network caching based on proxy cluster
CN104580526A (en) * 2015-02-03 2015-04-29 浪潮电子信息产业股份有限公司 Close-by visit and load balance scheduling method in high-performance Web service network
CN104994029A (en) * 2015-06-23 2015-10-21 浪潮电子信息产业股份有限公司 Link load balance outbound session persistence method based on intelligent learning algorithm
US9450875B1 (en) * 2011-09-23 2016-09-20 Google Inc. Cooperative fault tolerance and load balancing
CN108366110A (en) * 2018-02-05 2018-08-03 山东地主网络科技创新有限公司 A kind of website data interactive system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045400A (en) * 2010-12-29 2011-05-04 北京世纪互联工程技术服务有限公司 Method and system for synchronizing file content
US9450875B1 (en) * 2011-09-23 2016-09-20 Google Inc. Cooperative fault tolerance and load balancing
CN103036994A (en) * 2012-12-18 2013-04-10 曙光信息产业(北京)有限公司 Cloud storage system capable of achieving load balance
CN103347068A (en) * 2013-06-26 2013-10-09 中国(南京)未来网络产业创新中心 Method for accelerating network caching based on proxy cluster
CN104580526A (en) * 2015-02-03 2015-04-29 浪潮电子信息产业股份有限公司 Close-by visit and load balance scheduling method in high-performance Web service network
CN104994029A (en) * 2015-06-23 2015-10-21 浪潮电子信息产业股份有限公司 Link load balance outbound session persistence method based on intelligent learning algorithm
CN108366110A (en) * 2018-02-05 2018-08-03 山东地主网络科技创新有限公司 A kind of website data interactive system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
卢卓君: "DN网络中一种新的负载平衡技术", 《计算机仿真》, vol. 28, no. 1 *

Also Published As

Publication number Publication date
CN116155909B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN109145210B (en) Information recommendation method and device and storage medium
CN106776660A (en) A kind of information recommendation method and device
RU2731654C1 (en) Method and system for generating push-notifications associated with digital news
CN103647800B (en) Recommend the method and system of application resource
US9104970B2 (en) Method and system for creating a predictive model for targeting web-page to a surfer
US7120615B2 (en) Neural network system and method for controlling information output based on user feedback
US20150120722A1 (en) Method and system for providing multimedia content recommendations
US20150213363A1 (en) Method and system for providing targeted content to a surfer
US20070112719A1 (en) System and method for dynamically generating and managing an online context-driven interactive social network
CN109190070A (en) A kind of data processing method, device, system and application server
US20100153411A1 (en) Socially Collaborative Filtering for Providing Recommended Content to a Website for Presentation to an Identified User
EP1628231A2 (en) System and method for ranking search results based on tracked user preferences
CN109672757B (en) File access method and file access processing device
US20140215008A1 (en) Network method and apparatus
CN109359217A (en) A kind of user interest degree calculation method, server and readable storage medium storing program for executing
CN111782692A (en) Frequency control method and device
CN102316167A (en) Website recommending method, system thereof and network server
CN109753421A (en) Optimization method, device, computer equipment and the storage medium of service system
Zeng et al. Toward cost‐effective replica placements in cloud storage systems with QoS‐awareness
WO2010037314A1 (en) A method for searching and the device and system thereof
CN101635686B (en) Resource management method
WO2014020076A1 (en) A method and appararus for providing a response to a query
WO2001055909A1 (en) System and method for bookmark management and analysis
CN116155909B (en) Method and system for load balancing by flow control chip
US9565224B1 (en) Methods, systems, and media for presenting a customized user interface based on user actions

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