Microservice processing method and device, storage medium and electronic device

By splitting and converting the project content of the single-structure project into sharing and initial business aggregation units, the project structure chaos and architecture stability problems when the single-structure transforms the microservice architecture are solved, and microservice processing with clear structure and high stability is achieved method.

CN113672200BActive Publication Date: 2025-02-21BOE TECHNOLOGY GROUP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010415062.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-15
Publication Date
2025-02-21
Estimated Expiration
2040-08-17

AI Technical Summary

Technical Problem

When converting a single architecture to a microservice architecture, the project structure is chaotic and the architecture is not stable, making it difficult to adapt to demand iteration.

Method used

By obtaining the content of the monolithic architecture project, determining whether the conditions are met, split into a shared functional unit and an initial functional unit, and converting it into an initial business aggregation unit and a shared business aggregation unit, ensuring that the initial business aggregation unit can access the shared business aggregation unit.

Benefits of technology

It realizes the clarity of the project structure and the stability of the architecture, making it convenient for centralized management and adapt to agile development iterations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113672200B_ABST
    Figure CN113672200B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of microservice architecture technology, and specifically to a microservice processing method and device, a computer-readable storage medium, and an electronic device, wherein the method comprises: obtaining the contents of multiple monolithic architecture projects; judging whether the project contents meet a first condition; splitting the project contents meeting the first condition into shared functional units and initial functional units according to a preset rule; converting multiple initial functional units into initial business aggregation units respectively; integrating multiple shared functional units into shared business aggregation units, wherein the initial business aggregation units can access the shared business aggregation units. The technical solution of the embodiment of the present disclosure ensures that the functions of multiple monolithic architectures can be completed, while having a clear structure and high architectural stability, and can facilitate centralized management of multiple projects and adapt to agile development iterations.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the rapid development of the Internet industry, monolithic architecture has gradually evolved into microservice architecture. Monolithic architecture cannot support large-scale user access, has relatively poor scalability, and its various shortcomings are not suitable for the iteration rhythm of current projects. The stability and high concurrency of the system are seriously challenged. How to use effective technology to serve users and continuously provide value to users has gradually become one of the issues of concern to the Internet.

[0003] However, when converting a monolithic architecture to a microservice architecture, the method to be adopted should be analyzed based on factors such as the current project's technical characteristics and technical architecture, labor costs, and how to split the business. It should also respond to real-time changes in demand iterations. Most conversions in related technologies have technical problems such as chaotic project structure and low architectural stability.

[0004] Therefore, it is necessary to design a new microservice processing method.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention

[0006] The purpose of the present disclosure is to provide a microservice processing method and device, a computer-readable storage medium and an electronic device, thereby overcoming, at least to a certain extent, the technical problems in the related art of converting a monolithic architecture into a microservice architecture, such as chaotic project structure and low architectural stability.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0008] According to a first aspect of the present disclosure, a microservice processing method is provided, comprising:

[0009] Get the content of multiple monolithic architecture projects;

[0010] Determining whether the project content meets the first condition;

[0011] Splitting the project content that meets the first condition into shared functional units and initial functional units according to preset rules;

[0012] Converting the plurality of initial functional units into initial service aggregation units respectively;

[0013] The plurality of shared functional units are integrated into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit.

[0014] In an exemplary embodiment of the present disclosure, determining whether the project content meets the first condition includes:

[0015] Determining whether there are project units of the same project type among the plurality of project contents;

[0016] The existence of a plurality of the item contents having the same type of item unit is determined to satisfy the first condition.

[0017] In an exemplary embodiment of the present disclosure, the project content that meets the first condition is split into shared functional units and initial functional units according to a preset rule, including:

[0018] Obtain a reference project type statistical table, and filter the target project type statistical table based on the first condition;

[0019] Determine the reference project type of each project unit in each project content;

[0020] Each of the project contents is split into a shared functional unit and an initial functional unit according to the reference project type and the target project type statistical table.

[0021] In an exemplary embodiment of the present disclosure, a plurality of the shared functional units are integrated into a shared service aggregation unit, including:

[0022] Get the target project type of each shared functional unit;

[0023] The multiple shared functional units of the same target project type are integrated into a shared business aggregation unit.

[0024] In an exemplary embodiment of the present disclosure, the method further includes:

[0025] Obtaining target data sources of each shared functional unit in the shared service aggregation unit;

