CN112565391A - Method, apparatus, device and medium for adjusting instances in an industrial internet platform - Google Patents

Method, apparatus, device and medium for adjusting instances in an industrial internet platform Download PDF

Info

Publication number
CN112565391A
CN112565391A CN202011386057.1A CN202011386057A CN112565391A CN 112565391 A CN112565391 A CN 112565391A CN 202011386057 A CN202011386057 A CN 202011386057A CN 112565391 A CN112565391 A CN 112565391A
Authority
CN
China
Prior art keywords
instance
micro service
instances
target micro
internet platform
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.)
Pending
Application number
CN202011386057.1A
Other languages
Chinese (zh)
Inventor
田宇
孙雪涛
张晨
何渝君
舒忠玲
邬明罡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hanyun Technology Co Ltd
Original Assignee
Hanyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hanyun Technology Co Ltd filed Critical Hanyun Technology Co Ltd
Priority to CN202011386057.1A priority Critical patent/CN112565391A/en
Publication of CN112565391A publication Critical patent/CN112565391A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a method, a device, equipment and a medium for adjusting examples in an industrial internet platform, wherein the method comprises the following steps: acquiring running information of a target micro service in an industrial internet platform; the running information carries the actual number of the instances of the running target micro service and the load value of each instance; if the load value of each instance of the target micro service is not matched with the preset load threshold, generating an instance adjustment strategy of the target micro service by using the actual quantity, the load value of each instance and the preset load threshold; and adjusting the number of the instances running the target micro service in the industrial Internet platform according to the instance adjusting strategy. According to the embodiment of the application, the instance adjusting strategy is generated, the number of the instances in the industrial Internet platform is adjusted through the instance adjusting strategy, the processing capacity of the micro-service can be improved by increasing the number of the instances, and the problem of resource waste caused by excessive instances in the industrial Internet platform is also solved.

Description

