WO2021227636A1 - 微服务处理方法及装置、存储介质及电子设备 - Google Patents

微服务处理方法及装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2021227636A1
WO2021227636A1 PCT/CN2021/080303 CN2021080303W WO2021227636A1 WO 2021227636 A1 WO2021227636 A1 WO 2021227636A1 CN 2021080303 W CN2021080303 W CN 2021080303W WO 2021227636 A1 WO2021227636 A1 WO 2021227636A1
Authority
WO
WIPO (PCT)
Prior art keywords
project
shared
unit
units
item
Prior art date
Application number
PCT/CN2021/080303
Other languages
English (en)
French (fr)
Inventor
高伟光
Original Assignee
京东方科技集团股份有限公司
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 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Publication of WO2021227636A1 publication Critical patent/WO2021227636A1/zh

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

Definitions

  • the present disclosure relates to the technical field of microservice architecture, and in particular, to a microservice processing method and device, computer-readable storage medium, and electronic equipment.
  • the monolithic architecture cannot support a large number of users to access, and its scalability is relatively poor, and various shortcomings are not suitable for the iterative pace of today's projects, and the system is stable. High concurrency and high concurrency have been severely challenged. How to use effective technology to serve users and provide users with continuous value has gradually become one of the concerns of the Internet.
  • a microservice processing method including:
  • a plurality of the shared function units are integrated into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit.
  • determining whether the item content meets the first condition includes:
  • splitting the item content that meets the first condition into a shared functional unit and an initial functional unit according to a preset rule includes:
  • the content of each item is split into a shared functional unit and an initial functional unit.
  • integrating a plurality of the shared function units into a shared service aggregation unit includes:
  • the multiple shared functional units with the same target project type are integrated and transformed into a shared business aggregation unit.
  • the method further includes:
  • 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 a kind of the target data source.
  • determining whether the item content meets the first condition includes:
  • splitting each item content satisfying the first condition into a shared functional unit and an initial functional unit according to a preset rule includes:
  • each item content is split into a shared functional unit and an initial functional unit.
  • integrating a plurality of the shared function units into a shared service aggregation unit includes:
  • the multiple shared functional units with the same target data source are integrated and transformed into a shared business aggregation unit.
  • the method further includes:
  • the authorization code of the non-converted item is configured so that the non-converted item can invoke the shared service aggregation unit and the initial service aggregation micro-unit through authorization verification.
  • a microservice processing apparatus including:
  • the acquisition module is used to acquire the content of multiple monolithic architecture projects
  • the judgment module is used to judge whether the content of the item meets the first condition
  • a splitting module configured to split the project content that meets the first condition into a shared functional unit and an initial functional unit according to a preset rule
  • the conversion module is used to convert a plurality of the initial functional units into initial business aggregation units respectively;
  • the integration module is used to transform a plurality of the shared function units into a shared service aggregation unit, wherein the initial service aggregation microservice unit can access the shared service aggregation unit.
  • a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the microservice processing method as described in any one of the above is implemented.
  • an electronic device including:
  • 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 realize the microcomputer as described in any one of the above Service processing method.
  • FIG. 1 schematically shows a flowchart of a microservice processing method in an exemplary embodiment of the present disclosure
  • Fig. 2 schematically shows an architecture diagram of a microservice processing method in an exemplary embodiment of the present disclosure
  • Fig. 4 schematically shows a data access roadmap of a microservice architecture in an exemplary embodiment of the present disclosure
  • FIG. 5 schematically shows a data access roadmap after the microservice architecture introduces the service middle layer in an exemplary embodiment of the present disclosure
  • FIG. 6 schematically shows a schematic diagram of the composition of a microservice processing apparatus in an exemplary embodiment of the present disclosure
  • FIG. 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
  • FIG. 8 schematically shows a schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure.
  • a microservice processing method is first provided.
  • the above microservice processing method may include the following steps:
  • S140 Convert a plurality of the initial functional units into initial business aggregation units respectively.
  • the content of multiple items that meet the first condition is divided into shared functional units and initial functional units to distinguish them according to preset rules, and business aggregation units are established respectively, and the initial business aggregation units can access the sharing
  • the business aggregation unit ensures that the functions of multiple single architectures can be completed, while having a clear structure and high architecture stability, and can achieve the effect of facilitating centralized management of multiple projects and adapting to agile development iterations.
  • step S110 the content of multiple monolithic architecture items is obtained.
  • the project content of the monolithic architecture 210 may include multiple types of applications, for example, Huaping application, WeChat business platform, Huaping cloud open platform, and Huaping external , Picture screen operation management platform, etc., are not specifically limited in this example implementation.
  • step S120 it is determined whether the content of the item satisfies the first condition.
  • the server may first obtain the item type of the item unit in each item content.
  • the item type may be, for example, topic, member, user, etc., which is not specifically limited in this example embodiment. Then it can be judged whether there are project units of the same project type among multiple project contents, for example, it can be judged whether there are project units of the same project type in the Huaping application, the WeChat business platform, and the Huaping cloud open platform.
  • the two-by-two combination judgment may be performed on the multiple project contents.
  • the type statistics table can include the item types of all item units in all item contents. Then classify all project units in the above-mentioned reference project type statistical table, and calculate the number of project units classified under each project type, and determine the project content corresponding to the project unit corresponding to the project type with the number greater than or equal to 2 as satisfying The first condition mentioned above. In this exemplary embodiment, it is not specifically limited how to determine whether there are project units of the same project type among multiple project contents.
  • the aforementioned picture screen application includes a picture screen external project unit, a picture screen operation project unit, and a member project unit.
  • the above-mentioned Wechat Business Platform may include Wechat Project Units, Membership Project Units, etc.
  • the Picture Screen Application and the Wechat Business Platform both include Member Project Units of the same project type.
  • the above Picture Screen Application and WeChat Business Platform can be combined. It is determined that the above-mentioned first condition is satisfied.
  • the server may first obtain the data source of the item unit in each item content.
  • the data source may include customers, equipment, etc., which is not specifically limited in this exemplary embodiment. Then, whether there are project units with the same data source among multiple project contents, for example, determine whether there are project units with the same data source in the Huaping application, WeChat business platform, and Huaping cloud open platform.
  • a pairwise combination judgment may be performed on the multiple project contents.
  • a reference data source list by enumerating the data sources of the project units in all project contents.
  • the reference data source The data source of all project units in all project contents can be included in the list. Then classify all the project units in the above reference data source list, calculate the number of project units classified under each data source, and determine the project content corresponding to the project unit corresponding to the data source with the number greater than or equal to 2 as meeting the above The first condition.
  • step S130 the project content that meets the first condition is split into a shared functional unit and an initial functional unit according to a preset rule
  • the reference project type statistical table may be obtained first, and the reference project type statistical table can be referred to.
  • the specific acquisition method has been described in detail above, so it will not be repeated here.
  • the target project type statistical table can be filtered out of the reference project type statistical table according to the above first condition. Specifically, all project units are classified in the above reference project type statistical table, and each one is calculated. The number of project units classified under the project type, and the number of project types greater than or equal to 2 is filtered out to form a statistical table of target project types;
  • the content of multiple items is divided into shared functional units and initial functional units according to the above-mentioned target item type statistical table. Specifically, it can be first determined whether the reference item type of each item unit in the item content can be classified In the statistical table of target project type, project units that can be classified in the statistical table of target project types are regarded as shared functional units, and project units that cannot be classified in the statistical table of target project types are regarded as initial functional units.
  • the reference data source list may be obtained first, and the specific data source list may be referred to.
  • the acquisition method has been described in detail above, so it will not be repeated here.
  • the target data source list can be filtered out of the reference data source list according to the above first condition. Specifically, all project units are classified in the above reference data source list, and each data source is calculated. The number of project units to be classified, and the data sources with the number greater than or equal to 2 are filtered out to form the target data source list;
  • multiple project contents are split into shared functional units and initial functional units according to the above-mentioned target data source list. Specifically, it can first be determined whether the reference data source of each project unit in the project content can be classified In the target data source list, the project units that can be classified in the target data source list are regarded as shared functional units, and the project units that cannot be classified in the target data source list are regarded as the initial functional units.
  • the screen application, cloud open project unit, external screen project unit, screen operation project unit, micro business project unit, and membership among the above multiple project contents can be divided.
  • Project units, content project units, AI project units, etc. are used as initial functional units, and the functions common to the above multiple applications are used as shared functional units, such as user project units, equipment project units, activity project units, and topics in each project content Project unit, recommended project unit, record project unit, payment project unit, SMS project unit, etc.
  • step S140 a plurality of the initial functional units are respectively converted into initial business aggregation units.
  • the initial functional units in the project content in the multiple monolithic architectures 210 are converted into initial business aggregation units 230, for example, convert the above-mentioned screen application project unit, cloud open project unit, external screen project unit, screen operation project unit, micro business project unit, membership project unit, content project unit, AI project unit, etc. into screen application business Aggregation unit, cloud open service aggregation unit, picture screen external business aggregation unit, picture screen operation business aggregation unit, micro business aggregation unit, membership service aggregation unit, content service aggregation unit, AI service aggregation unit, etc.
  • the monolithic architecture may be the Spring Cloud architecture
  • the converted microservice architecture may be the Spring Cloud collection, because there is a one-to-one correspondence between the versions of the Spring Cloud collection and the Spring Cloud architecture. Therefore, during the conversion, you can first determine whether the Spring Cloud version of the monolithic architecture exists in the corresponding Spring Cloud version. If it exists, directly convert the monolithic architecture to the Spring Cloud collection. If it does not exist, then It is necessary to upgrade the version of the Spreebut architecture with a single architecture to complete the conversion.
  • the version upgrade method is not specifically limited.
  • step S150 a plurality of the shared function units are integrated into a shared service aggregation unit, wherein the initial service aggregation unit can access the shared service aggregation unit.
  • the target item type of a shared functional unit may be obtained first, and then multiple shared functional units of the same target item type are integrated and converted into a shared business aggregation unit.
  • the target data source of a shared function unit may be obtained first, and then multiple shared function units with the same target data source may be integrated and converted into a shared service aggregation unit.
  • the specific manner of integrating a plurality of the shared function units into a shared service aggregation unit is not limited.
  • the above-mentioned sharing function may be converted into a sharing service aggregation unit 240, for example, the user project unit, equipment project unit, and activity in each of the above-mentioned project contents Project unit, thematic project unit, recommended project unit, record project unit, payment project unit, SMS project unit, etc. are integrated and converted into user service aggregation unit, equipment service aggregation unit, activity service aggregation unit, thematic service aggregation unit, and recommendation service aggregation unit , Recording service aggregation unit, payment service aggregation unit, SMS service aggregation unit, etc.
  • the shared service data aggregation unit 240 can obtain the required data from the data collection 260.
  • each aggregation unit includes multiple project units.
  • the user service aggregation unit includes multiple user project units, where multiple user project units are derived from unused project content.
  • the above method may further include obtaining target data of each sharing function unit in the sharing service aggregation unit Source, and form a parameter list according to the target data source.
  • the parameter list includes multiple parameter items. Each parameter item corresponds to a target data source. When working, you can call the corresponding parameters according to the target data source to complete the shared business aggregation unit. The realization of the functions of each shared functional unit in the.
  • the initial service aggregation unit being able to access the shared service aggregation unit may include steps S310 to S320; steps S310 to S320 will be described in detail below.
  • step S310 a service database of the shared service aggregation unit is established
  • a service database 480 may be established to store the shared data related to the shared service aggregation unit 450, and the shared data and the shared service aggregation unit are set separately to ensure that The security of the data, and the accuracy of the recalled data.
  • step S320 the initial service aggregation unit can obtain data in the service database.
  • the initial business aggregation unit 440 can obtain data related to the initial business aggregation unit 440 in the business database 480 to complete the initial business aggregation unit 440's aggregation of shared services.
  • Unit 450 visit.
  • the server may first establish the data service 470 function of the shared service aggregation unit 450.
  • the initial service aggregation unit 440 obtains data from the service database 480 by accessing the data service 470 function. To get the data.
  • Establishing the data service 470 function can enable the shared service aggregation unit 450 to complete layering with data, ensure the independence and isolation of the shared service aggregation service 450, and prevent the initial business aggregation service 440 from directly accessing the shared service aggregation service 450 and confusion caused by it.
  • the microservice processing method of the present disclosure also includes obtaining non-converted items 430 that cannot be directly converted into microservices among the project contents of multiple monolithic architectures, and the non-converted items access the shared service aggregation unit 450 and the initial business by means of authorization verification 420
  • the aggregating unit 440 can call the above-mentioned shared service aggregating unit 450 and the initial service aggregating unit 440 by means of hypertext transmission and authorization.
  • some external request services 410 can also access the shared service aggregation unit 450 and the initial service aggregation unit 440 through authorization verification 420.
  • the content of the project that does not meet the first condition can be defined as a non-converted project, and then the authorization code of the non-converted project can be configured in the server, and the authorization code can be verified through the gateway layer 220.
  • the non-converted project can be authorized.
  • the verification method calls the shared service aggregation unit and the initial service aggregation micro unit.
  • the gateway layer has related functions such as control authority, statistics, current limit, routing distribution, monitoring, and load balancing. Among them, authority control is to verify whether the above non-conversion items have access authority, and the monitoring and statistics functions are used for statistical functions.
  • a service layer middle 250 may also be established, and the service layer middle 250 may also include a message queue function, a service link tracking function, and a cache function, in which the message queue can improve the access speed.
  • the microservice processing method of the present disclosure further includes establishing a source database 460 of the initial business aggregation unit 440, and the aforementioned non-conversion items 430 can be directly obtained from the source database 460 The data corresponding to the non-converted project, so that multiple monolithic architectures can retain all the functions of the monolithic architecture after being converted to the microservice architecture.
  • the non-conversion items may include the global wide area network (web server) 521, the middle office service 522, etc. of each single architecture 510, which are not specifically limited in this example embodiment.
  • non-converted items access the initial service aggregation unit 551 and the shared service aggregation unit 552 through the Nginx server 530 and the route distribution function of the gateway 540 through hypertext transmission and authorization verification.
  • the non-converted items can directly obtain data related to the non-converted items from the source database 571 of the initial business aggregation unit 551.
  • the business data source 572 may include a user database, device data, and a content database.
  • the data classification of the business database is such that the initial business aggregation unit and the shared business aggregation unit can quickly and accurately obtain the corresponding data when retrieving data. data. It should be noted that there are multiple classification methods for data in the business database, and the specific classification methods are not limited in this exemplary embodiment.
  • the microservice processing method of the present disclosure further includes obtaining the IP address and port number of each shared service aggregation unit and each initial service aggregation unit, and when it is necessary to call the shared service aggregation unit or the initial service aggregation unit When, you only need to enter the corresponding port number and IP address to complete the access.
  • the IP address and port number of a new unit can be registered through the service middleware, and the shared service aggregation unit or the initial service aggregation unit The required units are added to the list. When in use, they are accessed through the port number and IP address.
  • obtaining the IP address and port number of each shared service aggregation unit and each initial service aggregation unit may be completed by the service middle layer 560, where the service layer may also include a message queue function and Service link tracking function, and cache function, in which message queue can improve access speed.
  • the service middle layer also includes a service link tracking function, which is used to track and store each service call or access route run, so as to ensure that the fault can be quickly and accurately located and resolved.
  • a remote dictionary service (Redis) 580 can also be set, and the remote dictionary service 580 can be connected to the source database, the initial business aggregation unit, and the shared business aggregation unit at the same time, so as to supplement the source database. At the same time, the speed of reading and storing data is improved.
  • the microservice processing apparatus 600 includes: an acquisition module 610, a judgment module 620, a split module 630, a conversion module 640, and an integration module 650.
  • the obtaining module 610 may be used to obtain the content of multiple monolithic architecture projects; the judging module 620 may be used to judge whether the project content meets the first condition; the judging module 630 may be used to obtain the content of the first
  • the item content of the condition is split 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; the integration module 650 can be used to convert A plurality of the shared function units are transformed into a shared service aggregation unit, wherein the initial service aggregation unit unit can access the shared service aggregation unit.
  • each functional module of the microservice processing apparatus of the exemplary embodiment of the present disclosure corresponds to the steps of the above exemplary embodiment of the microservice processing method, for details that are not disclosed in the embodiment of the apparatus of the present disclosure, please refer to the above-mentioned microservices of the present disclosure. Examples of service processing methods.
  • modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
  • an electronic device capable of implementing the above-mentioned microservice processing.
  • the electronic device 700 according to such an embodiment of the present disclosure will be 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 function and scope of use of the embodiments of the present disclosure.
  • the electronic device 700 is represented in the form of a general-purpose computing device.
  • the components of the 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 different system components (including the storage unit 720 and the processing unit 710), and a display unit 740.
  • the storage unit stores program code, and the program code can be executed by the processing unit 710, so that the processing unit 710 executes the various exemplary methods described in the "Exemplary Method" section of this specification. Example steps.
  • the processing unit 710 may perform the step S110 shown in FIG.
  • the electronic device can implement the steps shown in FIG. 1 and FIG. 3.
  • the storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 721 and/or a cache storage unit 722, and may further include a read-only storage unit (ROM) 723.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 720 may also include a program/utility tool 724 having a set of (at least one) program module 725.
  • program module 725 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 730 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 700 may also communicate with one or more external devices 770 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 700, and/or communicate with Any device (eg, router, modem, etc.) that enables the electronic device 700 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 750.
  • the electronic device 700 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 760.
  • networks for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
  • the network adapter 760 communicates with other modules of the electronic device 700 through the 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 system, etc.
  • the exemplary embodiments described here can be implemented by software, or can be implemented 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, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiment of the present disclosure.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
  • a computer-readable storage medium on which is stored a program product capable of implementing the above-mentioned method of this specification.
  • various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to enable the The terminal device executes the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
  • a program product 800 for implementing the above-mentioned method according to an embodiment of the present disclosure is described. Run on the computer.
  • the program product of the present disclosure is not limited thereto.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
  • the program product can use 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 device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
  • the program code used to perform the operations of the present disclosure can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, using Internet service providers). Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers for example, using Internet service providers.