[0026] A parameter list is formed according to the target data source, wherein the parameter list includes a plurality of parameter items, and each parameter item corresponds to one of the target data sources.

[0027] In an exemplary embodiment of the present disclosure, determining whether the project content meets the first condition includes:

[0028] Determine whether there are project units with the same data source among the plurality of project contents;

[0029] The existence of a plurality of the item contents in an item unit having the same data source is determined to satisfy the first condition.

[0030] In an exemplary embodiment of the present disclosure, each of the project contents that meets the first condition is split into shared functional units and initial functional units according to a preset rule, including:

[0031] Obtain a reference data source list, and filter the target data source list according to the first condition;

[0032] Determine the reference data source for each project unit in each project content;

[0033] Each of the project contents is split into shared functional units and initial functional units according to the target data source list and the reference data source.

[0034] In an exemplary embodiment of the present disclosure, a plurality of the shared functional units are integrated into a shared service aggregation unit, including:

[0035] Obtaining a target data source of each of the shared functional units;

[0036] The multiple shared functional units with the same target data source are integrated into a shared service aggregation unit.

[0037] In an exemplary embodiment of the present disclosure, the method further includes:

[0038] The project content that does not meet the first condition is defined as a non-conversion project;

[0039] The authorization code of the non-conversion project is configured so that the non-conversion project can call the shared service aggregation unit and the initial service aggregation micro-unit through authorization verification.

[0040] According to one aspect of the present disclosure, a microservice processing device is provided, comprising:

[0041] The acquisition module is used to obtain the contents of multiple single-architecture projects;

[0042] A judgment module, configured to judge whether the project content satisfies a first condition;

[0043] a splitting module, configured to split the project content meeting the first condition into shared functional units and initial functional units according to preset rules;

[0044] A conversion module, configured to convert the plurality of initial functional units into initial service aggregation units respectively;

[0045] An integration module is used to convert the plurality of shared functional units into a shared business aggregation unit, wherein the initial business aggregation microservice unit can access the shared business aggregation unit.

[0046] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the microservice processing method as described in any one of the above is implemented.

[0047] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0048] processor; and

[0049] The memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the microservice processing method as described in any one of the above.

[0050] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:

[0051] In a microservice processing method provided by an embodiment of the present disclosure, the method comprises the following steps: obtaining the contents of multiple monolithic architecture projects; determining whether the project contents meet a first condition; splitting the project contents meeting the first condition into shared functional units and initial functional units according to preset rules; converting the multiple initial functional units into initial business aggregation units respectively; and integrating the multiple shared functional units into a shared business aggregation unit, wherein the initial business aggregation unit can access the shared business aggregation unit. Compared with the prior art, the multiple project contents meeting the first condition are split into shared functional units and initial functional units according to preset rules to distinguish them, and business aggregation units are established for each of them, and the initial business aggregation unit can access the shared business aggregation unit. While ensuring that the functions of multiple monolithic architectures can be completed, the structure is clear and the architecture is highly stable, and it is possible to achieve the effect of facilitating centralized management of multiple projects and adapting to agile development iterations.

[0052] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0054] Figure 1 A flowchart schematically illustrates a microservice processing method in an exemplary embodiment of the present disclosure;

[0055] Figure 2 Schematically illustrates an architecture diagram of a microservice processing method in an exemplary embodiment of the present disclosure;

[0056] Figure 3 Schematically illustrates a flow chart for establishing a business database in an exemplary embodiment of the present disclosure;

[0057] Figure 4 Schematically illustrates a data access roadmap of a microservice architecture in an exemplary embodiment of the present disclosure;

[0058] Figure 5 Schematically illustrates a data access roadmap after a service middle layer is introduced into a microservice architecture in an exemplary embodiment of the present disclosure;

[0059] Figure 6 A schematic diagram schematically illustrates the composition of a microservice processing device in an exemplary embodiment of the present disclosure;

[0060] Figure 7 Schematically shows a structural diagram of a computer system suitable for implementing an electronic device according to an exemplary embodiment of the present disclosure;

[0061] Figure 8 A schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0062] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0063] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0064] In this exemplary embodiment, a microservice processing method is first provided, referring to Figure 1 As shown in , the above microservice processing method may include the following steps:

[0065] S110, obtaining content of multiple single-architecture projects;

[0066] S120, determining whether the project content meets the first condition;

[0067] S130: Split the project content that meets the first condition into shared functional units and initial functional units according to a preset rule.

[0068] S140: Convert the multiple initial functional units into initial service aggregation units respectively.

[0069] S150: Integrate the plurality of shared functional units into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit.

[0070] According to the microservice processing method provided in this exemplary embodiment,

[0071] Compared with the existing technology, the contents of multiple projects that meet the first condition are split into shared functional units and initial functional units according to preset rules for distinction, and each establishes a business aggregation unit, and the initial business aggregation unit can access the shared business aggregation unit. While ensuring that the functions of multiple monomer architectures can be completed, the structure is clear and the architecture is highly stable, and it can achieve the effect of facilitating centralized management of multiple projects and adapting to agile development iterations.

[0072] Below, each step of the microservice processing method in this exemplary embodiment will be described in more detail with reference to the accompanying drawings and embodiments.

[0073] In step S110 , multiple monolithic architecture project contents are obtained.

[0074] In an exemplary embodiment of the present disclosure, referring to Figure 2 As shown, the project content of the monolithic architecture 210 may include various types of applications, such as Huaping applications, WeChat business platforms, Huaping cloud open platforms, Huaping external platforms, Huaping operation and management platforms, etc., which are not specifically limited in this example implementation.

[0075] In step S120, it is determined whether the project content meets the first condition.

[0076] In this example implementation, the server may first obtain the project type of the project unit in each project content. The project type may be, for example, a topic, a member, or a user, and is not specifically limited in this example implementation. The server may then determine whether there are project units of the same project type across multiple project contents. For example, it may determine whether there are project units of the same project type across the Huaping application, the WeChat business platform, and the Huaping cloud open platform.

[0077] In this exemplary embodiment, when determining whether there are item units of the same item type among a plurality of item contents, the plurality of item contents may be judged in pairs.

[0078] In this example implementation, when determining whether there are project units of the same project type across multiple project contents, the project types of the project units in all project contents can be listed to form a reference project type statistical table. The reference project type statistical table can include the project types of all project units in all project contents. All project units are then categorized in the reference project type statistical table, and the number of project units categorized under each project type is calculated. The project contents corresponding to the project units corresponding to project types with a number greater than or equal to 2 are determined to satisfy the first condition. This example implementation does not specifically define how to determine whether there are project units of the same project type across multiple project contents.

[0079] For example, the Huaping application includes Huaping external project units, Huaping operation project units, and membership project units. The WeChat business platform may include WeChat business project units and membership project units. In this case, if both the Huaping application and the WeChat business platform include membership project units of the same project type, the Huaping application and the WeChat business platform can be determined to meet the first condition.

[0080] In another exemplary embodiment of the present disclosure, the server may first obtain the data source of the project unit in each project content. The data source may include a customer, a device, etc., which is not specifically limited in this exemplary embodiment. Then, the server determines whether there are project units with the same data source across multiple project contents. For example, it determines whether there are project units with the same data source in the Huaping application, the WeChat business platform, and the Huaping cloud open platform.

[0081] In this exemplary embodiment, when determining whether there are project units with the same data source among a plurality of project contents, the plurality of project contents may be judged in pairs.

[0082] In this example embodiment, when determining whether there are project units with the same data source across multiple project contents, a reference data source list can be formed by listing the data sources of the project units in all project contents. The reference data source list can include the data sources of all project units in all project contents. All project units are then categorized in the reference data source list, and the number of project units categorized under each data source is calculated. Project contents corresponding to project units with data sources with a number greater than or equal to 2 are determined to satisfy the first condition. This example embodiment does not specifically define how to determine whether there are project units of the same project type across multiple project contents.

[0083] In step S130, the project content that meets the first condition is split into shared functional units and initial functional units according to a preset rule.

[0084] In an example implementation of the present disclosure, when the first condition is whether there are project units of the same project type between multiple project contents, a reference project type statistical table can be obtained first. The specific method for obtaining the reference project type statistical table has been described in detail above, so it will not be repeated here.

[0085] In this example implementation, the target project type statistical table can be filtered out from the reference project type statistical table according to the first condition. Specifically, all project units are classified into the reference project type statistical table, and the number of project units classified under each project type is calculated. Project types with a number greater than or equal to 2 are filtered out to form the target project type statistical table.

[0086] In this example implementation, multiple project contents are split into shared functional units and initial functional units based on the above-mentioned target project type statistical table. Specifically, it is first possible to determine whether the reference project type of each project unit in the project content can be classified into the target project type statistical table. The project units that can be classified into the target project type statistical table will be used as shared functional units, and the project units that cannot be classified into the target project type statistical table will be used as initial functional units.

[0087] In another example implementation of the present disclosure, when the first condition is whether there are project units with the same data source between multiple project contents, a reference data source list can be obtained first. The specific method of obtaining the reference data source list has been described in detail above, so it will not be repeated here.

[0088] In this example implementation, the target data source list can be filtered out from the reference data source list according to the first condition. Specifically, all project units are classified into the reference data source list, and the number of project units classified under each data source is calculated. Data sources with a number of project units greater than or equal to 2 are filtered out to form the target data source list.

[0089] In this example implementation, multiple project contents are split into shared functional units and initial functional units based on the above-mentioned target data source list. Specifically, it is first possible to determine whether the reference data source of each project unit in the project content can be classified into the target data source list, and the project units that can be classified into the target data source list will be used as shared functional units, and the project units that cannot be classified into the target data source list will be used as initial functional units.

[0090] In this example implementation, after splitting according to preset rules, the painting screen application, cloud open project unit, painting screen external project unit, painting screen operation project unit, micro-business project unit, membership project unit, content project unit, AI project unit, etc. in the above-mentioned multiple project contents can be used as initial functional units, and the functions common to the above-mentioned multiple applications can be used as shared functional units, such as the user project unit, device project unit, activity project unit, special project unit, recommendation project unit, record project unit, payment project unit, SMS project unit, etc. in each project content.

[0091] In step S140, the plurality of initial functional units are converted into initial service aggregation units respectively.

[0092] In an exemplary embodiment of the present disclosure, referring to Figure 2 As shown, the initial functional units in the project contents of the above-mentioned multiple monomer architectures 210, that is, the initial functional units of multiple applications, are converted into initial business aggregation units 230. For example, the above-mentioned painting screen application project units, cloud-open project units, painting screen external project units, painting screen operation project units, micro-business project units, membership project units, content project units, AI project units, etc. are respectively converted into painting screen application business aggregation units, cloud-open business aggregation units, painting screen external business aggregation units, painting screen operation business aggregation units, micro-business business aggregation units, membership business aggregation units, content business aggregation units, AI business aggregation units, etc.

[0093] In this example implementation, the monolithic architecture can be a SpreeBundle architecture, and the resulting microservice architecture can be a Spring Cloud Collection. Since there is a one-to-one correspondence between the versions of the SpreeBundle architecture and the Spring Cloud Collection, during the conversion, it is first determined whether the SpreeBundle architecture of the monolithic architecture exists in the corresponding Spring Cloud version. If so, the monolithic architecture is directly converted to a Spring Cloud Collection. If not, the version of the SpreeBundle architecture with the monolithic architecture needs to be upgraded to complete the conversion. This example implementation does not specifically limit the version upgrade method.

[0094] In step S150, the plurality of shared functional units are integrated into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit.

[0095] In an exemplary implementation of the present disclosure, the target project types of the shared functional units may be first acquired, and then multiple shared functional units with the same target project type may be integrated into a shared service aggregation unit.

[0096] In another example embodiment of the present disclosure, the target data source of the shared functional units can be first obtained, and then multiple shared functional units with the same target data source can be integrated into a shared service aggregation unit. In this example embodiment, the specific method of integrating the multiple shared functional units into the shared service aggregation unit is not limited.

[0097] In an exemplary embodiment of the present disclosure, referring to Figure 2 As shown, the above-mentioned sharing function can be converted into a shared service aggregation unit 240. For example, the user project unit, device project unit, activity project unit, special project unit, recommended project unit, record project unit, payment project unit, SMS project unit, etc. in each of the above-mentioned project contents can be integrated into a user service aggregation unit, a device service aggregation unit, an activity service aggregation unit, a special service aggregation unit, a recommended service aggregation unit, a record service aggregation unit, a payment service aggregation unit, an SMS service aggregation unit, etc. The shared service data aggregation unit 240 can obtain the required data from the data set 260.

[0098] It should be noted that the number of the above-mentioned user project units, device project units, activity project units, special project units, recommended project units, record project units, payment project units, and SMS project units are all multiple, and they all correspond to different project contents. The number of the integrated and converted user business aggregation unit, device business aggregation unit, activity business aggregation unit, special business aggregation unit, recommended business aggregation unit, record business aggregation unit, payment business aggregation unit, and SMS business aggregation unit is all one, and each aggregation unit includes multiple project units. For example, the user business aggregation unit includes multiple user project units, where the multiple user project units are all derived from different project contents.

[0099] In an example embodiment of the present disclosure, when the first condition is whether there are project units of the same project type between multiple project contents, the above method may also include obtaining the target data source of each shared functional unit in the shared business aggregation unit, and forming a parameter list based on the target data source. The parameter list includes multiple parameter items, and each parameter item corresponds to a target data source. During operation, the corresponding parameters can be called according to the target data source to complete the implementation of the functions of each shared functional unit in the shared business aggregation unit.

[0100] In one example embodiment disclosed, referring to Figure 3 As shown, the initial service aggregation unit can access the shared service aggregation unit, which may include steps S310 to S320. Steps S310 to S320 are described in detail below.

[0101] In step S310, a service database of the shared service aggregation unit is established;

[0102] In an exemplary embodiment of the present disclosure, referring to Figure 4 As shown, a business database 480 can be established to store shared data related to the shared business aggregation unit 450. The shared data and the shared business aggregation unit are separated to ensure data security and accuracy of the called data.

[0103] In step S320, the initial service aggregation unit can obtain data from the service database.

[0104] In an exemplary embodiment of the present disclosure, referring to Figure 4 As shown, the initial service aggregation unit 440 can obtain data related to the initial service aggregation unit 440 from the service database 480 to complete the access of the initial service aggregation unit 440 to the shared service aggregation unit 450 .

[0105] In an exemplary embodiment of the present disclosure, reference may be made to Figure 4 As shown, the server can first establish a data service 470 function for the shared service aggregation unit 450. The initial service aggregation unit 440 obtains data from the aforementioned service database 480 by accessing the data service 470 function. Establishing the data service 470 function can achieve layering between the shared service aggregation unit 450 and the data, ensuring the independence and isolation of the shared service aggregation service 450, and preventing confusion caused by the initial service aggregation service 440 directly accessing the shared service aggregation service 450.

[0106] In an exemplary embodiment of the present disclosure, referring to Figure 4 As shown. The disclosed microservice processing method also includes obtaining non-converted projects 430 that cannot be directly converted into microservices from the project content of multiple monolithic architectures, and the non-converted projects access the shared business aggregation microservice 450 and the initial business aggregation microservice 440 through authorization verification 420, that is, the shared business aggregation microservice 450 and the initial business aggregation microservice 440 can be called through hypertext transmission and authorization. At the same time, some external request services 410 can also access the shared business aggregation microservice 450 and the initial business aggregation microservice 440 through authorization verification 420.

[0107] Specifically, refer to Figure 2, the project content that does not meet the first condition can be defined as a non-conversion project, and then the authorization code of the non-conversion project can be configured in the server. The authorization code can be verified through the gateway layer 220. The non-conversion project can call the shared business aggregation unit and the initial business aggregation micro-unit through authorization verification. The gateway layer has related functions such as control of permissions, statistics, current limiting, routing distribution, monitoring and load balancing. Among them, permission control is to verify whether the above-mentioned non-conversion project has access rights. The monitoring function and the statistical function are used for the statistical function to count the specific number and type of access to the microservice architecture and monitor and control them. The current limiting function is to ensure the normal operation of the microservice architecture and prevent the microservice architecture from being overloaded; the load balancing function is used to adjust the weights between multiple devices accessing the microservice architecture to ensure load balancing. A service layer middle 250 can also be established. The service layer middle 250 can also include a message queue function and a service link tracking function, as well as a cache function, wherein the message queue can increase the access speed.

[0108] In an exemplary embodiment of the present disclosure, referring to Figure 4 As shown, the microservice processing method disclosed herein also includes establishing a source database 460 of the initial business aggregation unit 440. The above-mentioned non-conversion items 430 can directly obtain data corresponding to the non-conversion items from the source database 460, so that multiple monolithic architectures can retain all the functions of the monolithic architecture after being converted into a microservice architecture.

[0109] In this example embodiment, referring to Figure 5 As shown, non-conversion projects may include the global wide area network (web server) 521 of each monolithic architecture 510, the middle platform service 522, etc., which are not specifically limited in this example implementation.