Method, apparatus, device and medium for adjusting instances in an industrial internet platform
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a medium for adjusting instances in an industrial internet platform.
Background
With the development of science and technology, the industrial technology is continuously improved, the industrial production is gradually mechanized, and high-efficiency industrial equipment is adopted for industrial production, so that the production efficiency is improved. Industrial equipment is more and more, and if the industrial equipment is operated by manpower, a sufficient number of workers can not operate all the industrial equipment, so that the automatic and intelligent industrial equipment becomes a necessary development trend, and the industrial internet platform well solves the problems. The industrial internet platform tightly connects and fuses industrial equipment, production lines, factories, suppliers, products and customers through the internet, and realizes that a small amount of workers can operate a large amount of industrial equipment.
Typically, the number of instances running in the microservice is adjusted by the staff member through the learned traffic pressure to keep the traffic pressure of the microservice at a preset load threshold. On an industrial internet platform based on a micro-service architecture, the number of micro-services may be hundreds, and as the number of industrial devices accessing the industrial internet platform increases, the business pressure of the related micro-services becomes larger, so that the method for manually adjusting the number of micro-service operation instances is not easy to implement.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, a device, and a medium for adjusting an instance in an industrial internet platform, which are used to solve the problem that in the prior art, a method for manually adjusting a business pressure of a micro service in the industrial internet platform is not easy to implement.
In a first aspect, an embodiment of the present application provides a method for adjusting an instance in an industrial internet platform, where the method includes:
acquiring running information of a target micro service in an industrial internet platform; the running information carries the actual number of the instances running the target micro service and the load value of each instance;
if the load value of each instance of the target micro service is not matched with a preset load threshold, generating an instance adjustment strategy of the target micro service by using the actual number, the load value of each instance and the preset load threshold;
and adjusting the number of the instances running the target micro service in the industrial Internet platform according to the instance adjusting strategy.
Optionally, if the load value of each instance of the target micro service is not matched with a preset load threshold, generating an instance adjustment policy of the target micro service by using the actual number, the load value of each instance, and the preset load threshold, including:
determining a preset load threshold corresponding to the target micro service according to the service category of the target micro service;
and if the load value of each instance of the target micro service is not matched with a preset load threshold, generating an instance adjustment strategy of the target micro service by using the actual number, the load value of each instance and the preset load threshold.
Optionally, the service categories include any one or two of the following categories:
a gateway class and a data processing class.
Optionally, if the load value of each instance of the target micro service is not matched with a preset load threshold, generating an instance adjustment policy of the target micro service by using the actual number, the load value of each instance, and the preset load threshold, including:
if the load value of each instance of the target micro service is not matched with a preset load threshold value, calculating the optimal number of the instances for operating the target micro service by using the actual number, the load value of each instance and the preset load threshold value;
and generating the instance adjustment strategy according to the optimal quantity and the actual quantity.
Optionally, the example adjusting policy includes:
if the actual number is smaller than the optimal number, increasing the number of the instances for operating the target microservice;
and if the actual number is larger than the optimal number, reducing the number of the instances for operating the target micro service.
Optionally, if the industrial internet platform includes a target micro service and at least one candidate micro service, after the executing step adjusts the number of instances in the industrial internet platform that are running the target micro service according to the instance adjustment policy, the candidate micro service is determined as the target micro service, and the executing step obtains the running information of the target micro service in the industrial internet platform.
In a second aspect, an embodiment of the present application further provides an apparatus for adjusting an instance in an industrial internet platform, including:
the information acquisition module is used for acquiring the running information of the target micro service in the industrial internet platform; the running information carries the actual number of the instances running the target micro service and the load value of each instance;
an adjustment policy generation module, configured to generate an instance adjustment policy for the target micro service by using the actual number, the load value of each instance, and a preset load threshold if the load value of each instance of the target micro service does not match the preset load threshold;
and the adjustment strategy execution module is used for adjusting the number of the instances running the target micro service in the industrial Internet platform according to the instance adjustment strategy.
Optionally, the adjusting policy generating module includes:
the determining unit is used for determining a preset load threshold corresponding to the target micro service according to the service category of the target micro service;
and the generating unit is used for generating an instance adjustment strategy of the target micro service by using the actual quantity, the load value of each instance and a preset load threshold if the load value of each instance of the target micro service is not matched with the preset load threshold.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory and a bus, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the processor and the memory communicate with each other through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the above method.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, performs the steps of the above method.
The method for adjusting the examples in the industrial internet platform comprises the following steps of firstly, obtaining operation information of target micro-services in the industrial internet platform; the running information carries the actual number of the instances running the target micro service and the load value of each instance; then, if the load value of each instance of the target micro service is not matched with a preset load threshold, generating an instance adjustment strategy of the target micro service by using the actual number, the load value of each instance and the preset load threshold; and finally, adjusting the number of the instances running the target micro service in the industrial internet platform according to the instance adjusting strategy.
The method provided by the embodiment of the application can acquire the actual number of the instances running the target micro service and the load value of each instance in real time, when the instance load value of the target server is not matched with the preset load threshold value, an instance adjustment strategy of the target micro service is generated, and the number of the instances running the target micro service is adjusted to adjust the number of the instances running to the optimal number, namely, the number of the running instances in the industrial internet platform is adjusted to the optimal number.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic basic flowchart of a method for adjusting an instance in an industrial internet platform according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a detailed method for adjusting instances in an industrial Internet platform according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an apparatus for adjusting instances in an industrial internet platform according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, there is a method for adjusting the number of instances in an internet platform, which automatically adjusts the number of running instances according to the load conditions of the instances, can dynamically adjust running instances according to the number of monitoring service requests and the total load conditions of the instances processing services, and determines the number of running instances according to the service access amount and the usage conditions of the CPU and the memory of each running instance. Although the universal technical scheme can be applied to the industrial internet platform, the conventional load indexes cannot well describe the service pressure of the industrial internet platform.
The essence of the industrial internet is to tightly connect and merge equipment, production lines, factories, suppliers, products and customers through an open, global industrial-level network platform, efficiently sharing the resources of various elements in the industrial economy. The industrial internet platform is unique to a general cloud computing platform in that the business pressure of the industrial internet platform is not concentrated on the access of users. Therefore, the load condition of the industrial internet micro-service operation instance cannot be accurately reflected through the conventional load indexes such as the CPU or the memory usage rate.
For the above reasons, an embodiment of the present application provides a method for adjusting an instance in an industrial internet platform, as shown in fig. 1, including:
s101, obtaining operation information of a target micro service in an industrial Internet platform; the running information carries the actual number of instances of the running target microservice and the load value of each instance.
In step S101, the industrial internet platform is an internet platform capable of centrally controlling a plurality of industrial devices. The industrial internet platform can run a plurality of micro services, and the target micro service refers to the micro service of the plurality of micro services run by the industrial internet platform, which is executing the method for adjusting the number of the instances in the industrial internet platform provided by the application. The running information of the target micro service refers to basic information related to the target micro service in the running process, and the running information can comprise the actual number of instances for running the target micro service and the load value of each instance. The actual number of instances to run the target microservice refers to the number of instances needed to execute the target microservice. The load value of each said instance refers to the amount of traffic carried during the operation of each instance. The load value of each instance in the target microservice is the same.
In specific implementation, the running information of the target micro-service in the industrial internet platform is obtained, wherein the running information comprises the actual number of the instances of the target micro-service and the load value of each instance. The industrial internet platform may be constructed based on a kubernets cluster, and an API (Application Programming Interface) query Interface of the kubernets cluster may obtain some running information of the target microservice, such as the number of running instances, CPU occupation, running time occupation, and the like. The API query interface of the industrial Internet platform can acquire business information related to the target micro service, namely the information exposed to the outside by the target micro service through code implementation. Therefore, the actual number of instances running the target microservice is obtained directly by calling the API query interface in the kubernets cluster. The load value of each instance can be directly obtained by calling an API query interface of the industrial Internet platform.
And S102, if the load value of each instance of the target micro service is not matched with the preset load threshold, generating an instance adjusting strategy of the target micro service by using the actual quantity, the load value of each instance and the preset load threshold.
In the above step S102, the preset load threshold is manually preset according to the service processing capability of the example. The instance adjustment policy is used to adjust the number of running instances in the target microservice.
In specific implementation, the load value of each instance of the target micro service is compared with a preset load threshold, and when the load value of each instance of the target micro service is equal to the preset load threshold, it indicates that the traffic pressure of the target micro service is in a normal state, that is, each instance is operating normally, at this time, the operation efficiency is the highest relative to the whole target micro service, that is, the number of the operating instances of the target micro service does not need to be adjusted. When the load value of each instance of the target micro service is not matched with the preset load threshold, it is indicated that the traffic pressure of the target micro service is in an abnormal state, each instance may be in an overload operation state, or each instance may be in a low-load operation state, both of the two operation states may affect the operation of the target micro service, and an instance adjustment policy needs to be generated to adjust the operation state of each instance. Specifically, when each instance may be in an overload running state, the current number of instances cannot meet the service requirement, which may cause a service queuing situation, thereby increasing the time consumed by the target micro-service for service processing. When each instance may be in a low-load operation state, the current number of instances is higher than the traffic demand, which causes a problem of resource waste. Therefore, an accurate instance adjustment strategy can well solve the problems.
S103, adjusting the number of the instances running the target micro service in the industrial Internet platform according to the instance adjusting strategy.
In the step S103, the number of instances of the target micro service running in the industrial internet platform is adjusted according to the instance adjustment policy, so that the number of instances of the target micro service can meet the business pressure of the target micro service, thereby achieving the optimal balance between the number of instances and the load condition. The number of the running instances of the target micro service is adjusted through the instance adjusting strategy, so that the processing capacity of the micro service can be improved by increasing the number of the instances, and the resource waste caused by excessive instances is reduced.
Through the three steps, the actual number of the running target micro-service instances and the load value of each instance are obtained in real time, when the load value of the target server instance is not matched with the preset load threshold value, an instance adjusting strategy of the target micro-service is generated, the number of the running target micro-service instances is adjusted, the running number of the instances is adjusted to the optimal number, the load condition of the running instances of the target micro-service can be accurately reflected, the situation that the load value of the instances is not matched with the preset load threshold value can be timely responded, and the optimal balance between the number of the instances and the load condition is achieved.
The main function of the industrial internet platform is the monitoring and management of industrial equipment. Generally, the operation of issuing a command from a platform to control equipment is less, so the pressure of general services lies in that industrial equipment reports data to an industrial internet platform through an mqtt protocol or an https protocol, and the industrial internet platform also performs operations such as processing, analyzing and storing the data. Therefore, the load of the industrial internet platform depends on three main factors, namely the number of the accessed industrial devices (that is, the number of the instances), the frequency of reporting data by each industrial device and the data volume reported by each industrial device at a single time, and the larger the values of the three main factors are, the greater the pressure of the industrial internet platform is, and the greater the load of the running instance is. In an industrial internet platform, there are a plurality of micro services, different micro services may execute different services, and loads corresponding to instances in the micro services may be different, so that the micro services need to be distinguished when determining an instance adjustment policy, as shown in fig. 2, including:
s201, determining a preset load threshold corresponding to the target micro service according to the service type of the target micro service.
In the step S201, the service class is used to distinguish the service traffic of the micro service, and the service class includes any one or two of the following classes: a gateway class and a data processing class.
In specific implementation, for a single micro service, the load may be determined according to the number of instances and the frequency of reporting data by the instances, or may be determined according to the number of instances and the amount of data reported by the instances in a single time. For example, for gateway-type micro services, the preset load threshold mainly takes into consideration the frequency of data reporting by the access device, and may be defined according to a protocol type weighted average; for data processing type microservices, the load threshold is primarily concerned with the amount of data processed per second. Therefore, the preset load threshold corresponding to the target micro service is determined according to the service category of the target micro service.
S202, if the load value of each instance of the target micro service is not matched with the preset load threshold, generating an instance adjusting strategy of the target micro service by using the actual number, the load value of each instance and the preset load threshold.
In the step S202, generating the instance adjustment policy includes the following steps:
step 2021, if the load value of each instance of the target micro service does not match a preset load threshold, calculating an optimal number of instances running the target micro service by using the actual number, the load value of each instance, and the preset load threshold.
In the above step 2021, the optimal number refers to the number of instances whose instance load values can satisfy the preset load threshold value during the running of the target microservice.
In specific implementation, if the load value of each instance of the target micro service does not match the preset load threshold, the optimal number of instances running the target micro service is calculated by using the obtained actual number of instances, the load value of each instance, and the preset load threshold determined in step S201.
Wherein the optimal number of instances to run the target microservice is calculated by the following formula.
(N-1)*T≦M*N≦N*T。
Wherein, N refers to the optimal number of the running instances in the target micro service, T refers to the preset load threshold value of the instances of the target micro service, and M refers to the running load of the instances in the target micro service.
Step 2022, generating an instance adjustment policy according to the optimal quantity and the actual quantity.
In the step 2022, the generated instance adjustment policy includes, according to the optimal number and the actual number:
step 20221, if the actual number is less than the optimal number, increasing the number of instances running the target microservice.
Step 20222, if the actual number is greater than the optimal number, reducing the number of instances to run the target microservice.
In the above step 20221 and step 20222, the number of instances in the target microservice is adjusted according to the instance adjustment policy, that is, the number of currently running instances in the target microservice is adjusted to the optimal number. When the number of the instances in the target micro service is adjusted to the optimal number, the processing capacity of the micro service can be improved by increasing the number of the instances, and the problem of resource waste caused by excessive instances is also reduced.
In an industrial internet platform, there are a plurality of micro services, and the business pressure of each micro service may change from time to time, so that each micro service needs to be monitored and the number of instances needs to be adjusted in real time. If the industrial internet platform comprises the target micro service and at least one candidate micro service, after the number of the instances running the target micro service in the industrial internet platform is adjusted according to the instance adjusting strategy in the executing step, the candidate micro service is determined as the target micro service, and the executing step obtains the running information of the target micro service in the industrial internet platform. That is, for the entire industrial internet platform, all the microservices need to poll to perform the method for adjusting the number of instances in the industrial internet platform provided by the present application.
The method for adjusting the number of instances in the industrial internet platform is a periodically executed process, and generally, the number can be executed once in 30 seconds to 1 minute so as to ensure the real-time performance of the number adjustment. The whole industrial Internet platform is composed of a plurality of micro services, and the number of running instances of each micro service is possibly more than one. In practical implementation, a polling strategy, such as 1 minute, may be adopted to perform a polling check. The method comprises the steps of checking the micro service A, wherein the number of running examples is not required to be adjusted, the micro service A is a target micro service, other micro services are candidate micro services, the number of the examples of the micro service A is adjusted, checking the micro service B, wherein the number of the running examples is not required to be adjusted, the micro service B is the target micro service, other micro services are candidate micro services, and the like, and the method is executed on the next micro service after the micro service is adjusted.
The embodiment of the application provides a method for adjusting the examples in the industrial Internet platform, the actual number of the examples of the target micro service in the industrial Internet platform and the load value of each example are obtained in real time, determining a preset load threshold value of each instance for operating the micro-service according to different service classes of the target micro-service, comparing the load value of the operating instance with the preset load threshold value, generating an instance adjustment policy for the target microservice when the instance load value of the target server does not match the preset load threshold, the number of the running examples of the target micro service is adjusted to the optimal number, the load condition of the running examples of the target micro service can be accurately reflected, the method and the device can timely cope with the condition that the load value of the instance is not matched with the preset load threshold value, and are favorable for realizing the optimal balance between the number of instances of the micro-service and the load condition.
An embodiment of the present application provides an apparatus for adjusting an instance in an industrial internet platform, as shown in fig. 3, the apparatus includes:
the information acquisition module 301 is used for acquiring the running information of the target micro service in the industrial internet platform; the running information carries the actual number of the instances running the target micro service and the load value of each instance;
an adjustment policy generating module 302, configured to generate an instance adjustment policy of the target micro service by using the actual number, the load value of each instance, and a preset load threshold if the load value of each instance of the target micro service does not match the preset load threshold;
and an adjusting policy executing module 303, configured to adjust, according to the instance adjusting policy, the number of instances in the industrial internet platform, where the target micro service is running.
Optionally, the adjusting policy generating module 302 includes:
the determining unit is used for determining a preset load threshold corresponding to the target micro service according to the service category of the target micro service;
and the generating unit is used for generating an instance adjustment strategy of the target micro service by using the actual quantity, the load value of each instance and a preset load threshold if the load value of each instance of the target micro service is not matched with the preset load threshold.
Optionally, the service categories include any one or two of the following categories:
a gateway class and a data processing class.
Optionally, the generating unit includes:
a calculating subunit, configured to calculate, if the load value of each instance of the target micro service does not match a preset load threshold, an optimal number of instances in which the target micro service is to be run by using the actual number, the load value of each instance, and the preset load threshold;
and the generating subunit is used for generating the instance adjusting strategy according to the optimal quantity and the actual quantity.
Optionally, the example adjusting policy includes:
if the actual number is smaller than the optimal number, increasing the number of the instances for operating the target microservice;
and if the actual number is larger than the optimal number, reducing the number of the instances for operating the target micro service.
Optionally, if the industrial internet platform includes a target micro service and at least one candidate micro service, after the executing step adjusts the number of instances in the industrial internet platform that are running the target micro service according to the instance adjustment policy, the candidate micro service is determined as the target micro service, and the executing step obtains the running information of the target micro service in the industrial internet platform.
Corresponding to the method for adjusting the example in the industrial internet platform in fig. 1, the embodiment of the present application further provides a schematic diagram of an electronic device 400, as shown in fig. 4, the electronic device 400 includes a processor 410, a memory 420 and a bus 430. The memory 420 stores machine-readable instructions executable by the processor 410, the processor 410 and the memory 420 communicate with each other through the bus 430 when the electronic device 400 is running, and the machine-readable instructions, when executed by the processor 410, can perform the steps of the above method for adjusting instances in an industrial internet platform, which solves the problem of the prior art method for adjusting traffic pressure of micro-services in an industrial internet platform.
Corresponding to the method for adjusting the example in the industrial internet platform in fig. 1, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, may perform the steps of the method for adjusting the example in the industrial internet platform.
Specifically, the storage medium can be a general storage medium, such as a removable disk, a hard disk, and the like, and when a computer program on the storage medium is executed, the method for adjusting the instance in the industrial internet platform can be executed, so that the problem of the prior art in adjusting the business pressure of the micro service in the industrial internet platform is solved. The method and the device for adjusting the number of the instances of the target micro service acquire the actual number of the instances of the target micro service and the load value of each instance in real time, generate an instance adjusting strategy of the target micro service when the load value of the instance of the target server is not matched with a preset load threshold value, adjust the number of the instances of the target micro service in operation to the optimal number, improve the processing capacity of the micro service by increasing the number of the instances, and reduce the problem of resource waste caused by excessive instances in an industrial internet platform.
In the embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of adjusting instances in an industrial internet platform, comprising:
acquiring running information of a target micro service in an industrial internet platform; the running information carries the actual number of the instances running the target micro service and the load value of each instance;
if the load value of each instance of the target micro service is not matched with a preset load threshold, generating an instance adjustment strategy of the target micro service by using the actual number, the load value of each instance and the preset load threshold;
and adjusting the number of the instances running the target micro service in the industrial Internet platform according to the instance adjusting strategy.
2. The method of claim 1, wherein if the load value of each of the instances of the target microservice does not match a preset load threshold, generating an instance adjustment policy for the target microservice using the actual number, the load value of each of the instances, and the preset load threshold comprises:
determining a preset load threshold corresponding to the target micro service according to the service category of the target micro service;
and if the load value of each instance of the target micro service is not matched with a preset load threshold, generating an instance adjustment strategy of the target micro service by using the actual number, the load value of each instance and the preset load threshold.
3. The method of claim 2, wherein the service classes comprise any one or both of the following classes:
a gateway class and a data processing class.
4. The method of claim 2, wherein if the load value of each of the instances of the target microservice does not match a preset load threshold, generating an instance adjustment policy for the target microservice using the actual number, the load value of each of the instances, and the preset load threshold comprises:
if the load value of each instance of the target micro service is not matched with a preset load threshold value, calculating the optimal number of the instances for operating the target micro service by using the actual number, the load value of each instance and the preset load threshold value;
and generating the instance adjustment strategy according to the optimal quantity and the actual quantity.
5. The method of claim 1, wherein the instance adjustment policy comprises:
if the actual number is smaller than the optimal number, increasing the number of the instances for operating the target microservice;
and if the actual number is larger than the optimal number, reducing the number of the instances for operating the target micro service.
6. The method according to claim 1, wherein if the industrial internet platform comprises a target micro service and at least one candidate micro service, after the executing step adjusts the number of instances in the industrial internet platform running the target micro service according to the instance adjusting policy, the candidate micro service is determined as the target micro service, and the executing step obtains the running information of the target micro service in the industrial internet platform.
7. An apparatus for adjusting instances in an industrial internet platform, comprising:
the information acquisition module is used for acquiring the running information of the target micro service in the industrial internet platform; the running information carries the actual number of the instances running the target micro service and the load value of each instance;
an adjustment policy generation module, configured to generate an instance adjustment policy for the target micro service by using the actual number, the load value of each instance, and a preset load threshold if the load value of each instance of the target micro service does not match the preset load threshold;
and the adjustment strategy execution module is used for adjusting the number of the instances running the target micro service in the industrial Internet platform according to the instance adjustment strategy.
8. The apparatus of claim 7, wherein the adjustment policy generation module comprises:
the determining unit is used for determining a preset load threshold corresponding to the target micro service according to the service category of the target micro service;
and the generating unit is used for generating an instance adjustment strategy of the target micro service by using the actual quantity, the load value of each instance and a preset load threshold if the load value of each instance of the target micro service is not matched with the preset load threshold.
9. An electronic device, comprising: processor, memory and bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the steps of the method of adapting instances in an industrial internet platform as claimed in any of the preceding claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of adapting instances in an industrial internet platform according to any one of the preceding claims 1 to 6.
CN202011386057.1A 2020-12-01 2020-12-01 Method, apparatus, device and medium for adjusting instances in an industrial internet platform Pending CN112565391A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011386057.1A CN112565391A (en) 2020-12-01 2020-12-01 Method, apparatus, device and medium for adjusting instances in an industrial internet platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011386057.1A CN112565391A (en) 2020-12-01 2020-12-01 Method, apparatus, device and medium for adjusting instances in an industrial internet platform

