WO2021051879A1 - 反向代理评价模型中目标参数选取方法及相关装置 - Google Patents

反向代理评价模型中目标参数选取方法及相关装置 Download PDF

Info

Publication number
WO2021051879A1
WO2021051879A1 PCT/CN2020/093601 CN2020093601W WO2021051879A1 WO 2021051879 A1 WO2021051879 A1 WO 2021051879A1 CN 2020093601 W CN2020093601 W CN 2020093601W WO 2021051879 A1 WO2021051879 A1 WO 2021051879A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
candidate parameter
candidate
sample
samples
Prior art date
Application number
PCT/CN2020/093601
Other languages
English (en)
French (fr)
Inventor
张旭明
宫林涛
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021051879A1 publication Critical patent/WO2021051879A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis

Definitions

  • This application relates to the field of information technology, and specifically to a method and device, storage medium, and electronic equipment for selecting target parameters in a reverse proxy evaluation model.
  • Nginx (engine x) is a high-performance HTTP and reverse proxy service, which is widely used in Internet applications.
  • the performance of reverse proxy is currently evaluated by the reverse proxy evaluation model.
  • the reverse proxy evaluation model needs to set some parameters in advance, and then the reverse proxy evaluation model measures the performance of the reverse proxy according to some of the parameters.
  • the inventor found that the selection of evaluation parameters from these parameters is random, not objective, and often fails to achieve the purpose of effectively monitoring the performance of the reverse proxy.
  • the purpose of this application is to provide a method, device, computer-readable storage medium, and electronic equipment for selecting target parameters in a reverse proxy evaluation model, so as to at least to some extent overcome the contradiction caused by the limitations and defects of related technologies.
  • a method for selecting target parameters in a reverse proxy evaluation model including: obtaining a candidate parameter set; obtaining a set of positive samples and a set of negative samples, the positive samples are known to have performance that meets performance standards Reverse proxy, the negative sample is a known reverse proxy whose performance does not meet the performance standard; calculate the positive sample ratio, and the positive sample ratio is equal to the number of positive samples in the positive sample set divided by the positive sample set and the negative sample set The total number of samples; for each candidate parameter in the candidate parameter set, obtain the candidate parameter value of each sample in the positive sample set and the negative sample set, and assign each sample in the positive sample set and the negative sample set to the candidate parameter value Sort from high to low.
  • the samples with the aforementioned positive sample ratio are judged as the first sample, and the rest are judged as the second samples.
  • a device for selecting target parameters in a reverse proxy evaluation model which includes: a parameter acquisition module for acquiring a candidate parameter set; a sample acquisition module for acquiring a positive sample set and a negative sample set, so The positive sample is a reverse proxy whose performance is known to meet the performance standard, and the negative sample is a reverse proxy whose performance is known not to meet the performance standard; the ratio calculation module is used to calculate the proportion of the positive sample, and the positive sample The ratio is equal to the number of positive samples in the positive sample set divided by the total number of samples in the positive sample set and the negative sample set; the ranking judgment module is used to obtain each sample in the positive sample set and the negative sample set for each candidate parameter of the candidate parameter set The candidate parameter value of the candidate parameter value, and each sample in the positive sample set and the negative sample set is sorted from high to low according to the candidate parameter value, and the sample with the aforementioned positive sample ratio in the sorting from high to low is judged as the first In this case, the rest are judged
  • the parameter selection module is used to select the candidate parameter as the target parameter based on the correct determination rate of each candidate parameter in the candidate parameter set.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method for selecting target parameters in the reverse proxy evaluation model described in any one of the above is implemented
  • the following steps are implemented: obtaining a candidate parameter set; obtaining a set of positive samples and a set of negative samples, the positive samples are known reverse agents whose performance meets the performance standard, and the negative
  • the sample is a known reverse proxy whose performance does not meet the performance standard
  • calculate the positive sample ratio which is equal to the number of positive samples in the positive sample set divided by the total number of samples in the positive sample set and the negative sample set; for candidate parameters
  • obtain the candidate parameter value of each sample in the positive sample set and the negative sample set and sort each sample in the positive sample set and the negative sample set according to the candidate parameter value from high to low, and In the order from high to low, the samples with the aforementioned positive sample ratio are judged
  • an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute by executing the executable instructions
  • the processor is configured to execute the following steps by executing the executable instructions: obtaining a candidate parameter set; obtaining a set of positive samples and a set of negative samples Set, the positive sample is a reverse proxy whose performance is known to meet the performance standard, and the negative sample is a reverse proxy whose performance is known not to meet the performance standard; the positive sample ratio is calculated, and the positive sample ratio is equal to the positive
  • the number of positive samples in the sample set is divided by the total number of samples in the positive sample set and the negative sample set; for each candidate parameter in the candidate parameter set, the candidate parameter value of each sample in the positive sample set and the negative sample set is obtained, and the positive
  • Each sample in the sample set and the negative sample set is sorted from high to low according to
  • the candidate parameter is selected as the target parameter.
  • This application uses the misjudgment rate of all samples obtained by each parameter to identify which parameters are available and which are unavailable, so that the selection of parameters is more objective and can effectively monitor the performance of the reverse proxy. purpose.
  • Fig. 1 schematically shows an example diagram of an application scenario of a method for selecting target parameters in a reverse proxy evaluation model.
  • Fig. 2 schematically shows a flow chart of a method for selecting target parameters in a reverse proxy evaluation model.
  • Fig. 3 schematically shows a flow chart of evaluating the reverse proxy to be tested after the method for selecting target parameters in the reverse proxy evaluation model illustrated in Fig. 2.
  • Fig. 4 schematically shows a block diagram of a target parameter selection device in a reverse proxy evaluation model.
  • FIG. 5 schematically shows a block diagram of an example of an electronic device for implementing the method for selecting target parameters in the above reverse proxy evaluation model.
  • Fig. 6 schematically shows a computer-readable storage medium for implementing the method for selecting target parameters in the above reverse proxy evaluation model.
  • the technical solution of this application can be applied to the field of artificial intelligence or big data technology.
  • the technical solution of this application can be implemented through a data platform.
  • FIG. 1 is an implementation environment diagram of a method for selecting target parameters in a reverse agent evaluation model provided in an embodiment.
  • the implementation environment includes a reverse agent evaluation model training device 110, and reverse agent evaluation Model 120, reverse proxy evaluation device 130, and client 140.
  • the reverse agent evaluation model training device 110 obtains the reverse agent evaluation model 120 by training a large amount of training data, and the reverse agent evaluation model training device 110 performs training by obtaining a candidate parameter set and a set of positive and negative samples. , Select the target parameters that need to be used in the reverse proxy evaluation model 120.
  • the reverse proxy evaluation device 130 applies the reverse proxy evaluation model 120 to realize the performance evaluation of the reverse proxy, and the reverse proxy evaluation model 120 can be built in the reverse proxy evaluation device 130.
  • the reverse proxy evaluation model training device 110 and the reverse proxy evaluation device 130 can be deployed independently of each other, or can be integrated in the same device.
  • the reverse proxy evaluation model 120 uses the selected target parameters to evaluate the reverse proxy to be tested to obtain the evaluation result.
  • the reverse proxy evaluation device 130 may have a display screen. The evaluation result is directly displayed to the user through the display screen.
  • the reverse proxy evaluation device 130 can also send the evaluation result to the user terminal 140, and the user can view the evaluation result through the user terminal 140.
  • the user terminal 140 refers to a user device capable of displaying information. , Such as smart phones, notebooks, tablets, etc.
  • the reverse proxy evaluation device 130 may be an independent server or a cluster server.
  • the cluster server can be used to quickly and parallelly implement the evaluation of the target objects.
  • a method for selecting target parameters in a reverse proxy evaluation model is proposed.
  • the method for selecting target parameters in the reverse proxy evaluation model can be applied to the above-mentioned reverse proxy evaluation model training.
  • the device 110 may specifically include the following steps.
  • Step S210 Obtain a candidate parameter set.
  • Step S220 Obtain a set of positive samples and a set of negative samples.
  • the positive sample is a known reverse proxy whose performance meets the performance standard
  • the negative sample is a known reverse proxy whose performance does not meet the performance standard.
  • Step S230 Calculate the positive sample ratio, where the positive sample ratio is equal to the number of positive samples in the positive sample set divided by the total number of samples in the positive sample set and the negative sample set.
  • Step S240 for each candidate parameter in the candidate parameter set, obtain the candidate parameter value of each sample in the positive sample set and the negative sample set, and obtain each sample in the positive sample set and the negative sample set from the candidate parameter value according to the candidate parameter value.
  • step S250 the candidate parameter is selected as the target parameter based on the correct determination rate of each candidate parameter in the candidate parameter set.
  • the candidate parameter set refers to a set of evaluation parameters that can be selected by the reverse proxy evaluation model to evaluate the performance of the reverse proxy.
  • the reverse proxy evaluation model is used to evaluate reverse proxy performance by setting some parameters in advance.
  • the candidate parameters can include Active Connections (currently active user connections), Accepts (the total number of user connections received), and Handled (reverse proxy).
  • the total number of user connections processed The total number of user connections processed), Requests (the total number of user requests), Reading (the number of reverse proxy read request headers in the current connection), Writing (the number of reverse proxy writes returned to the user in the current connection), Waiting ( The number of active user connections that are not currently requested), reverse proxy access logs, whether the back-end instance is alive, success rate, total average time, average back-end time, network transmission time, and error keyword statistics, etc.
  • the embodiment is not limited.
  • a positive sample set and a negative sample set are obtained, where the positive sample set contains multiple positive samples, the negative sample set contains multiple negative samples, and the positive samples are known reverse agents whose performance reaches the performance standard.
  • Negative samples are known reverse agents whose performance does not meet the performance standards.
  • the performance standards can be qualitative performance descriptions, such as the stability, security, reliability, and scalability of the reverse proxy, or it can be Quantitative performance standard values, such as physical resource utilization reaching a preset value, etc. Physical resource utilization includes CPU utilization, memory utilization, and disk utilization. For example, if the reverse proxy has good stability, high security, strong reliability, and high scalability, it is deemed that the performance of the reverse proxy meets the performance standard. If the reverse proxy does not meet the stability, security, reliability, and The requirement of scalability is deemed to be that the performance of the reverse proxy does not meet the performance standard.
  • the positive sample ratio is the ratio of the number of positive samples in the positive sample set to the total number of samples in the positive and negative sample set.
  • each sample in the positive sample set and the negative sample set is input to the reverse proxy evaluation model.
  • the reverse proxy evaluation model selects each candidate parameter in the candidate parameter set for evaluation, and outputs each sample corresponding to the candidate
  • the candidate parameter value of each candidate parameter in the parameter set is sorted according to the candidate parameter value from high to low, and the samples with the aforementioned positive sample ratio in the sorting from high to low are judged as the first sample, and the rest are judged as the second sample. Calculate the ratio of the number of samples judged to be the first sample in the positive sample set to the number of positive samples in the positive sample set.
  • candidate parameter 1 For example, if there are 3 positive samples in the positive sample set, namely: positive sample 1, positive sample 2, and positive sample 3, there are 2 negative samples in the negative sample set, namely: negative sample 1, negative sample 2 , There are 5 candidate parameters in the candidate parameter set, namely: candidate parameter 1, candidate parameter 2, candidate parameter 3, candidate parameter 4, candidate parameter 5.
  • candidate parameter 1 For each candidate parameter in the candidate parameter set, obtain the candidate parameter value of each sample in the positive sample set and the negative sample set. See the example in Table 1.
  • the reverse proxy evaluation model uses the candidate parameter 1 to evaluate the 6 samples.
  • the candidate parameter values are sorted as follows: 4.78>3.46>2.68>2.35>0.35.
  • the samples corresponding to the top 60% of the three candidate parameter values 4.78, 3.46, and 2.68 in the ranking from high to low are judged as the first sample.
  • the reverse proxy evaluation model uses candidate parameters 2
  • Candidate parameter 1 Candidate parameter 2
  • Candidate parameter 3 Candidate parameter 4
  • Candidate parameter 5 Positive sample 1 2.35 6.78 10.23 3.44 3.26 Positive sample 2 3.46 5.55 9.88 2 4.21 Positive sample 3 4.78 4.32 14.36 7.17 8.88 Negative sample 1 0.35 2.36 6.39 4.26 5.21 Negative sample 2 2.68 2.28 8.23 1.48 7.26
  • Table 1 Examples of candidate parameter values for positive and negative samples.
  • step S250 the candidate parameter is selected as the target parameter based on the correct determination rate of each candidate parameter in the candidate parameter set.
  • the reverse proxy evaluation model can select candidate parameters from the candidate parameter set as target parameters to evaluate the performance of the reverse proxy.
  • the advantage of this embodiment is that the candidate parameter value of each sample is obtained for each candidate parameter, and the positive and negative samples are determined according to the ratio of positive samples.
  • the candidate parameter value of each sample is sorted from high to low.
  • the reference value that is determined to be greater than the candidate parameter value identifies a positive sample.
  • FIG. 3 is a detailed description of step S250 in the method for selecting target parameters in a reverse proxy evaluation model proposed according to FIG. 2.
  • the candidate parameters are selected based on the correct determination rate of each candidate parameter in the candidate parameter set.
  • step S250 may include the following steps: if the correct determination rate of the candidate parameter exceeds a predetermined correct determination rate threshold, the candidate parameter is selected as the target parameter.
  • the correct determination rate threshold can be set according to the actual situation.
  • the correct determination rate threshold is 50%, and the correct determination rate of each candidate parameter calculated in step S250 is compared with the correct determination rate threshold.
  • the candidate parameters of the threshold are used as target parameters.
  • step S250 may include the following steps: sort the correct determination rates of all candidate parameters from high to low, and determine a predetermined ratio of candidate parameters as target parameters.
  • a predetermined ratio is set, the correct determination rates of all candidate parameters are sorted from high to low, and the candidate parameters of the previous predetermined ratio are determined as target parameters.
  • FIG. 3 is a further supplement of the method for selecting target parameters in a reverse proxy evaluation model proposed according to FIG. 2.
  • the method further includes: step S260, obtaining all the reverse proxy to be tested. The value of the target parameter; step S270, obtain the target parameter reference value corresponding to the target parameter; step S280, divide the value of each target parameter of the reverse proxy to be tested by the corresponding target parameter reference value to obtain the target parameter reference value to be tested Competency ratio of each target parameter of the agent; step S290, weighted average the competence ratio of each target parameter of the reverse agent to be tested to obtain the competency score of the reverse agent to be tested; step S2100, based on the competency score, Categorize the reverse proxy to be tested.
  • step S260 because the reverse proxy evaluation model has selected the target parameters, it starts to use the model to perform actual evaluation of the reverse proxy to be tested. After inputting the reverse proxy to be tested, the reverse proxy evaluation model can output the reverse proxy to be tested. The value of the target parameter to the agent.
  • Step S270 During the evaluation, obtain the value of each target parameter of the reverse proxy to be tested.
  • the value is an absolute value and there is no way to compare it. For example, the value of a target parameter is 2, and the value of another target parameter is 2. 3. The latter is not necessarily better than the former, because the latter may generally have a larger value. Therefore, in step S280, the value of each target parameter of the reverse proxy to be tested is divided by the corresponding target parameter reference value.
  • the value, the competency ratio can reflect whether the value of the target parameter is dominant in evaluating the performance of the reverse proxy.
  • the competency ratio of each target parameter of the reverse agent to be tested is weighted and averaged to obtain the competency score of the reverse agent to be tested.
  • Step S2100 based on the competency score, classify the reverse proxy to be tested.
  • the reverse proxy to be tested is classified, and the reverse proxy can be evaluated whether it is good or not.
  • the advantage of this embodiment is that by obtaining the target parameter reference value corresponding to the target parameter, the competency ratio of each target parameter of the reverse agent to be tested is calculated, and the weighted average is performed to obtain the competency score of the reverse agent to be tested.
  • the performance of the reverse proxy to be tested can be judged according to the competency score, making the evaluation of the reverse proxy more objective and the evaluation result more accurate.
  • a device 400 for selecting target parameters in a reverse proxy evaluation model may specifically include a parameter acquiring module 410.
  • the parameter acquisition module 410 is used to acquire a candidate parameter set.
  • the sample acquisition module 420 is configured to acquire a set of positive samples and a set of negative samples, the positive samples are known reverse agents whose performance meets the performance standard, and the negative samples are reverse agents whose known performance does not meet the performance standard. proxy.
  • the ratio calculation module 430 is configured to calculate a positive sample ratio, where the positive sample ratio is equal to the number of positive samples in the positive sample set divided by the total number of samples in the positive sample set and the negative sample set.
  • the parameter selection module 450 is configured to select candidate parameters as target parameters based on the correct determination rate of each candidate parameter in the candidate parameter set.
  • modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
  • the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
  • a non-volatile storage medium which can be a CD-ROM, U disk, mobile hard disk, etc.
  • Including several instructions to make a computing device which can be a personal computer, a server, a mobile terminal, or a network device, etc.
  • an electronic device capable of implementing the above method is also provided.
  • the electronic device 500 according to this embodiment of the present application will be described below with reference to FIG. 5.
  • the electronic device 500 shown in FIG. 5 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
  • the electronic device 500 is represented in the form of a general-purpose computing device.
  • the components of the electronic device 500 may include, but are not limited to: the aforementioned at least one processing unit 510, the aforementioned at least one storage unit 520, and a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510).
  • the storage unit stores program code, and the program code can be executed by the processing unit 510, so that the processing unit 510 executes the various exemplary methods described in the “Exemplary Method” section of this specification. Steps of implementation.
  • the processing unit 510 may perform step S210 as shown in FIG. 2 to obtain a candidate parameter set; step S220, obtain a set of positive samples and a set of negative samples, the positive samples are the inverse of a known performance that meets the performance standard.
  • the negative sample is a known reverse agent whose performance does not meet the performance standard; step S230, calculate a positive sample ratio, where the positive sample ratio is equal to the number of positive samples in the positive sample set divided by the positive sample set and the negative sample The total number of samples in the set; step S240, for each candidate parameter in the candidate parameter set, obtain the candidate parameter value of each sample in the positive sample set and the negative sample set, and combine each sample in the positive sample set and the negative sample set Sort according to the candidate parameter value from high to low. In the sorting from high to low, the sample with the positive sample ratio mentioned above is judged as the first sample, and the rest are judged as the second sample.
  • the storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and/or a cache storage unit 5202, and may further include a read-only storage unit (ROM) 5203.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 520 may also include a program/utility tool 5204 having a set of (at least one) program module 5205.
  • program module 5205 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 530 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 500 may also communicate with one or more external devices 700 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 500, and/or communicate with Any device (such as a router, modem, etc.) that enables the electronic device 500 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 550.
  • the electronic device 500 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 560.
  • networks for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
  • the network adapter 560 communicates with other modules of the electronic device 500 through the bus 530.
  • other hardware and/or software modules can be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
  • the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
  • a computer-readable storage medium on which is stored a program product capable of implementing the above-mentioned method in this specification.
  • various aspects of the present application can also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to make the The terminal device executes the steps according to various exemplary embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
  • the computer-readable storage medium may be a non-volatile storage medium or a volatile storage medium.
  • a program product 600 for implementing the above method according to an embodiment of the present application is described. It can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be installed in a terminal device, For example, running on a personal computer.
  • CD-ROM compact disk read-only memory
  • the program product of this application is not limited to this.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
  • the program product can use any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
  • the program code used to perform the operations of the present application can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, using Internet service providers). Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers for example, using Internet service providers.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Artificial Intelligence (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请是关于一种反向代理评价模型中目标参数选取方法及装置,属于信息技术领域,该方法包括:获取候选参数集和正负样本集合;计算正样本比例;针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将排序中前正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。该方法能够达到有效监测反向代理的性能的目的。

Description

反向代理评价模型中目标参数选取方法及相关装置
本申请要求于2019年9月17日提交中国专利局、申请号为201910878007.6,发明名称为“反向代理评价模型中目标参数选取方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息技术领域,具体而言,涉及一种反向代理评价模型中目标参数选取方法及装置、存储介质、电子设备。
背景技术
Nginx(engine x)是一个高性能的HTTP和反向代理服务,在互联网应用被广泛的使用。反向代理性能的好坏目前采取反向代理评价模型来进行评价。反向代理评价模型需要预先设置一些参数,然后,反向代理评价模型根据其中的一些参数来衡量反向代理的性能。但是,发明人发现,从这些参数中选择评价参数是随机的,不具有客观性,往往达不到有效监测反向代理的性能的目的。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
技术问题
本申请的目的在于提供一种反向代理评价模型中目标参数选取方法、装置、计算机可读存储介质以及电子设备,进而至少在一定程度上克服由于相关技术的限制和缺陷而导致的对反向代理性能评价时的参数选择不合理的问题。
技术解决方案
根据本申请的一个方面,提供一种反向代理评价模型中目标参数选取方法,包括:获取候选参数集;获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
根据本申请的一个方面,提供一种反向代理评价模型中目标参数选取装置,包括:参数获取模块,用于获取候选参数集;样本获取模块,用于获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;比例计算模块,用于计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;排序判定模块,用于针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的正样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;参数选择模块,用于基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
根据本申请的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的反向代理评价模型中目标参数选取方法,例如,所述计算机程序被处理器执行时实现以下步骤:获取候选参数集;获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
根据本申请的一个方面,提供一种电子设备,包括:处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令来执行上述任意一项所述的反向代理评价模型中目标参数选取方法,例如,所述处理器配置为经由执行所述可执行指令来执行以下步骤:获取候选参数集;获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
有益效果
本申请通过利用每个参数得到的对所有样本的误判率,来识别哪些是可用的参数,哪些是不可用的参数,从而使得参数的选择更客观,能够达到有效监测反向代理的性能的目的。
附图说明
图1示意性示出一种反向代理评价模型中目标参数选取方法的应用场景示例图。
图2示意性示出一种反向代理评价模型中目标参数选取方法的流程图。
图3示意性示出一根据图2示意出的一种反向代理评价模型中目标参数选取方法之后的评价待测反向代理的流程图。
图4示意性示出一种反向代理评价模型中目标参数选取装置的方框图。
图5示意性示出一种用于实现上述反向代理评价模型中目标参数选取方法的电子设备示例框图。
图6示意性示出一种用于实现上述反向代理评价模型中目标参数选取方法的计算机可读存储介质。
本发明的实施方式
附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
本申请的技术方案可应用于人工智能领域或大数据技术领域,例如本申请的技术方案可通过数据平台实现。
图1为一个实施例中提供的反向代理评价模型中目标参数选取方法的实施环境图,如图1所示,在该实施环境中,包括反向代理评价模型训练装置110,反向代理评价模型120,反向代理评价装置130,用户端140。
如图1所示,反向代理评价模型训练装置110通过对大量的训练数据进行训练得到反向代理评价模型120,反向代理评价模型训练装置110通过获取候选参数集和正负样本集合进行训练,选取反向代理评价模型120中所需要使用的目标参数。
反向代理评价装置130应用反向代理评价模型120实现对反向代理的性能评价,反向代理评价模型120可内置于反向代理评价装置130中。反向代理评价模型训练装置110与反向代理评价装置130可以相互独立部署,也可以集成在同一设备中。在将待测反向代理输入反向代理评价装置130后,反向代理评价模型120利用选取的目标参数对待测反向代理进行评价,得到评价结果,反向代理评价装置130可具有显示屏,通过该显示屏直接向用户展示评价结果,当然,反向代理评价装置130也可以向用户端140发送该评价结果,用户通过用户端140查看评价结果,用户端140是指能够展示信息的用户设备,如智能手机、笔记本、平板等。
反向代理评价装置130可以为独立的服务器,也可以为集群服务器,当待评价的目标对象的数量比较大时,利用集群服务器可快速并行地实现对目标对象的评测。
如图2所示,在一个实施例中,提出了一种反向代理评价模型中目标参数选取方法,所述反向代理评价模型中目标参数选取方法可以应用于上述的反向代理评价模型训练装置110中,具体可以包括以下步骤。
步骤S210,获取候选参数集。
步骤S220,获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理。
步骤S230,计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数。
步骤S240,针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N。
步骤S250,基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
在步骤S210中,候选参数集是指可供反向代理评价模型选择以评价反向代理性能的好坏的评价参数的集合。反向代理评价模型通过预先设置一些参数以用作评价反向代理性能,所述候选参数可以包括Active Connections(当前活跃的用户连接)、Accepts(接收到的用户连接总数)、Handled(反向代理处理的用户连接总数)、Requests(用户请求总数)、Reading(当前连接中反向代理读取请求首部的个数)、Writing(当前连接中反向代理写返回给用户的个数)、Waiting(当前没有请求的活跃用户连接数)、反向代理访问日志、后端实例是否存活、成功率、总平均耗时、后端平均耗时、网络传输耗时以及错误关键字统计等,对此本实施例不作限定。
在步骤S220中,获取正样本集合和负样本集合,其中,正样本集合包含多个正样本,负样本集合中包含多个负样本,正样本为已知的性能达到性能标准的反向代理,负样本为已知的性能达不到性能标准的反向代理,其中,性能标准可以是定性的性能描述,比如反向代理的稳定性、安全性、可靠性、扩展性情况等,也可以是定量的性能标准值,比如物理资源利用率达到预设值等,物理资源利用率包括CPU利用率、内存利用率和磁盘利用率等。例如,如果反向代理的稳定性好、安全性高、可靠性强、扩展性高,则认定为反向代理的性能达到性能标准,如果反向代理不满足稳定性、安全性、可靠性和扩展性的要求,则认定为反向代理的性能未达到性能标准。
在步骤S230中,正样本比例为正样本集合中正样本数与正负样本集合中的样本总数的比值。
在步骤S240中,将正样本集合和负样本集合中的每个样本都输入反向代理评价模型,反向代理评价模型选择候选参数集中的每个候选参数进行评价,输出每个样本对应于候选参数集中每个候选参数的候选参数值,按候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,计算正样本集合中被判定为第一样本的样本数与正样本集合中正样本数的比例。
举例来说,假如正样本集合中有3个正样本,分别为:正样本1、正样本2、正样本3,负样本集合中有2个负样本,分别为:负样本1、负样本2,候选参数集中有5个候选参数,分别为:候选参数1、候选参数2、候选参数3、候选参数4、候选参数5,计算得到正样本比例为60%。针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,见表1示例,反向代理评价模型利用候选参数1评价得出的6个样本的候选参数值排序为:4.78>3.46>2.68>2.35>0.35,将从高到低排序中前60%的3个候选参数值4.78、3.46、2.68所对应的样本判定为第一样本,则正样本集合中被判定为第一样本的样本数M=2,正样本集合中正样本数N=3,计算得到候选参数1的正确判定率为L=66.67%;反向代理评价模型利用候选参数2评价得出的6个样本的候选参数值排序为6.78>5.55>4.32>2.36>2.28,则正样本集合中被判定为第一样本的样本数M=3,正样本集合中正样本数N=3,计算得到候选参数2的正确判定率L=100%;反向代理评价模型利用候选参数3评价得出的6个样本的候选参数值排序为14.36>10.23>9.88>8.23>6.39,则正样本集合中被判定为第一样本的样本数M=3,正样本集合中正样本数N=3,计算得到候选参数3的正确判定率为L=100%;反向代理评价模型利用候选参数4评价得出的6个样本的候选参数值排序为7.17>4.26>3.44>2>1.48,则正样本集合中被判定为第一样本的样本数M=2,正样本集合中正样本数N=3,计算得到候选参数4的正确判定率为L=66.67%;反向代理评价模型利用候选参数5评价得出的6个样本的候选参数值排序为8.88>7.26>5.21>4.21>3.26,则正样本集合中被判定为第一样本的样本数M=1,正样本集合中正样本数N=3,计算得到候选参数,5的正确判定率为L=33.33%。
  候选参数1 候选参数2 候选参数3 候选参数4 候选参数5
正样本1 2.35 6.78 10.23 3.44 3.26
正样本2 3.46 5.55 9.88 2 4.21
正样本3 4.78 4.32 14.36 7.17 8.88
负样本1 0.35 2.36 6.39 4.26 5.21
负样本2 2.68 2.28 8.23 1.48 7.26
表1 正样本和负样本的候选参数值例。
步骤S250,基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
根据在步骤S240中计算出的正确判定率,反向代理评价模型可以从候选参数集中选择候选参数作为目标参数去评价反向代理的性能的好坏。
该实施例的优点在于,通过针对每个候选参数,获取每个样本的候选参数值,按照正样本比例去判定正负样本,首先对每个样本的候选参数值进行从高到低的排序,确定大于该候选参数值的基准值为识别正样本。判定的正样本与实际的正样本是有出入的,出入程度越小,候选参数越好用;出入程度越大,候选参数对于评价反向代理越不好用。基于候选参数集的每个候选参数的正确判定率,就可以选择候选参数作为目标参数。
可选的,图3是根据图2提出的一种反向代理评价模型中目标参数选取方法中步骤S250的细节描述,所述基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数,步骤S250可以包括以下步骤:如果候选参数的正确判定率超过预定正确判定率阈值,选择该候选参数作为目标参数。
在该实施例中,可以根据实际情况设定正确判定率阈值,例如正确判定率阈值为50%,将步骤S250中计算出的各个候选参数的正确判定率与正确判定率阈值进行比较,将超过阈值的候选参数作为目标参数。
可选的,步骤S250可以包括以下步骤:对所有候选参数的正确判定率从高到低排序,将前预定比例的候选参数确定为目标参数。
在该实施例中,设置一个预定比例,对所有候选参数的正确判定率从高到低排序,将前预定比例的候选参数确定为目标参数。
可选的,图3是根据图2提出的一种反向代理评价模型中目标参数选取方法的进一步补充,在步骤S250之后,所述方法还包括:步骤S260,获取待测反向代理的所述目标参数的值;步骤S270,获取所述目标参数对应的目标参数基准值;步骤S280,将待测反向代理的每项目标参数的值除以对应的目标参数基准值,得到待测反向代理的每项目标参数的胜任比率;步骤S290,将待测反向代理的每项目标参数的胜任比率加权平均,得到待测反向代理的胜任得分;步骤S2100,基于所述胜任得分,对待测反向代理进行归类。
在步骤S260中,因为反向代理评价模型已经选择了目标参数,就开始利用该模型对待测反向代理进行实际评测,在输入待测反向代理后,反向代理评价模型可以输出待测反向代理的所述目标参数的值。
步骤S270,在评测时,获取待测反向代理的各目标参数的值,该值是一个绝对值,没有办法用来比较,例如某一目标参数的值为2,另一目标参数的值为3,不一定后者比前者好,因为可能后者普遍数值较大,因此,在步骤S280中,将待测反向代理的每项目标参数的值除以对应的目标参数基准值,这个相对值,即胜任比率,就能反映出该目标参数的值在评测反向代理性能时是否占优势。在步骤S290中,将待测反向代理的每项目标参数的胜任比率加权平均,得到待测反向代理的胜任得分,例如得到待测反向代理的各目标参数的胜任比率为A、B、C、D,各自权重值分别为0.4、0.3、0.5、0.2,则得到待测反向代理的胜任得分为=0.4*A+B*0.3+0.5*C+0.2*D。
步骤S2100、基于所述胜任得分,对待测反向代理进行归类。
基于所述胜任得分,对待测反向代理进行归类,就可以评价该反向代理好还是不好。
该实施例的优点在于,通过获取所述目标参数对应的目标参数基准值,计算得到待测反向代理的每项目标参数的胜任比率,进行加权平均,得到待测反向代理的胜任得分,即可根据胜任得分的情况判定待测反向代理的性能的好坏,使得对反向代理的评测更加客观,评测结果更加准确。
如图4所示,在一个实施例中,提供了一种反向代理评价模型中目标参数选取装置400,所述反向代理评价模型中目标参数选取装置,具体可以包括参数获取模块410,样本获取模块420,比例计算模块430,排序判定模块440,参数选择模块450。
参数获取模块410,用于获取候选参数集。
样本获取模块420,用于获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理。
比例计算模块430,用于计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数。
排序判定模块440,用于针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N。
参数选择模块450,用于基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
上述反向代理评价模型中目标参数选取装置中各模块的具体细节已经在对应的反向代理评价模型中目标参数选取方法中进行了详细的描述,因此此处不再赘述。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
此外,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本公开实施方式的方法。
在本公开的示例性实施例中,还提供了一种能够实现上述方法的电子设备。
所属技术领域的技术人员能够理解,本申请的各个方面可以实现为系统、方法或程序产品。因此,本申请的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。
下面参照图5来描述根据本申请的这种实施方式的电子设备500。图5显示的电子设备500仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图5所示,电子设备500以通用计算设备的形式表现。电子设备500的组件可以包括但不限于:上述至少一个处理单元510、上述至少一个存储单元520、连接不同系统组件(包括存储单元520和处理单元510)的总线530。
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元510执行,使得所述处理单元510执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。例如,所述处理单元510可以执行如图2中所示的步骤S210,获取候选参数集;步骤S220,获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;步骤S230、计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;步骤S240,针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;步骤S250,基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
存储单元520可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)5201和/或高速缓存存储单元5202,还可以进一步包括只读存储单元(ROM)5203。
存储单元520还可以包括具有一组(至少一个)程序模块5205的程序/实用工具5204,这样的程序模块5205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线530可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备500也可以与一个或多个外部设备700(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备500交互的设备通信,和/或与使得该电子设备500能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口550进行。并且,电子设备500还可以通过网络适配器560与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器560通过总线530与电子设备500的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备500使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本申请的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。可选的,该计算机可读存储介质可以是非易失性存储介质,也可以是易失性存储介质。
参考图6所示,描述了根据本申请的实施方式的用于实现上述方法的程序产品600,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本申请的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
此外,上述附图仅是根据本申请示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。

Claims (20)

  1. 一种反向代理评价模型中目标参数选取方法,其中,包括:
    获取候选参数集;
    获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;
    计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;
    针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;
    基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
  2. 根据权利要求1所述的方法,其中,所述基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数,包括:
    如果候选参数的正确判定率超过预定正确判定率阈值,选择该候选参数作为目标参数。
  3. 根据权利要求1所述的方法,其中,所述基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数,包括:
    对所有候选参数的正确判定率从高到低排序,将前预定比例的候选参数确定为目标参数。
  4. 根据权利要求1所述的方法,其中,在基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数之后,所述方法还包括:
    获取待测反向代理的所述目标参数的值;
    获取所述目标参数对应的目标参数基准值;
    将待测反向代理的每项目标参数的值除以对应的目标参数基准值,得到待测反向代理的每项目标参数的胜任比率;
    将待测反向代理的每项目标参数的胜任比率加权平均,得到待测反向代理的胜任得分;
    基于所述胜任得分,对待测反向代理进行归类。
  5. 根据权利要求1-4任一项所述的方法,其中,所述针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,包括:
    将正样本集合和负样本集合中的每个样本都输入反向代理评价模型,以通过反向代理评价模型选择候选参数集中的每个候选参数进行评价,输出每个样本对应于候选参数集中每个候选参数的候选参数值。
  6. 根据权利要求1-4任一项所述的方法,其中,所述达到性能标准包括物理资源利用率达到预设值;其中,所述物理资源利用率包括CPU利用率、内存利用率和磁盘利用率。
  7. 根据权利要求1-4任一项所述的方法,其中,所述候选参数包括当前活跃的用户连接、接收到的用户连接总数、反向代理处理的用户连接总数、用户请求总数、当前连接中反向代理读取请求首部的个数、当前连接中反向代理写返回给用户的个数、当前没有请求的活跃用户连接数、反向代理访问日志、后端实例是否存活、成功率、总平均耗时、后端平均耗时、网络传输耗时以及错误关键字统计。
  8. 一种反向代理评价模型中目标参数选取装置,其中,包括:
    参数获取模块,用于获取候选参数集;
    样本获取模块,用于获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;
    比例计算模块,用于计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;
    排序判定模块,用于针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;
    参数选择模块,用于基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
  9. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现以下步骤:
    获取候选参数集;
    获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;
    计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;
    针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;
    基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
  10. 根据权利要求9所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数时,具体实现:
    如果候选参数的正确判定率超过预定正确判定率阈值,选择该候选参数作为目标参数。
  11. 根据权利要求9所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数时,具体实现:
    对所有候选参数的正确判定率从高到低排序,将前预定比例的候选参数确定为目标参数。
  12. 根据权利要求9所述的计算机可读存储介质,其中,所述计算机程序被处理器执行基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数之后,还用于实现:
    获取待测反向代理的所述目标参数的值;
    获取所述目标参数对应的目标参数基准值;
    将待测反向代理的每项目标参数的值除以对应的目标参数基准值,得到待测反向代理的每项目标参数的胜任比率;
    将待测反向代理的每项目标参数的胜任比率加权平均,得到待测反向代理的胜任得分;
    基于所述胜任得分,对待测反向代理进行归类。
  13. 根据权利要求9-12任一项所述的计算机可读存储介质,其中,所述针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,包括:
    将正样本集合和负样本集合中的每个样本都输入反向代理评价模型,以通过反向代理评价模型选择候选参数集中的每个候选参数进行评价,输出每个样本对应于候选参数集中每个候选参数的候选参数值。
  14. 一种电子设备,其中,包括:
    处理器;以及
    存储器,用于存储所述处理器的可执行指令;
    其中,所述处理器配置为经由执行所述可执行指令来执行以下步骤:
    获取候选参数集;
    获取正样本集合和负样本集合,所述正样本是已知的性能达到性能标准的反向代理,所述负样本是已知的性能达不到性能标准的反向代理;
    计算正样本比例,所述正样本比例等于正样本集合中正样本数除以正样本集合和负样本集合中的样本总数;
    针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值,并将正样本集合和负样本集合中每个样本按该候选参数值从高到低排序,将从高到低排序中前所述正样本比例的样本判定为第一样本,其余判定为第二样本,设正样本集合中被判定为第一样本的样本数为M,正样本集合中正样本数为N,则计算该候选参数的正确判定率L=M/N;
    基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数。
  15. 根据权利要求14所述的电子设备,其中,所述处理器在执行所述基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数时,具体执行以下步骤:
    如果候选参数的正确判定率超过预定正确判定率阈值,选择该候选参数作为目标参数。
  16. 根据权利要求14所述的电子设备,其中,所述处理器在执行所述基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数时,具体执行以下步骤:
    对所有候选参数的正确判定率从高到低排序,将前预定比例的候选参数确定为目标参数。
  17. 根据权利要求14所述的电子设备,其中,所述处理器在执行所述基于候选参数集的每个候选参数的正确判定率,选择候选参数作为目标参数之后,还执行以下步骤:
    获取待测反向代理的所述目标参数的值;
    获取所述目标参数对应的目标参数基准值;
    将待测反向代理的每项目标参数的值除以对应的目标参数基准值,得到待测反向代理的每项目标参数的胜任比率;
    将待测反向代理的每项目标参数的胜任比率加权平均,得到待测反向代理的胜任得分;
    基于所述胜任得分,对待测反向代理进行归类。
  18. 根据权利要求14-17任一项所述的电子设备,其中,所述处理器在执行所述针对候选参数集的每个候选参数,获取正样本集合和负样本集合中每个样本的该候选参数值时,具体执行以下步骤:
    将正样本集合和负样本集合中的每个样本都输入反向代理评价模型,以通过反向代理评价模型选择候选参数集中的每个候选参数进行评价,输出每个样本对应于候选参数集中每个候选参数的候选参数值。
  19. 根据权利要求14-17任一项所述的电子设备,其中,所述达到性能标准包括物理资源利用率达到预设值;其中,所述物理资源利用率包括CPU利用率、内存利用率和磁盘利用率。
  20. 根据权利要求14-17任一项所述的电子设备,其中,所述候选参数包括当前活跃的用户连接、接收到的用户连接总数、反向代理处理的用户连接总数、用户请求总数、当前连接中反向代理读取请求首部的个数、当前连接中反向代理写返回给用户的个数、当前没有请求的活跃用户连接数、反向代理访问日志、后端实例是否存活、成功率、总平均耗时、后端平均耗时、网络传输耗时以及错误关键字统计。
PCT/CN2020/093601 2019-09-17 2020-05-30 反向代理评价模型中目标参数选取方法及相关装置 WO2021051879A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910878007.6 2019-09-17
CN201910878007.6A CN110728306B (zh) 2019-09-17 2019-09-17 反向代理评价模型中目标参数选取方法及相关装置

Publications (1)

Publication Number Publication Date
WO2021051879A1 true WO2021051879A1 (zh) 2021-03-25

Family

ID=69219182

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093601 WO2021051879A1 (zh) 2019-09-17 2020-05-30 反向代理评价模型中目标参数选取方法及相关装置

Country Status (2)

Country Link
CN (1) CN110728306B (zh)
WO (1) WO2021051879A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117390796A (zh) * 2023-12-13 2024-01-12 陕西空天信息技术有限公司 诱导轮模化方法、装置、存储介质及电子设备
CN117726475A (zh) * 2024-02-05 2024-03-19 煤炭科学研究总院有限公司 尾矿溃坝监控方法、装置、电子设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110728306B (zh) * 2019-09-17 2024-07-16 平安科技(深圳)有限公司 反向代理评价模型中目标参数选取方法及相关装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130336579A1 (en) * 2012-06-15 2013-12-19 Vufind, Inc. Methods for Efficient Classifier Training for Accurate Object Recognition in Images and Video
CN109447156A (zh) * 2018-10-30 2019-03-08 北京字节跳动网络技术有限公司 用于生成模型的方法和装置
CN110728306A (zh) * 2019-09-17 2020-01-24 平安科技(深圳)有限公司 反向代理评价模型中目标参数选取方法及相关装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7409439B2 (en) * 2002-12-09 2008-08-05 Sun Microsystems Inc. Reducing overhead in reverse proxy servers when processing web pages
CN109711548B (zh) * 2018-12-26 2024-09-06 歌尔光学科技有限公司 超参数的选取方法、使用方法、装置及电子设备
CN110222701B (zh) * 2019-06-11 2019-12-27 北京新桥技术发展有限公司 一种桥梁病害自动识别方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130336579A1 (en) * 2012-06-15 2013-12-19 Vufind, Inc. Methods for Efficient Classifier Training for Accurate Object Recognition in Images and Video
CN109447156A (zh) * 2018-10-30 2019-03-08 北京字节跳动网络技术有限公司 用于生成模型的方法和装置
CN110728306A (zh) * 2019-09-17 2020-01-24 平安科技(深圳)有限公司 反向代理评价模型中目标参数选取方法及相关装置

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DU XUEHUI , MENG CHUN , LIU MEISHUANG: "Research on feature selection based on single feature classification accuracy", JOURNAL OF NANJING FORESTRY UNIVERSITY(NATURAL SCIENCES EDITION), vol. 43, no. 4, 1 July 2019 (2019-07-01), pages 109 - 116, XP055792621, ISSN: 1000-2006, DOI: 10.3969/j.issn.1000-2006.201807059 *
ISABELLE GUYON , ANDRE ELISSEEFF: "An Introduction to Variable and Feature Selection", JOURNAL OF MACHINE LEARNING RESEARCH, no. 3, 1 March 2003 (2003-03-01), pages 1157 - 1182, XP058112314, ISSN: 1532-4435 *
LING YUN: "Machine learning Zhou Zhihua-learner performance measurement", 16 June 2019 (2019-06-16), pages 1 - 5, XP055792611, Retrieved from the Internet <URL:https://www.cnblogs.com/Sweepingmonk/p/11037315.html> *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117390796A (zh) * 2023-12-13 2024-01-12 陕西空天信息技术有限公司 诱导轮模化方法、装置、存储介质及电子设备
CN117390796B (zh) * 2023-12-13 2024-03-08 陕西空天信息技术有限公司 诱导轮模化方法、装置、存储介质及电子设备
CN117726475A (zh) * 2024-02-05 2024-03-19 煤炭科学研究总院有限公司 尾矿溃坝监控方法、装置、电子设备及存储介质
CN117726475B (zh) * 2024-02-05 2024-05-14 煤炭科学研究总院有限公司 尾矿溃坝监控方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN110728306A (zh) 2020-01-24
CN110728306B (zh) 2024-07-16

Similar Documents

Publication Publication Date Title
WO2021051879A1 (zh) 反向代理评价模型中目标参数选取方法及相关装置
WO2021068513A1 (zh) 异常对象识别方法、装置、介质及电子设备
JP2021511588A (ja) データクエリ方法、装置およびデバイス
CN110221953A (zh) 测试结果分析方法、装置、服务器及存储介质
CN112506619B (zh) 作业处理方法、装置、电子设备和存储介质
WO2022213538A1 (zh) 仿真测试平台的建立方法、装置和电子设备
WO2021098265A1 (zh) 缺失信息预测方法、装置、计算机设备及存储介质
CN111447107A (zh) 网络状态确定方法、装置、存储介质及电子设备
WO2019237856A1 (zh) 实时显示网络状况的方法、系统、存储介质、及电子设备
WO2020207014A1 (zh) 大数据自动回归测试方法、装置、测试中心服务器和存储介质
US20200401658A1 (en) Probabilistic word embeddings for text classification
WO2021012795A1 (zh) 网络节点的调度方法、装置、电子设备和存储介质
US20230004776A1 (en) Moderator for identifying deficient nodes in federated learning
CN110245684B (zh) 数据处理方法、电子设备和介质
WO2020238131A1 (zh) 网络爬虫系统的测试方法及装置、存储介质、电子设备
WO2023071566A1 (zh) 数据处理方法、装置、计算机设备、计算机可读存储介质及计算机程序产品
CN111311393A (zh) 信用风险的评估方法、装置、服务器和存储介质
CN114338386B (zh) 一种网络的配置方法、装置、电子设备及存储介质
CN113518119B (zh) ABTest的服务分发方法、装置、设备及存储介质
WO2015039585A1 (en) Method and device for testing software reliability
CN115576791A (zh) 压测线程的动态调整方法、装置、电子设备及存储介质
CN112542244B (zh) 辅助信息的生成方法、相关装置及计算机程序产品
US20140359104A1 (en) Grouping processing method and system
CN111988195B (zh) 用于分组测试的应答方案确定方法、装置、设备及介质
CN112835759A (zh) 测试数据处理方法、装置、电子设备以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20864721

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20864721

Country of ref document: EP

Kind code of ref document: A1