[0110] Specifically, refer to Figure 5 The non-conversion project accesses the initial business aggregation unit 551 and the shared business aggregation unit 552 through hypertext transmission and authorization verification via the Nginx server 530 and the routing distribution function of the gateway 540. At the same time, the non-conversion project can directly obtain data related to the non-conversion project from the source database 571 of the initial business aggregation unit 551.

[0111] In this example embodiment, service data source 572 may include a user database, device data, and a content database. The data classification of the service database enables the initial service aggregation unit and the shared service aggregation unit to quickly and accurately retrieve the corresponding data when retrieving data. It should be noted that there are various ways to classify data in the service database, and this example embodiment does not limit the specific classification method.

[0112] In an example implementation of the present disclosure, the microservice processing method of the present disclosure also includes obtaining the IP address and port number of each shared business aggregation unit and each initial business aggregation unit. When it is necessary to call the shared business aggregation unit or the initial business aggregation unit, only the corresponding port number and IP address need to be entered to complete the access.

[0113] In this example implementation, when it is necessary to add a shared business aggregation unit or an initial business aggregation unit, you can first register a new unit's IP address and port number through the service middleware, and add the required unit to the shared business aggregation unit or initial business aggregation unit list. When in use, it is accessed through the port number and IP address. There are many ways to access the shared business aggregation unit or the initial business aggregation unit, which are not specifically limited in this example implementation.

[0114] In this example embodiment, referring to Figure 5 As shown, obtaining the IP address and port number of each shared business aggregation unit and each initial business aggregation unit can be completed by the service middle layer 560, wherein the service layer middle can also include a message queue function and a service link tracking function, as well as a cache function, wherein the message queue can improve the access speed.

[0115] In this example implementation, the service middle layer also includes a service link tracking function for tracking and storing the call or access route of each service to ensure that failures can be quickly and accurately located and resolved.

[0116] In this example implementation, a remote dictionary service (Redis) 580 may also be provided. The remote dictionary service 580 may be connected to the source database, the initial business aggregation unit, and the shared business aggregation unit simultaneously to supplement the source database and improve the speed of reading and storing data.

[0117] The following describes an embodiment of the device disclosed herein, which can be used to execute the microservice processing method disclosed herein. In addition, in an exemplary embodiment of the present disclosure, a microservice processing device is also provided. Figure 6 As shown, the microservice processing device 600 includes: an acquisition module 610, a judgment module 620, a splitting module 630, a conversion module 640 and an integration module 650.

[0118] Among them, the acquisition module 610 can be used to obtain multiple monolithic architecture project contents; the judgment module 620 can be used to judge whether the project content meets the first condition; the judgment module 630 can be used to split the project content that meets the first condition into shared functional units and initial functional units according to preset rules; the conversion module 640 can be used to convert multiple initial functional units into initial business aggregation units respectively; the integration module 650 can be used to convert multiple shared functional units into shared business aggregation units, wherein the initial business aggregation microservice unit can access the shared business aggregation unit.

[0119] Since the functional modules of the microservice processing device of the example embodiment of the present disclosure correspond to the steps of the example embodiment of the microservice processing method described above, for details not disclosed in the embodiment of the device of the present disclosure, please refer to the embodiment of the microservice processing method described above.

[0120] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0121] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned microservice processing is also provided.

[0122] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."

[0123] Refer to the following Figure 7 7 to describe an electronic device 700 according to such an embodiment of the present disclosure. Figure 7 The electronic device 700 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0124] like Figure 7 As shown, electronic device 700 is implemented as a general-purpose computing device. Components of electronic device 700 may include, but are not limited to, the aforementioned at least one processing unit 710, the aforementioned at least one storage unit 720, a bus 730 connecting various system components (including storage unit 720 and processing unit 710), and a display unit 740.

[0125] The storage unit stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps described in the "Exemplary Method" section of the present disclosure according to various exemplary embodiments. For example, the processing unit 710 can perform the following steps: Figure 1 Steps S110 shown in the figure: obtaining multiple monolithic architecture project contents; S120: determining whether the project contents meet a first condition; S130: splitting the project contents that meet the first condition into shared functional units and initial functional units according to preset rules; S140: converting the multiple initial functional units into initial business aggregation units respectively; S150: for converting the multiple shared functional units into a shared business aggregation unit, wherein the initial business aggregation microservice unit can access the shared business aggregation unit.

