CN114650318A - Switch pushing method - Google Patents

Switch pushing method Download PDF

Info

Publication number
CN114650318A
CN114650318A CN202210172829.4A CN202210172829A CN114650318A CN 114650318 A CN114650318 A CN 114650318A CN 202210172829 A CN202210172829 A CN 202210172829A CN 114650318 A CN114650318 A CN 114650318A
Authority
CN
China
Prior art keywords
switch
pushing
service
combination
push
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210172829.4A
Other languages
Chinese (zh)
Other versions
CN114650318B (en
Inventor
苏宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210172829.4A priority Critical patent/CN114650318B/en
Publication of CN114650318A publication Critical patent/CN114650318A/en
Application granted granted Critical
Publication of CN114650318B publication Critical patent/CN114650318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

The embodiment of the disclosure discloses a switch pushing method, which comprises the following steps: acquiring service configuration information, wherein the service configuration information comprises a pushing condition of a switch combination, and the switch combination comprises at least one switch item; and in response to reaching the pushing condition of the switch combination, pushing each switch item in the switch combination to a corresponding micro-service instance. According to the technical scheme, users do not need to manually push the service when pushing is needed, the labor cost is reduced, pushing errors are reduced, and flexible management of the switch is achieved by configuring the service configuration information.

Description

Switch pushing method
Technical Field
The embodiment of the disclosure relates to the field of micro services, in particular to a switch pushing method.
Background
With the advance of the pace of 'new infrastructure', various fields related to cloud infrastructure are not developed, and various large internet manufacturers are increasingly advancing the pace of construction in the fields of artificial intelligence, big data, 5G and the like, on the level of the middle desk and the front desk, due to the unique advantages, the micro-service has gradually expanded use range and already formed scale advantages, however, in the face of increasingly complex service logics and increasingly huge support platforms, the development of the management means of the switch plan presents the situation of obviously lagging behind the development of the micro-service, the existing switch management platform mainly pushes a single switch item, in practical use, in order to realize a certain service scenario, some switch items are usually combined and executed, some function logics are combined and executed, therefore, when the user performs switch pushing, the user selects the switch items to be pushed one by one to perform manual pushing, the labor cost is high, and mistakes are easily made.
Disclosure of Invention
The embodiment of the disclosure provides a switch pushing method.
In a first aspect, a switch pushing method is provided in the embodiments of the present disclosure.
Specifically, the switch pushing method includes:
acquiring service configuration information, wherein the service configuration information comprises a pushing condition of a switch combination, and the switch combination comprises at least one switch item;
and in response to reaching the pushing condition of the switch combination, pushing each switch item in the switch combination to a corresponding micro-service instance.
With reference to the first aspect, the present disclosure is implemented in a first implementation manner of the first aspect, wherein the method further includes:
the service configuration information further includes a push mode of the switch combination, where the push mode is used to indicate a micro-service instance to which the switch combination is pushed, and the pushing each switch item in the switch combination to a corresponding micro-service instance includes:
and pushing each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode.
With reference to the first aspect and the first implementation manner of the first aspect, the present disclosure is in a second implementation manner of the first aspect, where the method further includes:
detecting the pushing result of the switch item in the corresponding micro service instance, wherein the pushing result comprises successful pushing, abnormal pushing and abnormal reasons;
and in response to the pushing result is abnormal pushing, performing abnormal alarm or pushing again based on the abnormal reason.
With reference to the first aspect and the first implementation manner of the first aspect, the present disclosure is in a third implementation manner of the first aspect, wherein the method further includes:
and responding to the pushing result that the pushing is successful, and forwarding the corresponding flow to the corresponding micro service instance.
With reference to the first aspect and the first implementation manner of the first aspect, the present disclosure is in a fourth implementation manner of the first aspect, wherein the switch item is a minimum switch unit in the microservice instance, and the method further includes:
identifying objects in each microservice instance;
identifying a switch item based on the property and the method of the object, wherein the type of the switch item comprises an object type switch corresponding to the property and an operation type switch corresponding to the method;
and receiving a combination selection instruction, and obtaining a group of switch items selected by the combination selection instruction as a switch combination.
With reference to the first aspect and the first implementation manner of the first aspect, the present disclosure is implemented in a fifth implementation manner of the first aspect, where the identifying a switch item based on the property and the method of the object includes:
acquiring a service calling link in the service;
counting the attributes, the using frequency of the method and the number of involved calling links based on the service calling links;
screening the alternative switch items corresponding to the attributes and the methods, wherein the using frequency exceeds a first preset frequency or the number of the involved calling links exceeds a second preset number;
and receiving a switch selection instruction, and obtaining an alternative switch item selected by the switch selection instruction as a switch item.
With reference to the first aspect and the first implementation manner of the first aspect, the present disclosure is in a sixth implementation manner of the first aspect, where the obtaining service configuration information includes:
and receiving a configuration instruction aiming at the switch combination, and obtaining the pushing condition and the corresponding pushing mode of the switch combination indicated by the configuration instruction.
With reference to the first aspect and the first implementation manner of the first aspect, the present disclosure is in a seventh implementation manner of the first aspect, wherein the push condition includes at least one of the following conditions: receiving a push instruction, reaching a preset time, reaching a system resource condition, reaching a service program data locality optimization suggestion SLO condition, and before service starting or after service ending.
With reference to the first aspect and the first implementation manner of the first aspect, the present disclosure is in an eighth implementation manner of the first aspect, where the push mode includes a tag push mode, a fragment push mode, a global push mode, and a call chain mode.
In a second aspect, a switch pushing method is provided in the disclosed embodiments.
Specifically, the switch pushing method includes:
the method comprises the steps that a switch pusher acquires service configuration information, wherein the service configuration information comprises a pushing condition of a switch combination, and the switch combination comprises at least one switch item;
the switch pusher responds to the pushing condition of the switch combination, sends each switch item in the switch combination and the value thereof to the pushing manager, and simultaneously pushes each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode;
the push manager detects a push result of the switch item in the corresponding micro service instance based on the value of the switch item, wherein the push result comprises push success, push abnormity and an abnormity reason;
the pushing manager feeds the pushing result back to the switch pusher;
and the switch pusher responds to the pushing result as abnormal pushing, and performs abnormal alarm or re-pushing based on the abnormal reason.
With reference to the second aspect, in a first implementation manner of the present disclosure in the second aspect, wherein,
the service configuration information further comprises a push mode of the switch combination; the pushing of each switch item in the switch combination to the corresponding micro-service instance by the switch pusher according to the corresponding pushing mode includes:
and pushing each switch item in the switch combination to a corresponding micro-service instance according to a corresponding pushing mode.
With reference to the second aspect and the first implementation manner of the second aspect, the present disclosure is in a second implementation manner of the second aspect, wherein the method further includes:
the pushing manager feeds the pushing result back to the service processor;
and the service processor responds to the pushing result that the pushing is successful and performs service processing on the corresponding micro service instance.
With reference to the second aspect and the first implementation manner of the second aspect, the present disclosure is in a third implementation manner of the second aspect, wherein the method further includes:
the service configurator acquires and stores the service configuration information;
the step of acquiring the service configuration information by the switch pusher comprises the following steps: the switch pusher obtains the service configuration information from the service configurator.
With reference to the second aspect and the first implementation manner of the second aspect, the present disclosure is in a fourth implementation manner of the second aspect, wherein the method further includes:
the switch identifier identifies a switch item in each micro-service instance, wherein the switch item is the minimum switch unit in the micro-service instance;
the service configurator acquiring and storing the service configuration information includes:
the service configurator receives a combination selection instruction, and a group of switch items selected by the combination selection instruction are obtained as a switch combination;
and the service configurator receives a configuration instruction aiming at the switch combination, and obtains the push condition and the corresponding push mode of the switch combination indicated by the configuration instruction.
In a third aspect, an embodiment of the present disclosure provides a switch pushing device.
Specifically, the switch pusher includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is configured to acquire service configuration information, the service configuration information comprises a pushing condition of a switch combination, and the switch combination comprises at least one switch item;
a push module configured to push each switch item in the switch combination to a corresponding micro-service instance in response to reaching a push condition of the switch combination.
With reference to the third aspect, the present disclosure is in a first implementation manner of the third aspect, wherein the service configuration information further includes a push mode of the switch combination, where the push mode is used to indicate a micro-service instance to which the switch combination is pushed, and the push module is configured to:
and pushing each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode.
With reference to the third aspect and the first implementation manner of the third aspect, the present disclosure is in a second implementation manner of the third aspect, where the apparatus further includes:
the detection module is configured to detect pushing results of the switch items in the corresponding micro service instances, wherein the pushing results comprise pushing success, pushing abnormity and abnormity reasons;
and the response module is configured to perform exception warning or re-pushing based on the exception reason in response to the pushing result being abnormal.
With reference to the third aspect and various implementations of the third aspect, the present disclosure is in a third implementation of the third aspect, wherein the apparatus further includes:
and the flow distribution module is configured to respond to the pushing result that the pushing is successful, and forward the corresponding flow to the corresponding micro service instance.
With reference to the third aspect and the first implementation manner of the third aspect, the present disclosure is in a fourth implementation manner of the third aspect, where the switch item is a minimum switch unit in the microservice instance, and the apparatus further includes:
a first identification module configured to identify an object in each microservice instance;
the second identification module is configured to identify a switch item based on the attribute and the method of the object, wherein the type of the switch item comprises an object type switch corresponding to the attribute and an operation type switch corresponding to the method;
and the combination selection module is configured to receive a combination selection instruction, and a group of switch items selected by the combination selection instruction are obtained as a switch combination.
With reference to the third aspect and the first implementation manner of the third aspect, the present disclosure is in a fifth implementation manner of the third aspect, wherein the second identifying module is configured to:
acquiring a service calling link in the service;
counting the attributes, the using frequency of the method and the number of involved calling links based on the service calling links;
screening the alternative switch items corresponding to the attributes and the methods, wherein the using frequency exceeds a first preset frequency or the number of the involved calling links exceeds a second preset number;
with reference to the third aspect and the first implementation manner of the third aspect, the present disclosure is in a sixth implementation manner of the third aspect, wherein the obtaining module is configured to:
and receiving a configuration instruction aiming at the switch combination, and obtaining the pushing condition and the corresponding pushing mode of the switch combination indicated by the configuration instruction.
With reference to the third aspect and the first implementation manner of the third aspect, the present disclosure is in a seventh implementation manner of the third aspect, wherein the push condition includes at least one of the following conditions: receiving a push instruction, reaching a preset time, reaching a system resource condition, reaching a service program data locality optimization suggestion SLO condition, and before service starting or after service ending.
With reference to the third aspect and the first implementation manner of the third aspect, the present disclosure is in an eighth implementation manner of the third aspect, where the push modes include a tag push mode, a fragment push mode, a global push mode, and a call chain mode.
In a fourth aspect, a switch pushing device is provided in the embodiments of the present disclosure.
Specifically, the switch pusher includes:
the system comprises a switch pusher and a service processing device, wherein the switch pusher is configured to obtain service configuration information, the service configuration information comprises pushing conditions of a switch combination, and the switch combination comprises at least one switch item;
the switch pusher is configured to respond to the pushing condition of the switch combination, send each switch item in the switch combination and the value thereof to the pushing manager, and simultaneously push each switch item in the switch combination to the corresponding micro service instance according to the corresponding pushing mode;
the push manager is configured to detect a push result of the switch item in the corresponding micro-service instance based on a value of the switch item, wherein the push result comprises a push success, a push exception and an exception reason, and feed the push result back to the switch pusher;
the switch pusher is configured to respond to the pushing result that the pushing is abnormal, and conduct abnormal alarm or push again based on the abnormal reason.
With reference to the fourth aspect, in a first implementation manner of the fourth aspect of the present disclosure, the service configuration information further includes a push mode of the switch combination; the switch pusher is configured to:
and pushing each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode.
With reference to the fourth aspect and the first implementation manner of the fourth aspect, the present disclosure is in a second implementation manner of the fourth aspect, wherein the apparatus further includes a service processor, wherein:
the pushing manager is configured to feed back the pushing result to the service processor;
and the service processor is configured to perform service processing on the corresponding micro service instance in response to the pushing result being that the pushing is successful.
With reference to the fourth aspect and the first implementation manner of the fourth aspect, the present disclosure is in a third implementation manner of the fourth aspect, wherein the apparatus further includes a service configurator, wherein:
a service configurator configured to acquire and store the service configuration information;
the switch pusher configured to obtain service configuration information comprises: the switch pusher obtains the service configuration information from the service configurator.
With reference to the fourth aspect and the first implementation manner of the fourth aspect, the present disclosure is in a fourth implementation manner of the fourth aspect, wherein the apparatus further includes a switch identifier, wherein:
a switch identifier configured to identify a switch entry in each micro-service instance, the switch entry being a minimum unit of switching in the micro-service instance;
the service configurator is configured to receive a combination selection instruction, and a group of switch items selected by the combination selection instruction are obtained as a switch combination; and receiving a configuration instruction aiming at the switch combination, and obtaining the pushing condition and the corresponding pushing mode of the switch combination indicated by the configuration instruction.
In a fifth aspect, the disclosed embodiments provide an electronic device, including a memory for storing one or more computer instructions that support the above apparatus to perform the above method, and a processor configured to execute the computer instructions stored in the memory.
In a sixth aspect, the disclosed embodiments provide a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the method steps of any of the above aspects.
In a seventh aspect, the disclosed embodiments provide a computer program product comprising a computer program/instructions, wherein the computer program/instructions, when executed by a processor, implement the method steps of any one of the above aspects.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the technical scheme, service configuration information can be obtained, the service configuration information comprises push conditions of a switch combination, the switch combination comprises at least one switch item, and each switch item in the switch combination is pushed to a corresponding micro service instance according to the push mode in response to the push conditions of the switch combination being reached; therefore, when the pushing condition of the switch combination is met, all switch items in the switch combination can be automatically pushed to the corresponding micro-service instances according to the pushing mode, users do not need to push manually one by one when pushing is needed, the labor cost is reduced, pushing errors are reduced, and flexible management of the switches is achieved by configuring the service configuration information.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of embodiments of the disclosure.
Drawings
Other features, objects, and advantages of embodiments of the disclosure will become more apparent from the following detailed description of non-limiting embodiments when taken in conjunction with the accompanying drawings. In the drawings:
fig. 1 shows a flowchart of a switch pushing method according to an embodiment of the present disclosure.
FIG. 2 illustrates a schematic diagram of in-field object recognition according to an embodiment of the present disclosure.
Fig. 3 shows a schematic diagram of pushing a switch item in a tag pushing mode according to an embodiment of the present disclosure.
Fig. 4 shows a schematic diagram of pushing a switch item in a slice pushing mode according to an embodiment of the present disclosure.
Fig. 5 shows a schematic diagram of pushing a switch item in a global push mode according to an embodiment of the present disclosure.
Fig. 6 shows a schematic diagram of pushing a switch item in a call chain mode according to an embodiment of the present disclosure.
Fig. 7 shows a flowchart of a switch pushing method according to an embodiment of the present disclosure.
Fig. 8 shows an implementation schematic diagram of a switch pushing method according to an embodiment of the present disclosure.
Fig. 9 shows a block diagram of a switch pushing device according to an embodiment of the present disclosure.
Fig. 10 shows a block diagram of a switch pushing device according to an embodiment of the present disclosure.
Fig. 11 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
FIG. 12 is a schematic block diagram of a computer system suitable for use in implementing methods according to embodiments of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the disclosed embodiments will be described in detail with reference to the accompanying drawings so that they can be easily implemented by those skilled in the art. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the disclosed embodiments, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, behaviors, components, parts, or combinations thereof, and are not intended to preclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof may be present or added.
It should also be noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As mentioned above, with the advance of the "new infrastructure" pace, the various fields related to the cloud infrastructure are not fully developed, and the development pace in the fields of artificial intelligence, big data, 5G and the like is accelerated by various large internet manufacturers, at the level of the middle platform and the front platform, due to the unique advantages of micro services, the application range is gradually enlarged, and the scale advantage is already formed, however, in the face of increasingly complex service logics and increasingly huge support platforms, the development of the switch plan management means presents a situation obviously lagging behind the development of micro services, the existing switch management platform mainly pushes a single switch item, and under the actual use condition, in order to realize a certain service scene, certain switch items are generally required to be executed in combination, certain function logics are executed in combination, so that a user is required to select the switch items to be pushed one by one to another for manual pushing, the human cost is higher and easy mistake.
In view of the foregoing problems, the present disclosure provides a switch pushing method, which may obtain service configuration information, where the service configuration information includes pushing conditions of a switch combination, where the switch combination includes at least one switch item, and in response to reaching the pushing conditions of the switch combination, push each switch item in the switch combination to a corresponding micro-service instance according to the pushing mode; therefore, when the pushing condition of the switch combination is met, all switch items in the switch combination can be automatically pushed to the corresponding micro-service instances according to the pushing mode, users do not need to push manually one by one when pushing is needed, the labor cost is reduced, pushing errors are reduced, and flexible management of the switches is achieved by configuring the service configuration information.
Fig. 1 shows a flowchart of a switch pushing method according to an embodiment of the present disclosure, and as shown in fig. 1, the switch pushing method includes the following steps S101 to S102:
in step S101, service configuration information is obtained, where the service configuration information includes a push condition of a switch combination, and the switch combination includes at least one switch item;
in step S102, in response to reaching the pushing condition of the switch combination, pushing each switch item in the switch combination to a corresponding micro-service instance.
In an embodiment of the present disclosure, the concept of switches is more service and function level, mainly controlling the activation and deactivation of individual functions or switching the state of functions between different versions. The switch item is the minimum switch unit in the micro-service instance, the switch combination comprises one or more switch items, and the switch combination can be formed by combining a group of switch items by related personnel according to a service scene so as to complete a specific service function, such as displaying different interface prompts through the combination of a group of switch items, guiding consumers and the like.
In an embodiment of the present disclosure, the pushing condition refers to a condition for pushing a corresponding switch combination, and the corresponding switch combination can be pushed as long as the pushing condition is met, for example, the pushing time may be a pushing time, and the corresponding switch combination can be pushed as long as the pushing time is reached.
In an embodiment of the present disclosure, after the pushing condition of the switch combination is obtained, when the pushing condition of the switch combination is reached, each switch item in the switch combination can be automatically pushed to the corresponding micro service instance, without requiring a user to manually push at a corresponding pushing time one by one, thereby reducing labor cost and pushing errors, and realizing flexible management of the switch by configuring the service configuration information.
In a possible implementation, the service configuration information further includes a push mode of the switch combination, where the push mode is used to indicate a micro-service instance to which the switch combination is pushed, and the pushing each switch item in the switch combination to a corresponding micro-service instance includes:
and pushing each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode.
In this embodiment, the push mode indicates the corresponding micro-service instance to which the switch combination is pushed, so that after the push condition and the push mode of the switch combination are obtained, each switch item in the switch combination can be automatically pushed to the corresponding micro-service instance according to the indication of the push mode when the push condition of the switch combination is reached, users do not need to manually push the switch items one by one at the corresponding push time, the labor cost is reduced, the push errors are reduced, and the flexible management of the switches is realized by configuring the service configuration information.
In a possible implementation, the switch pushing method may further include the following steps:
detecting a pushing result of the switch item, wherein the pushing result comprises a successful pushing, an abnormal pushing and an abnormal reason;
and in response to the pushing result is abnormal pushing, performing abnormal alarm or pushing again based on the abnormal reason.
In this embodiment, after the corresponding switch combination is pushed, it is further necessary to detect a pushing result of the switch item, detect a receiving condition of the switch item in the corresponding micro service instance, if the receiving result of the switch item in the micro service instance matches with the value of the switch item, the pushing result is a pushing success, if the receiving result of the switch item in the micro service instance does not match with the value of the switch item, the pushing result is a pushing abnormality, at this time, an abnormality cause is also detected, if the abnormality cause is a pushing timeout or the like, it is indicated that the pushing abnormality may be caused by reasons such as unavailability of network connection, at this time, the pushing may be performed again, and if the abnormality cause is a problem in a node of the micro service instance, the abnormality may be performed, and a relevant person is alerted to perform processing.
In a possible implementation, the switch pushing method may further include the following steps:
and responding to the pushing result that the pushing is successful, and forwarding the corresponding flow to the corresponding micro service instance.
In this embodiment, if the pushing result is that the pushing is successful, it indicates that the micro service instance can perform expected operation, at this time, corresponding service processing may be performed on the corresponding micro service instance, for example, corresponding traffic may be forwarded to the corresponding micro service instance, and of course, if the pushing result is that the pushing is failed, corresponding traffic is not forwarded to the corresponding micro service instance.
In a possible implementation manner, the switch pushing method further includes:
identifying objects in each microservice instance;
and identifying a switch item based on the property and the method of the object, wherein the type of the switch item comprises an object type switch corresponding to the property and an operation type switch corresponding to the method.
In this implementation, microservices are a software architecture style that is based on small functional blocks dedicated to a single responsibility and function, and are combined into complex large applications in a modular fashion. The small function blocks communicate with each other using a language independent Application Programming Interface (API).
In this implementation, as shown in fig. 2, in the domain modeling process, the service may be divided into different sub-domains (sub-domain 1 and sub-domain 2), a service boundary 201 is defined, micro-service instances, that is, (micro-service 1) and (micro-service 2), are formed, the outside and inside of the boundary communicate through a domain event, and the invocation relationship between the object and the object is identified inside the domain; at the object level, analyzing the attributes and behaviors of the objects in an object-oriented modeling angle, as shown in fig. 2, it can be identified that the objects in microservice 1 are object O1, object O2 and object O3, the object in microservice 2 is object O1, object O1 in microservice 2 communicates with object O2 in microservice 1 through a domain event, and object O2 in microservice 1 communicates with object O3 in microservice 1 through a domain event, so that the call chains in the domain are identified as object O1-object O2-and object O3.
In this implementation, all objects within each microservice instance may be identified, and switch entries including object-type switches identified based on the attributes of the object and operation-type switches identified based on the methods of the object may be identified based on the attributes and methods (i.e., behaviors) of the object. The object switch refers to an associated object and an operation object related to the service logic, and influences the service execution behavior and result, the operation switch is a product of service code configuration and can execute the action of a minimum unit, and the relationship between the object switch and the operation switch can be expressed as that the object switch changes the object behavior in a mode of configuring an attribute value, and the object switch is a multi-valued switch; the operation type switch directly changes the object behavior and is a binary switch; the operation type switch may be an object type switch, and the object type switch may determine whether or not the operation type switch is used, and the two switch types are associated with each other and have a relationship of interdependence. For example, when the object is a write log, the write log is started when the object is not to be controlled by the operation type switch, and the write log is closed when the value of the operation type switch is true; what log information is written is controlled by an object type switch, the value of which is plural, the value of which is configured to start writing the configuration item of the system log, when configured to write the configuration item of the error log, when configured to start writing the error log, when configured to write the configuration item of the operation log, start writing the operation log, and so on.
In this implementation manner, a user may input a combination selection instruction according to a service function that needs to be implemented, and a selected group of switch items is a switch combination, and the combination type of the switch combination may include an object type switch combination, an operation type switch combination, and a hybrid type switch combination. The switch items in the object type switch combination are all object type switch items, and the applicable scene is that the object attribute value can influence the specific functions in the service scene, for example, different interface prompts are displayed through the combination of a group of object type switch items, and consumers are guided, for example, the flow protection threshold is set through the configuration of a group of object type switch items, so that system protection is carried out. The switch items in the operation type switch combination are all operation type switch items, and the execution of service logic in an applicable service scene has a causal relationship or an association relationship, such as cross-application execution of the switch items, so that the control of an upstream and a downstream call link is realized, such as dependency relationship exists between the switch items, and sequential execution is required to ensure affairs. The hybrid switch combination is a general combination mode, and an object type switch and an operation type switch are mixed to complete a certain service function.
In a possible implementation manner, the step in the above switch pushing method, based on the property and method of the object, identifying the switch item may include the following steps:
acquiring a service calling link in the service;
counting the attributes, the using frequency of the method and the number of involved calling links based on the service calling links;
screening attributes and methods with the use frequency exceeding a first preset frequency or the number of involved calling links exceeding a second preset number as alternative switch items;
and receiving a switch selection instruction, and obtaining an alternative switch item selected by the switch selection instruction as a switch item.
In the implementation mode, the key of the switch item identification lies in the completeness and the accuracy, and the service model behavior can be effectively controlled so as to achieve the expected service result. The integrity can identify all necessary switch items related to the service from the angle of two-layer views of the micro-service instance identified by the domain modeling and the object in the micro-service instance identified by the object-oriented modeling, the accuracy can be measured from the angle of the service call link, and the switch items possibly with risk hidden danger are screened out to be used as the switch items.
In this implementation, the methods and attributes of all objects involved in a call chain have different degrees of failure risks, so that the service cannot achieve the expected result, the failure risks can be measured from two aspects of service influence (external) and call incorporativeness (internal), from the aspect of call incorporatability, the number of call links or the number of use frequencies involved in the attributes and methods is relatively larger, the influence range is larger, and faults are more easily caused when the links fail, so that all service call links in the service can be acquired, the use frequencies of the attributes, methods and the number of call links involved in the service call links are counted, a suitable threshold policy can be formulated to set a first preset frequency and a second preset number, the first preset frequency is determined based on the use frequencies of the attributes and methods, for example, the first preset frequency can be an intermediate value of the use frequencies of the attributes and methods, the second preset number is determined based on the number of call links involved in each attribute and method, for example, the second preset number may be an intermediate value of the number of call links involved in each attribute and method, and so on. In this way, the attributes and methods whose usage frequency exceeds a first preset frequency or the number of involved call links exceeds a second preset number can be screened as alternative switch items. From the aspect of service influence, a field architect or a qualified service person utilizes professional knowledge to judge, inputs a switch selection instruction, and obtains an alternative switch item selected by the switch selection instruction as a switch item.
In a possible implementation manner, the step S101 in the switch pushing method may include the following steps:
and receiving a configuration instruction aiming at the switch combination, and obtaining the pushing condition and the corresponding pushing mode of the switch combination indicated by the configuration instruction.
In this embodiment, the push condition and the push mode of the switch combination in the service configuration information are configured by the user according to the actual service situation.
In a possible embodiment, the push condition may include at least one of the following conditions: receiving a push instruction, reaching a predetermined time, reaching a system resource condition, reaching a service SLO (service Level object) condition, before service start or after service end.
In this embodiment, the service person comprehensively determines according to experience and actual conditions on the service line, and in a scenario where pushing of the relevant switch combination needs to be manually performed, the pushing condition is that a pushing instruction is received, and after the service person inputs the pushing instruction for the switch combination, the service person can immediately push the switch combination.
In this embodiment, in a scenario where the switch combination can be pushed at a predetermined time or a set frequency to complete a regular switch change operation, such as a service scenario where a cache is periodically cleared and a heartbeat is periodically sent, the pushing condition of the relevant switch combination can be set to reach a predetermined time, so that when the predetermined time is reached, the switch item in the corresponding switch combination can be automatically pushed.
In this embodiment, the service SLO condition, the system resource condition, and the like may be used as the push condition of the switch combination, and it is ensured that the push of the switch combination is executed in time when the service SLO condition and the system resource condition occur, for example, the system resource condition may be that the CPU resource occupies 50%, and the SLO condition may be that the interface 99% response time is less than 500 ms.
In this embodiment, in a service scenario where a preset switch combination needs to be pushed before service start or after service end, and preparation work and ending work are completed, the pushing condition of the relevant switch combination may be set to be pushed before service start or after service end.
In one possible implementation, the push modes include a tag push mode, a slice push mode, a global push mode, and a call chain mode.
In the embodiment, the common application scenarios of the switch in service include a/B test, database migration, blue-green deployment, canary test, and the like, and the push modes can be summarized as the following according to the application scenarios:
1. label pushing mode
The tag pushing mode is used to instruct that a switch item in the switch combination is selectively pushed to some micro-service instances in the micro-service instance cluster according to the micro-service instance tag, as shown in fig. 3, all the micro-service instances are marked with tags of tag1, tag, and the like, and the tag pushing mode instructs that the switch item is to be pushed to the micro-service instance with tag of tagk, so that the switch item may be pushed to the micro-service instances with tag of tagk according to the micro-service instance tag. The label pushing mode can be suitable for application scenes of small-scale verification of functions such as a gold sparrow test and the like. The gold sparrow test means that a small number of micro service instances of a micro service instance cluster are updated to a latest system, observation and verification are carried out, after no abnormality is confirmed, the rest micro service instances are updated, at the moment, tags 1 can be marked for the small number of micro service instances, and when the system is updated, a switch item corresponding to an updated service function can be pushed to a micro service instance device with a tag1 according to a tag pushing mode.
2. Slice push mode
The fragment pushing mode is used for indicating and selecting partial micro-service instance fragment pushing switch items, and is applicable to blue-green deployment, A/B test and other application scenes, and the blue-green deployment has two sets of systems in total: one set is the serving system being provided, marked "green"; the other set is a system to be released, which is marked as 'blue', the two sets of systems are both perfect in function and running, and only the system version is different from the external service condition; when the application scenario is a blue-green deployment, the switch item can be selectively pushed to the microservice instance labeled "green" or the microservice instance labeled "blue". The a/B test has multiple versions of services to the outside at the same time, and these services are tested enough to reach the online standard services, but there is no difference but no new or old difference, as shown in fig. 4, including the micro service instance of the a version, i.e. the a micro service, and the micro service instance of the B version, i.e. the B micro service, at this time, the switch item may be selectively pushed to the micro service instance of the a version or the micro service instance of the B version in a sliced manner.
3. Global push mode
The global pushing mode is used for indicating that the switch items are directly and indiscriminately pushed to all the microservice instances, and is suitable for application scenarios such as adjustment after new functions are online, failure timely stopping loss and the like, and as shown in fig. 5, the corresponding switch items can be pushed to each microservice instance, namely a microservice.
4. Calling chain mode
The calling chain mode is used for indicating that the switch items in the switch combination are pushed to the corresponding microservice instances in sequence. For an application scenario in which a dependency relationship exists between micro service instances, the order and the affairs of switch execution need to be ensured, and at this time, corresponding switch items need to be sequentially pushed to the corresponding micro service instances, as shown in fig. 6, a dependency relationship exists among three micro service instances, that is, a micro service a, a micro service B, and a micro service C, and the switch item a, the switch item B, and the switch item C can be sequentially pushed to the micro service a, the micro service B, and the micro service C.
In this embodiment, the push mode of the switch combination is formed into a standard paradigm, and the push mode is standardized, so that subsequent expansion is facilitated.
By way of example, one usage scenario of the above switch push method may be: when the last new client recommendation algorithm A is applied, the recommendation effect between the old client recommendation algorithm B and the new client recommendation algorithm A needs to be compared, and whether the new client recommendation algorithm A is better than the old client recommendation algorithm B or not needs to be verified. At this time, a switch combination can be set, which abstracts out whether the decision algorithm a and the algorithm B take effect: a combination of switch a and switch B. The switch A and the switch B are both operation type switches and are binary, the switch A is used for controlling the algorithm A to take effect and fail, the switch B is used for controlling the algorithm B to take effect and fail, and the switch combination means that when the value of the switch A and the switch B is (true, false), the control algorithm A takes effect and the algorithm B fails; when the value is (false, true), the control algorithm B takes effect, and the algorithm A fails; setting the pushing time of the switch combination (switch A, switch B) - > (true, false) to be 12 noon of the current friday, setting the pushing time of the switch (switch A, switch B) - > (false, true) to be 12 noon of the next friday, and in order to avoid influencing normal service, adopting a label pushing mode, marking the micro-service instances, only having the instance pushing switch items corresponding to labels, without losing generality, assuming that three micro-service instances are provided, and two of the three micro-service instances are set as Tag1, one is set as Tag2, and the label pushing mode indicates that the switch items are to be pushed into the micro-service instance labeled as Tag 1. Thus, at 12 pm on this friday, the switch combination (switch a, switch B) - > (true, false) may be pushed to two microservice instances labeled tag1, with their algorithm a validated and algorithm B invalidated, and at 12 pm on the next friday, the switch combination (switch a, switch B) - > (false, true) may be pushed to two microservice instances labeled tag1, with their algorithm a validated and algorithm B validated. After the pushing execution, comparing the passenger flow conditions of two Fridays, if the passenger flow of the Fridays is larger than that of the next Fridays, testing that the recommendation effect of the new customer recommendation algorithm A is better than that of the old customer recommendation algorithm B, and laying out the new algorithm A in the application; if the passenger flow volume of the current Friday is smaller than that of the next Friday, the result that the recommendation effect of the new customer recommendation algorithm A is not good as that of the old customer recommendation algorithm B is tested, and the new algorithm A cannot be distributed in the application.
The present disclosure further provides a switch pushing method, and fig. 7 shows a flowchart of the switch pushing method according to an embodiment of the present disclosure, and as shown in fig. 7, the switch pushing method includes the following steps S701 to S705:
in step S701, a switch pusher acquires service configuration information, where the service configuration information includes a pushing condition of a switch combination, and the switch combination includes at least one switch item;
in step S702, in response to reaching the pushing condition of the switch combination, the switch pusher sends each switch item in the switch combination and a value thereof to a push manager, and meanwhile pushes each switch item in the switch combination to a corresponding micro-service instance;
in step S703, the push manager detects, based on the value of the switch item, a push result of the switch item in the corresponding microservice instance, where the push result includes a push success, a push exception, and an exception reason;
in step S704, the push manager feeds back the push result to the switch pusher;
in step S705, the switch pusher performs an anomaly alarm or performs a re-pushing operation based on the anomaly reason in response to that the pushing result is an abnormal pushing operation.
In an embodiment of the present disclosure, the switch pushing apparatus includes, as shown in fig. 8, a switch pusher and a push manager, where a mutual cooperation relationship may be as shown in fig. 8, the switch pusher sends metadata of a switch entry to the push manager, where the metadata includes the switch entry and a value thereof, the sending of the metadata is strong in consistency, and the switch pusher will push the switch entry to a corresponding micro-service instance, where the pushing process is final in consistency (i.e., waiting for a period of time to finally receive a configuration of the switch entry), the push manager is responsible for detecting a receiving condition of the switch entry in the micro-service instance, if a receiving result of the switch entry in the micro-service instance matches the value of the switch entry, the pushing result is a push success, and if the receiving result of the switch entry in the micro-service instance does not match the value of the switch entry, the pushing result is an exception, and if the abnormal reason is that the micro-service instance node has a problem, the pushing manager can perform abnormal alarm to remind related personnel to process.
In the embodiment, the correctness of switch pushing can be ensured through the cooperation of the switch pusher and the pushing manager, the condition of short-time data inconsistency occurring in the switch pushing process is flexibly processed, and the transaction consistency of the switch pushing process is ensured.
In an embodiment of the present disclosure, the service configuration information further includes a push mode of the switch combination; the push mode is used for indicating the micro-service instance to which the switch combination is pushed, and the pushing of each switch item in the switch combination to the corresponding micro-service instance by the switch pusher according to the corresponding push mode comprises the following steps:
and pushing each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode.
In this embodiment, the push mode indicates the corresponding micro-service instance to which the switch combination is pushed, so that after the push condition and the push mode of the switch combination are obtained, the switch pusher can automatically push each switch item in the switch combination to the corresponding micro-service instance according to the indication of the push mode when the push condition of the switch combination is reached, and users do not need to push manually one by one at the corresponding push time, thereby reducing the labor cost and push errors, and realizing flexible management of the switches by configuring the service configuration information.
In an embodiment of the present disclosure, the method further comprises:
the pushing manager feeds the pushing result back to the service processor;
and the service processing is carried out on the corresponding micro service instance in response to the pushing result being that the pushing is successful.
In an embodiment of the present disclosure, as shown in fig. 8, the switch pushing apparatus further includes a service processor, where the service processor determines whether to perform corresponding service processing on some micro service instances according to a pushing result fed back by the pushing manager, and if the pushing result is a pushing success, it indicates that the micro service instance can perform expected operation, and at this time, the relevant service processing may be performed on the corresponding micro service instance, and of course, if the pushing result is a pushing failure, the relevant service processing is not performed on the corresponding micro service instance. For example, the service processor may be a traffic distributor, and the traffic distributor may forward corresponding traffic to the corresponding micro-service instance in response to the pushing result being a pushing success.
In an embodiment of the present disclosure, the method further comprises:
the service configurator acquires and stores the service configuration information;
the switch pusher obtaining service configuration information comprises: the switch pusher obtains the service configuration information from the service configurator.
In this embodiment, the switch pushing apparatus may further include a service configurator, and the service configurator may obtain service configuration information configured by a user, store the service configuration information, provide a storage basis for the switch pushing, and facilitate subsequent audit trail and switch pushing at the same time.
In an embodiment of the present disclosure, the method further comprises:
the switch identifier identifies a switch item in each micro-service instance;
the service configurator acquiring and storing the service configuration information includes:
the service configurator receives a combination selection instruction, and a group of switch items selected by the combination selection instruction are obtained as a switch combination;
and the service configurator receives a configuration instruction aiming at the switch combination, and obtains the push condition and the corresponding push mode of the switch combination indicated by the configuration instruction.
In this embodiment, the switch pushing device may further include a switch identifier, where the switch identifier may identify the switch item in each micro service instance according to the method described in the foregoing embodiment, and details are not described here again.
In this embodiment, when a user uses the switch pushing device to push a switch, a combination selection instruction may be input according to a service function that needs to be implemented by the user, so that a selected group of switch items is a switch combination, a configuration instruction of the switch combination is input to configure a pushing condition and a pushing mode for the switch combination, and the service configurator receives the combination selection instruction, so as to obtain that the group of switch items selected by the combination selection instruction is the switch combination.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 9 shows a block diagram of a switch pushing apparatus according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 9, the switch pushing device includes:
an obtaining module 901 configured to obtain service configuration information, where the service configuration information includes push conditions of a switch combination, and the switch combination includes at least one switch item;
a pushing module 902 configured to push each switch item in the switch combination to a corresponding micro-service instance in response to reaching a pushing condition of the switch combination.
In an embodiment of the present disclosure, the service configuration information further includes a push mode of the switch combination, where the push mode is used to indicate a micro-service instance to which the switch combination is pushed, and the push module is configured to:
and pushing each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode.
In an embodiment of the present disclosure, the apparatus further includes:
the detection module is configured to detect pushing results of the switch items in the corresponding micro service instances, wherein the pushing results comprise pushing success, pushing abnormity and abnormity reasons;
and the response module is configured to perform exception warning or re-pushing based on the exception reason in response to the pushing result being abnormal.
In an embodiment of the present disclosure, the apparatus further includes:
and the flow distribution module is configured to respond to the pushing result that the pushing is successful, and forward the corresponding flow to the corresponding micro service instance.
In an embodiment of the present disclosure, the apparatus further includes:
a first identification module configured to identify an object in each microservice instance;
the second identification module is configured to identify a switch item based on the attribute and the method of the object, wherein the type of the switch item comprises an object type switch corresponding to the attribute and an operation type switch corresponding to the method;
and the combination selection module is configured to receive a combination selection instruction, and a group of switch items selected by the combination selection instruction are obtained as a switch combination.
In an embodiment of the disclosure, the second identification module is configured to:
the identifying of the switch item based on the object attribute and the method comprises:
acquiring a service calling link in the service;
counting the attributes, the using frequency of the method and the number of involved calling links based on the service calling links;
screening the alternative switch items corresponding to the attributes and the methods, wherein the using frequency exceeds a first preset frequency or the number of the involved calling links exceeds a second preset number;
and receiving a switch selection instruction, and obtaining an alternative switch item selected by the switch selection instruction as a switch item.
In an embodiment of the disclosure, the obtaining module is configured to:
and receiving a configuration instruction aiming at the switch combination, and obtaining the pushing condition and the corresponding pushing mode of the switch combination indicated by the configuration instruction.
In an embodiment of the present disclosure, the push condition includes at least one of the following conditions: receiving a push instruction, reaching a preset time, reaching a system resource condition, reaching a service program data locality optimization Suggestion (SLO) condition, and before service starting or after service ending.
In an embodiment of the present disclosure, the push modes include a tag push mode, a fragment push mode, a global push mode, and a call chain mode.
Fig. 10 shows a block diagram of a switch pushing apparatus according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 10, the switch pushing device includes:
a switch pusher 1001 configured to acquire service configuration information, where the service configuration information includes a pushing condition of a switch combination, and the switch combination includes at least one switch item;
a switch pusher 1001 configured to send, in response to reaching a pushing condition of the switch combination, each switch item in the switch combination and a value thereof to a push manager, and push each switch item in the switch combination to a corresponding micro service instance according to a corresponding push mode;
the pushing manager 1002 is configured to detect a pushing result of the switch item in the corresponding micro service instance based on a value of the switch item, where the pushing result includes a pushing success, a pushing exception and an exception reason, and feed the pushing result back to the switch pusher;
the switch pusher 1001 is configured to perform an exception warning or push again based on the exception cause in response to the push result being a push exception.
In an embodiment of the present disclosure, the service configuration information further includes a push mode of the switch combination; the switch pusher 1001 is configured to:
and pushing each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode.
In an embodiment of the disclosure, the apparatus further comprises a service processor, wherein:
the pushing manager is configured to feed back the pushing result to the service processor;
and the service processor is configured to perform service processing on the corresponding micro service instance in response to the pushing result being that the pushing is successful.
In an embodiment of the disclosure, the apparatus further comprises a service configurator, wherein:
a service configurator configured to acquire and store the service configuration information;
the switch pusher configured to obtain service configuration information comprises: the switch pusher obtains the service configuration information from the service configurator.
In an embodiment of the disclosure, the apparatus further comprises a switch identifier, wherein:
a switch identifier configured to identify a switch item in each micro-service instance;
the service configurator is configured to receive a combination selection instruction, and a group of switch items selected by the combination selection instruction are obtained as a switch combination; and receiving a configuration instruction aiming at the switch combination, and obtaining the pushing condition and the corresponding pushing mode of the switch combination indicated by the configuration instruction.
The present disclosure also discloses an electronic device, fig. 11 shows a block diagram of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 11, the electronic device 1100 includes a memory 1101 and a processor 1102; wherein the content of the first and second substances,
the memory 1101 is used to store one or more computer instructions that are executed by the processor 1102 to implement the above-described method steps.
FIG. 12 is a block diagram of a computer system suitable for use in implementing the methods according to embodiments of the present disclosure.
As shown in fig. 12, the computer system 1200 includes a processing unit 1201 which can execute various processes in the above-described embodiments according to a program stored in a Read Only Memory (ROM)1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. In the RAM1203, various programs and data necessary for the operation of the system 1200 are also stored. The processing unit 1201, the ROM1202, and the RAM1203 are connected to each other by a bus 1204. An input/output (I/O) interface 1205 is also connected to bus 1204.
The following components are connected to the I/O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output portion 1207 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 1208 including a hard disk and the like; and a communication section 1209 including a network interface card such as a LAN card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. A driver 1210 is also connected to the I/O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 1210 as necessary, so that a computer program read out therefrom is mounted into the storage section 1208 as necessary. The processing unit 1201 can be implemented as a CPU, a GPU, a TPU, an FPGA, an NPU, or other processing units.
In particular, the above described methods may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the method described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 1209, and/or installed from the removable medium 1211.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software or hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation on the units or modules themselves.
As another aspect, the disclosed embodiment also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus in the foregoing embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the embodiments of the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept. For example, the above features and (but not limited to) the features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (14)

1. A switch push method, comprising:
acquiring service configuration information, wherein the service configuration information comprises a pushing condition of a switch combination, and the switch combination comprises at least one switch item;
and in response to reaching the pushing condition of the switch combination, pushing each switch item in the switch combination to a corresponding micro-service instance.
2. The method of claim 1, wherein the service configuration information further includes a push mode of the switch combination, the push mode being used to indicate a micro-service instance to which the switch combination is pushed, and the pushing each switch item in the switch combination to a corresponding micro-service instance comprises:
and pushing each switch item in the switch combination to a corresponding micro service instance according to the corresponding pushing mode.
3. The method of claim 1, wherein the method further comprises:
detecting the pushing result of the switch item in the corresponding micro service instance, wherein the pushing result comprises successful pushing, abnormal pushing and abnormal reasons;
and in response to the pushing result is abnormal pushing, performing abnormal alarm or pushing again based on the abnormal reason.
4. The method of claim 3, wherein the method further comprises:
and responding to the pushing result that the pushing is successful, and forwarding the corresponding flow to the corresponding micro service instance.
5. The method of claim 1, wherein the switch entry is a minimum unit of switching in the microservice instance, the method further comprising:
identifying objects in each microservice instance;
identifying a switch item based on the property and the method of the object, wherein the type of the switch item comprises an object type switch corresponding to the property and an operation type switch corresponding to the method;
and receiving a combination selection instruction, and obtaining a group of switch items selected by the combination selection instruction as a switch combination.
6. The method of claim 5, wherein the identifying a switch item based on the object's attributes and methods comprises:
acquiring a service calling link in the service;
counting the attributes, the using frequency of the method and the number of involved calling links based on the service calling links;
screening the alternative switch items corresponding to the attributes and the methods, wherein the using frequency exceeds a first preset frequency or the number of the involved calling links exceeds a second preset number;
and receiving a switch selection instruction, and obtaining an alternative switch item selected by the switch selection instruction as a switch item.
7. The method of claim 2, wherein the obtaining service configuration information comprises:
and receiving a configuration instruction aiming at the switch combination, and obtaining the pushing condition and the corresponding pushing mode of the switch combination indicated by the configuration instruction.
8. The method of claim 1, wherein the push condition comprises at least one of: receiving a push instruction, reaching a preset time, reaching a system resource condition, reaching a service program data locality optimization suggestion SLO condition, and before service starting or after service ending.
9. The method of claim 2, wherein the push mode comprises a tag push mode, a tile push mode, a global push mode, and a call chain mode.
10. A switch push method, comprising:
the method comprises the steps that a switch pusher acquires service configuration information, wherein the service configuration information comprises a pushing condition of a switch combination, and the switch combination comprises at least one switch item;
the switch pusher responds to the pushing condition of the switch combination, sends each switch item in the switch combination and the value thereof to the pushing manager, and simultaneously pushes each switch item in the switch combination to the corresponding micro-service instance;
the push manager detects a push result of the switch item in the corresponding micro service instance based on the value of the switch item, wherein the push result comprises push success, push abnormity and an abnormity reason;
the pushing manager feeds the pushing result back to the switch pusher;
and the switch pusher responds to the pushing result as abnormal pushing, and performs abnormal alarm or re-pushing based on the abnormal reason.
11. The method of claim 10, wherein the service configuration information further comprises a push mode of the switch combination; the pushing of each switch item in the switch combination to the corresponding micro-service instance by the switch pusher according to the corresponding pushing mode includes:
and the switch pusher pushes each switch item in the switch combination to a corresponding micro-service instance according to a corresponding pushing mode.
12. The method of claim 10, wherein the method further comprises:
the pushing manager feeds the pushing result back to the service processor;
and the service processor responds to the pushing result that the pushing is successful and performs service processing on the corresponding micro service instance.
13. The method of claim 10 or 12, wherein the method further comprises:
the service configurator acquires and stores the service configuration information;
the switch pusher obtaining service configuration information comprises: the switch pusher obtains the service configuration information from the service configurator.
14. The method of claim 13, wherein the method further comprises:
the switch identifier identifies a switch item in each micro-service instance, wherein the switch item is the minimum switch unit in the micro-service instance;
the service configurator acquiring and storing the service configuration information includes:
the service configurator receives a combination selection instruction, and a group of switch items selected by the combination selection instruction are obtained as a switch combination;
and the service configurator receives a configuration instruction aiming at the switch combination, and obtains the push condition and the corresponding push mode of the switch combination indicated by the configuration instruction.
CN202210172829.4A 2022-02-24 2022-02-24 Switch pushing method Active CN114650318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210172829.4A CN114650318B (en) 2022-02-24 2022-02-24 Switch pushing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210172829.4A CN114650318B (en) 2022-02-24 2022-02-24 Switch pushing method

Publications (2)

Publication Number Publication Date
CN114650318A true CN114650318A (en) 2022-06-21
CN114650318B CN114650318B (en) 2024-04-19

Family

ID=81993581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210172829.4A Active CN114650318B (en) 2022-02-24 2022-02-24 Switch pushing method

Country Status (1)

Country Link
CN (1) CN114650318B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180054355A1 (en) * 2016-08-19 2018-02-22 Hewlett Packard Enterprise Development Lp Micro-services for configuring switches
CN111324385A (en) * 2018-12-12 2020-06-23 中兴通讯股份有限公司 Starting method of application module, container, control device and readable storage medium
CN111466125A (en) * 2018-08-03 2020-07-28 华为技术有限公司 Service pushing method and terminal
CN111831325A (en) * 2020-07-17 2020-10-27 中国工商银行股份有限公司 Method, device, system and medium for updating configuration file in application
CN111897539A (en) * 2020-07-20 2020-11-06 国云科技股份有限公司 Method and device for deploying applications according to service roles
WO2020237797A1 (en) * 2019-05-31 2020-12-03 烽火通信科技股份有限公司 Dynamic configuration management method and system in microservice framework
WO2021013105A1 (en) * 2019-07-19 2021-01-28 深圳前海微众银行股份有限公司 Job state pushing method and apparatus
CN112311597A (en) * 2020-10-28 2021-02-02 南京尚网网络科技有限公司 Message pushing method and device
WO2021077506A1 (en) * 2019-10-23 2021-04-29 平安科技(深圳)有限公司 Micro-service call chain concretization method and device, electronic device and storage medium
CN113068203A (en) * 2019-03-22 2021-07-02 Oppo广东移动通信有限公司 Function control method of terminal equipment, terminal equipment and network equipment
CN113179183A (en) * 2021-04-29 2021-07-27 杭州迪普科技股份有限公司 Service switch state control device and method
CN114040009A (en) * 2021-10-18 2022-02-11 浪潮云信息技术股份公司 Method for implementing micro-service management platform gateway, storage medium and electronic equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180054355A1 (en) * 2016-08-19 2018-02-22 Hewlett Packard Enterprise Development Lp Micro-services for configuring switches
CN111466125A (en) * 2018-08-03 2020-07-28 华为技术有限公司 Service pushing method and terminal
CN111324385A (en) * 2018-12-12 2020-06-23 中兴通讯股份有限公司 Starting method of application module, container, control device and readable storage medium
CN113068203A (en) * 2019-03-22 2021-07-02 Oppo广东移动通信有限公司 Function control method of terminal equipment, terminal equipment and network equipment
WO2020237797A1 (en) * 2019-05-31 2020-12-03 烽火通信科技股份有限公司 Dynamic configuration management method and system in microservice framework
WO2021013105A1 (en) * 2019-07-19 2021-01-28 深圳前海微众银行股份有限公司 Job state pushing method and apparatus
WO2021077506A1 (en) * 2019-10-23 2021-04-29 平安科技(深圳)有限公司 Micro-service call chain concretization method and device, electronic device and storage medium
CN111831325A (en) * 2020-07-17 2020-10-27 中国工商银行股份有限公司 Method, device, system and medium for updating configuration file in application
CN111897539A (en) * 2020-07-20 2020-11-06 国云科技股份有限公司 Method and device for deploying applications according to service roles
CN112311597A (en) * 2020-10-28 2021-02-02 南京尚网网络科技有限公司 Message pushing method and device
CN113179183A (en) * 2021-04-29 2021-07-27 杭州迪普科技股份有限公司 Service switch state control device and method
CN114040009A (en) * 2021-10-18 2022-02-11 浪潮云信息技术股份公司 Method for implementing micro-service management platform gateway, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114650318B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN104765692B (en) Method and apparatus for automatic test software
CN110765018B (en) Automatic interface testing method and equipment
CN107807877A (en) A kind of method and apparatus of code performance test
CN111858254B (en) Data processing method, device, computing equipment and medium
CN110362479B (en) System upgrade test method and system
CN107193730A (en) A kind of interface test method of automation
CN109324959B (en) Method for automatically transferring data, server and computer readable storage medium
US10558513B2 (en) System management apparatus and system management method
CN112446714A (en) Server upgrading method, device and equipment for express after-sale work order processing system
CN110291505A (en) Reduce the recovery time of application
CN114650318B (en) Switch pushing method
CN112506802A (en) Test data management method and system
CN116596510A (en) Operation and maintenance fault management method, system, terminal equipment and storage medium
CN113868216B (en) Block chain monitoring method and device
CN115934513A (en) Demand analysis and test design adaptation method, device, equipment and medium
CN115981979A (en) Log data processing method, device, equipment, medium and computer program product
CN109766235A (en) Configuration file detection method, system, equipment and medium based on software supervision
CN115167896A (en) Method and device for updating software version, storage medium and electronic equipment
CN114356781A (en) Software function testing method and device
CN114356769A (en) Software learning method, device, equipment and storage medium
CN113590484A (en) Algorithm model service testing method, system, equipment and storage medium
CN112596982A (en) Multi-data-source project service monitoring method and device
CN111444032A (en) Computer system fault repairing method, system and equipment
CN112529590B (en) Service information generation method and device, electronic equipment and storage medium
CN114553748B (en) Product inspection method, device and computer program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant