Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 is a flowchart illustrating a method for distributing user configuration data according to an embodiment of the present invention. As shown in fig. 1, the method for distributing user configuration data includes:
step S11: and acquiring response time data of the service request corresponding to each service node.
In the embodiment of the present invention, the number of the service nodes is uncertain, the computation power of each service node may be the same or different, each service node may be offline at any time, online at any time, and register with the decision server, the network conditions of each service node are different, and the eSIM configuration data of the eSIM user to be issued in response to each service request is different.
In step S11, a service request of each service node eSIM configuration data is obtained; and recording the response time data corresponding to each service request. For example, the response time data of m service requests of each service node in n service nodes is as follows:
wherein, tn,mThe data is the mth response time data of the nth service node, and n and m are positive integers.
Step S12: and determining a preset number of response time data of each service node according to a time sequence, and calculating an estimation value of the response time data corresponding to each service node.
Specifically, for each service node, the preset number of response time data closest to the current time is selected according to a time sequence. And calculating the weighted average value of the preset number of response time data corresponding to each service node, wherein the weight of the response time data and the distance from the response time data to the current time are in a negative correlation relationship. That is, the closer the response time data is to the current time, i.e., the closer to the current time, the greater the weight of the response time data. Calculating an estimate of said response time data for each of said serving nodes according to the following formula:
Tn,x=(tn,m-x+1+…+(X-2)*tn,m-2+(X-1)*tn,m-1+X*tn,m)/(1+2+3+…+X),
wherein, tn,mThe latest response time data of the nth service node, X is a preset number, Tn,xN and m are both natural numbers, and are the estimated values of X pieces of the response time data of the nth service node. X, X-1 and X-2 are weights corresponding to the response time data, and the closer the response time data is to the current time, the more the weight of the response time data is, so that the influence of single impulse noise on the estimated value can be reduced.
Step S13: and calculating the calculation power proportion of each service node according to the estimation value.
Specifically, the computation power ratio of any service node is the ratio of the evaluation value of the service node to the sum of the evaluation values of all service nodes. Calculating a calculation force proportion of each service node according to the following formula according to the estimation value:
Pn=Tn,x/(T1,x+T2,x+…+Tn,x),
wherein, PnThe computation force proportion for the nth service node, X being a predetermined number, Tn,xIs the estimated value of X response time data of the nth service node, n being a natural number.
Step S14: and distributing service requests to the corresponding service nodes according to the calculation force proportion.
Specifically, the computation force proportion is arranged according to a specified sequence, and a specified number of the service requests are distributed to the service nodes in sequence. The calculation force proportion is in positive correlation with the specified quantity. The greater the computational rate proportion of the service node, the greater the specified number of service requests assigned to the service node, thereby implementing a request assignment decision. The request distribution decision of the embodiment of the invention is a preposed service performance estimation strategy, when a request for downloading the eSIM user configuration data by a user terminal is received, a service node is selected, and even if the hardware conditions of all the service nodes are different and the network environments are different, the eSIM user configuration data distribution service with basically consistent performance can be provided for the client, which is unrelated to the terminal trust problem, the transmission safety problem, the storage safety problem, the data deletion safety problem and the safety problem of switching operators.
In the embodiment of the invention, when the service nodes are added or deleted or the network is unstable, the calculation proportion of each service node is recalculated every time a service request is received, and the service request is distributed according to the calculation proportion. When the number of the service nodes is stable and the network is stable, the calculation proportion of each service node does not need to be calculated repeatedly, and the service request is directly distributed according to the calculation proportion of each service node calculated before. Through actual tests, the embodiment of the invention can effectively solve the problem of fluctuation of algorithms such as the current average allocation strategy, the polling strategy, the random allocation strategy and the like, effectively reduces the problem of larger data fluctuation of service response time caused by different hardware conditions and network conditions of service nodes, enables the load of each service node to be more stable, avoids the phenomenon of node service congestion with strong calculation capacity, effectively utilizes hardware purchased at different periods through estimation, promotes enterprise investment income, and accelerates the decision-making efficiency of selection of service nodes.
The embodiment of the invention obtains the response time data of the service request corresponding to each service node; determining a preset number of response time data of each service node according to a time sequence, and calculating an estimated value of the response time data corresponding to each service node; calculating the calculation power proportion of each service node according to the estimated value; and distributing service requests to the corresponding service nodes according to the calculation ratio, so that the selection decision efficiency of the service nodes can be accelerated, the hardware purchased at different periods can be effectively utilized, and the investment income of enterprises can be improved.
Fig. 2 shows a schematic structural diagram of an apparatus for distributing user configuration data according to an embodiment of the present invention. As shown in fig. 2, the apparatus for distributing user configuration data includes: a data acquisition unit 201, an evaluation value acquisition unit 202, a proportion calculation unit 203, and a request allocation unit 204. Wherein:
the data obtaining unit 201 is configured to obtain response time data of a service request corresponding to each service node; the estimated value obtaining unit 202 is configured to determine a preset number of response time data of each service node according to a time sequence, and calculate an estimated value of the response time data corresponding to each service node; the proportion calculation unit 203 is configured to calculate a computation proportion of each service node according to the estimation value; the request allocating unit 204 is configured to allocate a service request to the corresponding service node according to the computation power ratio.
In an alternative manner, the data obtaining unit 201 is configured to: acquiring a service request of each service node eSIM configuration data; and recording the response time data corresponding to each service request.
In an alternative manner, the estimated value obtaining unit 202 is configured to: and selecting the preset number of response time data closest to the current time according to the time sequence for each service node.
In an alternative manner, the estimated value obtaining unit 202 is configured to: and calculating the weighted average value of the preset number of response time data corresponding to each service node, wherein the weight of the response time data and the distance from the response time data to the current time are in a negative correlation relationship.
In an alternative manner, the estimated value obtaining unit 202 is configured to: calculating an estimated value of the response time data corresponding to each service node according to the following formula;
Tn,x=(tn,m-x+1+…+(X-2)*tn,m-2+(X-1)*tn,m-1+X*tn,m)/(1+2+3+…+X),
wherein, tn,mThe latest response time data of the nth service node, X is a preset number, Tn,xN and m are both natural numbers, and are the estimated values of X pieces of the response time data of the nth service node.
In an alternative manner, the proportion calculation unit 203 is configured to: calculating the calculation power proportion of each service node according to the following formula according to the estimated value;
Pn=Tn,x/(T1,x+T2,x+…+Tn,x),
wherein, PnThe computation force proportion for the nth service node, X being a predetermined number, Tn,xIs the estimated value of X response time data of the nth service node, n being a natural number.
In an alternative manner, the request allocating unit 204 is configured to: arranging the computation force proportion according to a specified sequence, and sequentially distributing a specified number of the service requests to the service nodes according to the sequence; the calculation force proportion is in positive correlation with the specified quantity.
The embodiment of the invention obtains the response time data of the service request corresponding to each service node; determining a preset number of response time data of each service node according to a time sequence, and calculating an estimated value of the response time data corresponding to each service node; calculating the calculation power proportion of each service node according to the estimated value; and distributing service requests to the corresponding service nodes according to the calculation ratio, so that the selection decision efficiency of the service nodes can be accelerated, the hardware purchased at different periods can be effectively utilized, and the investment income of enterprises can be improved.
An embodiment of the present invention provides a non-volatile computer storage medium, where the computer storage medium stores at least one executable instruction, and the computer executable instruction may execute the method for distributing user configuration data in any method embodiment described above.
The executable instructions may be specifically configured to cause the processor to:
acquiring response time data of a service request corresponding to each service node;
determining a preset number of response time data of each service node according to a time sequence, and calculating an estimated value of the response time data corresponding to each service node;
calculating the calculation power proportion of each service node according to the estimated value;
and distributing service requests to the corresponding service nodes according to the calculation force proportion.
In an alternative, the executable instructions cause the processor to:
acquiring a service request of each service node eSIM configuration data; and recording the response time data corresponding to each service request.
In an alternative, the executable instructions cause the processor to:
and selecting the preset number of response time data closest to the current time according to the time sequence for each service node.
In an alternative, the executable instructions cause the processor to:
and calculating the weighted average value of the preset number of response time data corresponding to each service node, wherein the weight of the response time data and the distance from the response time data to the current time are in a negative correlation relationship.
In an alternative, the executable instructions cause the processor to:
calculating an estimated value of the response time data corresponding to each service node according to the following formula;
Tn,x=(tn,m-x+1+…+(X-2)*tn,m-2+(X-1)*tn,m-1+X*tn,m)/(1+2+3+…+X),
wherein, tn,mThe response time data of the nth service node, X is a preset number, Tn,xN and m are both natural numbers, and are the estimated values of X pieces of the response time data of the nth service node.
In an alternative, the executable instructions cause the processor to:
calculating the calculation power proportion of each service node according to the following formula according to the estimated value;
Pn=Tn,x/(T1,x+T2,x+…+Tn,x),
wherein, PnThe computation force proportion for the nth service node, X being a predetermined number, Tn,xIs the estimated value of X response time data of the nth service node, n being a natural number.
In an alternative, the executable instructions cause the processor to:
arranging the computation force proportion according to a specified sequence, and sequentially distributing a specified number of the service requests to the service nodes according to the sequence; the calculation force proportion is in positive correlation with the specified quantity.
The embodiment of the invention obtains the response time data of the service request corresponding to each service node; determining a preset number of response time data of each service node according to a time sequence, and calculating an estimated value of the response time data corresponding to each service node; calculating the calculation power proportion of each service node according to the estimated value; and distributing service requests to the corresponding service nodes according to the calculation ratio, so that the selection decision efficiency of the service nodes can be accelerated, the hardware purchased at different periods can be effectively utilized, and the investment income of enterprises can be improved.
Embodiments of the present invention provide a computer program product comprising a computer program stored on a computer storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform a method of distributing user configuration data in any of the method embodiments described above.
The executable instructions may be specifically configured to cause the processor to:
acquiring response time data of a service request corresponding to each service node;
determining a preset number of response time data of each service node according to a time sequence, and calculating an estimated value of the response time data corresponding to each service node;
calculating the calculation power proportion of each service node according to the estimated value;
and distributing service requests to the corresponding service nodes according to the calculation force proportion.
In an alternative, the executable instructions cause the processor to:
acquiring a service request of each service node eSIM configuration data; and recording the response time data corresponding to each service request.
In an alternative, the executable instructions cause the processor to:
and selecting the preset number of response time data closest to the current time according to the time sequence for each service node.
In an alternative, the executable instructions cause the processor to:
and calculating the weighted average value of the preset number of response time data corresponding to each service node, wherein the weight of the response time data and the distance from the response time data to the current time are in a negative correlation relationship.
In an alternative, the executable instructions cause the processor to:
calculating an estimated value of the response time data corresponding to each service node according to the following formula;
Tn,x=(tn,m-x+1+…+(X-2)*tn,m-2+(X-1)*tn,m-1+X*tn,m)/(1+2+3+…+X),
wherein, tn,mThe response time data of the nth service node, X is a preset number, Tn,xN and m are both natural numbers, and are the estimated values of X pieces of the response time data of the nth service node.
In an alternative, the executable instructions cause the processor to:
calculating the calculation power proportion of each service node according to the following formula according to the estimated value;
Pn=Tn,x/(T1,x+T2,x+…+Tn,x),
wherein, PnThe computation force proportion for the nth service node, X being a predetermined number, Tn,xIs the estimated value of X response time data of the nth service node, n being a natural number.
In an alternative, the executable instructions cause the processor to:
arranging the computation force proportion according to a specified sequence, and sequentially distributing a specified number of the service requests to the service nodes according to the sequence; the calculation force proportion is in positive correlation with the specified quantity.
The embodiment of the invention obtains the response time data of the service request corresponding to each service node; determining a preset number of response time data of each service node according to a time sequence, and calculating an estimated value of the response time data corresponding to each service node; calculating the calculation power proportion of each service node according to the estimated value; and distributing service requests to the corresponding service nodes according to the calculation ratio, so that the selection decision efficiency of the service nodes can be accelerated, the hardware purchased at different periods can be effectively utilized, and the investment income of enterprises can be improved.
Fig. 3 is a schematic structural diagram of a computing device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the device.
As shown in fig. 3, the computing device may include: a processor (processor)302, a communication Interface 304, a memory 306, and a communication bus 308.
Wherein: the processor 302, communication interface 304, and memory 306 communicate with each other via a communication bus 308. A communication interface 304 for communicating with network elements of other devices, such as clients or other servers. The processor 302 is configured to execute the program 310, and may specifically execute the relevant steps in the above-described method embodiment for distributing the user configuration data.
In particular, program 310 may include program code comprising computer operating instructions.
The processor 302 may be a central processing unit CPU or an application Specific Integrated circuit asic or an Integrated circuit or Integrated circuits configured to implement embodiments of the present invention. The one or each processor included in the device may be the same type of processor, such as one or each CPU; or may be different types of processors such as one or each CPU and one or each ASIC.
And a memory 306 for storing a program 310. Memory 306 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 310 may specifically be configured to cause the processor 302 to perform the following operations:
acquiring response time data of a service request corresponding to each service node;
determining a preset number of response time data of each service node according to a time sequence, and calculating an estimated value of the response time data corresponding to each service node;
calculating the calculation power proportion of each service node according to the estimated value;
and distributing service requests to the corresponding service nodes according to the calculation force proportion.
In an alternative, the program 310 causes the processor to:
acquiring a service request of each service node eSIM configuration data; and recording the response time data corresponding to each service request.
In an alternative, the program 310 causes the processor to:
and selecting the preset number of response time data closest to the current time according to the time sequence for each service node.
In an alternative, the program 310 causes the processor to:
and calculating the weighted average value of the preset number of response time data corresponding to each service node, wherein the weight of the response time data and the distance from the response time data to the current time are in a negative correlation relationship.
In an alternative, the program 310 causes the processor to:
calculating an estimated value of the response time data corresponding to each service node according to the following formula;
Tn,x=(tn,m-x+1+…+(X-2)*tn,m-2+(X-1)*tn,m-1+X*tn,m)/(1+2+3+…+X),
wherein, tn,mThe response time data of the nth service node, X is a preset number, Tn,xN and m are both natural numbers, and are the estimated values of X pieces of the response time data of the nth service node.
In an alternative, the program 310 causes the processor to:
calculating the calculation power proportion of each service node according to the following formula according to the estimated value;
Pn=Tn,x/(T1,x+T2,x+…+Tn,x),
wherein, PnThe computation force proportion for the nth service node, X being a predetermined number, Tn,xIs the estimated value of X response time data of the nth service node, n being a natural number.
In an alternative, the program 310 causes the processor to:
arranging the computation force proportion according to a specified sequence, and sequentially distributing a specified number of the service requests to the service nodes according to the sequence; the calculation force proportion is in positive correlation with the specified quantity.
The embodiment of the invention obtains the response time data of the service request corresponding to each service node; determining a preset number of response time data of each service node according to a time sequence, and calculating an estimated value of the response time data corresponding to each service node; calculating the calculation power proportion of each service node according to the estimated value; and distributing service requests to the corresponding service nodes according to the calculation ratio, so that the selection decision efficiency of the service nodes can be accelerated, the hardware purchased at different periods can be effectively utilized, and the investment income of enterprises can be improved.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.