CN112835606A - Gradation issuing method, gradation issuing apparatus, electronic device, gradation issuing medium, and program product - Google Patents
Gradation issuing method, gradation issuing apparatus, electronic device, gradation issuing medium, and program product Download PDFInfo
- Publication number
- CN112835606A CN112835606A CN202110353059.9A CN202110353059A CN112835606A CN 112835606 A CN112835606 A CN 112835606A CN 202110353059 A CN202110353059 A CN 202110353059A CN 112835606 A CN112835606 A CN 112835606A
- Authority
- CN
- China
- Prior art keywords
- release
- sub
- version
- module
- calling
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 104
- 238000012545 processing Methods 0.000 claims abstract description 136
- 238000012360 testing method Methods 0.000 claims abstract description 38
- 230000006870 function Effects 0.000 claims description 210
- 238000003672 processing method Methods 0.000 claims description 36
- 238000003860 storage Methods 0.000 claims description 24
- 238000011423 initialization method Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 17
- 230000015654 memory Effects 0.000 claims description 16
- 238000010586 diagram Methods 0.000 description 22
- 238000009826 distribution Methods 0.000 description 20
- 230000008569 process Effects 0.000 description 15
- 108010001267 Protein Subunits Proteins 0.000 description 10
- 241001593730 Acacia salicina Species 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 125000000524 functional group Chemical group 0.000 description 6
- 238000012423 maintenance Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 230000002411 adverse Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012905 input function Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 208000032170 Congenital Abnormalities Diseases 0.000 description 1
- 241000287127 Passeridae Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 1
- 239000010931 gold Substances 0.000 description 1
- 229910052737 gold Inorganic materials 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The present disclosure provides a gray scale publishing method, including: and aiming at the release object, responding to a processing request of a target job to obtain a job attribute parameter, wherein the processing request is used for indicating that the release object with different versions is called. And searching M release sub-objects based on the job attribute parameters, wherein each release sub-object comprises a high-version sub-program and a low-version sub-program which are independent from each other, and M is a positive integer. And determining the test point logic of the release object, wherein the test point logic is used for indicating the release version corresponding to the target operation in each release sub-object, and the release version is a high version or a low version. And calling the release version in each release sub-object to realize gray release of the release object based on the test point logic of the release object. The present disclosure also provides a gradation issuance apparatus, device, medium, and program product. The method and the device provided by the disclosure can be applied to the financial field or other fields.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, an electronic device, a medium, and a program product for gray scale publishing.
Background
This section is intended to provide a background or context to the embodiments of the disclosure recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
When a new version is released by an internet product, in order to reduce a risk that the new version may be released, a gray-scale release (Feature Toggle) manner is generally adopted. Gray scale distribution (aka gold sparrow distribution) refers to a distribution method that can smoothly transition between black and white. AB Test can be carried out on the system, namely two schemes are formulated A, B for the same product target, a part of users continue to use the product functions provided by the scheme A, a part of users start to use the product functions provided by the scheme B, and if the users do not have any objection to the scheme B, the use range of the scheme B is gradually expanded until all the users are migrated to the scheme B.
The related art provides version release solutions for distributed batch systems, and specifically, the solution B is implemented by directly modifying an inventory batch program of the solution a, and then a suitable trial strategy is selected to trial add functions as required. In fact, the incremental code of the newly added function is tightly coupled with the stock code of the existing function, so that an effective pilot strategy is difficult to find to solve the gray scale issue of the batch system under various conditions.
Disclosure of Invention
In view of the above, in order to effectively solve the above technical problems in the solutions for the gray scale distribution of the batch system in the related art, the present disclosure provides a gray scale distribution method, apparatus, electronic device, medium, and program product, which can effectively solve the gray scale distribution of the distributed batch system in various situations through the trial logic.
In order to achieve the above object, one aspect of the present disclosure provides a gray scale issuing method, which may include: responding to a processing request of a target job to obtain job attribute parameters aiming at a release object, wherein the processing request is used for indicating to call release objects of different versions; searching M release sub-objects based on the job attribute parameters, wherein each release sub-object comprises a high-version sub-program and a low-version sub-program which are independent of each other, and M is a positive integer; determining a test point logic of the release object, wherein the test point logic is used for indicating a release version corresponding to the target job in each release sub-object, and the release version is a high version or a low version; and calling the release version in each release sub-object to realize the gray release of the release object based on the test point logic of the release object.
According to an embodiment of the present disclosure, the job attribute parameter includes a search path and a target job identifier, the issued object includes N sub-objects, N is a positive integer greater than or equal to M, and the searching for M issued sub-objects based on the job attribute parameter may include: obtaining a pre-configured annotation for each sub-object aiming at the N sub-objects, wherein the annotation comprises a job identifier; and searching M sub-objects with the job identifications matched with the target job identifications from the N sub-objects as M issuing sub-objects based on the search path.
According to an embodiment of the present disclosure, the annotating includes a calling priority, and the calling the release version in each release sub-object to implement gray-scale release of the release object based on the test point logic of the release object may include: aiming at the M issuing sub-objects, obtaining a preset calling priority for each issuing sub-object; and calling the release version in each release sub-object according to the preset calling priority for each release sub-object based on the test point logic of the release object to realize the gray release of the release object.
According to an embodiment of the present disclosure, the invoking the release version in each release sub-object according to the invoking priority pre-configured for each release sub-object may include: configuring a service function interface class in advance for each issuing sub-object in the M issuing sub-objects, wherein the service function interface class is used for indicating that a calling interface is provided according to a method defined by an interface; and responding to the calling request of the service function interface class, and calling the method defined by the interface to call the release version in each release sub-object according to the calling priority preset for each release sub-object.
According to an embodiment of the present disclosure, the method for calling the interface definition according to the call priority preconfigured for each issuing child object may include: calling the initialization method defined by the interface according to the calling priority preset for each issuing sub-object; calling the execution function processing method defined by the interface according to the calling priority preset for each issuing sub-object; and calling the end function processing method defined by the interface according to the calling priority preset for each issuing sub-object.
According to an embodiment of the present disclosure, the method may further include: acquiring a first function code of the release object for realizing the non-upgraded service and a second function code for realizing the upgraded service; generating a low-version program based on the first function code; and generating a high version program based on the first function code and the second function code, wherein the low version program and the high version program are independent of each other.
In order to achieve the above object, another aspect of the present disclosure provides a gray scale issuing apparatus, which may include: the system comprises an obtaining module, a processing module and a processing module, wherein the obtaining module is used for responding to a processing request of a target job and obtaining job attribute parameters aiming at a release object, and the processing request is used for indicating to call release objects with different versions; the searching module is used for searching M issuing sub-objects based on the job attribute parameters, wherein each issuing sub-object comprises a high-version sub-program and a low-version sub-program which are independent of each other, and M is a positive integer; a determining module, configured to determine a test point logic of the release object, where the test point logic is configured to indicate a release version corresponding to the target job in each release sub-object, and the release version is a high version or a low version; and the calling module is used for calling the release version in each release sub-object to realize the gray release of the release object based on the test point logic of the release object.
According to an embodiment of the present disclosure, the job attribute parameter includes a search path and a target job identifier, the release object includes N sub-objects, N is a positive integer greater than or equal to M, and the search module may include: a first obtaining sub-module, configured to obtain, for the N sub-objects, a pre-configured annotation for each sub-object, where the annotation includes a job identifier; and the searching sub-module is used for searching M sub-objects with the job identifications matched with the target job identifications from the N sub-objects as M issuing sub-objects based on the searching path.
According to an embodiment of the present disclosure, the annotation includes a call priority, and the call module may include: a second obtaining submodule, configured to obtain, for the M publishing sub-objects, a pre-configured calling priority for each publishing sub-object; and the calling sub-module is used for calling the release version in each release sub-object according to the preset calling priority for each release sub-object based on the test point logic of the release object so as to realize the gray release of the release object.
According to an embodiment of the present disclosure, the invoking sub-module may include: a configuration unit, configured to pre-configure a service function interface class for each issuing sub-object in the M issuing sub-objects, where the service function interface class is used to indicate that a calling interface is provided according to a method defined by an interface; and a calling unit, configured to respond to the call request of the service function interface class, and call a method defined by the service function interface class according to the call priority preconfigured for each release sub-object, so as to call the release version in each release sub-object.
According to an embodiment of the present disclosure, the calling unit may include: a first calling subunit, configured to call the interface-defined initialization apparatus according to the calling priority preconfigured for each issuing child object; a second calling subunit, configured to call the execution function processing device defined by the interface according to the calling priority preconfigured for each issuing child object; and the third calling subunit is used for calling the ending function processing device defined by the interface according to the calling priority preset for each issuing sub-object.
According to an embodiment of the present disclosure, the apparatus may further include: the acquisition module is used for acquiring a first function code of the release object for realizing the non-upgraded service and a second function code for realizing the upgraded service; the first generation module is used for generating a low-version program based on the first function code; and a second generation module configured to generate a high-version program based on the first function code and the second function code, wherein the low-version program and the high-version program are independent of each other.
In order to achieve the above object, another aspect of the present disclosure provides an electronic device, which may include: one or more processors, a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the gray scale publishing method as described above.
To achieve the above object, another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the gray scale issuing method as described above when executed.
To achieve the above object, another aspect of the present disclosure provides a computer program comprising computer executable instructions for implementing the gray scale publishing method as described above when executed.
According to the embodiment of the disclosure, the program for realizing the high-version function and the program for realizing the low-version function are decoupled, so that the technical problems of the gray release method caused by the strong coupling of the increment code of the newly added function and the stock code of the original function in the traditional gray release solution in the related art can be at least partially avoided, the adverse effect caused by the fact that the code of the original function needs to be modified for realizing the newly added function can be at least reduced, and the probability of increasing the maintenance cost is reduced.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
fig. 1 schematically illustrates a system architecture of a gray scale publishing method, apparatus, electronic device, medium, and program product suitable for use with embodiments of the present disclosure;
FIG. 2 schematically shows a flow chart of a gray scale publishing method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a search module versus processing module diagram according to an embodiment of the disclosure;
FIG. 4 schematically shows a flow chart of a gray scale publishing method according to another embodiment of the present disclosure;
FIG. 5 schematically shows a flow chart of a gray scale publishing method according to another embodiment of the present disclosure;
FIG. 6 schematically illustrates a process flow diagram for a job module according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a process flow diagram for an input module according to an embodiment of the disclosure;
FIG. 8 schematically illustrates a process flow diagram for an output processing module according to an embodiment of the disclosure;
fig. 9 schematically shows a block diagram of a gradation issuance apparatus according to an embodiment of the present disclosure;
FIG. 10 schematically illustrates a schematic diagram of a computer-readable storage medium product suitable for implementing the above-described gray scale publishing method in accordance with an embodiment of the present disclosure; and
fig. 11 schematically illustrates a block diagram of an electronic device suitable for implementing the above-described grayscale publication method and apparatus according to an embodiment of the present disclosure.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
It should be noted that the figures are not drawn to scale and that elements of similar structure or function are generally represented by like reference numerals throughout the figures for illustrative purposes.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components. All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, or other programmable grayscale issuing processor such that the instructions, when executed by the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon for use by or in connection with an instruction execution system.
In order to reduce the risk possibly caused by the release of a new version of an internet product, a gray scale release mode is usually adopted, and through smooth transition between black and white, the stability of system operation can be ensured, various problems possibly causing the risk can be timely discovered and adjusted in the initial gray scale, so that the influence degree of the problems can be ensured, the stability of the product and the function can be improved, the adverse effect of the product on a user due to version upgrade can be reduced, the downtime of the system during production release can be shortened, the seamless switching of the production environment can be realized, meanwhile, development and testing personnel do not need to perform online verification on the production function in the middle of night, and certain defects or loopholes which can be discovered in the next day can be discovered in advance.
In the related art, the conventional solution for gray release is to directly modify (e.g., add, delete, and modify) the stock program codes related to the original functions in the old version, and then select a suitable test-point strategy to test the newly added functions in the new version according to the actual business scenario requirements. However, there are some technical problems in batch gray scale distribution of a distributed system using the conventional solution of gray scale distribution, which mainly includes: (1) on one hand, the modification affects the original functions which can be realized by the stock batch program codes in the old version and is easy to cause new problems, and on the other hand, the modified branches of the program codes in the new version are increased, so that the maintenance cost of the new version is correspondingly increased. (2) If the input and output names of the newly added function in the new version or the input and output structures are changed, the input and output names of the program code in the old version or the input and output structures also need to be adjusted correspondingly, otherwise, the gray scale release cannot be performed. (3) If a new function is tried on a plurality of iterative versions at the same time, for example, the version mainly running is the base version V1, the plurality of iterative versions include the enhanced version V2 in which a part of the program code is modified on the basis of the base version V1, and the enhanced version V3 in which a part of the program code is modified on the basis of the enhanced version V2. Then multiple modifications to the program code of base version V1 such that the program code in enhanced version V2 and enhanced version V3 necessarily requires more branches, greatly increases the complexity of the program code, increases the maintenance cost, and is more prone to new problems. (4) If the new version is tried out and the old version needs to be switched to the new version, the program code in the new version needs to be modified to delete the program code related to the original function in the old version, so that the deleting workload is large and new problems are easily caused. If the program codes related to the original functions in the old version are reserved, and the new version and the old version are switched comprehensively by modifying the branch judgment, after a plurality of new versions are changed, the related programs are very likely to become completely useless, and the program codes needing to be deleted cannot be distinguished at all. (5) If a new version needs to be rolled back to an old version, then modifications still need to be made to the inventory batch program code in the new version, again risking new problems.
Just because of the strong coupling at the code level between the program for implementing the high-version function and the program for implementing the low-version function, the conventional solution for the gray scale distribution has a congenital defect, which affects the effectiveness of the batch gray scale distribution of the distributed system. Therefore, in order to achieve the effectiveness of batch gray scale release, the gray scale release method provided by the present disclosure decouples, on a code level, a program for implementing a high-version function and a program for implementing a low-version function, and can avoid the need for modifying an existing program for implementing a new function.
In order to effectively solve the problem related to the gray scale release of the distributed batch system, the gray scale release method provided by the disclosure comprises a search phase for releasing the sub-object and a calling phase for releasing the sub-object. The method comprises the steps of searching for issuing sub-objects, obtaining a job attribute parameter in response to a processing request of a target job aiming at the issuing object, wherein the processing request is used for indicating to call issuing objects of different versions, and then searching for a plurality of issuing sub-objects based on the job attribute parameter, wherein each issuing sub-object comprises a high-version sub-program and a low-version sub-program which are independent of each other. In the calling phase of the release sub-objects, the test point logic of the release objects is determined, wherein the test point logic is used for indicating the release version corresponding to the target job in each release sub-object, and the release version is a high version or a low version, and then based on the test point logic of the release objects, the release version in each release sub-object is called to realize the gray release of the release objects.
The gray scale release method and the gray scale release device provided by the disclosure can be used for version release of software products in the financial field, and can also be used for version release of software products in any fields except the financial field. Therefore, the application field of the gray scale publishing method and device provided by the present disclosure is not particularly limited.
Fig. 1 schematically illustrates a system architecture 100 of a gray scale publishing method, apparatus, electronic device, medium, and program product suitable for use with embodiments of the disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 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.
The server 105 may be a server providing various distributed services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user service processing request) to the terminal device.
It should be noted that the gray scale distribution method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the gray scale distribution apparatus provided by the embodiment of the present disclosure may be generally disposed in the server 105. The gray scale distribution method provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the gray scale distribution apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
In order to solve the above-mentioned drawback that the conventional solution of gray release is exposed in the face of such a case of calling programs of different versions, the new solution of gray release provided by the present disclosure can automatically call programs of a plurality of different versions of functions by using an automatic search program.
Fig. 2 schematically shows a flow chart of a gray scale publishing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method 200 may include operations S210 to S240.
In operation S210, a job attribute parameter is obtained for the release target in response to a processing request of the target job.
According to an embodiment of the present disclosure, the publishing object may be a program product to be published, and in particular, may be a program product to be published in a distributed batch system. The release object includes a program product for implementing the service function that has not been upgraded and a program product for implementing the service function that has been upgraded. In order to achieve high availability and stability of Service functions, a plurality of mutually independent Service units (Service units) may be deployed in a distributed system, where each Service Unit may be configured to provide services for a plurality of Service items, a Service Unit refers to a functional module that receives and processes a Service request for a Service in a complex big data distributed system, and the Service Unit includes a source Service Unit and a target Service Unit, the source Service Unit is a Service Unit that is not subjected to Service upgrade, and the target Service Unit is a Service Unit that is subjected to Service upgrade.
According to an embodiment of the present disclosure, the processing request is used to indicate that a different version of the published object is invoked. The job attribute parameter is used for characterizing a release object required to be called for processing the target job and calling the version of the release object. Each service unit can provide services for various service projects, each service project refers to a whole set of service logic divided by a service department, such as logic of data import and export, data analysis, data report and the like, and service requests of the service projects are processed and completed through the service units.
The business item may be a target job that is switched from a source service unit to a target service unit during the gray scale release process. Specifically, each target job has different requirements for the service functions provided by the distributed system, or requires stability, or requires new functions. For example, if the target job needs a stable running environment, the target job may be run on the service unit of the corresponding function, which deploys the release version code, to ensure the required stability, and if the target job needs to use the latest function in time, the target job may be run on the service unit of the corresponding function, which deploys the beta version code, and the new function may be tested. When some business items running on the low-version service unit cannot provide some functions and the functions provided by the high-version service unit are needed to be used, the target jobs can be switched from the low-version service unit to the high-version service unit capable of providing the needed functions.
It should be noted that the number of service units that can be deployed in the distributed system may be determined according to a service scenario, but to meet the requirement of gray scale distribution, the number of the service units is preferably two or more.
In operation S220, M publication sub-objects are searched based on the job attribute parameter.
According to the embodiment of the disclosure, each publishing sub-object comprises a high version sub-program and a low version sub-program which are independent of each other, and M is a positive integer.
According to different service scene requirements, each service unit can be set with different function positioning. For example, for testability requirements, the latest functions are required to be used, the requirement on stability is relatively low, and upgrading is relatively frequent, and beta version codes can be deployed to provide the latest functions; for the stability requirement, the system is required to be stable and robust, the upgrading frequency is low, and the uninterrupted service of 7 × 24 hours can be provided, and at this time, the release version code can be deployed. When the system releases a new version, development, operation and maintenance personnel can select different service units to perform gray release according to different positioning of the service units and the stability of the version to be released.
In operation S230, a test point logic of the distribution object is determined.
According to the embodiment of the disclosure, the test point logic is used for indicating the release version corresponding to the target job in each release sub-object, and the release version is a high version or a low version.
In operation S240, the release version in each release sub-object is called to implement gray-scale release of the release object based on the test point logic of the release object.
By the embodiment of the disclosure, the program for realizing the high-version function and the program for realizing the low-version function are decoupled, the technical problems of the gray release method caused by the strong coupling of the increment code of the newly added function and the stock code of the original function in the traditional gray release solution in the related art can be at least partially avoided, the adverse effect caused by the fact that the code of the original function needs to be modified for realizing the newly added function can be at least reduced, and the probability of increasing the maintenance cost is reduced.
As an alternative embodiment, the job attribute parameter includes a search path and a target job identifier, the published object includes N sub-objects, N is a positive integer greater than or equal to M, and searching M published sub-objects based on the job attribute parameter may include: aiming at N sub-objects, obtaining a pre-configured annotation for each sub-object, wherein the annotation comprises a job identifier; and searching M sub-objects with the matched job identifications and target job identifications from the N sub-objects as M issuing sub-objects based on the search path.
According to the embodiment of the disclosure, by using the automatic search program, a plurality of programs with different versions of functions can be automatically called, and an annotation (denoted as annotation N) which can contain ID information needs to be configured in advance for each sub-object. Wherein the ID information is used by the search module in searching for the matching program. In specific implementation, all programs with ID information matched with the ID information in the annotation are searched by the search module for subsequent calling and execution.
According to the embodiment of the disclosure, each sub-object can serve processing requests of a plurality of jobs, and by means of pre-configuration of the annotation, the sub-object required to be called for processing the target job can be searched out as the issuing sub-object according to the matching result of the job identifier of the sub-object configured in the annotation and the job identifier of the target job, so that effectiveness and efficiency of gray level issuing can be improved.
As an alternative embodiment, the annotation contains a calling priority, and calling the release version in each release sub-object to implement gray release of the release object based on the test point logic of the release object may include: aiming at M issuing sub-objects, obtaining a preset calling priority for each issuing sub-object; and calling the release version in each release sub-object according to the preset calling priority for each release sub-object based on the test point logic of the release object to realize the gray release of the release object.
According to an embodiment of the present disclosure, the pre-configured annotation for each sub-object (denoted as annotation N) may include priority information in addition to ID information. Wherein the priority information is for use by the search module when invoking the matching program. In specific implementation, according to the priority information, the searching module may preferentially call a matching program with higher priority among the searched programs matching the ID information in the annotation, and then call a matching program with lower priority among the searched programs matching the ID information in the annotation.
By the embodiment of the disclosure, each sub-object can serve processing requests of a plurality of jobs, and by the pre-configuration of the annotation, the orderly calling of the searched sub-objects can be realized according to the calling priority of the sub-objects configured in the annotation, so that the efficiency and the accuracy of gray release are improved.
As an alternative embodiment, according to the pre-configured call priority for each publishing sub-object, calling the publishing version in each publishing sub-object may include: for each issuing sub-object in the M issuing sub-objects, a service function interface class is configured in advance, wherein the service function interface class is used for indicating that a calling interface is provided according to a method defined by the interface; and responding to the calling request of the business function interface class, and calling a method defined by the business function interface class according to the calling priority preset for each issuing sub-object to call the issuing version in each issuing sub-object.
According to the embodiment of the disclosure, a program for automatically calling a plurality of different versions of functions is implemented by using an automatic search program, except that an annotation (denoted as annotation N) needs to be configured in advance for each sub-object, a service function interface class (denoted as interface I) needs to be defined in advance for each sub-object, all service functions can provide a calling interface outwards according to a method defined by interface I to implement service logic corresponding to the service function, and parameters can be transferred between different service functions in a Map manner. In specific implementation, the method defined by the interface I may include initialization, function processing, and end processing, and there is also a sequential execution order among the methods, where the first executed method is initialization, the second executed method is function processing, and the last executed method is end processing. Taking a search module as an example, the method defined according to the interface I is used to provide a call interface to the outside to implement a search logic corresponding to the search function, and may include an initialization method of the search function, a function processing method of the search function, and an end processing method of the search function. Taking a search module as an example, the method defined according to the interface I is used to provide a call interface to the outside to implement a search logic corresponding to the search function, and may include an initialization method of the search function, a function processing method of the search function, and an end processing method of the search function.
By the embodiment of the disclosure, the service function processing class is defined, so that the calling of each issuing sub-object can be executed according to the unified method defined by the interface, thereby being beneficial to the unified implementation of gray issuing and shielding the difference inside each function module.
As an alternative embodiment, according to the pre-configured call priority for each issued sub-object, the method for calling the interface definition may include: calling an initialization method defined by an interface according to a calling priority preset for each issuing sub-object; calling an execution function processing method defined by an interface according to a calling priority preset for each issuing sub-object; and calling the end function processing method defined by the interface according to the calling priority preset for each issuing sub-object.
According to the embodiment of the disclosure, a program for automatically calling a plurality of different versions of functions is implemented by using an automatic search program, and besides the annotation N needs to be configured in advance for each sub-object and a business function interface class I needs to be defined in advance for each sub-object, a search class needs to be defined for each sub-object, and the main function of the search class is to hide the identification and creation of a lower layer module by an upper layer module and call one by one according to the call priority.
And searching a program which contains the annotation N and can be matched with the ID information in the annotation N under the search path, and calling the searched program which can be matched with the ID information in the annotation N one by one according to the priority information in the annotation N from high to low. In a specific implementation, the method of initializing the searched programs that can match the ID information in the annotation may be executed first in an order from high priority to low priority, then the method of processing the searched programs that can match the ID information in the annotation may be executed in an order from high priority to low priority, and finally the method of ending the searched programs that can match the ID information in the annotation may be executed in an order from high priority to low priority. The search path and the ID information may be specified. For example, the search path and the ID information may be specified manually by an operation and maintenance person, which is not limited by the present disclosure.
By the embodiment of the disclosure, the implementation of the trial logic can be realized without influencing the service logic by sequentially performing the initialization method, the function execution processing method and the end execution processing method of the plurality of searched publishing sub-objects which can be matched with the target job identifier.
As an alternative embodiment, the gray scale method may further include: acquiring a first function code of a release object for realizing the non-upgraded service and a second function code for realizing the upgraded service; generating a low-version program based on the first function code; and generating a high version program based on the first function code and the second function code, wherein the low version program and the high version program are independent of each other.
In a specific implementation, the code for implementing the low-version function may be placed in one entity program, and the code for implementing the high-version function based on the low-version function may be placed in another entity program, so that the program for implementing the high-version function and the program for implementing the low-version function are decoupled on a code level. After the test point is completed, the unnecessary versions can be directly removed according to the requirements, and the test point logic can be completely switched without modifying the service logic after being slightly modified.
By the embodiment of the disclosure, the newly added service function can be tested without affecting the service logic, and the processing program related to a certain version can be directly deleted without modifying the main control program and without any influence on the service logic of other versions.
FIG. 3 schematically illustrates a search module versus processing module diagram according to an embodiment of the disclosure. As shown in fig. 3, the processing module object is searched and automatically created by annotation, wherein the initialization method is used to call the initialization method of the processing module according to priority, the function processing method is used to call the function processing method of the processing module according to priority, and the end processing method is used to call the end processing method of the processing module according to priority. The method defined by the search module 310 includes initialization (): coolan (ID1) as shown in the figure), function processing (): coolan (ID1) as shown in the figure) and end processing (): coolan (ID1) as shown in the figure), the defined annotations include setting a search path (in path: string (ID1) as shown in the figure) and setting a search ID (in search ID: string (ID1) as shown in the figure), the method defined by the processing module 320 includes initialization (): coolan (ID1) as shown in the figure), function processing (): coolan (ID1) as shown in the figure) and end processing (): coolan (ID1) as shown in the figure), both the search module 310 and the processing module 320 may call initialization (): coolan (coolan ID1) as shown in the figure) A function process (): coolean (id1) as shown in the figure) and a call interface 330 that ends the process (end process (): coolean (id1) as shown in the figure).
Based on the above automatic search program, for the low version function F1, the code for implementing the low version function F1 is placed in an entity program, named F1, and placed in a packet with a path P, and an annotation N is added thereto, where the annotation N includes an ID information ID set for F1 and priority information P1 configured for F1, so as to implement the service function interface class I, and the low version function F1 provides a call interface according to three methods, namely initialization, function processing, and end processing defined by the service function interface class I, so as to directly call the initialization method of F1, the function processing method of F1, and the end processing method of F1. If the search path set for the search module is P and the ID information included in the searched annotation N is ID, the service function interface class I is implemented, and the search module provides a call interface according to the three methods of initialization, function processing, and end processing defined by the service function interface class I, so as to directly call the initialization method of the search module, the function processing method of the search module, and the end processing method of the search module, and indirectly call the initialization method of F1, the function processing method of F1, and the end processing method of F1. Since the search module only needs to perform 1 search, and does not need to perform the search every time, the mechanism of gray scale distribution has little influence on the system performance. For the high version function F2, in which a new function is added on the basis of the low version function F1, the code for realizing the low version function F1 may be copied, on the basis of which the code for realizing the new function F2 is added, the code for realizing the low version function F1 and the code for realizing the new function F2 are put in another entity program, named F2, the path of the packet is kept unchanged, i.e. it is put in a packet with path P, to which annotation N is added, which contains the ID information ID set for F2, and priority information p2 configured for F2, implementing service function interface class I, high version function F2 provides a call interface according to three methods of initialization, function processing, and end processing defined by the service function interface class I, to call directly the initialization method to F2, the function processing method of F2, and the end processing method of F2. On the one hand, the high-version function F2 of a new function can be added on the basis of F1 without changing the low-version function F1, and the gray scale of a certain function can be realized by adding test point logic unrelated to business logic in each different version. On the other hand, without modifying the search module, the programs F1 and F2 that include the annotation N and can be matched with the ID information ID included in the annotation N can be searched under the search path P, and based on the priority information P1 configured for F1 and the priority information P2 configured for F2 in the annotation N, the programs F1 and F2 are called one by one from high to low in the order of priority represented by P1 and P2. For example, if the priority represented by p1 and p2 is p1 higher than p2, the initialization method to F1, the function processing method to F1, and the end processing method to F1 are invoked with priority, and then the initialization method to F2, the function processing method to F2, and the end processing method to F2 are invoked. If the priority represented by p1 and p2 is p1 lower than p2, the initialization method to F2, the function processing method to F2, and the end processing method to F2 are invoked with priority, and then the initialization method to F1, the function processing method to F1, and the end processing method to F1 are invoked.
The following describes a specific process flow of the gray scale distribution method provided by the present disclosure in conjunction with a general form of batch processing.
Fig. 4 schematically shows a flowchart of a gray scale publishing method according to another embodiment of the present disclosure. As shown in fig. 4, the functional modules for completing the entire gradation issuance processing flow include a job module 410, an input module 420, and an output processing module 430 in this order from top to bottom. The modules at each level in the processing flow need to complete their own function processing, and also need to pack the object at the current level as the calling parameter of the module at the lower level, so as to call the module at the next level through the search module. Wherein a module at a level above the process flow may invoke a module at a level below the current level. In specific implementation, the operation module may call an input module located at a next level of the hierarchy corresponding to the operation module, the input module may call a function group module located at a next level of the hierarchy corresponding to the input module, or the input module may call an output processing module located at a next level of the hierarchy corresponding to the input module, and the function group module may call an output processing module located at a next level of the hierarchy corresponding to the function group module.
The job module 410 is configured to package the job attributes into job attribute parameters, select an input module (which may be multiple input modules that are not associated with each other) to be called through the search module according to the job name in the job attribute parameters, and transmit the packaged job attribute parameters to the input module to be called. The plurality of unassociated input modules 420 may include an input module version V1(4201), an input module version V2(4202), and an input module version V3(4203) as shown in the figure, wherein the input module version V1(4201) may correspond to the base version V1, the input module version V2(4202) may correspond to the enhanced version V2, and the input module version V3(4203) may correspond to the enhanced version V3. In specific implementation, the job module 410 includes a search module, which initializes call parameters and transmits useful facilities, and after setting a search path and a search ID according to a job name, the search module executes initialization, function processing, and termination processing. This may mask the selection of input modules.
The input module 420 is configured to determine whether to execute input processing of a file or a table record according to a trial strategy, if so, read the input file or the table record, disassemble the input file or the table record into a key value pair form, use the key value pair form as an input data parameter, select an output processing module (which may be multiple output processing modules that are not associated with each other) to be invoked according to a specified search ID through the search module, and transmit the job attribute parameter and the input data parameter to the functional group module to be invoked. The plurality of unrelated output processing modules may include an output processing module version V1(4301), an output processing module version V2(4302), and an output processing module version V3 (4303). In specific implementation, annotation N can be used for annotation, and an interface I is realized and provided for the operation layer module to call. The output processing module may include a search module that initializes call parameters, transmits useful facilities, and executes initialization, function processing, and termination processing after setting a search path and a search ID according to a job name. The layer selects the required entries and unpacks each record into Map mapping of key value pairs when reading it, so as to be transmitted to the back module as read-only parameters for processing.
The output processing module 430 is configured to determine whether to execute output processing according to the input data parameters and the trial logic transmitted by the input module 420, and if so, process related data according to related service logic, complete a related service function, and output a processing result. The output processing module version V1(4301) as shown in the figure may determine the relevant data to be processed based on the input data parameters of the incoming output processing module version V1(4301) according to the relevant business logic processing, and to accomplish the relevant business functions, the output processing module version V2(4302) may determine the relevant data to be processed based on the input data parameters of the input output processing module version V2(4301) according to the relevant business logic processing, and to perform the relevant service functions, the output processing module version V3(4303) may determine the relevant data to be processed based on the input data parameters of the input output processing module version V3(4303) according to the relevant service logic processing, and completing the related service function, and finally outputting the processing results of the output processing module version V1(4301), the output processing module version V2(4302) and the output processing module version V3 (4303). In specific implementation, the annotation N can be used for annotating, so as to realize the interface I, and provide the interface I for the upper module (the functional group module or the input module) to call. The output processing module implements the processing of the input data and writes the results to the output. Before processing, whether processing is performed or not needs to be judged according to the test point logic irrelevant to the service logic.
Fig. 5 schematically shows a flowchart of a gray scale publishing method according to another embodiment of the present disclosure. As shown in fig. 5, the module for implementing the gradation issuance method may include a function group module 510 in addition to the job module 410, the input module 420, and the output processing module 430 shown in fig. 4, and the function group module 510 functions to classify output functions.
The functional group module 510 is configured to select, by the search module, an output processing module (which may be multiple output processing modules that are not associated with each other) that needs to be called according to the specified search ID, and send the job attribute parameter and the input data parameter to the multiple output processing modules that need to be called and are not associated with each other. The plurality of unrelated output processing modules may include an output processing module version V1(4301), an output processing module version V2(4302), and an output processing module version V3 (4303). Wherein the functional group module 1(5101) can automatically discover and call the output processing module version V1(4301) and the output processing module version V2(4302) by the search module according to the designated search ID, and the functional group module 2(5102) can automatically discover and call the output processing module version V3(4303) by the search module according to the designated search ID.
In specific implementation, the functional group module 510 annotates with the annotation N to implement the interface I, and provides the interface I to the input module 420 for calling. The function group module 510 may include a search module that initializes call parameters, passes through useful facilities, and executes initialization, function processing, and termination processing after setting a search path and a search ID according to a job identifier such as a job name. The function group module 510 functions to classify output functions.
In view of modularization of the input function and the output function, the batch job is hereinafter combined in the following structure. FIG. 6 schematically shows a process flow diagram of a job module according to an embodiment of the present disclosure. The processing flow of the job module includes operations S610 to S660 as shown in fig. 6.
In operation S610, the present-layer object to be used is packaged as a lower-layer call parameter. In operation S620, the lower layer processing modules are searched by the search module, the related objects are automatically created, and the sorting is performed according to the priority. In operation S630, an initialization method of the lower layer processing module is called by the search module. In operation S640, the function processing method is performed by the search module calling the function processing interface of the lower layer processing module. In operation S650, the end processing method is executed by the search module calling an end processing interface of the lower layer processing module.
According to the embodiment of the disclosure, the attributes of the job are packaged into the job attribute parameters through the job module, the input module (which can be a plurality of input modules which are not related to each other) which needs to be called is selected through the search module according to the job name in the job attribute parameters, and the packaged job attribute parameters are transmitted into the input module which needs to be called.
In view of modularization of the input function and the output function, the batch job is hereinafter combined in the following structure. FIG. 7 schematically shows a process flow diagram of an input module according to an embodiment of the disclosure. The processing flow of the input module includes operations S710 to S780 shown in fig. 7.
In operation S710, whether the test point logic is met is detected. If not, returning to the processing. If yes, operation S720 is performed to pack the current-layer object to be used as the lower-layer call parameter. In operation S730, the lower layer processing modules are searched by the search module, the related objects are automatically created, and the sorting is performed according to the priority. In operation S740, an initialization method of the lower layer processing module is called by the search module. In operation S750, the record is read, and the record field is formatted. In operation S760, whether the input is ended is detected. If yes, operation S780 is performed, and the search module calls an end processing interface of the lower processing module to execute an end processing method. If not, operation S770 is executed first, the search module calls the function processing interface of the lower layer processing module to execute the function processing method, and then operation S780 is executed.
According to the embodiment of the disclosure, whether the input of the file or the table record is executed or not is judged through the input module according to the trial point logic, if so, the input file or the table record is read, the input file or the table record is disassembled into a key value pair form and is used as an input data parameter, the function group module (which can be a plurality of function group modules which are not associated with each other) which needs to be called is selected through the search module according to the specified search ID, and the operation attribute parameter and the input data parameter are transmitted to the function group module which needs to be called.
In view of modularization of the input function and the output function, the batch job is hereinafter combined in the following structure. FIG. 8 schematically shows a process flow diagram of an output processing module according to an embodiment of the disclosure. The processing flow of the output processing module includes operations S810 to S820 as shown in fig. 8.
In operation S810, it is determined whether the logic is a pilot logic. If yes, operation S820 is performed to execute the business logic. If not, returning to the processing.
According to the embodiment of the disclosure, whether output processing is executed or not is judged through the output processing module according to the input data parameters and the trial point logic, if so, relevant data is processed according to relevant business logic, relevant business functions are completed, and a processing result is output.
As an alternative embodiment, in order to solve the defects of the conventional solution for gray-scale distribution, the input and output of the job are modularized, so that the modification of one module does not affect another module.
According to the embodiment of the present disclosure, from the perspective of input and output, there are several read-write situations, such as reading a table, writing a file, and reading a file. In specific implementation, for the input module, if the low version F1 uses an a table (or file), the new function or the high version F2 uses a B table (or file), and the B table (or file) is obtained on the basis of modifying the a table (or file), the input module of the low version F1 may be copied to the input module of the high version F2, the input module of the low version F1 is not changed, the table name (and the screening logic) or the file name is modified by the high version, and meanwhile, the related trial point logic is added, so that the support for the batch version gray release can be completed. For the output module, if the low version F1 uses an a table (or file), the new function or the high version F2 uses a B table (or file), and the B table (or file) is obtained on the basis of modifying the a table (or file), the output module of the low version F1 may be copied to the output module of the high version F2, the output module of the low version F1 is not changed, the table name (and screening logic) or the file name is modified by the high version, and meanwhile, the relevant trial logic is added, so that the support for the batch version gray release can be completed.
Fig. 9 schematically shows a block diagram of a gradation issuance apparatus according to an embodiment of the present disclosure.
As shown in fig. 9, the gray scale issuing apparatus 900 may include an obtaining module 910, a searching module 920, a determining module 930, and a calling module 940.
An obtaining module 910, configured to obtain, for a release object, a job attribute parameter in response to a processing request of a target job, where the processing request is used to indicate that a release object of a different version is called. Optionally, the obtaining module 910 may be configured to perform operation S210 described in fig. 2, for example, and is not described herein again.
And a searching module 920, configured to search M publishing sub-objects based on the job attribute parameter, where each publishing sub-object includes a high version sub-program and a low version sub-program that are independent of each other, and M is a positive integer. Optionally, the searching module 920 may be configured to perform operation S220 described in fig. 2, for example, and is not described herein again.
A determining module 930, configured to determine a trial logic of the release object, where the trial logic is configured to indicate a release version corresponding to the target job in each release sub-object, and the release version is a high version or a low version. Optionally, the determining module 930 may be configured to perform operation S230 described in fig. 2, for example, and is not described herein again.
And the calling module 940 is configured to call the release version in each release sub-object to implement gray release of the release object based on the test point logic of the release object. Optionally, the calling module 940 may be configured to perform operation S240 described in fig. 2, for example, and is not described herein again.
As an alternative embodiment, the job attribute parameter includes a search path and a target job identifier, the published object includes N sub-objects, N is a positive integer greater than or equal to M, and the search module may include: the first obtaining sub-module is used for obtaining an annotation which is configured in advance for each sub-object aiming at the N sub-objects, wherein the annotation comprises a job identifier; and the searching sub-module is used for searching M sub-objects with the job identifications matched with the target job identifications from the N sub-objects as M issuing sub-objects based on the searching path.
As an alternative embodiment, the annotation contains a call priority, and the call module may include: the second obtaining submodule is used for obtaining a preset calling priority for each issuing sub-object aiming at the M issuing sub-objects; and the calling sub-module is used for calling the release version in each release sub-object to realize the gray release of the release object according to the preset calling priority for each release sub-object based on the test point logic of the release object.
As an alternative embodiment, the invoking submodule may include: the configuration unit is used for configuring a service function interface class in advance aiming at each issuing sub-object in the M issuing sub-objects, wherein the service function interface class is used for indicating that a calling interface is provided according to a method defined by the interface; and the calling unit is used for responding to the calling request of the service function interface class and calling the method defined by the service function interface class according to the calling priority preset for each issuing sub-object to call the issuing version in each issuing sub-object.
As an alternative embodiment, the calling unit may include: the first calling subunit is used for calling the initialization device defined by the interface according to the calling priority preset for each issuing sub-object; the second calling subunit is used for calling the execution function processing device defined by the interface according to the calling priority preset for each issuing sub-object; and a third calling subunit, configured to call the end function processing device defined by the interface according to the calling priority preconfigured for each issuing sub-object.
As an alternative embodiment, the apparatus may further comprise: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first function code of a release object for realizing the non-upgraded service and a second function code for realizing the upgraded service; the first generation module is used for generating a low-version program based on the first function code; and a second generation module for generating a high version program based on the first function code and the second function code, wherein the low version program and the high version program are independent of each other.
It should be noted that the implementation, solved technical problems, implemented functions, and achieved technical effects of each module in the embodiment of the gray scale publishing device are respectively the same as or similar to the implementation, solved technical problems, implemented functions, and achieved technical effects of each corresponding step in the embodiment of the gray scale publishing method, and are not described herein again.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a field programmable gate array (FNGA), a programmable logic array (NLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, the obtaining module, the searching module, the determining module, the calling module, the first obtaining sub-module, the searching sub-module, the second obtaining sub-module, the calling sub-module, the configuration unit, the calling unit, the first calling sub-unit, the second calling sub-unit, the third calling sub-unit, the obtaining module, the first generating module, and the second generating module may be combined and implemented in one module, or any one of the modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module, the searching module, the determining module, the calling module, the first obtaining sub-module, the searching sub-module, the second obtaining sub-module, the calling sub-module, the configuring unit, the calling unit, the first calling sub-unit, the second calling sub-unit, the third calling sub-unit, the obtaining module, the first generating module, and the second generating module may be at least partially implemented as a hardware circuit, such as field programmable gate arrays (FNGAs), programmable logic arrays (NLAs), systems on a chip, systems on a substrate, systems on a package, Application Specific Integrated Circuits (ASICs), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging circuits, or in any one of three implementations, software, hardware and firmware, or in any suitable combination of any of them. Alternatively, at least one of the obtaining module, the searching module, the determining module, the calling module, the first obtaining sub-module, the searching sub-module, the second obtaining sub-module, the calling sub-module, the configuring unit, the calling unit, the first calling sub-unit, the second calling sub-unit, the third calling sub-unit, the obtaining module, the first generating module, and the second generating module may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.
Fig. 10 schematically illustrates a schematic diagram of a computer-readable storage medium product suitable for implementing the above-described gray scale publishing method in accordance with an embodiment of the present disclosure.
In some possible embodiments, aspects of the present invention may also be implemented in a form of a program product including program code for causing a device to perform the aforementioned operations (or steps) in the gray scale distribution method according to various exemplary embodiments of the present invention described in the above-mentioned "exemplary method" section of this specification when the program product is run on the device, for example, the electronic device may perform operations S210 to S240 as shown in fig. 2, operations S610 to S650 as shown in fig. 6, operations S710 to S780 as shown in fig. 7, and operations S810 to S820 as shown in fig. 8.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (ENROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As shown in fig. 10, a gray-scale distributed program product 1000 according to an embodiment of the present invention is depicted, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a device, such as a personal computer. However, the program product of the present invention is not limited in this respect, and in this document, a 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, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, or device. Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAA) or a wide area network (WAA), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Fig. 11 schematically illustrates a block diagram of an electronic device suitable for implementing the above-described grayscale publication method and apparatus according to an embodiment of the present disclosure. The electronic device shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 11, an electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. The processor 1101 may comprise, for example, a general purpose microprocessor (e.g., CNU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., Application Specific Integrated Circuit (ASIC)), or the like. The processor 1101 may also include on-board memory for caching purposes. The processor 1101 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to the embodiments of the present disclosure.
In the RAM 1103, various programs and data necessary for the operation of the electronic device 1100 are stored. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other by a bus 1104. The processor 1101 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 1102 and/or the RAM 1103. It is noted that the programs may also be stored in one or more memories other than the ROM 1102 and RAM 1103. The processor 1101 may also perform operations S210 to S240 shown in fig. 2, operations S610 to S650 shown in fig. 6, operations S710 to S780 shown in fig. 7, and operations S810 to S820 shown in fig. 8 by executing the programs stored in the one or more memories.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 1109 and/or installed from the removable medium 1111. The computer program, when executed by the processor 1101, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The above-mentioned computer-readable storage medium carries one or more programs which, when executed, implement the gradation issuance method according to the embodiment of the present disclosure, including operations S210 to S240 shown in fig. 2, operations S610 to S650 shown in fig. 6, operations S710 to S780 shown in fig. 7, and operations S810 to S820 shown in fig. 8.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (ENROM or flash memory), 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 disclosure, 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. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 1102 and/or the RAM 1103 and/or one or more memories other than the ROM 1102 and the RAM 1103 described above.
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 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.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
Claims (10)
1. A gray scale publishing method, comprising:
responding to a processing request of a target job to obtain a job attribute parameter aiming at a release object, wherein the processing request is used for indicating to call release objects of different versions;
searching M release sub-objects based on the job attribute parameters, wherein each release sub-object comprises a high-version sub-program and a low-version sub-program which are independent of each other, and M is a positive integer;
determining a test point logic of the release object, wherein the test point logic is used for indicating a release version corresponding to the target operation in each release sub-object, and the release version is a high version or a low version;
and calling the release version in each release sub-object to realize the gray release of the release object based on the test point logic of the release object.
2. The method of claim 1, wherein the job attribute parameters include a search path and a target job identification, the published object includes N sub-objects, N being a positive integer greater than or equal to M, and searching the M published sub-objects based on the job attribute parameters includes:
obtaining a pre-configured annotation for each sub-object for the N sub-objects, wherein the annotation comprises a job identifier;
and searching M sub-objects with the job identifications matched with the target job identifications from the N sub-objects as M issuing sub-objects based on the search path.
3. The method of claim 2, wherein the annotation contains a call priority, and the calling the release version in each release sub-object to implement gray-scale release of the release object based on the test point logic of the release object comprises:
aiming at the M issuing sub-objects, obtaining a preset calling priority for each issuing sub-object;
based on the test point logic of the release object, the release version in each release sub-object is called according to the preset calling priority for each release sub-object to realize the gray release of the release object.
4. The method of claim 3, wherein said invoking the publication version in each publishing sub-object according to the pre-configured invocation priority for each publishing sub-object comprises:
for each issuing sub-object in the M issuing sub-objects, a service function interface class is configured in advance, wherein the service function interface class is used for indicating that a calling interface is provided according to a method defined by an interface;
and responding to the calling request of the service function interface class, and calling the method defined by the interface to call the release version in each release sub-object according to the calling priority preset for each release sub-object.
5. The method of claim 4, wherein said invoking said interface-defined method according to said preconfigured invocation priority for each published sub-object comprises:
calling the interface defined initialization method according to the preset calling priority for each issuing sub-object;
calling the execution function processing method defined by the interface according to the calling priority preset for each issuing sub-object;
and calling the end function processing method defined by the interface according to the calling priority preset for each issuing sub-object.
6. The method of claim 1, wherein the method further comprises:
acquiring a first function code of the release object for realizing the non-upgraded service and a second function code for realizing the upgraded service;
generating a low-version program based on the first function code;
generating a high version program based on the first function code and the second function code, wherein the low version program and the high version program are independent of each other.
7. A gradation issuance apparatus comprising:
the system comprises an obtaining module, a processing module and a processing module, wherein the obtaining module is used for responding to a processing request of a target job and obtaining job attribute parameters aiming at a release object, and the processing request is used for indicating that release objects with different versions are called;
the searching module is used for searching M issuing sub-objects based on the job attribute parameters, wherein each issuing sub-object comprises a high-version sub-program and a low-version sub-program which are independent of each other, and M is a positive integer;
a determining module, configured to determine a test point logic of the release object, where the test point logic is configured to indicate a release version corresponding to the target job in each release sub-object, and the release version is a high version or a low version;
and the calling module is used for calling the release version in each release sub-object to realize the gray release of the release object based on the test point logic of the release object.
8. An electronic device, comprising:
one or more processors; and
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-6.
9. A computer-readable storage medium storing computer-executable instructions that, when executed, cause a processor to perform the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, performs the method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110353059.9A CN112835606B (en) | 2021-03-31 | 2021-03-31 | Gray release method and device, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110353059.9A CN112835606B (en) | 2021-03-31 | 2021-03-31 | Gray release method and device, electronic equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112835606A true CN112835606A (en) | 2021-05-25 |
CN112835606B CN112835606B (en) | 2024-01-30 |
Family
ID=75930730
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110353059.9A Active CN112835606B (en) | 2021-03-31 | 2021-03-31 | Gray release method and device, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112835606B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113950118A (en) * | 2021-10-14 | 2022-01-18 | 四川九州电子科技股份有限公司 | Mesh-based software upgrading method |
CN118151969A (en) * | 2024-03-18 | 2024-06-07 | 上海数禾信息科技有限公司 | Version updating method, version updating device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110286941A (en) * | 2019-06-28 | 2019-09-27 | 江苏满运软件科技有限公司 | Gray scale dissemination method, device, storage medium and electronic equipment |
CN111290779A (en) * | 2020-03-04 | 2020-06-16 | 北京三快在线科技有限公司 | Gray scale distribution method, device, storage medium and electronic equipment |
WO2020181684A1 (en) * | 2019-03-12 | 2020-09-17 | 平安科技(深圳)有限公司 | Grayscale release management method, system and device, and storage medium |
US20200327035A1 (en) * | 2016-08-26 | 2020-10-15 | Hitachi, Ltd. | Application management system, method, and computer program |
-
2021
- 2021-03-31 CN CN202110353059.9A patent/CN112835606B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200327035A1 (en) * | 2016-08-26 | 2020-10-15 | Hitachi, Ltd. | Application management system, method, and computer program |
WO2020181684A1 (en) * | 2019-03-12 | 2020-09-17 | 平安科技(深圳)有限公司 | Grayscale release management method, system and device, and storage medium |
CN110286941A (en) * | 2019-06-28 | 2019-09-27 | 江苏满运软件科技有限公司 | Gray scale dissemination method, device, storage medium and electronic equipment |
CN111290779A (en) * | 2020-03-04 | 2020-06-16 | 北京三快在线科技有限公司 | Gray scale distribution method, device, storage medium and electronic equipment |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113950118A (en) * | 2021-10-14 | 2022-01-18 | 四川九州电子科技股份有限公司 | Mesh-based software upgrading method |
CN113950118B (en) * | 2021-10-14 | 2023-04-28 | 四川九州电子科技股份有限公司 | Mesh-based software upgrading method |
CN118151969A (en) * | 2024-03-18 | 2024-06-07 | 上海数禾信息科技有限公司 | Version updating method, version updating device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112835606B (en) | 2024-01-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109062563B (en) | Method and device for generating page | |
CN108920222B (en) | Business processing method and device based on rule engine | |
US20190332357A1 (en) | System and method for automated generation of integration elements modeling process flow for an integration process with a swagger api | |
US12061595B2 (en) | Facilitating performance of database operations using microservices | |
CN110765187A (en) | Data source route management method and device | |
CN112835606B (en) | Gray release method and device, electronic equipment and medium | |
US10915378B1 (en) | Open discovery service | |
CN110865889A (en) | Method and apparatus for transferring events between components | |
US7716399B2 (en) | Method and system for data management interface with intelligent plugins that determine whether to perform the requested data operation received from an application | |
CN115082247B (en) | System production method, device, equipment, medium and product based on label library | |
US20080209400A1 (en) | Approach for versioning of services and service contracts | |
CN110764769A (en) | Method and device for processing user request | |
CN111258988A (en) | Asset management method, device, electronic device, and medium | |
CN110109983B (en) | Method and device for operating Redis database | |
US20110055373A1 (en) | Service identification for resources in a computing environment | |
CN113625998B (en) | Request processing method and device | |
CN110223179A (en) | The data processing method of fund, device, system, medium | |
CN112000343B (en) | Method and system for deploying multi-version services in Kubernetes by using Devops | |
US20220035606A1 (en) | System and method for tailoring a customizer for integration process modeling visual element to a domain specific language for business integrations | |
US10838781B1 (en) | Eventually consistent metadata exchange between software applications and services | |
CN113535220B (en) | Code packet management method and device | |
CN117573111A (en) | Micro-service deployment method, device, equipment and storage medium | |
CN111382953A (en) | Dynamic process generation method and device | |
CN115291928A (en) | Task automatic integration method and device of multiple technology stacks and electronic equipment | |
US20210173620A1 (en) | System and method for providing integrated development environment |
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 |