CN107786614B - TMS application downloading self-adaptive strategy method - Google Patents
TMS application downloading self-adaptive strategy method Download PDFInfo
- Publication number
- CN107786614B CN107786614B CN201610786280.2A CN201610786280A CN107786614B CN 107786614 B CN107786614 B CN 107786614B CN 201610786280 A CN201610786280 A CN 201610786280A CN 107786614 B CN107786614 B CN 107786614B
- Authority
- CN
- China
- Prior art keywords
- downloading
- tms
- time point
- calculating
- pos
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07G—REGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
- G07G1/00—Cash registers
- G07G1/12—Cash registers electronically operated
- G07G1/14—Systems including one or more distant stations co-operating with a central processing unit
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0806—Configuration setting for initial configuration or provisioning, e.g. plug-and-play
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to a method for calculating a download request time point by TMS, which comprises the following steps: calculating whether PN is less than or equal to (DC/ST), if yes, calculating the downloading request time point according to the least concurrent fragmentation mode; calculating whether PN is less than or equal to (TCN × MCL × DC/ST ], if yes, calculating a downloading request time point according to a high concurrency fragmentation mode; when the system is close to a full load or overload closed state, forcibly adjusting the DC to be equal to the DCRV, and calculating a downloading request time point according to a high concurrency fragmentation mode; wherein the content of the first and second substances, PN is the number of POS terminals to be accessed in advance, DC is a downloading period, ST is the estimated duration of single downloading, TCN is the maximum concurrency number of TMS service, MCL is the concurrency degree of a strategy model, DCRV is an experience reference value of the downloading period, the invention combines two algorithms of high concurrency fragmentation and minimum concurrency fragmentation on a time slice discretization algorithm of a downloading request, and the method automatically adapts to the optimal algorithm according to the strategy elements, and smoothes the load of the server to the maximum extent.
Description
Technical Field
The invention relates to an application downloading strategy method, in particular to a method for calculating a downloading request time point by a TMS (traffic management system).
Background
When a new POS Terminal loader application is initialized or some applications are updated as necessary, the required applications may be downloaded locally by means of remote downloading of a TMS (Terminal Management System) application. Because the load and performance of the TMS system are limited, if there are a large number of POS application download requests at the same time, a large number of queues may be generated, resulting in a failure to process in time.
On the other hand, when a large number of requests come at the same time, the TMS server needs a long time of high load operation to process these application requests. While during other times the TMS server may be very idle. The load is high and low, and the fluctuation is large, which has a large negative effect on the performance of the server.
At present, in the TMS application downloading field, an effective method is not adopted generally, even if measures are taken, most of used modes or strategies are simplified, and the problems are not solved well. For example: only considering the TMS server to simply time-slice the downloading request of the POS, and not considering the abnormal conditions that the POS terminal misses the set time point due to abnormality, and the POS terminal is started up in a centralized manner to carry out the downloading request, and the like. In addition, only a single concurrency strategy is used, and an application scene with very strict requirements on timeliness of TMS downloading requests is not considered; in addition, because the strategy has many elements, complicated configuration and no experience value for reference, a user needs to have higher actual experience and corresponding skill, otherwise, unreasonable setting of the strategy and conflict between the strategies are easily caused; finally, various strategies cannot be flexibly set according to the application scene, and the method is rigid.
Disclosure of Invention
The present invention has been made in view of the above problems, and it is an object of the present invention to provide a method for TMS to calculate a download request time point, which overcomes or at least partially solves the above problems.
A method of TMS calculating a download request time point, the method comprising:
calculating whether PN is less than or equal to (DC/ST), if so, calculating a downloading request time point according to a minimum concurrent fragmentation mode, wherein the minimum concurrent fragmentation mode refers to that a TMS system processes and completes the request of downloading application of each POS machine as soon as possible in a non-concurrent or minimum concurrent mode;
calculating whether PN is less than or equal to (TCNxMCLxDC/ST), if so, calculating a downloading request time point according to a high concurrency fragment mode, wherein the high concurrency fragment mode refers to that a TMS (trusted service provider) system processes and finishes the request of downloading application of each POS machine in a high concurrency mode;
when the system is close to a full load or overload closed state, forcibly adjusting the DC to be equal to the DCRV, and calculating a downloading request time point according to a high concurrency fragmentation mode;
the method comprises the steps of obtaining a strategy model concurrency degree, a load cycle experience reference value and a load cycle experience reference value, wherein PN is the number of POS terminals accessed in advance, DC is the load cycle, ST is the estimated duration of single load, TCN is the maximum concurrency number of TMS service, MCL is the strategy model concurrency degree, and DCRV is the load cycle experience reference value.
Further, the least concurrent fragmentation mode is applicable in the following scenarios: the mode is automatically matched under the conditions that the updating timeliness requirement on TMS application is not high, the number of POS machines is not large, the TMS server side does not support high concurrency or the system performance is low.
Further, the applicable scenarios of the high-concurrency split mode are as follows: the mode is automatically matched under the conditions that the updating timeliness requirement on the TMS application is higher, the number of POS machines is larger, the TMS server supports high concurrency or the system performance is better.
Further, the step of calculating the download request time point in the least concurrent fragmentation mode specifically includes:
according to the formula TN=TS+(n‐1)×DC/ST,n:[1,PN]Calculating TN(ii) a N and corresponding TNStored in a MAP data structure, wherein TNThe time point is the time point distributed when the TMS is accessed to the POS for the nth time; t isSThe starting time point of the TMS in a certain cycle period CT is shown; n is a positive integer, which means a counting sequence of the POS downloading request of the TMS end, counting is started from 1, and n +1 is executed once each time access is required.
9. The method of claim 1, wherein the TMS calculates a download request time point,
the high concurrency fragment sharing mode calculates the downloading request time point, and the specific steps comprise:
according to the formula X ═ ((PN × ST)/DC)]Calculating the concurrency number X of the processing service in the single service time slice; according to the formula TN=TS+[(n‐1)/X)×DC/ST,n:[1,PN]Calculating the result TN(ii) a N and corresponding TNStored in a MAP data structure, wherein TNThe time point is the time point distributed when the TMS is accessed to the POS for the nth time; t isSThe starting time point of the TMS in a certain cycle period CT is shown; n is a positive integer, which means a counting sequence of the POS downloading request of the TMS end, counting is started from 1, and n +1 is executed once each time access is required.
Further, when DC is DCRV, X is TCN × MCL.
Further, the DC may be adjusted manually, preferably in a direction in which the DC increases.
Further, DC is equal to DCRV by default.
According to the strategy method, all POS terminals can orderly and dispersedly finish the downloading and updating of the application in the specified downloading period. The invention combines two modes of POS passive decentralized downloading request and POS active decentralized downloading request, the purpose of POS passive decentralized downloading is to avoid the occurrence of request congestion theoretically, and the purpose of POS active decentralized downloading is to avoid and control the congestion actively when the congestion situation occurs due to abnormal situation in practice, thereby finally realizing the self-adaptive congestion avoidance and control.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic flowchart of an adaptive policy method for TMS application downloading according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating an adaptive policy method for TMS application downloading according to another embodiment of the present invention.
Fig. 3 is a schematic diagram showing the influence of the setting of the pre-accessed POS terminal number PN and other policy elements on the system load according to the present invention.
Fig. 4 is a flowchart illustrating a method for calculating a download request time point by a TMS according to another embodiment of the present invention.
Fig. 5 is a schematic diagram of the relationship between the download period DC and the system load according to the present invention.
Fig. 6 is a flowchart illustrating an adaptive policy method for TMS application downloading according to another embodiment of the present invention.
Detailed Description
For the convenience of understanding the embodiments of the present invention, the following description will be further explained by taking several specific embodiments as examples in conjunction with the drawings, and the embodiments are not to be construed as limiting the embodiments of the present invention.
In order to more clearly illustrate the policy method of the present invention, a detailed description is first made of the policy elements used in the policy method of the present invention. In the strategy method of the invention, the following element strategies are provided: policy Number (Policy SN, PSN), Policy name, start date and end date, start Time and end Time, Number of POS terminals pre-accessed (POS Number, PN), estimated duration of single Download (Signal Time, ST), TMS service maximum Concurrency Number (TMS Concurrency Number, TCN), Policy Model Concurrency Level (MCL), Download period empirical Reference Value (DCRV), Download period (DC), congestion control factor (Hold control, HC), and the like.
The strategy method of the invention takes strategy elements as parameters and is divided into two types of formulated parameters and automatic parameters. The parameter setting means that the initial value is set according to the strategy application scene, and the parameter setting can be manually and dynamically adjusted. For example: for MCL, if the default value of 70% is not desired, other values, such as 20%, may be set. For DC, the default value is equal to the empirical reference value DCRV to avoid the case of too far spectra set manually, although the value can be adjusted manually to be larger. The automatic parameters are values obtained by the system according to a certain rule or the setting of drawn parameters, and are automatically calculated and generated. Specifically, the method comprises the following steps:
the policy number is an automatic parameter, and is an identification code which is automatically generated by the system and uniquely identifies a certain policy.
The strategy name is a parameter which is set manually by the Chinese name or brief explanation of the strategy.
The starting date and the ending date are the execution date range of the strategy task set by a human operator, and the parameters are drawn up.
The start time and the end time are specific time ranges in the execution date range of the strategy task set by a human operator, and the parameters are drawn up.
The pre-accessed POS terminal quantity PN is a planned POS terminal quantity with a parameter and a strategy task set manually.
The estimated time length ST of single download is a formulated parameter, and each terminal finishes the estimated time length of online download in a manually set strategy task.
The maximum concurrent number TCN of the TMS system is a maximum concurrent number which can be borne by the TMS server system of an execution strategy set manually and a parameter is drawn up.
The strategy model concurrency degree MCL is an automatic parameter and a formulated parameter, and refers to the percentage of the TMS service maximum concurrency number TCN occupied in the strategy. There is a default value, such as 70%, which may also be manually reset. The MCL can be used and set, so that the system performance can be exerted to the maximum extent, and meanwhile, the load of the system is not too high. In addition, for some POS terminals, after missing the downloading at the preset time point due to abnormal conditions, the random downloading request is initiated to the TMS, the MCL can prevent the load added by the TMS from being influenced by the similar conditions, and allowance is also reserved for congestion avoidance.
The download period experience reference value DCRV is an automatic parameter, and the experience reference value is automatically calculated by the system according to the related formulated parameter. DCRV is calculated as TCN × MCL. The larger the value, the longer the download period, and the smaller the system load. Conversely, the shorter the download period, the higher the system load. When MCL equals 100%, DCRV is theoretically minimal while the system is in maximum concurrent TCN full load operation. According to a large number of argumentations, MCL is generally set to be 50% -70%, and is reasonable.
The download period DC, which is an automatic parameter and also a proposed parameter, refers to the download period actually applied in the policy. The default value is equal to the experience reference value of the downloading period, and the setting can be manually changed again;
the congestion control factor HC is an automatic parameter and a proposed parameter, and means that when the POS terminal is in the active mode, the Time point NT (Next Time, NT) of the Next request of the POS terminal is calculated. The default value of HC is 1, and the setting can be manually changed again. The larger the HC is, the larger the NT offset is generated, so the smaller the probability of next congestion is, and the greater the probability of avoiding congestion. The cost is that its download update period becomes long, possibly exceeding DC. Therefore, not the larger the better, the more moderate.
As shown in fig. 1, according to an aspect of the present invention, there is provided an adaptive policy method for TMS application download, the method specifically includes the following steps:
step S110, the TMS system presets a time point of a request for the POS passive distributed downloading for the downloading request of each POS terminal. Specifically, the TMS service establishes a policy model, discretizes the time slice of downloading application or updating application of the POS terminal, and gives a reasonable request time point for the download request of each POS terminal in advance, thereby theoretically avoiding the occurrence of request congestion. The time point is given by the TMS system, which is equivalent to that the POS terminal is passive, so the POS passive distributed download request mode is called. The download request includes a download of the application program or a download of the application update program. According to the utilized condition of the TMS system, the time point of the request of the POS passive decentralized downloading can be immediate downloading of the POS terminal or downloading of the POS terminal at a later designated time point. The downloading of the POS terminal may be completed by the POS terminal automatically downloading at a time point specified by the TMS (a POS passive decentralized downloading mode, which is a time point calculated by discretizing a time slice by the TMS), or actively downloading at a time point specified by the POS terminal (a POS active decentralized downloading mode, which is a time point calculated by the POS actively according to an actual congestion condition).
The step of generating the request time point of the POS passive distributed downloading by the TMS specifically includes:
(1) the policy elements are initialized. Inputting proposed parameters PN, ST and TCN, setting MCL default values, for example, the default value is 70%, and the MCL default values can be updated and adjusted according to conditions. The strategy elements are combined with default fixing and dynamic adjustment, so that the flexibility of configuration and the applicability of multiple scenes are improved. For example: MCL is equal to 70% by default, DC is equal to DCRV by default, and the setting of the strategy elements can be changed again according to the actual application occasions.
(2) DCRV is calculated according to the formula DCRV ((PN × ST)/(TCN × MCL) ], and the time range T is calculated according to the formula T ═ (end date-start date +1) × (end time-start time) [, in the present invention, [) a "round-only" (i.e., "tail-out") representation of the values, such as: 0, [1.8, [ 1.3, [2.3, ] 2, and so on, as the same hereinafter. (]: the abbreviations without division for numerical values, such as (0.6) ═ 1, (1.8) ═ 2, (2.3) ═ 3, and the like, hereinafter the same.
(3) Judging whether the DCRV is matched with a proposed time range T or not, if the DCRV is less than or equal to T, indicating that the DCRV is matched, and enabling the DCRV to be in accordance with the expectation; and if the DCRV is larger than T, giving an error prompt and carrying out adaptive adjustment on the DCRV process. If DCRV is less than or equal to T, all downloading request tasks can be completed within the proposed time range theoretically; if DCRV > T indicates that all the downloading request tasks cannot be completed within the planned time range, the time range needs to be increased or other strategy parameters need to be adjusted, in this case, the strategy cannot be effective, and the system must give a corresponding error prompt to make adjustment. The process of adaptively adjusting the DCRV specifically includes: according to the application scene, reasonably adjusting the policy elements: PN, ST, TCN, MCL, start and end dates, start and end times; and calculating DCRV and T, and comparing and judging the DCRV and T until the DCRV is less than or equal to T, so as to meet the expectation.
(4) In case the DCRV is expected, a download request time point is calculated.
The method adopts a download period experience reference value DCRV as a reference, and the experience value is calculated by a system according to strategy elements PN, ST, TCN and MCL in a self-adaptive mode according to an algorithm. Manually investigate whether the DCRV is within the expected range. If the DCRV is not in the expected range, the parameters such as PN, ST, MCL and the like can be adjusted repeatedly according to the application scene until the DCRV is in the expected range. The DCRV adaptive adjustment process can avoid the situation that the strategy elements set manually are unreasonable, and is convenient for users.
Step S120, the TMS system judges whether each POS terminal finishes downloading within a given request time point, and if the POS terminal finishes downloading, the TMS system finishes downloading; if the downloading is not finished, the POS terminal passive distributed downloading request time point is given again when the POS terminal active distributed downloading request of the downloading is received. In the passive mode, the TMS system only gives a reference time point for downloading the TMS application by the POS terminal, and cannot really control the time point. When a large number of POS terminals miss the originally planned download time point for some reason and initiate a download request to the TMS system almost simultaneously, congestion may result. In order to solve the problem, a POS active distributed downloading request mode is combined in the method. The active distributed downloading request mode of the POS specifically comprises the following steps: when the POS terminal actively initiates a downloading request to cause request queuing and time-out, the request is directly returned, the POS terminal actively calculates the time point of the next request initiated to the TMS according to the strategy control factor HC, and when the POS terminal waits until the time point arrives, the POS terminal initiates a downloading request to the TMS again to obtain the POS passive decentralized downloading request time point initiated again by the TMS.
According to the embodiment of the invention, a strategy model is established in the TMS service, the POS downloading application time slice is discretized, and a reasonable request time point (POS passive decentralized downloading request) is given to the downloading request of each POS in advance, so that the occurrence of request congestion is avoided theoretically, and all POS terminals finish downloading or updating the application in an ordered and decentralized manner in a specified downloading period. When the congestion is caused by abnormal conditions, a mode of actively dispersing downloading requests by a POS (point of sale) can be adopted, network congestion during TMS (traffic management system) application downloading is avoided and controlled as much as possible, a large number of requests are prevented from being queued and waited in a concentrated mode, congestion is avoided and controlled, accordingly, congestion and smooth server load are avoided to the greatest extent, and large fluctuation of server load is avoided.
Corresponding to the foregoing embodiment, according to another aspect of the present invention, as shown in fig. 2, there is further provided an adaptive policy method for TMS application downloading, the method specifically includes the following steps:
in step S210, the POS terminal obtains a time point of a request for passive distributed downloading of the designated POS sent by the TMS system. The download request includes downloading the application or updating the application. The request time points of the POS passive decentralized downloading are discrete time points. According to the utilized condition of the TMS system, the request time point of the POS passive decentralized downloading can be immediate downloading (POS immediate downloading mode) of the POS terminal or downloading of the POS terminal at a later designated time point. The downloading of the POS terminal may be completed by the POS terminal automatically downloading at a time point specified by the TMS (a POS passive decentralized downloading mode, a time point calculated by discretizing a time slice by the TMS), or actively downloading at a time point specified by the POS terminal (a POS active decentralized downloading mode, which is a time point actively calculated by the POS according to an actual congestion condition).
Step S220, judging whether the POS terminal initiates a downloading request to the TMS service at the appointed request time point, if so, ending the process; and if the POS terminal does not initiate a downloading request to the TMS at the appointed request time point, performing instant downloading or active downloading, if overtime occurs, directly returning, and generating POS active distributed downloading request time points according to the congestion control factors so as to calculate the next request time point. And after waiting for the time point to arrive, the POS terminal initiates a downloading request to the TMS. Furthermore, when a new POS terminal is initialized or the POS terminal reports to the TMS online for the first time, the congestion control factor and the discrete time point in the strategy elements are bound with the POS terminal. The POS terminal may miss a specified time point due to an abnormal condition, so that the application request is not initiated, and the downloading request is initiated immediately.
Generating POS active dispersed downloading request time points, comprising the following steps: according to the formula NT ═ TN+[1,(HC×DC)/ST]ST, the point in time NT at which the next application download request is initiated to the TMS is calculated. Wherein, [ x, y [ ]]Random positive integers representing the intervals x to y; t isNFor the original download request time point, HC is a congestion control factor (HC) and defaults to 1. The larger HC is, the larger NT offset may be generated, and the smaller probability of the next congestion may be. Thus, there is a greater chance of avoiding congestion at the cost of a longer update period, which may exceed the originally specified DC. This mode is performed by the POS terminal. Due to abnormal conditions, the application request is initiated immediately when the specified time point is missed and the application request is not initiated, and the request is returned directly when the request is overtime, and then the time point NT of the POS active dispersed downloading request is calculated. And after waiting for the time point to arrive, the POS terminal initiates a downloading request to the TMS.
According to the embodiment of the invention, two modes of POS passive decentralized downloading request and POS active decentralized downloading request are combined, and the POS active decentralized downloading is divided into an automatic instant downloading mode and an active decentralized downloading mode. The purpose of POS passive decentralized downloading is to avoid the occurrence of request congestion in theory; the purpose of automatic instant downloading is that after the POS terminal detects that the passive downloading time point of the POS terminal is invalid, a downloading request can be automatically and instantly initiated to the TMS, so that the problem that the downloading time-effect point is missed due to the abnormality of the POS terminal or the TMS is efficiently solved; the purpose of the POS active distributed downloading is to actively avoid and control congestion when the congestion situation occurs due to the fact that abnormal situations occur in reality.
As shown in fig. 3, MPN — TCN × MCL indicates the number of concurrences of requests processed by the TMS system in a single time slice.
When in useWhen the system is in a non-concurrent condition, the system can reach saturation treatment;
thus, policy types can be divided into two categories: a least concurrent fragmentation strategy and a high concurrent fragmentation strategy.
When in useWhen the system is in use, the system automatically triggers a minimum concurrent fragmentation strategy, and the system operates at low load;
when in useWhen the system is in use, the system automatically triggers a high concurrency fragmentation strategy, and the system runs under high load;
when in useOr evenAt that time, the system is operating near full or overload. There may be a continuous presence of a large amount of traffic queuing. The closer the MPN is to the TPN, the greater the load on the system.
Preferably, the MPN is limited to 70% of the TPN. The system performance is exerted to the maximum extent, and simultaneously the load of the system is not too high. In addition, random incoming downloading requests after some POS machines miss the downloading at the preset time point are prevented, and allowance is reserved for congestion avoidance. If the set MPN is close to the TCN and cannot meet the application requirement, the problem can be solved by increasing the downloading cycle DT, or reducing the POS number PN, and even increasing the system concurrent TCN to increase the MPN.
Therefore, according to another aspect of the present invention, as shown in fig. 4, there is also provided a method for TMS to calculate a download request time point, the method comprising:
step S410, calculating whether PN is less than or equal to (DC/ST), if yes, calculating a downloading request time point according to a minimum concurrency fragmentation mode, otherwise, carrying out the next step, wherein the minimum concurrency fragmentation algorithm means that a TMS system processes and finishes the request of downloading application of each POS machine as soon as possible in a non-concurrency or minimum concurrency mode, and the algorithm is a derivative of a high concurrency fragmentation algorithm, when TCNxMCL is 1, the method belongs to the situation.
The method comprises the following steps of calculating a downloading request time point in a least concurrent fragmentation mode:
according to the formula TN=TS+(n‐1)×DC/ST,n:[1,PN]Calculating TN(ii) a N and corresponding TNStored in the MAP data structure.
Wherein, TNThe time point is the time point distributed when the TMS is accessed to the POS for the nth time; t isSThe starting time point of the TMS in a certain cycle period CT is shown; n is a positive integer, which means a counting sequence of the POS downloading request of the TMS end, counting is started from 1, and n +1 is executed once each time access is required.
And step S420, calculating whether PN is less than or equal to (TCNxMCLxDC/ST), if so, calculating a downloading request time point according to a high concurrency fragment mode, otherwise, carrying out the next step, namely, a high concurrency fragment mode algorithm means that the TMS system processes and completes the request of downloading the application of each POS machine in a high concurrency mode.
The high concurrency fragment mode calculates the downloading request time point, which comprises the following steps:
according to the formula X ═ ((PN × ST)/DC)]Calculating the concurrency number X of the processing service in the single service time slice; according to the formula TN=TS+[(n‐1)/X)×DC/ST,n:[1,PN]Calculating the result TN(ii) a N and corresponding TNStored in the MAP data structure.
Wherein, TNThe time point is the time point distributed when the TMS is accessed to the POS for the nth time; t isSThe starting time point of the TMS in a certain cycle period CT is shown; n is a positive integer, which means a counting sequence of the POS downloading request of the TMS end, counting is started from 1, and n +1 is executed once each time access is required.
Further, when DC is equal to DCRV, X is equal to TCN × MCL. The larger the DC is, the smaller the X is, the fewer the concurrence number of the processing service in the single service time slice is, and the smaller the system load is; otherwise, the more the concurrency number of the services processed in the single service time slice is, the higher the system load is.
And step S430, when the system is close to a full load or overload closed state, forcibly adjusting the DC to be equal to the DCRV, and calculating the downloading request time point according to a high concurrency fragmentation mode.
As a further improvement of the above embodiment, the DC may be adjusted manually, if necessary, preferably in the direction of increasing DC. As shown in fig. 5, SL represents System Load (SL), and DCRV is calculated by default MCL as 70%, indicating that DC is equal to DCRV by default. Manual adjustment, preferably in the large direction, may also be performed. The larger the DC, the longer the download period, and the smaller the system load. Conversely, the shorter the download period, the higher the system load. When MCL equals 100%, DCRV is theoretically minimum (denoted MinDCRV) while the system is in maximum concurrent TCN full load operation.
In adjusting the DC, the following considerations apply: DC is equal to DCRV by default. The DCRV is an empirical reference value of the download period obtained by the system under the premise that policy elements such as PN, ST, TCN, MCL, start and end dates, start and end times and the like are fixed. Indicating that all download requests can be processed with MCL concurrency within the DCRV cycle and within the defined time frame. In practical application scenarios, the DC value can be increased appropriately as needed, so that the system can actually complete all download requests within the DC period with a small degree of concurrency (less than MCL) and system load. When adjusting DC, the adjustment is generally performed in an increasing direction. The DC value is not generally adjusted if there is no particular need. When the DC is determined to be good, and other elements of the strategy are combined, whether the least fragmentation mode or the high concurrency mode is selected can be matched.
The invention combines two algorithms of high concurrency fragmentation and minimum concurrency fragmentation on the time slice discretization algorithm of the download request, automatically adapts to the optimal algorithm according to the strategy elements, and smoothes the load of the server to the maximum extent.
According to another aspect of the present invention, the foregoing embodiments may be combined, and as shown in fig. 6, there is further provided an adaptive policy method for TMS application downloading, the method specifically includes the following steps:
step S610, the TMS generates POS passive distributed downloading request time points and distributes the POS passive distributed downloading request time points to each POS terminal. The method specifically comprises the following steps: the policy elements are initialized. Inputting proposed parameters PN, ST and TCN, setting MCL default values, for example, the default value is 70%, and the MCL default values can be updated and adjusted according to conditions. And calculating the DCRV, judging whether the DCRV meets the expectation, and if not, adaptively adjusting the DCRV. The method for calculating the DCRV and determining whether the DCRV meets the expectation has been described in detail in the above embodiments, and is not repeated herein.
And S620, calculating whether the PN is less than or equal to (DC/ST), if so, calculating the time point of the downloading request according to the least concurrent fragmentation mode, and if not, carrying out the next step.
Step S630, calculating whether PN is less than or equal to (TCN × MCL × DC/ST), if yes, calculating the time point of the downloading request according to the high concurrency slicing mode, otherwise, carrying out the next step.
And step S640, the system approaches a full load or overload off state, the DC is forcibly adjusted to be equal to the DCRV, and the downloading request time point is calculated according to a high concurrency fragmentation mode.
Since the calculation methods of the minimum concurrent fragmentation mode and the high concurrent fragmentation mode have been described in detail in the above embodiments, they are not described in detail herein.
As a further improvement of the above embodiment, the DC may be adjusted manually as needed, preferably in a direction in which the DC increases. The adjustment process is described in detail in the above embodiments, and is not described herein again.
By adopting the strategy method, all POS machines can orderly and dispersedly finish application downloading and updating in a specified downloading period. This strategy approach has the following objectives and advantages:
(1) the POS passive decentralized downloading request and the active decentralized downloading request are adopted, the self-adaptive discrete TMS application downloading request avoids and controls network congestion when the TMS application is downloaded as much as possible, and a large number of requests are prevented from being queued and waited in a centralized manner;
(2) the load of the server is smoothed to the maximum extent, and large fluctuation of the load of the server is avoided;
(3) a high-concurrency fragmentation strategy and a minimum-concurrency fragmentation strategy are selected in a self-adaptive mode, and server resources are reasonably used;
(4) the downloading period is calculated in a self-adaptive mode, and an empirical value is provided as a reference, so that a user can conveniently and reasonably dynamically optimize strategy elements, and blind adjustment of the strategy elements is avoided;
(5) the system can respectively create various strategies according to different practical scenes such as types, sizes, time and the like of downloaded applications so as to meet flexible application requirements.
Those of ordinary skill in the art will understand that: the drawings are merely schematic representations of one embodiment, and the flow of blocks in the drawings is not necessarily required to practice the present invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (5)
1. A method of TMS calculating a download request time point, the method comprising:
the strategy elements are taken as parameters and are divided into two types of proposed parameters and automatic parameters, wherein the proposed parameters refer to initial values set according to strategy application scenes and can be manually and dynamically adjusted; the automatic parameters are values obtained by the system according to a certain rule or the setting of formulated parameters and are automatically calculated and generated; the strategy number and the downloading period experience reference value DCRV are automatic parameters; the strategy name, the starting date and the ending date, the number PN of the POS terminals accessed in advance, the estimated time length ST of single downloading and the maximum concurrency number TCN of the TMS system are drawn up parameters; the strategy model concurrency MCL, the download period DC and the congestion control factor HC are automatic parameters and also formulated parameters;
calculating whether PN is less than or equal to (DC/ST), if so, calculating a downloading request time point according to a minimum concurrent fragmentation mode, wherein the minimum concurrent fragmentation mode refers to a mode that a TMS system does not concurrently complete the request of each POS machine for downloading application; otherwise, carrying out the next step;
calculating whether PN is less than or equal to (TCN multiplied by MCL multiplied by DC/ST), if so, calculating a downloading request time point according to a high concurrency fragment mode, wherein the high concurrency fragment mode refers to that a TMS system processes and completes the request of downloading application of each POS machine in a high concurrency mode; otherwise, carrying out the next step;
when the system is in an overload closed state, adjusting the DC to be equal to DCRV, and calculating a downloading request time point according to a high concurrency fragmentation mode;
the method comprises the following steps that PN is the number of POS terminals accessed in advance, DC is a downloading period, ST is estimated duration of single downloading, TCN is the maximum concurrency number of TMS service, MCL is strategy model concurrency, and DCRV is an experience reference value of the downloading period; [) a representation of numerical values as "cut-only" (i.e., "tailed") and (]: a representation of numerical values as "cut-not-only" abbreviated;
the high concurrency fragment sharing mode calculates the downloading request time point, and the specific steps comprise:
calculating the concurrency number X of the processing service in the single service time slice according to the formula X ((PN multiplied by ST)/DC), calculating the result TN according to the formula TN (TS + [ (n-1)/X) multiplied by DC/ST, n: [1, PN ]; storing n and a corresponding TN in an MAP data structure, wherein the TN is a time point distributed when the nth POS of the TMS is accessed; TS is the starting time point of CT in a certain cycle period of TMS; n is a positive integer, indicates a counting sequence of the POS downloading request of the TMS end, starts counting from 1, and executes n +1 once when the access is required once;
[) represents a "round-only" (i.e., "tailed") representation of a value, and (]: represents a "round-not" abbreviated representation of a value.
2. The method according to claim 1, wherein the method for calculating the download request time point by TMS specifically includes the steps of:
calculating TN according to the formula of TN ═ TS + (n-1) multiplied by DC/ST, n: [1, PN ]; storing n and a corresponding TN in an MAP data structure, wherein the TN is a time point distributed when the nth POS of the TMS is accessed; TS is the starting time point of CT in a certain cycle period of TMS; n is a positive integer, wherein n [1, PN ] refers to a counting sequence of POS downloading requests of the TMS end, counting is started from 1, and n +1 is executed once every time access is required.
3. The method of claim 1, wherein the TMS device further comprises:
when DC is DCRV, X is TCN × MCL.
4. The method of claim 1, wherein the TMS device further comprises:
the DC is manually adjusted, and the adjustment is performed in the direction in which the DC increases.
5. The method of claim 1, wherein the TMS device further comprises:
DC is equal to DCRV by default.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610786280.2A CN107786614B (en) | 2016-08-30 | 2016-08-30 | TMS application downloading self-adaptive strategy method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610786280.2A CN107786614B (en) | 2016-08-30 | 2016-08-30 | TMS application downloading self-adaptive strategy method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107786614A CN107786614A (en) | 2018-03-09 |
CN107786614B true CN107786614B (en) | 2022-02-22 |
Family
ID=61451421
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610786280.2A Active CN107786614B (en) | 2016-08-30 | 2016-08-30 | TMS application downloading self-adaptive strategy method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107786614B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116502235B (en) * | 2023-05-26 | 2024-01-30 | 北京神州安付科技股份有限公司 | TMS remote management method and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101192228A (en) * | 2006-12-01 | 2008-06-04 | 阿里巴巴公司 | Database interactive processing method and system |
CN102708008A (en) * | 2012-04-12 | 2012-10-03 | 福建联迪商用设备有限公司 | Implementation method of linking download strategy |
CN104580305A (en) * | 2013-10-18 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Network uploading scheduling method and system, network bandwidth detection method, client and servers |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140279107A1 (en) * | 2013-03-14 | 2014-09-18 | William P. Vasquez | Systems and methods for integrated, secure point-of-sale transactions |
-
2016
- 2016-08-30 CN CN201610786280.2A patent/CN107786614B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101192228A (en) * | 2006-12-01 | 2008-06-04 | 阿里巴巴公司 | Database interactive processing method and system |
CN102708008A (en) * | 2012-04-12 | 2012-10-03 | 福建联迪商用设备有限公司 | Implementation method of linking download strategy |
CN104580305A (en) * | 2013-10-18 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Network uploading scheduling method and system, network bandwidth detection method, client and servers |
Also Published As
Publication number | Publication date |
---|---|
CN107786614A (en) | 2018-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9071609B2 (en) | Methods and apparatus for performing dynamic load balancing of processing resources | |
US20100058342A1 (en) | Provisioning system, method, and program | |
WO2007111588A1 (en) | Centralized scheduler for content delivery network | |
US20080313261A1 (en) | Server, client apparatus, program and download method | |
CN110995617B (en) | MQTT-based data transmission method and device, computer equipment and storage medium | |
CN111490963B (en) | Data processing method, system, equipment and storage medium based on QUIC protocol stack | |
CA2843231A1 (en) | Deferred transfer of content to optimize bandwidth usage | |
CN109815204B (en) | Metadata request distribution method and equipment based on congestion perception | |
CN110691127A (en) | Data acquisition control system, data acquisition control method and related device | |
CN111459676B (en) | Node resource management method, device and storage medium | |
CN105049240B (en) | A kind of message treatment method and server | |
CN111193796A (en) | Session keeping method based on delay queue, server and readable storage medium | |
CN107786614B (en) | TMS application downloading self-adaptive strategy method | |
US10361912B2 (en) | Traffic switching method and apparatus | |
US20190227859A1 (en) | Data store device and data management method | |
CN107786615B (en) | TMS application downloading self-adaptive strategy method | |
CN111355751A (en) | Task scheduling method and device | |
US20150277892A1 (en) | Multi-phase software delivery | |
CN117579611A (en) | Data transmission method and device, storage medium and electronic device | |
CN111224811A (en) | SNMP request monitoring system, method, device and computer readable storage medium | |
US11275621B2 (en) | Device and method for selecting tasks and/or processor cores to execute processing jobs that run a machine | |
US20190121664A1 (en) | Method, apparatus and computer-readable medium for application scheduling | |
CN106980545B (en) | Remote calling method and device | |
CN107786608A (en) | Adaptive strategy method is downloaded in a kind of TMS applications | |
CN111049779B (en) | Information processing method, electronic device, and computer-readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |