CN113672200A - Microservice processing method and device, storage medium and electronic equipment - Google Patents

Microservice processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113672200A
CN113672200A CN202010415062.4A CN202010415062A CN113672200A CN 113672200 A CN113672200 A CN 113672200A CN 202010415062 A CN202010415062 A CN 202010415062A CN 113672200 A CN113672200 A CN 113672200A
Authority
CN
China
Prior art keywords
item
unit
units
shared
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010415062.4A
Other languages
Chinese (zh)
Inventor
高伟光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202010415062.4A priority Critical patent/CN113672200A/en
Priority to PCT/CN2021/080303 priority patent/WO2021227636A1/en
Publication of CN113672200A publication Critical patent/CN113672200A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Bioethics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure relates to the technical field of micro-service architecture, and in particular, to a micro-service processing method and apparatus, a computer-readable storage medium, and an electronic device, wherein the method includes: acquiring a plurality of monomer architecture project contents; judging whether the item content meets a first condition; splitting the project content meeting the first condition into a sharing functional unit and an initial functional unit according to a preset rule; respectively converting the plurality of initial functional units into initial service aggregation units; and integrating a 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 technical scheme of the embodiment of the disclosure ensures that the functions of a plurality of monomer frameworks can be completed, has clear structure and high framework stability, and can realize the effects of conveniently carrying out centralized management on a plurality of projects and adapting to agile development iteration.

Description

