Movatterモバイル変換


[0]ホーム

URL:


CN113495747A - Gray scale publishing method and device - Google Patents

Gray scale publishing method and device
Download PDF

Info

Publication number
CN113495747A
CN113495747ACN202010265347.4ACN202010265347ACN113495747ACN 113495747 ACN113495747 ACN 113495747ACN 202010265347 ACN202010265347 ACN 202010265347ACN 113495747 ACN113495747 ACN 113495747A
Authority
CN
China
Prior art keywords
shunting
component
configuration information
service
version
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
CN202010265347.4A
Other languages
Chinese (zh)
Other versions
CN113495747B (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.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information 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 Beijing Jingdong Zhenshi Information Technology Co LtdfiledCriticalBeijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202010265347.4ApriorityCriticalpatent/CN113495747B/en
Publication of CN113495747ApublicationCriticalpatent/CN113495747A/en
Application grantedgrantedCritical
Publication of CN113495747BpublicationCriticalpatent/CN113495747B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a gray level publishing method and device, and relates to the technical field of computers. One embodiment of the method comprises: receiving and analyzing a service request to obtain a service field and a service parameter corresponding to the service field; intercepting method call to a shunting assembly, and judging whether shunting configuration information of the shunting assembly is stored locally; if so, matching the component realization class name of the target version from the shunting configuration information according to the service field and the service parameter corresponding to the service field, thereby calling the method corresponding to the component realization class name of the target version. The implementation mode can solve the technical problems of large development workload, poor maintainability or occupation of more hardware resources.

Description

Gray scale publishing method and device
Technical Field
The invention relates to the technical field of computers, in particular to a gray level publishing method and device.
Background
The gray release means that when a system needs to be on-line due to new requirements, all users can use new functions instead of being on-line in a full amount, part of users can try the new functions first by setting a specific shunting rule, other users can use the old functions, whether the new functions meet the expected requirements or not is analyzed through various system logs, product perfection is carried out according to feedback results, and a new round of gray release or complete release is carried out.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1) the workload of developers is large, and the shunting rules of the system are scattered at all positions of the system, so that the system cannot be uniformly managed, and the maintainability is poor;
2) more hardware resources are needed, and a plurality of sets of branch codes need to be maintained, so that code branch management is complex.
Disclosure of Invention
In view of this, embodiments of the present invention provide a gray scale publishing method and apparatus, so as to solve the technical problems of large development workload, poor maintainability, or occupation of more hardware resources.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a gray scale issuing method applied to an application container, including:
receiving and analyzing a service request to obtain a service field and a service parameter corresponding to the service field;
intercepting method call to a shunting assembly, and judging whether shunting configuration information of the shunting assembly is stored locally;
if so, matching the component realization class name of the target version from the shunting configuration information according to the service field and the service parameter corresponding to the service field, thereby calling the method corresponding to the component realization class name of the target version.
Optionally, matching a component implementation class name of a target version from the offloading configuration information according to the service field and the service parameter corresponding to the service field, including:
determining a target distribution condition according to each service field and the corresponding service parameter thereof;
and matching the corresponding component implementation class name of the target version from the distribution configuration information according to the target distribution condition.
Optionally, before receiving and parsing the service request, the method further includes:
starting an application container, and finding out a shunting component added with multi-version annotations in an application code;
registering each shunting assembly to a shunting configuration center according to a shunting configuration address of the shunting configuration center; wherein, the registration information of the shunting component comprises: the address of the application container, the component implementation class name of each version corresponding to the shunting component and the method name thereof.
Optionally, the registration information of the offloading component further includes a callback port;
according to the distribution configuration address of the distribution configuration center, after registering each distribution component to the distribution configuration center, the method further includes:
and monitoring whether the shunting configuration information of the shunting assembly is updated or not through a callback port.
Optionally, after monitoring whether the offloading configuration information of the offloading component is updated through the callback port, the method further includes:
receiving a configuration update message sent by the shunting configuration center;
drawing shunting configuration information corresponding to each shunting assembly from the shunting configuration center, and storing the shunting configuration information locally;
the distribution configuration information includes a corresponding relationship between each distribution condition and a component implementation class name of each version, and the distribution condition includes a combination of parameter information of at least one service field.
Optionally, after registering each shunting component to the shunting configuration center according to a shunting configuration address of the shunting configuration center, the method further includes:
and updating the registration information of each shunting component in the shunting configuration center at regular time through a timing task.
Optionally, the method further comprises: if not, calling a method before intercepting the shunting component.
Optionally, the method further comprises: after the method calling is finished, recording a calling log;
the call log comprises the called component, the version of the called component and a corresponding call result.
In addition, according to another aspect of the embodiments of the present invention, there is provided a gray scale issuing apparatus provided in an application container, including:
the receiving module is used for receiving and analyzing the service request to obtain a service field and a service parameter corresponding to the service field;
the calling module is used for intercepting method calling of the shunting assembly and judging whether shunting configuration information of the shunting assembly is stored locally; if so, matching the component realization class name of the target version from the shunting configuration information according to the service field and the service parameter corresponding to the service field, thereby calling the method corresponding to the component realization class name of the target version.
Optionally, the invoking module is further configured to:
determining a target distribution condition according to each service field and the corresponding service parameter thereof;
and matching the corresponding component implementation class name of the target version from the distribution configuration information according to the target distribution condition.
Optionally, the system further comprises a registration module, configured to:
before receiving and analyzing a service request, starting an application container, and searching a shunting component added with multi-version annotations in an application code;
registering each shunting assembly to a shunting configuration center according to a shunting configuration address of the shunting configuration center; wherein, the registration information of the shunting component comprises: the address of the application container, the component implementation class name of each version corresponding to the shunting component and the method name thereof.
Optionally, the registration information of the offloading component further includes a callback port;
the monitoring system further comprises a monitoring module used for: and according to the shunting configuration address of the shunting configuration center, after registering each shunting assembly to the shunting configuration center, monitoring whether shunting configuration information of the shunting assembly is updated or not through a callback port.
Optionally, the listening module is further configured to:
monitoring whether the shunting configuration information of the shunting assembly is updated or not through a callback port, and receiving a configuration update message sent by the shunting configuration center;
drawing shunting configuration information corresponding to each shunting assembly from the shunting configuration center, and storing the shunting configuration information locally;
the distribution configuration information includes a corresponding relationship between each distribution condition and a component implementation class name of each version, and the distribution condition includes a combination of parameter information of at least one service field.
Optionally, the registration module is further configured to:
and according to the shunting configuration address of the shunting configuration center, after registering each shunting assembly to the shunting configuration center, regularly refreshing the registration information of each shunting assembly in the shunting configuration center through a timing task.
Optionally, the invoking module is further configured to: if not, calling a method before intercepting the shunting component.
Optionally, the invoking module is further configured to: after the method calling is finished, recording a calling log; the call log comprises the called component, the version of the called component and a corresponding call result.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any of the embodiments described above.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements the method of any of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: the method for calling the shunting component by intercepting is adopted to judge whether shunting configuration information of the shunting component is stored locally or not, if yes, the component realization class name of the target version is matched, and therefore the technical means of calling the corresponding method is adopted, and the technical problems that in the prior art, the development workload is large, the maintainability is poor or more hardware resources are occupied are solved. The embodiment of the invention uniformly configures the shunting configuration information of each shunting assembly through the shunting configuration center, so that the shunting configuration information is easier to maintain; and code control shunting logic is not needed, development workload is reduced, independent gray level grouping is not needed, server resources are saved, independent branch codes are not needed to be established, and branch code management is simplified. Therefore, the embodiment of the invention can flexibly and efficiently complete the gray scale release of the system without increasing hardware consumption, additionally introducing code branches and increasing system switches without codes, simplifies the difficulty of shunt realization and reduces the workload of shunt realization.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a gradation issuance method according to an embodiment of the present invention;
fig. 2 is a schematic view of a main flow of a gradation issuance method according to one referential embodiment of the present invention;
FIG. 3 is a block diagram of a gray scale distribution system according to an embodiment of the invention;
fig. 4 is a schematic diagram of a main flow of a gradation issuance method according to another referential embodiment of the present invention;
fig. 5 is a schematic diagram of main blocks of a gradation issuance apparatus according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The gray release is used more in internet enterprises, because the system user volume of internet enterprises is big, the frequency of system release is high, if new demand is directly on line, the system can be caused to break down in a large scale, or the experience that causes a large amount of users changes, large-area customer complaints can be generated, so through the mode of gray release, the new demand that sequences is verified, and the stability of the on-line system can be kept.
Fig. 1 is a schematic diagram of a main flow of a gradation issuance method according to an embodiment of the present invention. As an embodiment of the present invention, as shown in fig. 1, the gray scale publishing method applied to an application container may include the following steps:
step 101, receiving and analyzing a service request to obtain a service field and a service parameter corresponding to the service field.
Optionally, the application container receives a service request sent by the terminal, and analyzes the service request, so as to obtain a service field carried in the request and a service parameter corresponding to the service field. Optionally, the service field may be a user account, an IP where the user logs in, a four-level address where the user belongs, an organizational structure where the user belongs, a merchant code or a provider code, and the like, and the request may carry a plurality of fields.
Step 102, intercepting method call to a shunting component, and judging whether shunting configuration information of the shunting component is stored locally; if yes, go to step 103.
After a certain shunting component in the application code is added with a multi-version annotation (such as a facet-oriented programming annotation), in the process of running the application code, an application container intercepts method calls of the shunting component, and then judges whether a local virtual machine stores shunting configuration information of the shunting component. It should be noted that, the offloading configuration information of each offloading component is configured in the offloading configuration center by a developer, so before performing step 101, the application container needs to store the offloading configuration information of each offloading component locally.
Optionally, before step 101, the method further includes: starting an application container, and finding out a shunting component added with multi-version annotations in an application code; and registering each shunting assembly to the shunting configuration center according to a shunting configuration address of the shunting configuration center. Wherein, the registration information of the shunting component comprises: the address of the application container, the component implementation class name of each version corresponding to the shunting component and the method name thereof. When the application container is started, business components (namely shunting components) with multi-version annotations added in all application codes are found out, and each shunting component is registered in the shunting configuration center by calling a shunting configuration address provided by the shunting configuration center. The registered information mainly includes an IP address of the application container, component implementation class names of each version corresponding to each shunting component, method names thereof, callback ports, and the like. In an embodiment of the invention, a component includes a class and an interface. Generally, in order to implement gray scale distribution, each shunting component has multiple versions, and therefore, the component implementation class name and the method name of each version need to be registered in a shunting configuration center, so that developers can configure shunting configuration information of the shunting component according to the registered shunting components of the multiple versions conveniently.
Optionally, after registering each shunting component to the shunting configuration center according to a shunting configuration address of the shunting configuration center, the method further includes: and monitoring whether the shunting configuration information of the shunting assembly is updated or not through a callback port. Optionally, the method further comprises: receiving a configuration update message sent by the shunting configuration center; and pulling the shunting configuration information corresponding to each shunting assembly from the shunting configuration center, and storing the shunting configuration information locally. The distribution configuration information includes a corresponding relationship between each distribution condition and a component implementation class name of each version, and the distribution condition includes a combination of parameter information of at least one service field. Optionally, the service field may be a user account, an IP where the user logs in, a four-level address where the user belongs, an organizational structure where the user belongs, a merchant code or a provider code, and the like, and the distribution condition is also configured by the developer.
When the shunting configuration information of the shunting configuration center is changed, the shunting configuration center notifies the application container through the callback port, and after the application container receives the configuration updating message, the shunting configuration information of the shunting component is pulled from the shunting configuration center and stored in the local virtual machine, so that multi-version management of the same service component in one virtual machine is realized.
It should be noted that the application container may pull the offloading configuration information of all offloading components from the offloading configuration center, or may pull only the offloading configuration information of the offloading component that is updated. Optionally, the application container may invoke a query service of a offload configuration center to query the offload configuration of each offload component of the application container, and then, offload configuration information is refreshed into the local virtual machine for storage.
And 103, matching the component realization class name of the target version from the shunting configuration information according to the service field and the service parameter corresponding to the service field, so as to call a method corresponding to the component realization class name of the target version.
If the shunting configuration information of the shunting component is locally stored, matching the component implementation class (namely bean) name of the target version of the shunting component from the shunting configuration information according to each service field obtained by analyzing in the step 101 and the service parameter corresponding to the service field, so as to call a method corresponding to the component implementation class name of the version.
Optionally, matching a component implementation class name of a target version from the offloading configuration information according to the service field and the service parameter corresponding to the service field, including: determining a target distribution condition according to each service field and the corresponding service parameter thereof; and matching the corresponding component implementation class name of the target version from the distribution configuration information according to the target distribution condition. The shunting configuration information comprises the corresponding relation between each shunting condition and the component realization class name of each version, so that which shunting condition is met is judged through the service parameters in the request, the target shunting condition is determined, and then the component realization class name of the target version of the shunting component is matched according to the corresponding relation between each shunting condition and the component realization class name of each version.
Optionally, if the shunting configuration information of the shunting component is not stored locally, which indicates that shunting of the shunting component is not needed, a method before intercepting the shunting component is directly called.
Optionally, the method further comprises: after the method calling is finished, recording a calling log; the call log comprises the called component, the version of the called component and a corresponding call result. The calling logs can be used for knowing which components are called in the process of running the application codes, which version of which components is called, the calling results of all the components and the like, so that whether the new functions meet the expected requirements or not can be conveniently analyzed, product perfection is carried out according to the feedback results, and a new round of gray release or complete release is carried out.
According to the various embodiments described above, it can be seen that the technical means of the embodiments of the present invention, by intercepting method calls to a shunting component, determining whether shunting configuration information of the shunting component is stored locally, and if so, matching a component implementation class name of a target version, thereby calling a corresponding method, solves the technical problems of large development workload, poor maintainability, or occupation of more hardware resources in the prior art. The embodiment of the invention uniformly configures the shunting configuration information of each shunting assembly through the shunting configuration center, so that the shunting configuration information is easier to maintain; and code control shunting logic is not needed, development workload is reduced, independent gray level grouping is not needed, server resources are saved, independent branch codes are not needed to be established, and branch code management is simplified. Therefore, the embodiment of the invention can flexibly and efficiently complete the gray scale release of the system without increasing hardware consumption, additionally introducing code branches and increasing system switches without codes, simplifies the difficulty of shunt realization and reduces the workload of shunt realization.
Fig. 2 is a schematic diagram of a main flow of a gradation issuance method according to one referential embodiment of the present invention. As another embodiment of the present invention, as shown in fig. 2, the gray scale publishing method applied to the application container may include the following steps:
step 201, starting the application container, and finding out the shunting component added with the multi-version annotation in the application code.
Firstly, deploying application codes into an application container, searching business components with multi-version annotations added in the application codes after the application container is started, and taking the business components as classification components.
Step 202, registering each shunting assembly to the shunting configuration center according to a shunting configuration address of the shunting configuration center.
And registering each shunting component to the shunting configuration center by calling a shunting configuration address provided by the shunting configuration center. The registered information mainly includes an IP address of the application container, component implementation class names of versions corresponding to the respective shunting components, method names thereof, call-back ports, and the like.
And 203, monitoring whether the shunting configuration information of the shunting assembly is updated or not through the callback port.
And monitoring port information by the application container, and judging whether the shunting configuration information of the shunting assembly configured on the shunting configuration center is changed or not.
Step 204, receiving a configuration update message sent by the offloading configuration center.
Step 205, pulling the shunting configuration information corresponding to each shunting component from the shunting configuration center, and storing the shunting configuration information locally.
When the shunting configuration information of the shunting configuration center is changed, the shunting configuration center notifies the application container through the callback port, and after the application container receives the configuration update message, the shunting configuration information of the shunting component is pulled from the shunting configuration center and stored in the local virtual machine.
The distribution configuration information of each distribution component is configured in a distribution configuration center by a developer, the distribution configuration information comprises the corresponding relation between each distribution condition and the component implementation class name of each version, and the distribution condition comprises the combination of parameter information of at least one service field.
Step 206, receiving and analyzing the service request to obtain the service field and the service parameter corresponding to the service field.
Step 207, intercepting method call to a shunting component, and judging whether shunting configuration information of the shunting component is stored locally; if yes, go to step 208; if not, go to step 209.
After a multi-version annotation is added to a certain shunting component in the application code, in the process of running the application code, the application container intercepts method calls of the shunting component, and then judges whether the local virtual machine stores shunting configuration information of the shunting component.
And 208, matching the component implementation class name of the target version from the shunting configuration information according to the service field and the service parameter corresponding to the service field, so as to call a method corresponding to the component implementation class name of the target version.
The shunting configuration information comprises the corresponding relation between each shunting condition and the component realization class name of each version, so that the target shunting condition is determined according to which shunting condition is met by the service parameter in the request, and then the component realization class name of the target version of the shunting component is matched according to the corresponding relation between each shunting condition and the component realization class name of each version.
Step 209, call the method before intercepting the shunting component.
If the shunting configuration information of the shunting assembly is not stored locally, which indicates that shunting of the shunting assembly is not needed, a method before intercepting the shunting assembly is directly called.
Step 210, recording the call log. The call log comprises the called component, the version of the called component and a corresponding call result. The embodiment of the invention records the log executed by the multi-version assembly, can inquire the call log through the identifier, and confirms the information of which assemblies are called, which version of the assemblies is called for execution, the call result and the like in the execution process of the application code. Whether the new function meets the expected requirement or not is conveniently analyzed, product perfection is carried out according to the feedback result, and a new round of gray scale release or complete release is carried out.
In addition, in one embodiment of the present invention, the detailed implementation of the gray-scale distribution method is described in detail in the above-mentioned gray-scale distribution method, and therefore, the repeated description is not repeated here.
Fig. 3 is a schematic diagram of a framework of a gray scale distribution system according to an embodiment of the present invention. As shown in fig. 3, the grayscale publishing system includes a distribution module, an application container (e.g., Spring container), a distribution configuration center, a log module, a building module, and a development plug-in module (e.g., IDEA development tool). The shunting module mainly comprises a shunting control interceptor, a shunting node register and a shunting configuration updater.
Fig. 4 is a schematic diagram of a main flow of a gradation issuance method according to another referential embodiment of the present invention. As another embodiment of the present invention, as shown in fig. 4, the gray scale publishing method applied to the application container may include the following steps:
step 401, a developer writes a multi-version implementation class of a service component through a development plug-in module, and adds a multi-version control AOP annotation to the service component needing multi-version control, so as to obtain an application code (a callback port, an application code demoApp, and the like also need to be configured in a configuration file of the application code); and then, a shunting module (existing in the form of jar software package) is referred in the application code, and a shunting configuration address of a shunting configuration center is configured in a configuration file.
It should be noted that, which service components need to be shunted, annotations are added to which service components for intercepting calls to these service components.
Step 402, packaging the application code, the shunting module, the configuration file and the like into an executable program by adopting a construction module, and deploying the executable program into an application container.
Step 403, after the application container is started, the shunting node registrar finds out the service component (i.e. shunting component) to which the multi-version annotation is added in the application code, and then registers the shunting component to which the multi-version annotation is added to the shunting configuration center according to the shunting configuration address. Wherein, the registration information includes: the IP address of the application container, the component realization class name of each version corresponding to each shunt component, the method name thereof, the call-back port and the like.
After the container is started, the shunting node register can call shunting configuration addresses at regular time through a timing task, and register each shunting component to the shunting configuration center, so that the shunting configuration center knows the state (stop or operation) of the application container.
In step 404, the developer configures shunting configuration information of the shunting component of the application container on an interface of the shunting configuration center.
The distribution configuration information includes a corresponding relationship between each distribution condition and each version of component implementation class name, and the distribution condition includes a combination of parameter information of at least one service field. Optionally, the service field may be a user account, an IP where the user logs in, a four-level address where the user belongs, an organizational structure where the user belongs, a merchant code or a provider code, and the like, and the distribution condition is also configured by the developer. The meaning of the offloading configuration information is: and when the service field or the service field combination meets a certain shunting condition, executing the method of the component implementation class of the corresponding version.
Two states may be configured for the flow configuration information: the method comprises an initial state and an enabling state, wherein the initial state means that the shunting configuration information is not effective, and the enabling state means that the shunting configuration information is effective. The starting state is changed after the starting button is clicked, and the initial state is changed after the stopping state is clicked.
Step 405, the shunting configuration updater monitors port information, when shunting configuration information of the shunting configuration center changes, the shunting configuration center notifies the shunting configuration updater through the callback port, and after receiving the configuration update message, the shunting configuration updater pulls shunting configuration information of the shunting component from the shunting configuration center and stores the shunting configuration information in the local virtual machine.
And 406, the application container receives the service request, analyzes the service request to obtain service parameters, intercepts method calls of the shunting component by the shunting control interceptor in the process of running the code, and then judges whether the local virtual machine stores shunting configuration information of the shunting component.
If the shunting configuration information of the shunting assembly is locally stored, judging which shunting condition is met according to each service field obtained by analyzing the request and the service parameter corresponding to the service field, and then matching the assembly implementation class name of the target version of the shunting assembly from the shunting configuration information, thereby calling the method corresponding to the assembly implementation class name of the version.
If the shunting configuration information of the shunting assembly is not stored locally, which indicates that shunting of the shunting assembly is not needed, a method before intercepting the shunting assembly is directly called.
Step 407, after the method is called, the log module records a call log, where the call log includes the called component, the version of the called component, and a corresponding call result.
In addition, in another embodiment of the present invention, the detailed implementation of the gray-scale distribution method is described in detail in the above-mentioned gray-scale distribution method, and therefore, the repeated content is not described again.
Fig. 5 is a schematic diagram of main modules of a gray scale issuing apparatus according to an embodiment of the present invention, and as shown in fig. 5, the grayscale issuing apparatus 500 is disposed in an application container and includes a receivingmodule 501 and acalling module 502; the receivingmodule 501 is configured to receive and analyze a service request to obtain a service field and a service parameter corresponding to the service field; thecalling module 502 is configured to intercept method calling for a shunting component, and determine whether shunting configuration information of the shunting component is stored locally; if so, matching the component realization class name of the target version from the shunting configuration information according to the service field and the service parameter corresponding to the service field, thereby calling the method corresponding to the component realization class name of the target version.
Optionally, the invokingmodule 502 is further configured to:
determining a target distribution condition according to each service field and the corresponding service parameter thereof;
and matching the corresponding component implementation class name of the target version from the distribution configuration information according to the target distribution condition.
Optionally, the system further comprises a registration module, configured to:
before receiving and analyzing a service request, starting an application container, and searching a shunting component added with multi-version annotations in an application code;
registering each shunting assembly to a shunting configuration center according to a shunting configuration address of the shunting configuration center; wherein, the registration information of the shunting component comprises: the address of the application container, the component implementation class name of each version corresponding to the shunting component and the method name thereof.
Optionally, the registration information of the offloading component further includes a callback port;
the monitoring system further comprises a monitoring module used for: and according to the shunting configuration address of the shunting configuration center, after registering each shunting assembly to the shunting configuration center, monitoring whether shunting configuration information of the shunting assembly is updated or not through a callback port.
Optionally, the listening module is further configured to:
monitoring whether the shunting configuration information of the shunting assembly is updated or not through a callback port, and receiving a configuration update message sent by the shunting configuration center;
drawing shunting configuration information corresponding to each shunting assembly from the shunting configuration center, and storing the shunting configuration information locally;
the distribution configuration information includes a corresponding relationship between each distribution condition and a component implementation class name of each version, and the distribution condition includes a combination of parameter information of at least one service field.
Optionally, the registration module is further configured to:
and according to the shunting configuration address of the shunting configuration center, after registering each shunting assembly to the shunting configuration center, regularly refreshing the registration information of each shunting assembly in the shunting configuration center through a timing task.
Optionally, the invokingmodule 502 is further configured to: if not, calling a method before intercepting the shunting component.
Optionally, the invokingmodule 502 is further configured to: after the method calling is finished, recording a calling log; the call log comprises the called component, the version of the called component and a corresponding call result.
According to the various embodiments described above, it can be seen that the technical means of the embodiments of the present invention, by intercepting method calls to a shunting component, determining whether shunting configuration information of the shunting component is stored locally, and if so, matching a component implementation class name of a target version, thereby calling a corresponding method, solves the technical problems of large development workload, poor maintainability, or occupation of more hardware resources in the prior art. The embodiment of the invention uniformly configures the shunting configuration information of each shunting assembly through the shunting configuration center, so that the shunting configuration information is easier to maintain; and code control shunting logic is not needed, development workload is reduced, independent gray level grouping is not needed, server resources are saved, independent branch codes are not needed to be established, and branch code management is simplified. Therefore, the embodiment of the invention can flexibly and efficiently complete the gray scale release of the system without increasing hardware consumption, additionally introducing code branches and increasing system switches without codes, simplifies the difficulty of shunt realization and reduces the workload of shunt realization.
It should be noted that, in the implementation of the gray scale distribution apparatus of the present invention, the details of the gray scale distribution method are already described in detail, and therefore, the repeated details are not described herein.
Fig. 6 shows anexemplary system architecture 600 of a gray scale distribution method or a gray scale distribution apparatus to which an embodiment of the present invention can be applied.
As shown in fig. 6, thesystem architecture 600 may includeterminal devices 601, 602, 603, anetwork 604, and aserver 605. Thenetwork 604 serves to provide a medium for communication links between theterminal devices 601, 602, 603 and theserver 605.Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use theterminal devices 601, 602, 603 to interact with theserver 605 via thenetwork 604 to receive or send messages or the like. Theterminal devices 601, 602, 603 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
Theterminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
Theserver 605 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using theterminal devices 601, 602, 603. The background management server may analyze and otherwise process the received data such as the item information query request, and feed back a processing result (for example, target push information, item information — just an example) to the terminal device.
It should be noted that the gray scale distribution method provided by the embodiment of the present invention is generally executed by theserver 605, and accordingly, the gray scale distribution apparatus is generally disposed in theserver 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of acomputer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, thecomputer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from astorage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of thesystem 700 are also stored. TheCPU 701, theROM 702, and the RAM703 are connected to each other via abus 704. An input/output (I/O)interface 705 is also connected tobus 704.
The following components are connected to the I/O interface 705: aninput portion 706 including a keyboard, a mouse, and the like; anoutput section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; astorage section 708 including a hard disk and the like; and acommunication section 709 including a network interface card such as a LAN card, a modem, or the like. Thecommunication section 709 performs communication processing via a network such as the internet. Adrive 710 is also connected to the I/O interface 705 as needed. Aremovable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on thedrive 710 as necessary, so that a computer program read out therefrom is mounted into thestorage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through thecommunication section 709, and/or installed from theremovable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer programs according to various embodiments of the present invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a receiving module and a calling module, where the names of the modules do not in some cases constitute a limitation on the modules themselves.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, implement the method of: receiving and analyzing a service request to obtain a service field and a service parameter corresponding to the service field; intercepting method call to a shunting assembly, and judging whether shunting configuration information of the shunting assembly is stored locally; if so, matching the component realization class name of the target version from the shunting configuration information according to the service field and the service parameter corresponding to the service field, thereby calling the method corresponding to the component realization class name of the target version.
According to the technical scheme of the embodiment of the invention, the technical means that the method call of the shunting component is intercepted, whether the shunting configuration information of the shunting component is stored locally or not is judged, if yes, the component realization class name of the target version is matched, and the corresponding method is called is adopted, so that the technical problems of large development workload, poor maintainability or more hardware resource occupation in the prior art are solved. The embodiment of the invention uniformly configures the shunting configuration information of each shunting assembly through the shunting configuration center, so that the shunting configuration information is easier to maintain; and code control shunting logic is not needed, development workload is reduced, independent gray level grouping is not needed, server resources are saved, independent branch codes are not needed to be established, and branch code management is simplified. Therefore, the embodiment of the invention can flexibly and efficiently complete the gray scale release of the system without increasing hardware consumption, additionally introducing code branches and increasing system switches without codes, simplifies the difficulty of shunt realization and reduces the workload of shunt realization.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