Publications (1)

Publication Number Publication Date
CN112565391A true CN112565391A (en) 2021-03-26

Family

ID=75047018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011386057.1A Pending CN112565391A (en) 2020-12-01 2020-12-01 Method, apparatus, device and medium for adjusting instances in an industrial internet platform

Country Status (1)

Country Link
CN (1) CN112565391A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296915A (en) * 2021-06-18 2021-08-24 瀚云科技有限公司 Task generation method and system based on industrial internet platform
CN114844843A (en) * 2022-03-24 2022-08-02 清华大学 Method and device for adjusting number of application instances

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234589A (en) * 2016-12-22 2018-06-29 瞻博网络公司 The auto zoom of micro services application
CN110971623A (en) * 2018-09-28 2020-04-07 中兴通讯股份有限公司 Micro-service instance elastic scaling method and device and storage medium
US20200195526A1 (en) * 2018-12-13 2020-06-18 Sap Se Amplifying scaling elasticity of microservice meshes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234589A (en) * 2016-12-22 2018-06-29 瞻博网络公司 The auto zoom of micro services application
CN110971623A (en) * 2018-09-28 2020-04-07 中兴通讯股份有限公司 Micro-service instance elastic scaling method and device and storage medium
US20200195526A1 (en) * 2018-12-13 2020-06-18 Sap Se Amplifying scaling elasticity of microservice meshes

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296915A (en) * 2021-06-18 2021-08-24 瀚云科技有限公司 Task generation method and system based on industrial internet platform
CN113296915B (en) * 2021-06-18 2023-07-18 瀚云科技有限公司 Task generation method and system based on industrial Internet platform
CN114844843A (en) * 2022-03-24 2022-08-02 清华大学 Method and device for adjusting number of application instances