Microservice processing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the technical field of micro-service architecture, and in particular, to a micro-service processing method and apparatus, a computer-readable storage medium, and an electronic device.
Background
With the rapid development of the internet industry, a single architecture gradually evolves into a micro-service architecture, the single architecture cannot support access of a large amount of users, the expansibility is relatively poor, various defects are not suitable for the iteration rhythm of the current project, the stability and high concurrency of the system are seriously challenged, and how to use an effective technology to serve the users and continuously provide values for the users gradually becomes one of the problems concerned by the internet.
However, the monomer architecture is converted into the micro-service architecture, and what way to convert the monomer architecture into the micro-service architecture is analyzed according to the technical characteristics of the current project, the technical architecture, the labor cost, how to split the service and other factors, and iteration is needed according to the real-time change requirement, and most of the conversions in the related technologies have the technical problems of disordered project structures and low architecture stability.
Therefore, it is necessary to design a new micro-service processing method.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a method and an apparatus for micro-service processing, a computer readable storage medium, and an electronic device, so as to overcome at least some technical problems of disordered project structure and low stability of architecture in transforming a monomer architecture into a micro-service architecture in related technologies.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a micro-service processing method, including:
acquiring a plurality of monomer architecture project contents;
judging whether the item content meets a first condition;
splitting the project content meeting the first condition into a sharing functional unit and an initial functional unit according to a preset rule;
respectively converting the plurality of initial functional units into initial service aggregation units;
and integrating a plurality of the shared function units into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit.
In an exemplary embodiment of the present disclosure, determining whether the item content satisfies a first condition includes:
judging whether item units of the same item type exist among a plurality of item contents;
determining that the first condition is satisfied for a plurality of the item contents in which the same type of item unit exists.
In an exemplary embodiment of the present disclosure, splitting the item content meeting the first condition into a shared functional unit and an initial functional unit according to a preset rule includes:
acquiring a reference item type statistical table, and screening a target item type statistical table according to the first condition;
determining a reference item type of each item unit in each item content;
and splitting each item content into a sharing functional unit and an initial functional unit according to the reference item type and the target item type statistical table.
In an exemplary embodiment of the present disclosure, integrating a plurality of the shared function units into a shared service aggregation unit includes:
acquiring the target item type of each sharing function unit;
and integrating and converting the plurality of sharing function units with the same target project type into a sharing service aggregation unit.
In an exemplary embodiment of the present disclosure, the method further comprises:
acquiring a target data source of each shared function unit in the shared service aggregation unit;
and forming a parameter list according to the target data source, wherein the parameter list comprises a plurality of parameter items, and each parameter item corresponds to one target data source.
In an exemplary embodiment of the present disclosure, determining whether the item content satisfies a first condition includes:
judging whether project units with the same data source exist among the project contents;
determining that the first condition is satisfied for a plurality of the item contents in which item units having the same data source exist.
In an exemplary embodiment of the present disclosure, splitting each item content meeting the first condition into a shared functional unit and an initial functional unit according to a preset rule includes:
acquiring a reference data source list, and screening a target data source list according to the first condition;
determining a reference data source of each item unit in each item content;
and splitting each item content into a sharing functional unit and an initial functional unit according to the target data source list and the reference data source.
In an exemplary embodiment of the present disclosure, integrating a plurality of the shared function units into a shared service aggregation unit includes:
acquiring a target data source of each shared function unit;
and integrating and converting a plurality of sharing functional units with the same target data source into a sharing service aggregation unit.
In an exemplary embodiment of the present disclosure, the method further comprises:
defining item contents which do not satisfy the first condition as non-conversion items;
and configuring an authorization code of the non-conversion item so that the non-conversion item can call the shared service aggregation unit and the initial service aggregation micro unit in an authorization verification mode.
According to an aspect of the present disclosure, there is provided a microservice processing apparatus comprising:
the acquisition module is used for acquiring a plurality of monomer architecture project contents;
the judging module is used for judging whether the project content meets a first condition;
the splitting module is used for splitting the project content meeting the first condition into a sharing functional unit and an initial functional unit according to a preset rule;
the conversion module is used for respectively converting the plurality of initial functional units into initial service aggregation units;
and the integration module is used for converting the plurality of sharing function units into sharing service aggregation units, wherein the initial service aggregation micro-service unit can access the sharing service aggregation units.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a microservice processing method as described in any one of the above.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor; and
memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a microservice processing method as recited in any of the above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in a micro-service processing method provided by an embodiment of the present disclosure, a plurality of monomer architecture project contents are obtained; judging whether the item content meets a first condition; splitting the project content meeting the first condition into a sharing functional unit and an initial functional unit according to a preset rule; respectively converting the plurality of initial functional units into initial service aggregation units; and integrating a plurality of shared function units into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit. Compared with the prior art, the method has the advantages that the plurality of project contents meeting the first condition are divided into the shared function unit and the initial function unit according to the preset rule for distinguishing, the service aggregation units are respectively established, the initial service aggregation unit can access the shared service aggregation unit, the functions of a plurality of monomer frameworks can be completed, the structure is clear, the framework stability is high, and the effects of conveniently carrying out centralized management on the plurality of projects and adapting to agile development iteration can be achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 schematically illustrates a flow chart of a microservice processing method in an exemplary embodiment of the disclosure;
FIG. 2 schematically illustrates an architecture diagram of a microservice processing method in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart for building a business database in an exemplary embodiment of the disclosure;
FIG. 4 schematically illustrates a data access roadmap for a microservice architecture in an exemplary embodiment of the present disclosure;
fig. 5 schematically illustrates a data access roadmap after the microservice architecture has been introduced into a service middle layer in an exemplary embodiment of the disclosure;
FIG. 6 schematically illustrates a composition diagram of a microservice processing apparatus in an exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates a structural diagram of a computer system suitable for use with an electronic device that implements an exemplary embodiment of the present disclosure;
fig. 8 schematically illustrates a schematic diagram of a computer-readable storage medium, according to some embodiments of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different 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 concept of 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.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In the present exemplary embodiment, there is first provided a micro service processing method, which may include, as shown in fig. 1, the steps of:
s110, acquiring a plurality of monomer architecture project contents;
s120, judging whether the item content meets a first condition;
s130, splitting the project content meeting the first condition into a sharing functional unit and an initial functional unit according to a preset rule.
And S140, respectively converting the plurality of initial functional units into initial service aggregation units.
S150, integrating the plurality of sharing function units into a sharing service aggregation unit, where the initial service aggregation unit can access the sharing service aggregation unit.
In the micro-service processing method provided in the present exemplary embodiment,
compared with the prior art, the method has the advantages that the plurality of project contents meeting the first condition are divided into the shared function unit and the initial function unit according to the preset rule for distinguishing, the service aggregation units are respectively established, the initial service aggregation unit can access the shared service aggregation unit, the functions of a plurality of monomer frameworks can be completed, the structure is clear, the framework stability is high, and the effects of conveniently carrying out centralized management on the plurality of projects and adapting to agile development iteration can be achieved.
Hereinafter, each step of the micro-service processing method in the present exemplary embodiment will be described in more detail with reference to the drawings and the embodiments.
In step S110, a plurality of single-frame project contents are acquired.
In an example embodiment of the present disclosure, referring to fig. 2, the project content of the monolithic framework 210 may include multiple types of applications, for example, a screen drawing application, a westerner platform, a screen drawing cloud open platform, a screen drawing exterior, a screen drawing operation management platform, and the like, which are not specifically limited in this example embodiment.
In step S120, it is determined whether the item content satisfies a first condition.
In the present exemplary embodiment, the server may first obtain an item type of an item unit in each item content, where the item type may be, for example, a topic, a member, a user, and the like, and is not specifically limited in the present exemplary embodiment. Then, it may be determined whether item units of the same item type exist among the plurality of item contents, for example, whether item units of the same item type exist in the screen application, the retailer platform, and the screen cloud open platform.
In the present exemplary embodiment, in determining whether or not there are item units of the same item type between a plurality of item contents, two-by-two combination determination may be made for the plurality of item contents.
In the present exemplary embodiment, when determining whether there are item units of the same item type among a plurality of item contents, a reference item type statistical table may also be formed by listing the item types of the item units in all the item contents, and the reference item type statistical table may include the item types of all the item units in all the item contents. Then, all the item units are classified in the reference item type statistical table, the quantity of the classified item units under each item type is calculated, and the item content corresponding to the item unit corresponding to the item type with the quantity being more than or equal to 2 is determined to meet the first condition. In the present exemplary embodiment, how to determine whether or not there are item units of the same item type between a plurality of item contents is not specifically limited.
For example, the screen application includes a screen external item unit, a screen operation item unit, a member item unit, and the like. The above-mentioned WeChat platform can include WeChat project unit, member project unit, etc., include the member project unit that the project type is the same between platform of the WeChat and the application program of the screen drawing at this moment, just can judge that the above-mentioned first condition is met with platform of the WeChat and the above-mentioned application program of the screen drawing at this moment.
In another example embodiment of the present disclosure, the server may first obtain a data source of the item unit in each item content, where the data source may include a client, a device, and the like, and is not specifically limited in this example embodiment. Then, whether the project units with the same data source exist among the project contents is judged, for example, whether the project units with the same data source exist in the screen drawing application program, the WeChat platform and the screen drawing cloud open platform is judged.
In the present exemplary embodiment, when determining whether there are item units having the same data source among a plurality of item contents, two-by-two combination determination may be performed on the plurality of item contents.
In the present exemplary embodiment, when determining whether there are item units with the same data source among a plurality of item contents, a reference data source list may be formed by enumerating the data sources of the item units in all the item contents, and the reference data source list may include the data sources of all the item units in all the item contents. Then, all the item units are classified in the reference data source list, the number of the classified item units under each data source is calculated, and the item content corresponding to the item unit corresponding to the data source with the number larger than or equal to 2 is determined to meet the first condition. In the present exemplary embodiment, how to determine whether or not there are item units of the same item type between a plurality of item contents is not specifically limited.
In step S130, the item content meeting the first condition is split into a shared functional unit and an initial functional unit according to a preset rule
In an example embodiment of the present disclosure, when the first condition is whether there are item units of the same item type among a plurality of item contents, the reference item type statistics table may be obtained first, and a specific obtaining manner of the reference item type statistics table is described in detail above, and therefore, details are not repeated here.
In this exemplary embodiment, the target item type statistical table may be screened out from the reference item type statistical table according to the first condition, specifically, all item units are categorized in the reference item type statistical table, the number of the categorized item units under each item type is calculated, and the item types with the number greater than or equal to 2 are screened out to form the target item type statistical table;
in the present exemplary embodiment, the plurality of item contents are divided into the shared functional units and the initial functional units according to the target item type statistical table, specifically, it may be determined whether the reference item type of each item unit in the item contents can be classified into the target item type statistical table, the item units that can be classified into the target item type statistical table are used as the shared functional units, and the item units that cannot be classified into the target item type statistical table are used as the initial functional units.
In another exemplary embodiment of the disclosure, when the first condition is whether there are item units with the same data source among a plurality of item contents, the reference data source list may be obtained first, and a specific obtaining manner of the reference data source list is described in detail above, so that details are not described herein again.
In this exemplary embodiment, the target data source list may be screened out from the reference data source list according to the first condition, specifically, all the item units are categorized in the reference data source list, the number of the categorized item units under each data source is calculated, and the data sources with the number greater than or equal to 2 are screened out to form the target data source list;
in this exemplary embodiment, the plurality of item contents are divided into the shared functional units and the initial functional units according to the target data source list, and specifically, it may be determined whether the reference data source of each item unit in the item contents can be categorized in the target data source list, the item units that can be categorized in the target data source list are taken as the shared functional units, and the item units that cannot be categorized in the target data source list are taken as the initial functional units.
In this exemplary embodiment, by splitting according to a preset rule, the screen-drawing application, the cloud open item unit, the screen-drawing external item unit, the screen-drawing operation item unit, the wechat business item unit, the member item unit, the content item unit, the AI item unit, and the like in the plurality of item contents may be used as an initial function unit, and the function shared by the plurality of application programs may be used as a shared function unit, such as a user item unit, an equipment item unit, an activity item unit, a special item unit, a recommended item unit, a recording item unit, a payment item unit, a short message item unit, and the like in each item content.
In step S140, the plurality of initial functional units are respectively converted into initial service aggregation units.
In an example embodiment of the present disclosure, referring to fig. 2, the initial function units in the item contents in the monomer architectures 210, that is, the initial function units of the applications, are converted into an initial service aggregation unit 230, for example, the screen application item unit, the cloud open item unit, the screen external item unit, the screen operation item unit, the micro business item unit, the member item unit, the content item unit, the AI item unit, and the like are respectively converted into a screen application service aggregation unit, a cloud open service aggregation unit, a screen external service aggregation unit, a screen operation service aggregation unit, a micro business aggregation unit, a member service aggregation unit, a content service aggregation unit, an AI service aggregation unit, and the like.
In this example embodiment, the monolithic framework may be a Spring Cloud framework, and the converted micro service framework may be a Spring Cloud set, and because there is a one-to-one correspondence between the versions of the monolithic framework and the Spring Cloud set, it may be first determined that the monolithic framework is a Spring Cloud version corresponding to the monolithic framework during the conversion, if there is a Spring Cloud set, the monolithic framework is directly converted into the Spring Cloud set, and if there is no Spring Cloud set, the version of the monolithic framework needs to be upgraded to complete the conversion. The version upgrade method is not specifically limited in the present exemplary embodiment.
In step S150, the plurality of shared function units are integrated into a shared service aggregation unit, where the initial service aggregation unit can access the shared service aggregation unit.
In an example embodiment of the present disclosure, the target item types of the shared function units may be obtained first, and then the shared function units with the same target item types are integrated and converted into the shared service aggregation unit.
In another example embodiment of the present disclosure, the target data sources of the shared functional units may be obtained first, and then the shared functional units with the same target data sources are integrated and converted into the shared service aggregation unit. In the present exemplary embodiment, a specific manner of integrating a plurality of the shared function units into a shared service aggregation unit is not limited.
In an example embodiment of the present disclosure, referring to fig. 2, the sharing function may be converted into a sharing service aggregation unit 240, for example, a user item unit, an equipment item unit, an activity item unit, a special item unit, a recommended item unit, a recording item unit, a payment item unit, a short message item unit, and the like in each item content are integrated and converted into a user service aggregation unit, an equipment service aggregation unit, an activity service aggregation unit, a special service aggregation unit, a recommended service aggregation unit, a recording service aggregation unit, a payment service aggregation unit, a short message service aggregation unit, and the like. Wherein the shared service data aggregation unit 240 can be able to acquire the required data in the data set 260.
It should be noted that the number of the user item units, the equipment item units, the activity item units, the special item units, the recommended item units, the recording item units, the payment item units, and the short message item units is multiple and all correspond to different item contents, the number of the integrated and converted user service aggregation units, the equipment service aggregation units, the activity service aggregation units, the special service aggregation units, the recommended service aggregation units, the recording service aggregation units, the payment service aggregation units, and the short message service aggregation units is one, and each aggregation unit includes multiple item units, for example, the user service aggregation unit includes multiple user item units, where the multiple user item units are all derived from unused item contents.
In an example embodiment of the present disclosure, when the first condition is whether an item unit of the same item type exists among the plurality of item contents, the method may further include obtaining a target data source of each shared function unit in the shared service aggregation unit, and forming a parameter list according to the target data source, where the parameter list includes a plurality of parameter items, each parameter item corresponds to one target data source, and when the method works, the method may call a corresponding parameter according to the target data source to complete implementation of a function of each shared function unit in the shared service aggregation unit.
In a disclosed example embodiment, referring to fig. 3, the enabling of the initial service aggregation unit to access the shared service aggregation unit may include steps S310 to S320; the following specifically describes steps S310 to S320.
In step S310, a service database of the shared service aggregation unit is established;
in an example embodiment of the present disclosure, referring to fig. 4, a service database 480 may be established to store shared data related to the shared service aggregating unit 450, and the shared data is set separately from the shared service aggregating unit, so that the security of the data and the accuracy of the call data can be ensured.
In step S320, the initial service aggregating unit can obtain data in the service database.
In an example embodiment of the present disclosure, referring to fig. 4, the initial service aggregating unit 440 can obtain data related to the initial service aggregating unit 440 in the service database 480 to complete the access of the initial service aggregating unit 440 to the shared service aggregating unit 450.
In an example embodiment of the present disclosure, as can be seen in fig. 4, the server may first establish a data service 470 function of the shared service aggregating unit 450, and the initial service aggregating unit 440 obtains data from the service database 480 by accessing the data service 470 function. The function of establishing the data service 470 enables the shared service aggregation unit 450 to be layered with data completion, ensures the independence and isolation of the shared service aggregation service 450, and prevents confusion caused by the fact that the initial service aggregation service 440 directly accesses the shared service aggregation service 450.
In an example embodiment of the present disclosure, reference is made to fig. 4. The disclosed microservice processing method further includes obtaining a non-conversion item 430 which cannot be directly converted into microservices in the item contents of the plurality of monomer architectures, and the non-conversion item accesses the shared service aggregation microservices 450 and the initial service aggregation microservices 440 by means of authorization verification 420, that is, the shared service aggregation microservices 450 and the initial service aggregation microservices 440 can be called by means of hypertext transmission and authorization. While some external request services 410 may also access the shared traffic aggregation microservice 450 and the initial traffic aggregation microservice 440 by way of authorization verification 420.
Specifically, referring to fig. 2, the content of the item that does not satisfy the first condition may be defined as a non-conversion item, then an authorization code of the non-conversion item is configured in the server, and the gateway layer 220 may perform authorization code to verify that the non-conversion item can call the shared service aggregation unit and the initial service aggregation micro unit in an authorization verification manner. The gateway layer has related functions of controlling authority, counting, limiting current, routing distribution, monitoring, load balancing and the like, wherein the authority is controlled to verify whether the non-conversion items have access authority, the monitoring function and the counting function are used for counting the specific number and types of the micro service architecture to be accessed and monitoring and controlling the micro service architecture, and the current limiting function is used for ensuring the normal operation of the micro service architecture and preventing the micro service architecture from being overloaded; the load balancing function is used for adjusting the weight among a plurality of devices accessing the micro-service architecture, and ensuring load balancing. Service layer middlings 250 can also be established, and the service layer middlings 250 can also include a message queue function and a service link tracking function, as well as a caching function, wherein the message queue can improve the access speed.
In an example embodiment of the present disclosure, referring to fig. 4, the microservice processing method of the present disclosure further includes establishing a source database 460 of the initial service aggregating unit 440, and the non-conversion item 430 may directly obtain data corresponding to the non-conversion item from the source database 460, so that a plurality of monomer architectures can retain all functions of the monomer architecture after being converted into the microservice architecture.
In the present exemplary embodiment, as shown in fig. 5, the non-conversion item may include a global wide area network (web server) 521, a middle station service 522, and the like of each individual architecture 510, which is not particularly limited in the present exemplary embodiment.
Specifically, referring to fig. 5, the non-converted item accesses the initial service aggregating unit 551 and the shared service aggregating unit 552 through a routing distribution function of the gateway 540 via the Nginx server 530 through hypertext transfer and authorization verification. Meanwhile, the non-conversion item can directly acquire data related to the non-conversion item from the source database 571 of the initial service aggregation unit 551.
In this example embodiment, the service data source 572 may include a user database, device data, and a content database, and the data classification of the service database is to enable the initial service aggregation unit and the shared service aggregation unit to quickly and accurately obtain corresponding data when the data is called. It should be noted that there are various classification methods for data in the service database, and the specific classification method is not limited in the present exemplary embodiment.
In an example embodiment of the present disclosure, the method for processing a microservice further includes obtaining IP addresses and port numbers of each shared service aggregation unit and each initial service aggregation unit, and when the shared service aggregation unit or the initial service aggregation unit needs to be called, access can be completed only by inputting a corresponding port number and IP address.
In this exemplary embodiment, when a shared service aggregation unit or an initial service aggregation unit needs to be added, an IP address and a port number of a new unit may be registered through the service middleware, and a needed unit may be added in the shared service aggregation unit or the initial service aggregation unit list.
In this example embodiment, as shown in fig. 5, acquiring the IP addresses and port numbers of each shared service aggregation unit and each initial service aggregation unit may be performed by the service middle layer 560, where the service middle layer may further include a message queue function and a service link tracking function, and a cache function, where the message queue may improve access speed.
In this exemplary embodiment, the service middle layer further includes a service link tracking function, which is used to track and store the call of each service or the route accessed to run, so as to ensure that the fault can be quickly and accurately located and solved.
In this exemplary embodiment, a remote dictionary service (Redis)580 may be further provided, and the remote dictionary service 580 may be simultaneously connected to the source database, the initial service aggregation unit, and the shared service aggregation unit, so as to supplement the source database and improve the speed of reading and storing data.
Embodiments of the disclosed apparatus are described below, which can be used to perform the above-described microservice processing method of the present disclosure. In addition, in an exemplary embodiment of the present disclosure, a micro service processing device is also provided. Referring to fig. 6, the microservice processing apparatus 600 includes: an obtaining module 610, a determining module 620, a splitting module 630, a transforming module 640, and an integrating module 650.
The obtaining module 610 may be configured to obtain a plurality of single architecture project contents; the determining module 620 may be configured to determine whether the item content satisfies a first condition; the determining module 630 may be configured to split the item content meeting the first condition into a shared functional unit and an initial functional unit according to a preset rule; the converting module 640 may be configured to convert the plurality of initial functional units into initial service aggregation units, respectively; the integration module 650 may be configured to convert a plurality of the shared functional units into a shared service aggregation unit, wherein the initial service aggregation micro-service unit has access to the shared service aggregation unit.
For details that are not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the micro service processing method described above for the details that are not disclosed in the embodiments of the apparatus of the present disclosure.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-described microservice processing is also provided.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 700 according to such an embodiment of the present disclosure is described below with reference to fig. 7. The electronic device 700 shown in fig. 7 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, electronic device 700 is embodied in the form of a general purpose computing device. The components of the electronic device 700 may include, but are not limited to: the at least one processing unit 710, the at least one memory unit 720, a bus 730 connecting different system components (including the memory unit 720 and the processing unit 710), and a display unit 740.
Wherein the storage unit stores program code that is executable by the processing unit 710 to cause the processing unit 710 to perform steps according to various exemplary embodiments of the present disclosure as described in the above section "exemplary methods" of this specification. For example, the processing unit 710 may perform step S110 as shown in fig. 1: acquiring a plurality of monomer architecture project contents; s120: judging whether the item content meets a first condition; s130: splitting the project content meeting the first condition into a sharing functional unit and an initial functional unit according to a preset rule; s140: respectively converting the plurality of initial functional units into initial service aggregation units; s150: and the system is used for converting the plurality of sharing function units into sharing service aggregation units, wherein the initial service aggregation micro-service unit can access the sharing service aggregation units.
As another example, the electronic device may implement the steps shown in fig. 1 and 3.
The storage unit 720 may include readable media in the form of volatile memory units, 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.
The memory unit 720 may also include programs/utilities 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 thereof, may comprise an implementation of a network environment.
Bus 730 may be any representation of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 700 may also communicate with one or more external devices 770 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 700, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 700 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 750. Also, the electronic device 700 may 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 the network adapter 760. As shown, the network adapter 760 communicates with the other modules of the electronic device 700 via the bus 730. It should be appreciated that although not shown in the figures, other hardware and/or software modules may 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, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may 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.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the present disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the "exemplary methods" section above of this specification, when the program product is run on the terminal device.
Referring to fig. 8, a program product 800 for implementing the above method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, 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, apparatus, or device.
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, apparatus, 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 (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer 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 many 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, apparatus, 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 the present disclosure 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's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and 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 (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes included in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (12)

1. A method for processing microservices, comprising:
acquiring a plurality of monomer architecture project contents;
judging whether the item content meets a first condition;
splitting the project content meeting the first condition into a sharing functional unit and an initial functional unit according to a preset rule;
respectively converting the plurality of initial functional units into initial service aggregation units;
and integrating a plurality of the shared function units into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit.
2. The method of claim 1, wherein determining whether the item content satisfies a first condition comprises:
judging whether item units of the same item type exist among a plurality of item contents;
determining that the first condition is satisfied for a plurality of the item contents in which the same type of item unit exists.
3. The method according to claim 2, wherein splitting the item content satisfying the first condition into a shared functional unit and an initial functional unit according to a preset rule comprises:
acquiring a reference item type statistical table, and screening a target item type statistical table according to the first condition;
determining a reference item type of each item unit in each item content;
and splitting each item content into a sharing functional unit and an initial functional unit according to the reference item type and the target item type statistical table.
4. The method of claim 3, wherein integrating a plurality of the shared functional units into a shared service aggregate unit comprises:
acquiring the target item type of each sharing function unit;
and integrating and converting the plurality of sharing function units with the same target project type into a sharing service aggregation unit.
5. The method of claim 4, further comprising:
acquiring a target data source of each shared function unit in the shared service aggregation unit;
and forming a parameter list according to the target data source, wherein the parameter list comprises a plurality of parameter items, and each parameter item corresponds to one target data source.
6. The method of claim 1, wherein determining whether the item content satisfies a first condition comprises:
judging whether project units with the same data source exist among the project contents;
determining that the first condition is satisfied for a plurality of the item contents in which item units having the same data source exist.
7. The method according to claim 6, wherein splitting each item content satisfying the first condition into a shared functional unit and an initial functional unit according to a preset rule comprises:
acquiring a reference data source list, and screening a target data source list according to the first condition;
determining a reference data source of each item unit in each item content;
and splitting each item content into a sharing functional unit and an initial functional unit according to the target data source list and the reference data source.
8. The method of claim 7, wherein integrating a plurality of the shared functional units into a shared service aggregate unit comprises:
acquiring a target data source of each shared function unit;
and integrating and converting a plurality of sharing functional units with the same target data source into a sharing service aggregation unit.
9. The method of claim 1, further comprising:
defining item contents which do not satisfy the first condition as non-conversion items;
and configuring an authorization code of the non-conversion item so that the non-conversion item can call the shared service aggregation unit and the initial service aggregation micro unit in an authorization verification mode.
10. A microservice processing apparatus, comprising:
the acquisition module is used for acquiring a plurality of monomer architecture project contents;
the judging module is used for judging whether the project content meets a first condition;
the splitting module is used for splitting the project content meeting the first condition into a sharing functional unit and an initial functional unit according to a preset rule;
the conversion module is used for respectively converting the plurality of initial functional units into initial service aggregation units;
and the integration module is used for converting the plurality of sharing function units into sharing service aggregation units, wherein the initial service aggregation micro-service unit can access the sharing service aggregation units.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a microservice processing method according to any one of claims 1 to 9.
12. An electronic device, comprising:
a processor; and
memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a microservice processing method as claimed in any one of claims 1 to 9.
CN202010415062.4A 2020-05-15 2020-05-15 Microservice processing method and device, storage medium and electronic equipment Pending CN113672200A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010415062.4A CN113672200A (en) 2020-05-15 2020-05-15 Microservice processing method and device, storage medium and electronic equipment
PCT/CN2021/080303 WO2021227636A1 (en) 2020-05-15 2021-03-11 Microservice processing method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010415062.4A CN113672200A (en) 2020-05-15 2020-05-15 Microservice processing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113672200A true CN113672200A (en) 2021-11-19

Family

ID=78526281

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010415062.4A Pending CN113672200A (en) 2020-05-15 2020-05-15 Microservice processing method and device, storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN113672200A (en)
WO (1) WO2021227636A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116644329B (en) * 2023-03-15 2024-02-13 交通运输部规划研究院 Method and device for classifying data of comprehensive transportation planning industry in grading manner

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168746B (en) * 2017-05-27 2020-09-29 北京中电普华信息技术有限公司 Micro-service generation method and device
US10474438B2 (en) * 2017-07-21 2019-11-12 Accenture Global Solutions Limited Intelligent cloud engineering platform
CN107391142B (en) * 2017-07-26 2020-11-06 北京中电普华信息技术有限公司 Application splitting method and device
CN110018822A (en) * 2019-04-16 2019-07-16 山东浪潮通软信息科技有限公司 A kind of method and system automatically generating micro services function
CN110287438A (en) * 2019-06-19 2019-09-27 天津大学 A kind of service convergence method transboundary based on micro services framework

Also Published As

Publication number Publication date
WO2021227636A1 (en) 2021-11-18

Similar Documents

Publication Publication Date Title
CN106489251B (en) The methods, devices and systems of applied topology relationship discovery
US8195785B2 (en) Dynamic server consolidation and rationalization modeling tool
WO2020258290A1 (en) Log data collection method, log data collection apparatus, storage medium and log data collection system
US10936659B2 (en) Parallel graph events processing
US8539514B2 (en) Workflow integration and portal systems and methods
US8291373B2 (en) Generating LoadRunner scripts
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
US9798782B2 (en) Re-sizing data partitions for ensemble models in a mapreduce framework
CN111917587B (en) Method for network service management by using service system and service system
CN110780856B (en) Electricity data release platform based on micro-service
US20220179711A1 (en) Method For Platform-Based Scheduling Of Job Flow
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
CN112181393B (en) Front-end and back-end code generation method and device, computer equipment and storage medium
US20180288169A1 (en) Intelligent information adapter generation for service management
US20200220910A1 (en) Idempotent processing of data streams
CN113672200A (en) Microservice processing method and device, storage medium and electronic equipment
US11023156B2 (en) Dynamic API allocation based on data-tagging
CN109308243B (en) Data processing method, data processing device, computer equipment and medium
US20190332393A1 (en) Mainframe system structuring
CN115760013A (en) Operation and maintenance model construction method and device, electronic equipment and storage medium
US20230196182A1 (en) Database resource management using predictive models
CN112948141A (en) Data processing method, device and system based on message middleware
CN114070889A (en) Configuration method, traffic forwarding method, device, storage medium, and program product
CN113472638A (en) Edge gateway control method, system, device, electronic equipment and storage medium
US20230017500A1 (en) Tokenized federated learning

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