Landscapes

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

Abstract

一种微服务处理方法及装置、计算机可读存储介质及电子设备,该方法包括:获取多个单体架构项目内容(S110);判断项目内容是否满足第一条件(S120);将满足第一条件的项目内容按照预设规则拆分为共享功能单元与初始功能单元(S130);将多个初始功能单元分别转化为初始业务聚合单元(S140);将多个共享功能单元整合为共享业务聚合单元,其中初始业务聚合单元能够访问共享业务聚合单元(S150)。在保证多个单体架构的功能均可以完成的同时,结构清晰、架构稳定性高,且能够实现便于对多个项目进行集中管理、适应敏捷开发迭代的效果。

Description

微服务处理方法及装置、存储介质及电子设备
交叉引用
本公开要求于2020年5月15日提交的申请号为202010415062.4名称为“微服务处理方法及装置、存储介质及电子设备”的中国专利申请的优先权,该中国专利申请的全部内容通过引用全部并入本文。
技术领域
本公开涉及微服务架构技术领域,具体而言,涉及一种微服务处理方法及装置、计算机可读存储介质及电子设备。
背景技术
随着互联网行业的快速发展,单体架构逐渐演变为微服务架构,单体架构无法支撑大用户量的访问,及扩展性相对较差,以及种种缺点不适应当今项目的迭代节奏,系统的稳定性、高并发性受到严重的挑战,如何用有效的技术服务于用户、并为用户持续提供价值,逐渐成为互联网关注的问题之一。
但是,单体架构转化微服务架构,要采取何种方式来转为微服务架构,要根据目前项目的技术特点和技术架构、人力成本、如何拆分业务等因素分析,并且还要对应实时变化的需求迭代,相关技术中的大多数转换均存在项目结构混乱、架构稳定性不高的技术问题。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
公开内容
根据本公开的第一方面,提供了一种微服务处理方法,包括:
获取多个单体架构项目内容;
判断所述项目内容是否满足第一条件;
将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能 单元与初始功能单元;
将多个所述初始功能单元分别转化为初始业务聚合单元;
将多个所述共享功能单元整合为共享业务聚合单元,其中所述初始业务聚合单元能够访问所述共享业务聚合单元。
在本公开的一种示例性实施例中,判断所述项目内容是否满足第一条件,包括:
判断多个所述项目内容之间是否存在相同项目类型的项目单元;
将存在相同类型项目单元的多个所述项目内容判定为满足所述第一条件。
在本公开的一种示例性实施例中,将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元,包括:
获取参考项目类型统计表,并根据所述第一条件筛选目标项目类型统计表;
确定每一个所述项目内容中各所述项目单元的参考项目类型;
根据所述参考项目类型和所述目标项目类型统计表将每一个所述项目内容拆分为共享功能单元与初始功能单元。
在本公开的一种示例性实施例中,将多个所述共享功能单元整合为共享业务聚合单元,包括:
获取各共享功能单元的目标项目类型;
将所述目标项目类型相同的多个共享功能单元整合转化为共享业务聚合单元。
在本公开的一种示例性实施例中,所述方法还包括:
获取所述共享业务聚合单元中各共享功能单元的目标数据来源;
根据所述目标数据来源形成参数列表,其中,所述参数列表包括多个参数项,每一个所述参数项对应一种所述目标数据来源。
在本公开的一种示例性实施例中,判断所述项目内容是否满足第一条件,包括:
判断多个所述项目内容之间是否存在数据来源相同的项目单元;
将存在数据来源相同的项目单元的多个所述项目内容判定为满足所述第一条件。
在本公开的一种示例性实施例中,将满足所述第一条件的每一个所述项目内容按照预设规则拆分为共享功能单元与初始功能单元,包括:
获取参考数据来源列表,并根据所述第一条件筛选目标数据来源列表;
确定每一个所述项目内容中各所述项目单元的参考数据来源;
根据所述目标数据来源列表和所述参考数据来源将每一个所述项目内容拆分为共享功能单元与初始功能单元。
在本公开的一种示例性实施例中,将多个所述共享功能单元整合为共享业务聚合单元,包括:
获取各所述共享功能单元的目标数据来源;
将所述目标数据来源相同的多个共享功能单元整合转化为共享业务聚合单元。
在本公开的一种示例性实施例中,所述方法还包括:
将不满足所述第一条件的项目内容定义为非转换项目;
配置所述非转换项目的授权码,以使得所述非转换项目能够通过授权验证的方式调用所述共享业务聚合单元以及所述初始业务聚合微单元。
根据本公开的一个方面,提供一种微服务处理装置,包括:
获取模块,用于获取多个单体架构项目内容;
判断模块,用于判断所述项目内容是否满足第一条件;
拆分模块,用于将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元;
转化模块,用于为将多个所述初始功能单元分别转化为初始业务聚合单元;
整合模块,用于将多个所述共享功能单元转化为共享业务聚合单元,其中所述初始业务聚合微服务单元能够访问所述共享业务聚合单元。
根据本公开的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如上述任意一项所述的微服务处理方法。
根据本公开的一个方面,提供一种电子设备,包括:
处理器;以及
存储器,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上述任意一项所述的微服务处理方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1示意性示出本公开示例性实施例中微服务处理方法的流程图;
图2示意性示出本公开示例性实施例中微服务处理方法的架构图;
图3示意性示出本公开示例性实施例中建立业务数据库的流程图;
图4示意性示出本公开示例性实施例中微服务架构的数据访问路线图;
图5示意性示出本公开示例性实施例中微服务架构引入服务中间层后的数据访问路线图;
图6示意性示出本公开示例性实施例中一种微服务处理装置的组成示意图;
图7示意性示出了适于用来实现本公开示例性实施例的电子设备的计算机系统的结构示意图;
图8示意性示出了根据本公开的一些实施例的计算机可读存储介质的示意图。
具体实施方式
现在将参照附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以 任何合适的方式结合在一个或更多实施方式中。
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
在本示例性实施例中,首先提供了一种微服务处理方法,参照图1中所示,上述的微服务处理方法可以包括以下步骤:
S110,获取多个单体架构项目内容;
S120,判断所述项目内容是否满足第一条件;
S130,将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元。
S140,将多个所述初始功能单元分别转化为初始业务聚合单元。
S150,将多个所述共享功能单元整合为共享业务聚合单元,其中所述初始业务聚合单元能够访问所述共享业务聚合单元。
根据本示例性实施例中所提供的微服务处理方法中,
相较于现有技术,将满足第一条件的多个项目内容按照预设规则拆分为共享功能单元与初始功能单元来进行区分,并各自建立业务聚合单元,且初始业务聚合单元能够访问共享业务聚合单元,在保证多个单体架构的功能均可以完成的同时,结构清晰、架构稳定性高,且能够达到便于对多个项目进行集中管理、适应敏捷开发迭代的效果。
下面,将结合附图及实施例对本示例性实施例中的微服务处理方法的各个步骤进行更详细的说明。
在步骤S110中,获取多个单体架构项目内容。
在本公开的一种示例实施方式中,参照图2所示,单体架构210的项目内容可以包括多种类型的应用程序,例如,画屏应用程序、微商平台、画屏云端开放平台、画屏外部、画屏运营管理平台等,在本示例实施方式中不做具体限定。
在步骤S120中,判断所述项目内容是否满足第一条件。
在本示例实施方式中,服务器可以首先获取每一个项目内容中项目单元的项目类型,项目类型可以是例如专题、会员、用户等,在本示例实施方式中不做具体限定。然后可以判断多个项目内容之间是否存在相同项目类型的项目单元,例如,判断画屏应用程序、微商平台、画屏云端开放平台中是否存在相同项目类型的项目单元。
在本示例实施方式中,在判断多个项目内容之间是否存在相同项目类型的项目单元时,可以对上述多个项目内容进行两两组合判断。
在本示例实施方式中,在判断多个项目内容之间是否存在相同项目类型的项目单元时,也可以通过将所有项目内容中的项目单元的项目类型进行列举形成参考项目类型统计表,参考项目类型统计表中可以包括所有项目内容中所有项目单元的项目类型。然后将所有项目单元归类在上述参考项目类型统计表中,并计算每一个项目类型下归类的项目单元的数量,将数量大于等于2的项目类型对应的项目单元对应的项目内容确定为满足上述第一条件。在本示例实施方式中不做如何判断多个项目内容之间是否存在相同项目类型的项目单元做具体限定。
例如,上述画屏应用程序中包括画屏外部项目单元、画屏运营项目单元以及会员项目单元等。上述微商平台可以包括微商项目单元、会员项目单元等,此时画屏应用程序和微商平台之间均包括项目类型相同的会员项目单元,此时就可以将上述画屏应用程序和微商平台判定为满足上述第一条件。
在本公开的另一种示例实施方式中,服务器可以首先获取每一个项目内容中项目单元的数据来源,数据来源可以包括客户、设备等,在本示例实施方式中不做具体限定。然后多个项目内容之间是否存在数据来源相同的项目单元,例如,判断画屏应用程序、微商平台、画屏云端开放平台中是否存在数据来源相同的项目单元。
在本示例实施方式中,在判断多个项目内容之间是否存在数据来源相同的项目单元时,可以对上述多个项目内容进行两两组合判断。
在本示例实施方式中,在判断多个项目内容之间是否存在数据来源相同的项目单元时,也可以通过将所有项目内容中的项目单元的数据来源进行列举形成参考数据来源列表,参考数据来源列表中可以包括所有 项目内容中所有项目单元的数据来源。然后将所有项目单元归类在上述参考数据来源列表中,并计算每一个数据来源下归类的项目单元的数量,将数量大于等于2的数据来源对应的项目单元对应的项目内容确定为满足上述第一条件。在本示例实施方式中不做如何判断多个项目内容之间是否存在相同项目类型的项目单元做具体限定。
在步骤S130中,将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元
在本公开的一种示例实施方式中,在上述第一条件是多个所述项目内容之间是否存在相同项目类型的项目单元时,可以首先获取参考项目类型统计表,参考项目类型统计表的具体获取方式上述已进行了详细的说明,因此此处不再赘述。
在本示例实施方式中,可以根据上述第一条件在参考项目类型统计表筛选出目标项目类型统计表,具体而言,将所有项目单元归类在上述参考项目类型统计表中,并计算每一个项目类型下归类的项目单元的数量,将数量大于等于2的项目类型筛选出来构成目标项目类型统计表;
在本示例实施方式中,根据上述目标项目类型统计表将多个项目内容拆分为共享功能单元和初始功能单元,具体而言,首先可以判断项目内容中各项目单元的参考项目类型是否能够归类到目标项目类型统计表中,将能够归类在目标项目类型统计表中的项目单元作为共享功能单元,将不能归类到目标项目类型统计表中的项目单元作为初始功能单元。
在本公开的另一种示例实施方式中,在上述第一条件是多个所述项目内容之间是否存在相同数据来源的项目单元时,可以首先获取参考数据来源列表,参考数据来源列表的具体获取方式上述已进行了详细的说明,因此此处不再赘述。
在本示例实施方式中,可以根据上述第一条件在参考数据来源列表筛选出目标数据来源列表,具体而言,将所有项目单元归类在上述参考数据来源列表中,并计算每一个数据来源下归类的项目单元的数量,将数量大于等于2的数据来源筛选出来构成目标数据来源列表;
在本示例实施方式中,根据上述目标数据来源列表将多个项目内容拆分为共享功能单元和初始功能单元,具体而言,首先可以判断项目内 容中各项目单元的参考数据来源是否能够归类到目标数据来源列表中,将能够归类在目标数据来源列表中的项目单元作为共享功能单元,将不能归类到目标数据来源列表中的项目单元作为初始功能单元。
在本示例实施方式中,经过按照预设规则进行拆分,可以将上述多个项目内容中的画屏应用程序、云端开放项目单元、画屏外部项目单元、画屏运营项目单元、微商项目单元、会员项目单元、内容项目单元、AI项目单元等作为初始功能单元,将上述多个应用程序共有的功能作为共享功能单元,如每一个项目内容中的用户项目单元、设备项目单元、活动项目单元、专题项目单元、推荐项目单元、记录项目单元、支付项目单元、短信项目单元等。
在步骤S140,将多个所述初始功能单元分别转化为初始业务聚合单元。
在本公开的一种示例实施方式中,参照图2所示,将上述多个单体架构210中的项目内容中的初始功能单元,即多个应用程序的初始功能单元转换为初始业务聚合单元230,例如将上述画屏应用程序项目单元、云端开放项目单元、画屏外部项目单元、画屏运营项目单元、微商项目单元、会员项目单元、内容项目单元、AI项目单元等分别转换为画屏应用程序业务聚合单元、云端开放业务聚合单元、画屏外部业务聚合单元、画屏运营业务聚合单元、微商业务聚合单元、会员业务聚合单元、内容业务聚合单元、AI业务聚合单元等。
在本示例实施方式中,单体架构可以是斯普瑞布特架构,转换得到的微服务架构可以是Spring Cloud集合,由于斯普瑞布特架构与Spring Cloud集合之间的版本存在一一对应关系,因此,在转换时可以首先判断单体架构的斯普瑞布特架构是都存在于之对应的Spring Cloud版本,若存在则直接将单体架构转换为Spring Cloud集合,若不存在,则需要对有单体架构的斯普瑞布特架构的版本进行升级以完成转换。在本示例实施方式中不对版本升级方式进行具体限定。
在步骤S150中,将多个所述共享功能单元整合为共享业务聚合单元,其中所述初始业务聚合单元能够访问所述共享业务聚合单元。
在本公开的一种示例实施方式中,可以首先获取个共享功能单元的 目标项目类型,然后将多个目标项目类型相同的共享功能单元整合转化为共享业务聚合单元。
在本公开的另一种示例实施方式中,可以首先获取个共享功能单元的目标数据来源,然后将多个目标数据来源相同的共享功能单元整合转化为共享业务聚合单元。在本示例实施方式中,不对将多个所述共享功能单元整合为共享业务聚合单元的具体方式进行限定。
在本公开的一种示例实施方式中,参照图2所示,可以将上述共享功能转换为与共享业务聚合单元240,例如,将上述每一个项目内容中的用户项目单元、设备项目单元、活动项目单元、专题项目单元、推荐项目单元、记录项目单元、支付项目单元、短信项目单元等整合转换为用户业务聚合单元、设备业务聚合单元、活动业务聚合单元、专题业务聚合单元、推荐业务聚合单元、记录业务聚合单元、支付业务聚合单元、短信业务聚合单元等。其中共享业务数据聚合单元240能够才能够数据集合260中获取所需的数据。
需要说明的是,上述用户项目单元、设备项目单元、活动项目单元、专题项目单元、推荐项目单元、记录项目单元、支付项目单元、短信项目单元的数量均为多个,且均对应不同的项目内容,整合转换后的用户业务聚合单元、设备业务聚合单元、活动业务聚合单元、专题业务聚合单元、推荐业务聚合单元、记录业务聚合单元、支付业务聚合单元、短信业务聚合单元的数量均为一个,且每一个聚合单元均包括多个项目单元,例如,用户业务聚合单元包括多个用户项目单元,其中多个用户项目单元均来源于不用的项目内容。
在本公开的一种示例实施方式中,在第一条件为多个项目内容之间是否存在相同项目类型的项目单元时,上述方法还可以包括获取共享业务聚合单元中各共享功能单元的目标数据来源,并根据目标数据来源形成参数列表,参数列表中包括多个参数项,每一个参数项对应一种目标数据来源,在工作时可以和根据目标数据来源调用相应的参数来完成共享业务聚合单元中各个共享功能单元功能的实现。
在公开的一种示例实施方式中,参照图3所示,初始业务聚合单元能够访问所述共享业务聚合单元可以包括步骤S310至步骤S320;下面 对步骤S310至步骤S320进行具体阐述。
在步骤S310中,建立所述共享业务聚合单元的业务数据库;
在本公开的一种示例实施方式中,参照图4所示,可以将建立一个业务数据库480来存储于共享业务聚合单元450相关的共享数据,将共享数据与共享业务聚合单元分离设置,能够保证数据的安全性,以及调用数据的准确性。
在步骤S320中,所述初始业务聚合单元能够在所述业务数据库中获取数据。
在本公开的一种示例实施方式中,参照图4所示,初始业务聚合单元440能够在业务数据库480中获取与初始业务聚合单元440相关的数据,以完成初始业务聚合单元440对共享业务聚合单元450的访问。
在本公开的一种示例实施方式中,可以参照图4所示,服务器可以首先建立共享业务聚合单元450的数据服务470功能,初始业务聚合单元440通过访问数据服务470功能从上述业务数据库480中来获取数据。建立数据服务470功能能够使得共享业务聚合单元450与数据完成分层,保证共享业务聚合服务450的独立与隔离,防止初始业务聚合服务440直接访问共享业务聚合服务450而造成的混乱。
在本公开的一种示例实施方式中,参照图4所示。本公开微服务处理方法还包括获取多个单体架构的项目内容中无法直接转换为微服务的非转换项目430,且非转换项目通过授权验证420的方式来访问共享业务聚合单元450和初始业务聚合单元440,即可以通过超文本传输和授权的方式调用上述共享业务聚合单元450和初始业务聚合单元440。同时一些外部请求服务410也可以通过授权验证420的方式来访问共享业务聚合单元450和初始业务聚合单元440。
具体而言,参照图2,可以将不满足第一条件的项目内容定义为非转换项目,然后服务器中配置非转换项目的授权码,可以通过网关层220进行授权码验证非转换项目能够通过授权验证的方式调用共享业务聚合单元以及初始业务聚合微单元。其中网关层具有把控权限、统计、限流、路由分发、监控以及负载均衡等相关功能,其中,权限把控是验证上述非转换项目是否具有访问权限,监控功能和统计功能用于统计功 能用于统计访问微服务架构的具体数量以及种类,并对其进行监测控制,限流功能时为了保证微服务架构的正常运行,防止微服务架构负载过多;负载均衡功能用于调整访问微服务架构的多台设备之间的权重,保证负载均衡。还可以建立服务层中间250,服务层中间250还可以包括消息队列功能和服务链路跟踪功能,以及缓存功能,其中消息队列可以提高访问速度。
在本公开的一种示例实施方式中,参照图4所示,本公开微服务处理方法还包括建立初始业务聚合单元440的源数据库460,上述的非转换项目430可以直接从源数据库460中获取与非转换项目对应的数据,以使得多个单体架构在转换为微服务架构后能够保留单体架构的所有功能。
在本示例实施方式中,参照图5所示,非转换项目可以包括各单体架构510的全球广域网(web服务器)521、中台服务522等,在本示例实施方式中不做具体限定。
具体而言,参照图5,非转换项目通过超文本传输和授权验证,经由Nginx服务器530,通过网关540的路由分发功能来访问初始业务聚合单元551和共享业务聚合单元552。同时非转换项目可以直接从初始业务聚合单元551的源数据库571中获取与非转换项目相关的数据。
在本示例实施方式中,业务数据源572可以包括用户数据库、设备数据以及内容数据库,业务数据库的数据分类是使得初始业务聚合单元和共享业务聚合单元在调取数据时能够快速准确的获取相应的数据。需要说明的是,对业务数据库中的数据的分类方式具有多种,在本示例实施方式中不对具体的分类方式做出限定。
在本公开的一种示例实施方式中,本公开微服务处理方法还包括获取各共享业务聚合单元和各初始业务聚合单元的IP地址和端口号,当需要调用共享业务聚合单元或者初始业务聚合单元时,只需要输入相应的端口号和IP地址即可完成访问。
在本示例实施方式中,在需要增加共享业务聚合单元或者初始业务聚合单元时,可以首先通过服务中间件注册一个新的单元的IP地址和端口号,并在共享业务聚合单元或者初始业务聚合单元列表中添加需要 的单元,在使用时,是通过端口号和IP地址进行访问的,访问共享业务聚合单元或者初始业务聚合单元的方式可以有多种,在本示例实施方式中不做具体限定。
在本示例实施方式中,参照图5所示,获取各共享业务聚合单元和各初始业务聚合单元的IP地址和端口号可以由服务中间层560完成,其中服务层中间还可以包括消息队列功能和服务链路跟踪功能,以及缓存功能,其中消息队列可以提高访问速度。
在本示例实施方式中,服务中间层还包括服务链路跟踪的功能,用于跟踪每个服务的调用或者访问所运行的路线并进行存储,以保障到故障时能够快速准确的定位并解决。
在本示例实施方式中,还可以设置一远程字典服务(Redis)580,远程字典服务580可以同时与源数据库、初始业务聚合单元以及共享业务聚合单元连接,用于对源数据库起到补充作用,同时提升读取和存储数据的速度。
以下介绍本公开的装置实施例,可以用于执行本公开上述的微服务处理方法。此外,在本公开的示例性实施方式中,还提供了一种微服务处理装置。参照图6所示,所述微服务处理装置600包括:获取模块610,判断模块620、拆分模块630、转化模块640以及整合模块650。
其中,所述获取模块610可以用于获取多个单体架构项目内容;所述判断模块620可以用于判断所述项目内容是否满足第一条件;判断模块630可以用于将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元;转化模块640可以用于将多个所述初始功能单元分别转化为初始业务聚合单元;整合模块650可以用于将多个所述共享功能单元转化为共享业务聚合单元,其中所述初始业务聚合单元单元能够访问所述共享业务聚合单元。
由于本公开的示例实施例的微服务处理装置的各个功能模块与上述微服务处理方法的示例实施例的步骤对应,因此对于本公开装置实施例中未披露的细节,请参照本公开上述的微服务处理方法的实施例。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的 实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
此外,在本公开的示例性实施例中,还提供了一种能够实现上述微服务处理的电子设备。
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施例、完全的软件实施例(包括固件、微代码等),或硬件和软件方面结合的实施例,这里可以统称为“电路”、“模块”或“系统”。
下面参照图7来描述根据本公开的这种实施例的电子设备700。图7显示的电子设备700仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图7所示,电子设备700以通用计算设备的形式表现。电子设备700的组件可以包括但不限于:上述至少一个处理单元710、上述至少一个存储单元720、连接不同系统组件(包括存储单元720和处理单元710)的总线730、显示单元740。
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元710执行,使得所述处理单元710执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施例的步骤。例如,所述处理单元710可以执行如图1中所示的步骤S110:获取多个单体架构项目内容;S120:判断所述项目内容是否满足第一条件;S130:将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元;S140:将多个所述初始功能单元分别转化为初始业务聚合单元;S150:用于将多个所述共享功能单元转化为共享业务聚合单元,其中所述初始业务聚合单元单元能够访问所述共享业务聚合单元。
又如,所述的电子设备可以实现如图1和图3所示的各个步骤。
存储单元720可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)721和/或高速缓存存储单元722,还可以进一步 包括只读存储单元(ROM)723。
存储单元720还可以包括具有一组(至少一个)程序模块725的程序/实用工具724,这样的程序模块725包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线730可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备700也可以与一个或多个外部设备770(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备700交互的设备通信,和/或与使得该电子设备700能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口750进行。并且,电子设备700还可以通过网络适配器760与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器760通过总线730与电子设备700的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备700使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施例的描述,本领域的技术人员易于理解,这里描述的示例实施例可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施例的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施例的方法。
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施例中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程 序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施例的步骤。
参照图8,描述了根据本公开的实施例的用于实现上述方法的程序产品800,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本公开的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部 分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
此外,上述附图仅是根据本公开示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。

Claims (12)

  1. 一种微服务处理方法,其中,包括:
    获取多个单体架构项目内容;
    判断所述项目内容是否满足第一条件;
    将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元;
    将多个所述初始功能单元分别转化为初始业务聚合单元;
    将多个所述共享功能单元整合为共享业务聚合单元,其中所述初始业务聚合单元能够访问所述共享业务聚合单元。
  2. 根据权利要求1所述的方法,其中,判断所述项目内容是否满足第一条件,包括:
    判断多个所述项目内容之间是否存在相同项目类型的项目单元;
    将存在相同类型项目单元的多个所述项目内容判定为满足所述第一条件。
  3. 根据权利要求2所述的方法,其中,将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元,包括:
    获取参考项目类型统计表,并根据所述第一条件筛选目标项目类型统计表;
    确定每一个所述项目内容中各所述项目单元的参考项目类型;
    根据所述参考项目类型和所述目标项目类型统计表将每一个所述项目内容拆分为共享功能单元与初始功能单元。
  4. 根据权利要求3所述的方法,其中,将多个所述共享功能单元整合为共享业务聚合单元,包括:
    获取各共享功能单元的目标项目类型;
    将所述目标项目类型相同的多个共享功能单元整合转化为共享业务聚合单元。
  5. 根据权利要求4所述的方法,其中,所述方法还包括:
    获取所述共享业务聚合单元中各共享功能单元的目标数据来源;
    根据所述目标数据来源形成参数列表,其中,所述参数列表包括多个参数项,每一个所述参数项对应一种所述目标数据来源。
  6. 根据权利要求1所述的方法,其中,判断所述项目内容是否满足第一条件,包括:
    判断多个所述项目内容之间是否存在数据来源相同的项目单元;
    将存在数据来源相同的项目单元的多个所述项目内容判定为满足所述第一条件。
  7. 根据权利要求6所述的方法,其中,将满足所述第一条件的每一个所述项目内容按照预设规则拆分为共享功能单元与初始功能单元,包括:
    获取参考数据来源列表,并根据所述第一条件筛选目标数据来源列表;
    确定每一个所述项目内容中各所述项目单元的参考数据来源;
    根据所述目标数据来源列表和所述参考数据来源将每一个所述项目内容拆分为共享功能单元与初始功能单元。
  8. 根据权利要求7所述的方法,其中,将多个所述共享功能单元整合为共享业务聚合单元,包括:
    获取各所述共享功能单元的目标数据来源;
    将所述目标数据来源相同的多个共享功能单元整合转化为共享业务聚合单元。
  9. 根据权利要求1所述的方法,其中,所述方法还包括:
    将不满足所述第一条件的项目内容定义为非转换项目;
    配置所述非转换项目的授权码,以使得所述非转换项目能够通过授权验证的方式调用所述共享业务聚合单元以及所述初始业务聚合微单元。
  10. 一种微服务处理装置,其中,包括:
    获取模块,用于获取多个单体架构项目内容;
    判断模块,用于判断所述项目内容是否满足第一条件;
    拆分模块,用于将满足所述第一条件的所述项目内容按照预设规则拆分为共享功能单元与初始功能单元;
    转化模块,用于将多个所述初始功能单元分别转化为初始业务聚合单元;
    整合模块,用于将多个所述共享功能单元转化为共享业务聚合单元, 其中所述初始业务聚合单元单元能够访问所述共享业务聚合单元。
  11. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1至9中任一项所述的微服务处理方法。
  12. 一种电子设备,其中,包括:
    处理器;以及
    存储器,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1至9中任一项所述的微服务处理方法。
PCT/CN2021/080303 2020-05-15 2021-03-11 微服务处理方法及装置、存储介质及电子设备 WO2021227636A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010415062.4 2020-05-15
CN202010415062.4A CN113672200A (zh) 2020-05-15 2020-05-15 微服务处理方法及装置、存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2021227636A1 true WO2021227636A1 (zh) 2021-11-18

Family

ID=78526281

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/080303 WO2021227636A1 (zh) 2020-05-15 2021-03-11 微服务处理方法及装置、存储介质及电子设备

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116644329A (zh) * 2023-03-15 2023-08-25 交通运输部规划研究院 综合交通运输规划行业的数据分级分类的方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168746A (zh) * 2017-05-27 2017-09-15 北京中电普华信息技术有限公司 一种微服务生成方法及装置
CN107391142A (zh) * 2017-07-26 2017-11-24 北京中电普华信息技术有限公司 一种应用拆分的方法及装置
US20190026085A1 (en) * 2017-07-21 2019-01-24 Accenture Global Solutions Limited Intelligent cloud engineering platform
CN110018822A (zh) * 2019-04-16 2019-07-16 山东浪潮通软信息科技有限公司 一种自动生成微服务功能的方法及系统
CN110287438A (zh) * 2019-06-19 2019-09-27 天津大学 一种基于微服务架构的跨界服务融合方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761870B2 (en) * 2003-03-06 2010-07-20 Sap Ag Methods and systems for generating an application consistent with a profile
JP2005190212A (ja) * 2003-12-25 2005-07-14 Toshiba Corp データベースシステム、データ処理方法及びプログラム
CN102332116A (zh) * 2011-08-05 2012-01-25 四川电力科学研究院 基于云计算SaaS服务模式的电能质量辅助服务系统及其实现方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168746A (zh) * 2017-05-27 2017-09-15 北京中电普华信息技术有限公司 一种微服务生成方法及装置
US20190026085A1 (en) * 2017-07-21 2019-01-24 Accenture Global Solutions Limited Intelligent cloud engineering platform
CN107391142A (zh) * 2017-07-26 2017-11-24 北京中电普华信息技术有限公司 一种应用拆分的方法及装置
CN110018822A (zh) * 2019-04-16 2019-07-16 山东浪潮通软信息科技有限公司 一种自动生成微服务功能的方法及系统
CN110287438A (zh) * 2019-06-19 2019-09-27 天津大学 一种基于微服务架构的跨界服务融合方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116644329A (zh) * 2023-03-15 2023-08-25 交通运输部规划研究院 综合交通运输规划行业的数据分级分类的方法和装置
CN116644329B (zh) * 2023-03-15 2024-02-13 交通运输部规划研究院 综合交通运输规划行业的数据分级分类的方法和装置

Also Published As

Publication number Publication date
CN113672200A (zh) 2021-11-19

Similar Documents

Publication Publication Date Title
US10447772B2 (en) Managed function execution for processing data streams in real time
US11836533B2 (en) Automated reconfiguration of real time data stream processing
US10169433B2 (en) Systems and methods for an SQL-driven distributed operating system
US9529657B2 (en) Techniques for generating diagnostic identifiers to trace events and identifying related diagnostic information
US11334589B2 (en) System and platform for computing and analyzing big data
US20120137309A1 (en) Workflow integration and portal systems and methods
US11658972B2 (en) Isolated cell architecture for cloud computing platform
US11381463B2 (en) System and method for a generic key performance indicator platform
US10938669B2 (en) Intelligent information adapter generation for service management
CN110532322A (zh) 运维交互方法、系统、计算机可读存储介质及设备
CN108269056A (zh) 政务信息资源管理系统
US20220035802A1 (en) Analytics center having a natural language query (nlq) interface
WO2021227636A1 (zh) 微服务处理方法及装置、存储介质及电子设备
Calderon et al. Monitoring framework for the performance evaluation of an IoT platform with Elasticsearch and Apache Kafka
CN114547175A (zh) 一种数据处理方法、装置、存储介质及计算机系统
CN102055779A (zh) 生成高可用性组的方法、设备及系统
CN116991929A (zh) 基于医院大数据的微服务系统
US20190332393A1 (en) Mainframe system structuring
US20230267478A1 (en) Event attribution for estimating down stream impact
CN117376346A (zh) 基于边缘计算与分布式计算的设备数据处理方法及装置
CN115803729A (zh) 中间件生成的记录的直接数据加载
Li et al. A quick response data collection and management system for digital twin production line based on cloud-fog-edge computing collaboration
CN118626467A (zh) 数据采集存储方法、装置、设备及存储介质
CN117390108A (zh) 一种集数据的组织、整合、治理、融合及分析的统计系统
Li et al. IOT big data process based on context temporal-spatial characteristics in petroleum products distribution

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21805040

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21805040

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 23/06/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21805040

Country of ref document: EP

Kind code of ref document: A1