Similar Documents

Publication Publication Date Title
JP6457447B2 (en) Data center network traffic scheduling method and apparatus
US8930521B2 (en) Method, apparatus, and computer program product for enabling monitoring of a resource
US10783002B1 (en) Cost determination of a service call
US20150286507A1 (en) Method, node and computer program for enabling automatic adaptation of resource units
US8305911B2 (en) System and method for identifying and managing service disruptions using network and systems data
CN112579304A (en) Resource scheduling method, device, equipment and medium based on distributed platform
CN112565391A (en) Method, apparatus, device and medium for adjusting instances in an industrial internet platform
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
US9306814B1 (en) Providing instance availability information
CN110737425B (en) Method and device for establishing application program of charging platform system
CN114490078A (en) Dynamic capacity reduction and expansion method, device and equipment for micro-service
CN112506619A (en) Job processing method, apparatus, electronic device, storage medium, and program product
CN110096339B (en) System load-based capacity expansion and contraction configuration recommendation system and method
CN115001989A (en) Equipment early warning method, device, equipment and readable storage medium
JP2005128866A (en) Computer unit and method for controlling computer unit
CN113159463A (en) Traffic monitoring method and device
CN110336884B (en) Server cluster updating method and device
CN112468573A (en) Data pushing method, device, equipment and storage medium
WO2020000724A1 (en) Method, electronic device and medium for processing communication load between hosts of cloud platform
CN109960572B (en) Equipment resource management method and device and intelligent terminal
CN114356582A (en) Expansion method, system, equipment and medium based on edge cloud computing
US20180123866A1 (en) Method and apparatus for determining event level of monitoring result
US10866876B2 (en) Dynamically configurable operation information collection
CN112783637A (en) Resource regulation and control method and device
CN116303804B (en) Data comparison method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210326

RJ01 Rejection of invention patent application after publication