CN202010265347.4A2020-04-072020-04-07Gray scale release method and deviceActiveCN113495747B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010265347.4ACN113495747B (en)2020-04-072020-04-07Gray scale release method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010265347.4ACN113495747B (en)2020-04-072020-04-07Gray scale release method and device

Publications (2)

Publication NumberPublication Date
CN113495747Atrue CN113495747A (en)2021-10-12
CN113495747B CN113495747B (en)2023-09-26

Family

ID=77995601

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010265347.4AActiveCN113495747B (en)2020-04-072020-04-07Gray scale release method and device

Country Status (1)

CountryLink
CN (1)CN113495747B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103095743A (en)*2011-10-282013-05-08阿里巴巴集团控股有限公司Handling method and system of grey release
WO2016179958A1 (en)*2015-05-122016-11-17百度在线网络技术(北京)有限公司Method, device and system for performing grey-releasing on mobile application
CN108595337A (en)*2018-05-072018-09-28杭州有赞科技有限公司A kind of operation method and system of Jar packets
WO2019029457A1 (en)*2017-08-072019-02-14阿里巴巴集团控股有限公司Method and apparatus for updating application program on client, and electronic device
WO2019047821A1 (en)*2017-09-072019-03-14华为技术有限公司Service routing method, device and storage medium
CN109857409A (en)*2019-01-162019-06-07深圳壹账通智能科技有限公司Data processing method, device and computer equipment based on micro services gateway
CN109995713A (en)*2017-12-302019-07-09华为技术有限公司Service processing method and relevant device in a kind of micro services frame
CN110245014A (en)*2018-03-092019-09-17北京京东尚科信息技术有限公司Data processing method and device
CN110830374A (en)*2018-08-072020-02-21北京京东尚科信息技术有限公司Method and device for gray level release based on SDK
CN110825425A (en)*2018-08-092020-02-21北京京东尚科信息技术有限公司Configuration data management method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103095743A (en)*2011-10-282013-05-08阿里巴巴集团控股有限公司Handling method and system of grey release
WO2016179958A1 (en)*2015-05-122016-11-17百度在线网络技术(北京)有限公司Method, device and system for performing grey-releasing on mobile application
WO2019029457A1 (en)*2017-08-072019-02-14阿里巴巴集团控股有限公司Method and apparatus for updating application program on client, and electronic device
WO2019047821A1 (en)*2017-09-072019-03-14华为技术有限公司Service routing method, device and storage medium
CN109995713A (en)*2017-12-302019-07-09华为技术有限公司Service processing method and relevant device in a kind of micro services frame
CN110245014A (en)*2018-03-092019-09-17北京京东尚科信息技术有限公司Data processing method and device
CN108595337A (en)*2018-05-072018-09-28杭州有赞科技有限公司A kind of operation method and system of Jar packets
CN110830374A (en)*2018-08-072020-02-21北京京东尚科信息技术有限公司Method and device for gray level release based on SDK
CN110825425A (en)*2018-08-092020-02-21北京京东尚科信息技术有限公司Configuration data management method and device, electronic equipment and storage medium
CN109857409A (en)*2019-01-162019-06-07深圳壹账通智能科技有限公司Data processing method, device and computer equipment based on micro services gateway

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张宇光;王俊杰: "面向工作流的Gitlab服务化设计", 计算机系统应用, no. 09*