[0126] For example, the electronic device can achieve the following Figure 1 and Figure 3 The steps shown.

[0127] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 721 and / or a cache memory unit 722 , and may further include a read-only memory unit (ROM) 723 .

[0128] The storage unit 720 may also include a program / utility 724 having a set (at least one) of program modules 725, such program modules 725 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0129] Bus 730 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0130] The electronic device 700 can also communicate with one or more external devices 770 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 700, and / or any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 750. Furthermore, the electronic device 700 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 700, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0131] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0132] In exemplary embodiments of the present disclosure, a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the aforementioned methods of this specification. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present disclosure.

[0133] Reference Figure 8 , describes a program product 800 for implementing the above method according to an embodiment of the present disclosure, which can be a portable compact disk read-only memory (CD-ROM) and includes program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0134] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with 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 (EPROM 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 thereof.

[0135] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0136] The program code embodied on the 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.

[0137] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0138] Furthermore, the figures above are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the figures above do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0139] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

[0140] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A microservice processing method, characterized in that: include: Get the content of multiple monolithic projects; Determine whether the project content meets the first condition; Splitting the project content that meets the first condition into shared functional units and initial functional units according to a preset rule; Converting the plurality of initial functional units into initial service aggregation units respectively; Integrate the plurality of shared function units into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit; The project content that does not meet the first condition is defined as a non-conversion project; The authorization code of the non-conversion project is configured so that the non-conversion project can call the shared service aggregation unit and the initial service aggregation micro-unit through authorization verification.

2. The method according to claim 1, characterized in that Determining whether the project content meets the first condition includes: Determine whether there are project units of the same project type among the plurality of project contents; The existence of a plurality of the item contents of the same type of item unit is determined to satisfy the first condition.

3. The method according to claim 2, characterized in that Splitting the project content that meets the first condition into shared functional units and initial functional units according to a preset rule includes: Obtain a reference project type statistical table, and filter the target project type statistical table according to the first condition; Determine the reference project type of each project unit in each project content; Each of the project contents is split into a shared functional unit and an initial functional unit according to the reference project type and the target project type statistical table.

4. The method according to claim 3, characterized in that Integrating the plurality of shared functional units into a shared service aggregation unit, comprising: Get the target project type of each shared functional unit; The multiple shared functional units of the same target project type are integrated and converted into a shared business aggregation unit.

5. The method according to claim 4, characterized in that The method further comprises: Acquire the target data source of each shared function unit in the shared service aggregation unit; A parameter list is formed according to the target data source, wherein the parameter list includes a plurality of parameter items, and each parameter item corresponds to one of the target data sources.

6. The method according to claim 1, characterized in that Determining whether the project content meets the first condition includes: Determine whether there are project units with the same data source among the plurality of project contents; The existence of a plurality of the item contents in an item unit having the same data source is determined to satisfy the first condition.

7. The method according to claim 6, characterized in that Splitting each of the project contents that meets the first condition into shared functional units and initial functional units according to a preset rule includes: Obtain a reference data source list, and filter the target data source list according to the first condition; Determine the reference data source for each project unit in each project content; Each of the project contents is split into a shared functional unit and an initial functional unit according to the target data source list and the reference data source.

8. The method according to claim 7, characterized in that Integrating the plurality of shared functional units into a shared service aggregation unit, comprising: Acquire the target data source of each of the shared functional units; The multiple shared functional units with the same target data source are integrated and converted into a shared service aggregation unit.

9. A microservice processing device, characterized in that: include: The acquisition module is used to obtain the contents of multiple monolithic architecture projects; A judging module, used to judge whether the project content meets the first condition; A splitting module, used for splitting the project content satisfying the first condition into shared functional units and initial functional units according to a preset rule; A conversion module, used to convert the multiple initial functional units into initial service aggregation units respectively; An integration module, used for converting the plurality of shared functional units into a shared business aggregation unit, wherein the initial business aggregation microservice unit can access the shared business aggregation unit; The splitting unit is further configured to perform: The project content that does not meet the first condition is defined as a non-conversion project; The authorization code of the non-conversion project is configured so that the non-conversion project can call the shared service aggregation unit and the initial service aggregation micro-unit through authorization verification.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the microservice processing method according to any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: processor; as well as A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the microservice processing method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for application separation

    CN107391142A