Also Published As

Publication numberPublication date
CN113495747B (en)2023-09-26

Similar Documents

PublicationPublication DateTitle
CN112148711B (en)Batch processing task processing method and device
CN113495921A (en)Routing method and device of database cluster
CN112445868B (en)Service message processing method and device
WO2021023149A1 (en)Method and apparatus for dynamically returning message
CN110795315A (en) Method and apparatus for monitoring services
CN111414154A (en)Method and device for front-end development, electronic equipment and storage medium
CN111062682B (en)Work order processing method and device
CN112817562B (en)Service processing method and device
CN112306984A (en) A data source routing method and device
CN111478781B (en)Message broadcasting method and device
CN113448602B (en) Version update method and device
CN111382953A (en)Dynamic process generation method and device
CN109981546B (en)Method and device for acquiring remote call relation between application modules
CN113779122A (en)Method and apparatus for exporting data
CN118312076A (en) Map icon processing method, device, electronic device and computer readable medium
CN113672671A (en)Method and device for realizing data processing
CN113821519B (en)Data processing method and domain drive design architecture
CN113495747B (en)Gray scale release method and device
CN113556370B (en)Service calling method and device
CN112559001B (en)Method and device for updating application
CN113110898A (en)Transaction task execution method and device
CN113778847A (en)Test report generation method and device
CN113535163B (en)Method and device for generating message
CN111949472A (en)Method and device for recording application logs
CN114885030B (en) Service calling method, device, equipment, storage medium and program product

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp